Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
99e8eb11
MK
12016-01-22 Marcin Koƛcielnicki <koriakin@0x04.net>
2
3 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4 it works properly on big-endian machines where sizeof (CORE_ADDR)
5 != sizeof (void *).
6
a994041d
PA
72016-01-21 Pedro Alves <palves@redhat.com>
8
9 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
10 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
11 * configure: Regenerate.
12
f7a6a40d
YQ
132016-01-21 Yao Qi <yao.qi@linaro.org>
14
15 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
16 is_thumb and set it according to CPSR saved on the stack.
17 (get_next_pcs_syscall_next_pc): Pass is_thumb to
18 arm_sigreturn_next_pc.
19
6f69e520
YQ
202016-01-18 Yao Qi <yao.qi@linaro.org>
21
22 * linux-low.c (linux_set_pc_64bit): New function.
23 (linux_get_pc_64bit): New function.
24 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
25 Declare.
26 * linux-sparc-low.c (debug_threads): Remove declaration.
27 (sparc_get_pc): Remove.
28 (the_low_target): Use linux_get_pc_64bit instead of
29 sparc_get_pc.
30 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
31 (the_low_target): Use linux_get_pc_64bit and
32 linux_set_pc_64bit.
33
276d4552
YQ
342016-01-18 Yao Qi <yao.qi@linaro.org>
35
36 * linux-arm-low.c (debug_threads): Remove declaration.
37 (arm_get_pc, arm_set_pc): Remove.
38 (the_low_target): Use linux_get_pc_32bit and
39 linux_set_pc_32bit.
40 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
41 (the_low_target): Use linux_get_pc_32bit and
42 linux_set_pc_32bit.
43 * linux-cris-low.c (debug_threads): Remove declaration.
44 (cris_get_pc, cris_set_pc,): Remove.
45 (the_low_target): Use linux_get_pc_32bit and
46 linux_set_pc_32bit.
47 * linux-crisv32-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-low.c: Include inttypes.h.
52 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
53 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
54 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
55 (the_low_target): Use linux_get_pc_32bit and
56 linux_set_pc_32bit.
57 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
58 (the_low_target): Use linux_get_pc_32bit and
59 linux_set_pc_32bit.
60 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
61 (the_low_target): Use linux_get_pc_32bit and
62 linux_set_pc_32bit.
63 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
64 (the_low_target): Use linux_get_pc_32bit and
65 linux_set_pc_32bit.
66 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
67 (the_low_target): Use linux_get_pc_32bit and
68 linux_set_pc_32bit.
69
eb0edac8
GB
702016-01-18 Gary Benson <gbenson@redhat.com>
71
72 * configure.ac (AC_FUNC_FORK): New check.
73 * config.in: Regenerate.
74 * configure: Likewise.
75
1b451dda
YQ
762016-01-14 Yao Qi <yao.qi@linaro.org>
77
78 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
79 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
80 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
81 arm_get_next_pcs_ctor.
82
82075af2
JS
832016-01-12 Josh Stone <jistone@redhat.com>
84 Philippe Waroquiers <philippe.waroquiers@skynet.be>
85
86 * inferiors.h: Include "gdb_vecs.h".
87 (struct process_info): Add syscalls_to_catch.
88 * inferiors.c (remove_process): Free syscalls_to_catch.
89 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
90 syscall_return stops.
91 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
92 * server.c (handle_general_set): Handle QCatchSyscalls.
93 (handle_query): Report support for QCatchSyscalls.
94 * target.h (struct target_ops): Add supports_catch_syscall.
95 (target_supports_catch_syscall): New macro.
96 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
97 (struct lwp_info): Add syscall_state.
98 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
99 Maintain syscall_state and syscalls_to_catch across exec.
100 (get_syscall_trapinfo): New function, proxy to the_low_target.
101 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
102 (linux_low_filter_event): Toggle syscall_state entry/return for
103 syscall traps, and set it ignored for all others.
104 (gdb_catching_syscalls_p): New function.
105 (gdb_catch_this_syscall_p): New function.
106 (linux_wait_1): Handle SYSCALL_SIGTRAP.
107 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
108 (linux_supports_catch_syscall): New function.
109 (linux_target_ops): Install it.
110 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
111 (the_low_target): Install it.
112
8f13a3ce
MF
1132016-01-12 Mike Frysinger <vapier@gentoo.org>
114
115 * acinclude.m4: Include new ../warning.m4 file.
116 * configure: Regenerated.
117 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
118
5b3da067
MF
1192016-01-12 Mike Frysinger <vapier@gentoo.org>
120
121 * ax.c (is_goto_target): Mark static.
122 * linux-low.c (register_addr): Likewise.
123 (linux_fetch_registers, linux_store_registers): Likewise.
124 * mem-break.c (any_persistent_commands): Fix old prototype.
125 (add_commands_to_breakpoint): Mark static.
126 * regcache.c (find_register_by_name): Delete unused func.
127 * remote-utils.c (hex_or_minus_one): Mark static.
128 * server.c (monitor_show_help): Mark static.
129 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
130 handle_v_requests): Likewise.
131
bc504a31
PA
1322016-01-12 Pedro Alves <palves@redhat.com>
133
134 Remove use of the registered trademark symbol throughout.
135
5a0dd67a
YQ
1362016-01-08 Yao Qi <yao.qi@linaro.org>
137
138 * remote-utils.c (getpkt): If c is '\003', call target hook
139 request_interrupt.
140
b2ca446f
YQ
1412016-01-06 Yao Qi <yao.qi@linaro.org>
142
143 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
144 linux-aarch32-low.c.
145 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
146 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
147 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
148 (thumb2_breakpoint): Declare.
149 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
150 linux-aarch32-low.h.
151 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
152 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
153 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
154
edd88788
JB
1552016-01-01 Joel Brobecker <brobecker@adacore.com>
156
157 * gdbreplay.c (gdbreplay_version): Change copyright year in
158 version message.
159 * server.c (gdbserver_version): Likewise.
160
65da7f14
PP
1612015-12-28 Patrick Palka <patrick@parcs.ath.cx>
162
163 * server.c (crc32_table): Delete.
164 (crc32): Use libiberty's xcrc32 function.
165
4abd5ed2
JB
1662015-12-22 Joel Brobecker <brobecker@adacore.com>
167
168 * lynx-low.c (lynx_delete_thread_callback): New function.
169 (lynx_mourn): Properly delete our process and all of its
170 threads. Remove call to clear_inferiors.
171
0e50fe5c
JB
1722015-12-22 Joel Brobecker <brobecker@adacore.com>
173
174 * target.c (thread_search_callback): Add check that
175 the thread_stopped target callback is not NULL before
176 calling it.
177
35adc03f
YQ
1782015-12-21 Yao Qi <yao.qi@linaro.org>
179
180 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
181 arm breakpoint.
182
bd2b2909
AT
1832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
184
185 * server.c (handle_query): Call target_supports_software_single_step.
186
7fe5e27e
AT
1872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
188
189 * linux-low.c (single_step): New function.
190 (linux_resume_one_lwp_throw): Call single_step.
191 (start_step_over): Likewise.
192
d9311bfa
AT
1932015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
194
195 * Makefile.in (SFILES): Append arch/arm-linux.c,
196 arch/arm-get-next-pcs.c.
197 (arm-linux.o): New rule.
198 (arm-get-next-pcs.o): New rule.
199 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
200 arm-linux.o.
201 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
202 to linux-aarch32-low.c.
203 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
204 (arm_breakpoint_len, thumb_breakpoint): Likewise.
205 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
206 (thumb2_breakpoint_len): Likewise.
207 (arm_is_thumb_mode): Make non-static.
208 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
209 from linux-aarch32-low.c.
210 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
211 (arm_breakpoint_len, thumb_breakpoint): Likewise.
212 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
213 (thumb2_breakpoint_len): Likewise.
214 (arm_is_thumb_mode): New declaration.
215 * linux-arm-low.c: Include arch/arm-linux.h
216 aarch/arm-get-next-pcs.h, sys/syscall.h.
217 (get_next_pcs_ops): New struct.
218 (get_next_pcs_addr_bits_remove): New function.
219 (get_next_pcs_is_thumb): New function.
220 (get_next_pcs_read_memory_unsigned_integer): Likewise.
221 (arm_sigreturn_next_pc): Likewise.
222 (get_next_pcs_syscall_next_pc): Likewise.
223 (arm_gdbserver_get_next_pcs): Likewise.
224 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
225 Initialize.
226 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
227 * server.h: Include gdb_vecs.h.
228
68ce2059
AT
2292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
230
231 * Makefile.in (SFILES): Append common/common-regcache.c.
232 (OBS): Append common-regcache.o.
233 (common-regcache.o): New rule.
234 * regcache.c (init_register_cache): Initialize cache to
235 REG_UNAVAILABLE.
236 (regcache_raw_read_unsigned): New function.
237 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
238 register_status enum.
239
fa5308bd
AT
2402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
241
242 * linux-aarch64-low.c (the_low_targets): Rename
243 breakpoint_reinsert_addr to get_next_pcs.
244 * linux-arm-low.c (the_low_targets): Likewise.
245 * linux-bfin-low.c (the_low_targets): Likewise.
246 * linux-cris-low.c (the_low_targets): Likewise.
247 * linux-crisv32-low.c (the_low_targets): Likewise.
248 * linux-low.c (can_software_single_step): Likewise.
249 (install_software_single_step_breakpoints): New function.
250 (start_step_over): Use install_software_single_step_breakpoints.
251 * linux-low.h: New CORE_ADDR vector.
252 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
253 get_next_pcs.
254 * linux-mips-low.c (the_low_targets): Likewise.
255 * linux-nios2-low.c (the_low_targets): Likewise.
256 * linux-sparc-low.c (the_low_targets): Likewise.
257
4a6ed09b
PA
2582015-12-17 Pedro Alves <palves@redhat.com>
259
260 * linux-low.c (linux_kill_one_lwp): Remove references to
261 LinuxThreads.
262 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
263 to 'kill'.
264 (linux_init_signals): Delete.
265 (initialize_low): Adjust.
266 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
267
7544db95
PA
2682015-12-16 Pedro Alves <palves@redhat.com>
269
270 * configure.ac (compiler warning flags): When testing a
271 -Wno-foo option, check whether -Wfoo works instead.
272 * configure: Regenerate.
273
8020350c
DB
2742015-12-11 Don Breazeal <donb@codesourcery.com>
275
276 * server.c (process_serial_event): Don't exit from gdbserver
277 in remote mode if there are still active inferiors.
278
db91f502
YQ
2792015-12-11 Yao Qi <yao.qi@linaro.org>
280
281 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
282 arm_breakpoint_at if the process is 32-bit.
283
b37a6290
YQ
2842015-12-11 Yao Qi <yao.qi@linaro.org>
285
286 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
287 arm breakpoint.
288
17b1509a
YQ
2892015-12-07 Yao Qi <yao.qi@linaro.org>
290
291 * configure.srv: Append arm.o to srv_tgtobj for
292 aarch64*-*-linux* target.
293 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
294 from linux-arm-low.c.
295 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
296 (arm_breakpoint_len, thumb_breakpoint): Likewise.
297 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
298 (thumb2_breakpoint_len): Likewise.
299 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
300 (arm_breakpoint_kinds): Likewise.
301 (arm_breakpoint_kind_from_pc): Likewise.
302 (arm_sw_breakpoint_from_kind): Likewise.
303 (arm_breakpoint_kind_from_current_state): Likewise.
304 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
305 (arm_sw_breakpoint_from_kind): Declare.
306 (arm_breakpoint_kind_from_current_state): Declare.
307 (arm_breakpoint_at): Declare.
308 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
309 arm_sw_breakpoint_from_kind if process is 32-bit.
310 (aarch64_breakpoint_kind_from_pc): New function.
311 (aarch64_breakpoint_kind_from_current_state): New function.
312 (the_low_target): Initialize fields breakpoint_kind_from_pc
313 and breakpoint_kind_from_current_state.
314 * linux-arm-low.c (arm_breakpoint_kinds): Move to
315 linux-aarch32-low.c.
316 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
317 (arm_breakpoint, arm_breakpoint_len): Likewise.
318 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
319 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
320 (arm_is_thumb_mode): Likewise.
321 (arm_breakpoint_at): Likewise.
322 (arm_breakpoint_kind_from_pc): Likewise.
323 (arm_sw_breakpoint_from_kind): Likewise.
324 (arm_breakpoint_kind_from_current_state): Likewise.
325
326 Revert:
327 2015-08-04 Yao Qi <yao.qi@linaro.org>
328
329 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
330 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
331 * server.c (extended_protocol): Remove "static".
332 * server.h (extended_protocol): Declare it.
333
ece66d65
JS
3342015-12-04 Josh Stone <jistone@redhat.com>
335
336 * target.h (struct target_ops) <arch_setup>: Rename to ...
337 (struct target_ops) <post_create_inferior>: ... this.
338 (target_arch_setup): Rename to ...
339 (target_post_create_inferior): ... this, calling post_create_inferior.
340 * server.c (start_inferior): Update target_arch_setup calls to
341 target_post_create_inferior.
342 * linux-low.c (linux_low_ptrace_options): Forward declare.
343 (linux_arch_setup): Update its comment for general use.
344 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
345 (struct linux_target_ops): Use linux_post_create_inferior.
346 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
347 to post_create_inferior.
348 * nto-low.c (struct nto_target_ops): Likewise.
349 * spu-low.c (struct spu_target_ops): Likewise.
350 * win32-low.c (struct win32_target_ops): Likewise.
351
e58c48b4
AT
3522015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
353
354 * linux-arm-low.c: Remove duplicate arch/arm.h include.
355
fbec8956
AT
3562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
357
358 * linux-arm-low.c (arm_reinsert_addr): Remove function.
359 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
360 * linux-cris-low.c (cris_reinsert_addr> Remove function.
361 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
362 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
363 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
364 * linux-mips-low.c (mips_reinsert_addr): Remove function.
365 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
366 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
367 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
368 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
370
9b4c5f87
AT
3712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
372
373 * linux-low.c (linux_look_up_symbols): Don't call
374 linux_supports_traceclone.
375 * linux-low.h (thread_db_init): Remove use_events argument.
376 * thread-db.c (thread_db_use_event): Remove global variable.
377 (struct thread_db) <td_thr_event_enable_p>: Remove field.
378 (struct thread_db) <td_create_bp>: Remove field.
379 (thread_db_create_event): Remove function.
380 (thread_db_enable_reporting): Likewise.
381 (find_one_thread): Don't check for thread_db_use_events.
382 (attach_thread): Likewise.
383 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
384 (try_thread_db_load_1): Don't check for thread_db_use_events.
385 (thread_db_init): Remove use_events argument and thread events
386 handling.
387 (remove_thread_event_breakpoints): Remove function.
388 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
389
7d00775e
AT
3902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
391
392 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
393 New function.
394 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
395 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
397 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
398 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
399 Initialize.
400 * linux-crisv32-low.c (cris_supports_hardware_single_step):
401 New function.
402 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
403 * linux-low.c (can_hardware_single_step): Use
404 supports_hardware_single_step.
405 (can_software_single_step): New function.
406 (start_step_over): Call can_software_single_step.
407 (linux_supports_hardware_single_step): New function.
408 (struct target_ops) <supports_software_single_step>: Initialize.
409 * linux-low.h (struct linux_target_ops)
410 <supports_hardware_single_step>: Initialize.
411 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
412 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
413 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
414 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
415 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
416 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
417 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
418 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
419 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
420 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
421 Initialize.
422 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
423 (struct linux_target_ops) <tile_supports_hardware_single_step>:
424 Initialize.
425 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
427 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
428 New function.
429 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
430 * target.h (struct target_ops): <supports_software_single_step>:
431 New field.
432 (target_supports_software_single_step): New macro.
433
2d97cd35
AT
4342015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
435
436 * linux-low.c (linux_wait_1): Fix pc advance condition.
437 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
438 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
439
769ef81f
AT
4402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
441
442 * linux-arm-low.c (arm_is_thumb_mode): New function.
443 (arm_breakpoint_at): Use arm_is_thumb_mode.
444 (arm_breakpoint_kind_from_current_state): New function.
445 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
446 Initialize.
447 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
448 (linux_breakpoint_kind_from_current_state): New function.
449 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
450 * linux-low.h (struct linux_target_ops)
451 <breakpoint_kind_from_current_state>: New field.
452 * target.h (struct target_ops): Likewise.
453 (target_breakpoint_kind_from_current_state): New macro.
454
1bebeeca
PA
4552015-11-30 Pedro Alves <palves@redhat.com>
456
457 * linux-low.c (linux_resume): Wake up the event loop before
458 returning.
459
a67a9fae
PA
4602015-11-30 Pedro Alves <palves@redhat.com>
461
462 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
463 check.
464 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
465 to -1.
466 * target.c (struct thread_search): New structure.
467 (thread_search_callback): New function.
468 (prev_general_thread): New global.
469 (prepare_to_access_memory, done_accessing_memory): New functions.
470 * target.h (prepare_to_access_memory, done_accessing_memory):
471 Replace macros with function declarations.
472
f2faf941
PA
4732015-11-30 Pedro Alves <palves@redhat.com>
474
475 PR 14618
476 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
477 report TARGET_WAITKIND_NO_RESUMED.
478 * remote-utils.c (prepare_resume_reply): Handle
479 TARGET_WAITKIND_NO_RESUMED.
480 * server.c (report_no_resumed): New global.
481 (handle_query) <qSupported>: Handle "no-resumed+". Report
482 "no-resumed+" support.
483 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
484 return error if the client doesn't support no-resumed events.
485 (push_stop_notification): New function.
486 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
487 events if the client supports them.
488
a681f9c9
PA
4892015-11-30 Pedro Alves <palves@redhat.com>
490
491 * linux-low.c (thread_still_has_status_pending_p): Don't check
492 vCont;t here.
493 (lwp_resumed): New function.
494 (status_pending_p_callback): Return early if the LWP is not
495 supposed to be resumed.
496
65706a29
PA
4972015-11-30 Pedro Alves <palves@redhat.com>
498
499 * linux-low.c (handle_extended_wait): Assert that the LWP's
500 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
501 thread create events, leave the new child's status pending.
502 (linux_low_filter_event): If GDB wants to hear about thread exit
503 events, leave the LWP marked dead and don't delete it.
504 (linux_wait_for_event_filtered): Don't check for thread exit.
505 (filter_exit_event): New function.
506 (linux_wait_1): Use it, when returning an exit event.
507 (linux_resume_one_lwp_throw): Assert that the LWP's
508 waitstatus is TARGET_WAITKIND_IGNORE.
509 * remote-utils.c (prepare_resume_reply): Handle
510 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
511 * server.c (report_thread_events): New global.
512 (handle_general_set): Handle QThreadEvents.
513 (handle_query) <qSupported>: Handle and report QThreadEvents+;
514 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
515 TARGET_WAITKIND_THREAD_EXITED.
516 * server.h (report_thread_events): Declare.
517
56cf4bed
PA
5182015-11-30 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
521 the thread's last_resume_kind was resume_stop.
522
500c1d85
PA
5232015-11-30 Pedro Alves <palves@redhat.com>
524
525 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
526 before returning.
527
de979965
PA
5282015-11-30 Pedro Alves <palves@redhat.com>
529
530 * server.c (handle_v_requests): Handle vCtrlC.
531
34c65914
PA
5322015-11-30 Pedro Alves <palves@redhat.com>
533
534 * gdbthread.h (find_any_thread_of_pid): Declare.
535 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
536 functions.
537 * server.c (handle_query): If current_thread is NULL, look for
538 another thread of the selected process.
539
79efa585 5402015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 541 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
542
543 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
544 * server.c (handle_qxfer_threads_worker): Refactor to include thread
545 name in reply.
546 * target.h (struct target_ops) <thread_name>: New field.
547 (target_thread_name): New macro.
548
80d82c19
JB
5492015-11-23 Joel Brobecker <brobecker@adacore.com>
550
551 * regcache.h (regcache_invalidate_pid): Add declaration.
552 * regcache.c (regcache_invalidate_pid): New function, extracted
553 from regcache_invalidate.
554 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
555 Add trivial documentation comment.
556 * lynx-low.c: Use regcache_invalidate_pid instead of
557 regcache_invalidate.
558
64da5dd5
JB
5592015-11-23 Joel Brobecker <brobecker@adacore.com>
560
561 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
562 and Elf64_auxv_t if the target is Android.
563
37ce4055
DE
5642015-11-22 Doug Evans <xdje42@gmail.com>
565
566 * target.h: #include <sys/types.h>.
567
06e03fff
PA
5682015-11-19 Pedro Alves <palves@redhat.com>
569
570 * linux-low.c (linux_process_qsupported): Change prototype.
571 Adjust.
572 * linux-low.h (struct linux_target_ops) <process_qsupported>:
573 Change prototype.
574 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
575 and adjust to loop over all features.
576 * server.c (handle_query) <qSupported>: Adjust to call
577 target_process_qsupported once, passing it a vector of unprocessed
578 features.
579 * target.h (struct target_ops) <process_qsupported>: Change
580 prototype.
581 (target_process_qsupported): Adjust.
582
9a084706
PA
5832015-11-19 Pedro Alves <palves@redhat.com>
584
585 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
586 mode.
587 * configure: Regenerate.
588
dad44a1f
PA
5892015-11-19 Pedro Alves <palves@redhat.com>
590
591 * configure: Regenerate.
592
231c0592
YQ
5932015-11-19 Yao Qi <yao.qi@linaro.org>
594
595 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
596 type to uint32_t.
597
6c1c9a8b
YQ
5982015-11-19 Yao Qi <yao.qi@linaro.org>
599
600 * linux-aarch64-low.c (enum aarch64_operand_type): New.
601 (struct aarch64_operand): Move enum out.
602
9caa3311
YQ
6032015-11-19 Yao Qi <yao.qi@linaro.org>
604
605 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
606 struct user_fpsimd_state *.
607 (aarch64_store_fpregset): Likewise.
608
6a69a054
YQ
6092015-11-19 Yao Qi <yao.qi@linaro.org>
610
611 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
612 struct user_pt_regs *.
613 (aarch64_store_gregset): Likewise.
614
1798301e
PA
6152015-11-18 Pedro Alves <palves@redhat.com>
616
617 * Makefile.in (all_object_files): Add $IPA_OBJS.
618
ce7715e2
PA
6192015-11-17 Pedro Alves <palves@redhat.com>
620
621 * win32-low.c (win32_resume): Use gdb_signal_from_host,
622 GDB_SIGNAL_0 and gdb_signal_to_string.
623
c0879059
PA
6242015-11-17 Pedro Alves <palves@redhat.com>
625
626 * win32-low.c (handle_output_debug_string): Remove parameter.
627 (win32_kill): Remove our_status local and adjust call to
628 handle_output_debug_string.
629 (get_child_debug_event): Adjust call to
630 handle_output_debug_string.
631
1996e237
SM
6322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
633
634 * linux-mips-low.c (mips_fill_gregset): Add cast.
635 (mips_store_gregset): Likewise.
636 (mips_fill_fpregset): Likewise.
637 (mips_store_fpregset): Likewise.
638
cbec665b
SM
6392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * linux-mips-low.c (mips_add_watchpoint): Rename private to
642 priv.
643
eb3e3c67
SM
6442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
645
646 * linux-mips-low.c (mips_linux_new_thread): Change type of
647 watch_type to enum target_hw_bp_type.
648
171de4b8
SM
6492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
650
651 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
652 Change return type to arm_hwbp_type.
653
04248ead
SM
6542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
655
656 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
657 (arm_store_gregset): Likewise.
658 * linux-arm-low.c (arm_get_hwcap): Likewise.
659 (arm_read_description): Likewise.
660
04b3479c
SM
6612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
662
663 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
664
2bc84e8a
SM
6652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
666
667 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
668 (ppc_fill_vsxregset): Likewise.
669 (ppc_store_vsxregset): Likewise.
670 (ppc_fill_vrregset): Likewise.
671 (ppc_store_vrregset): Likewise.
672 (ppc_fill_evrregset): Likewise.
673 (ppc_store_evrregset): Likewise.
674
e6c5bb05
SM
6752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * linux-ppc-low.c (ppc_usrregs_info): Remove
678 forward-declaration.
679 (ppc_arch_setup): Move lower in file.
680
7ea45d72
SM
6812015-10-30 Simon Marchi <simon.marchi@ericsson.com>
682
683 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
684 (ps_pdwrite): Likewise.
685
69291610
HW
6862015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
687
688 * linux-arm-low.c (arm_new_thread): Move pointer dereference
689 to after assert checks.
690
b42945fd
SM
6912015-10-29 Simon Marchi <simon.marchi@ericsson.com>
692
693 * proc-service.c (ps_pdread): Add/adjust casts.
694 (ps_pdwrite): Add/adjust casts.
695
d6f85c84
SM
6962015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * server.c (handle_search_memory_1): Cast return value of
699 memmem.
700
f98cd059
SM
7012015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
702
703 * server.c (write_qxfer_response): Change type of data to
704 gdb_byte *.
705
d2412fa5
PA
7062015-10-29 Pedro Alves <palves@redhat.com>
707
708 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
709
c17414a2
PA
7102015-10-29 Pedro Alves <palves@redhat.com>
711
712 * tracepoint.c (clear_installed_tracepoints): Add casts.
713
e053fbc4
PA
7142015-10-29 Pedro Alves <palves@redhat.com>
715
716 * server.c (handle_v_cont, process_serial_event): Add enum
717 gdb_signal casts to signal parsing code.
718
add67df8
PA
7192015-10-29 Pedro Alves <palves@redhat.com>
720
721 * linux-low.h (NULL_REGSET): Define.
722 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
723 * linux-arm-low.c (arm_regsets): Likewise.
724 * linux-crisv32-low.c (cris_regsets): Likewise.
725 * linux-m68k-low.c (m68k_regsets): Likewise.
726 * linux-mips-low.c (mips_regsets): Likewise.
727 * linux-nios2-low.c (nios2_regsets): Likewise.
728 * linux-ppc-low.c (ppc_regsets): Likewise.
729 * linux-s390-low.c (s390_regsets): Likewise.
730 * linux-sh-low.c (sh_regsets): Likewise.
731 * linux-sparc-low.c (sparc_regsets): Likewise.
732 * linux-tic6x-low.c (tic6x_regsets): Likewise.
733 * linux-tile-low.c (tile_regsets): Likewise.
734 * linux-x86-low.c (x86_regsets): Likewise.
735 * linux-xtensa-low.c (xtensa_regsets): Likewise.
736
50bc912a
PA
7372015-10-29 Pedro Alves <palves@redhat.com>
738
739 * linux-low.h (NULL_REGSET): Define.
740 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
741 * linux-arm-low.c (arm_regsets): Likewise.
742 * linux-crisv32-low.c (cris_regsets): Likewise.
743 * linux-m68k-low.c (m68k_regsets): Likewise.
744 * linux-mips-low.c (mips_regsets): Likewise.
745 * linux-nios2-low.c (nios2_regsets): Likewise.
746 * linux-ppc-low.c (ppc_regsets): Likewise.
747 * linux-s390-low.c (s390_regsets): Likewise.
748 * linux-sh-low.c (sh_regsets): Likewise.
749 * linux-sparc-low.c (sparc_regsets): Likewise.
750 * linux-tic6x-low.c (tic6x_regsets): Likewise.
751 * linux-tile-low.c (tile_regsets): Likewise.
752 * linux-x86-low.c (x86_regsets): Likewise.
753 * linux-xtensa-low.c (xtensa_regsets): Likewise.
754
682b2546
DE
7552015-10-26 Doug Evans <dje@google.com>
756
757 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
758
963843d4
DE
7592015-10-26 Doug Evans <dje@google.com>
760
761 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
762
d41401ac
DE
7632015-10-26 Doug Evans <dje@google.com>
764
765 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
766 for debug_printf.
767 (attach_thread, find_new_threads_callback): Ditto.
768
3db28855
AT
7692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
770
771 * mem-break.h (set_breakpoint_data): Remove.
772
fb78e89c
AT
7732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
774
775 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
776 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
777 (initialize_low): Remove set_breakpoint_data call.
778 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
779 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
780 (initialize_low): Remove set_breakpoint_data call.
781 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
782 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
783 (initialize_low): Remove set_breakpoint_data call.
784
2e6ee069
AT
7852015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
786
787 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
788 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
789 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
790 * target.h (target_breakpoint_kind_from_pc): New macro.
791
1652a986
AT
7922015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
793
794 * linux-low.c (default_breakpoint_kind_from_pc): New function.
795 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
796 the default breakpoint kind.
797
abeead09
AT
7982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
799
800 * linux-arm-low.c (arm_supports_z_point_type): Add software
801 breakpoint support.
802
b0b4b501
AT
8032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
804
805 * linux-arm-low.c: Refactor breakpoint definitions.
806 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
807 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
808
8689682c
AT
8092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
810
811 * Makefile.in: Add arm.c/o.
812 * configure.srv: Likewise.
813 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
814 (arm_breakpoint_kind_from_pc): New function.
815 (arm_sw_breakpoint_from_kind): Return proper kind.
816 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
817
27165294
AT
8182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
819
820 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
821 removal.
822 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
823 (struct raw_breakpoint) <size>: Remove.
824 (struct raw_breakpoint) <kind>: Add.
825 (bp_size): New function.
826 (bp_opcode): Likewise.
827 (find_raw_breakpoint_at): Adjust for kind.
828 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
829 (remove_memory_breakpoint): Adjust for kind call bp_size.
830 (set_raw_breakpoint_at): Adjust for kind.
831 (set_breakpoint): Likewise.
832 (set_breakpoint_at): Call breakpoint_kind_from_pc.
833 (delete_raw_breakpoint): Adjust for kind.
834 (delete_breakpoint): Likewise.
835 (find_gdb_breakpoint): Likewise.
836 (set_gdb_breakpoint_1): Likewise.
837 (set_gdb_breakpoint): Likewise.
838 (delete_gdb_breakpoint_1): Likewise.
839 (delete_gdb_breakpoint): Likewise.
840 (uninsert_raw_breakpoint): Likewise.
841 (reinsert_raw_breakpoint): Likewise.
842 (set_breakpoint_data): Remove.
843 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
844 (check_mem_read): Adjust for kind call bp_size.
845 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
846 (clone_one_breakpoint): Adjust for kind.
847 * mem-break.h (set_gdb_breakpoint): Likewise.
848 (delete_gdb_breakpoint): Likewise.
849 * server.c (process_serial_event): Likewise.
850
dd373349
AT
8512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
852
853 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
854 (struct linux_target_ops) <breakpoint>: Remove.
855 (struct linux_target_ops) <breakpoint_len>: Remove.
856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
858 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
859 (arm_sw_breakpoint_from_kind): New function.
860 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
861 (struct linux_target_ops) <breakpoint>: Remove.
862 (struct linux_target_ops) <breakpoint_len>: Remove.
863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
865 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
866 (struct linux_target_ops) <breakpoint>: Remove.
867 (struct linux_target_ops) <breakpoint_len>: Remove.
868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
870 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
871 (struct linux_target_ops) <breakpoint>: Remove.
872 (struct linux_target_ops) <breakpoint_len>: Remove.
873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
875 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
876 and sw_breakpoint_from_kind to increment the pc.
877 (linux_breakpoint_kind_from_pc): New function.
878 (linux_sw_breakpoint_from_kind): New function.
879 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
880 (initialize_low): Call breakpoint_kind_from_pc and
881 sw_breakpoint_from_kind to replace breakpoint_data/len.
882 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
883 New field.
884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
885 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
886 (struct linux_target_ops) <breakpoint>: Remove.
887 (struct linux_target_ops) <breakpoint_len>: Remove.
888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
890 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
891 (struct linux_target_ops) <breakpoint>: Remove.
892 (struct linux_target_ops) <breakpoint_len>: Remove.
893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
895 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
896 (struct linux_target_ops) <breakpoint>: Remove.
897 (struct linux_target_ops) <breakpoint_len>: Remove.
898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
900 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
901 (struct linux_target_ops) <breakpoint>: Remove.
902 (struct linux_target_ops) <breakpoint_len>: Remove.
903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
905 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
906 (struct linux_target_ops) <breakpoint>: Remove.
907 (struct linux_target_ops) <breakpoint_len>: Remove.
908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
910 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
911 (struct linux_target_ops) <breakpoint>: Remove.
912 (struct linux_target_ops) <breakpoint_len>: Remove.
913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
915 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
916 (struct linux_target_ops) <breakpoint>: Remove.
917 (struct linux_target_ops) <breakpoint_len>: Remove.
918 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
919 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
920 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
921 (struct linux_target_ops) <breakpoint>: Remove.
922 (struct linux_target_ops) <breakpoint_len>: Remove.
923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
925 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
926 (struct linux_target_ops) <breakpoint>: Remove.
927 (struct linux_target_ops) <breakpoint_len>: Remove.
928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
930 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
931 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
932 (struct linux_target_ops) <breakpoint>: Remove.
933 (struct linux_target_ops) <breakpoint_len>: Remove.
934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
936 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
937 (struct linux_target_ops) <breakpoint>: Remove.
938 (struct linux_target_ops) <breakpoint_len>: Remove.
939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
941
4cd98a19
AT
9422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
943
944 * linux-cris-low.c (cris_get_pc): Remove void arg.
945
774ee6d2
AR
9462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
947
948 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
949 variable name.
950
833dcd29
AR
9512015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
952
953 * inferiors.c (thread_pid_matches_callback): New function.
954 (find_thread_process): New function.
955 (remove_thread): Reset current_thread.
956 (remove_process): Assert threads have been removed first.
957
8d689ee5
YQ
9582015-10-15 Yao Qi <yao.qi@linaro.org>
959
960 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
961 if it is 3.
962 (aarch64_remove_point): Likewise.
963 * regcache.c (regcache_register_size): New function.
964
1c2e1515
YQ
9652015-10-12 Yao Qi <yao.qi@linaro.org>
966
967 * linux-aarch64-low.c: Update all callers as emit_load_store
968 is renamed to aarch64_emit_load_store.
969
e1c587c3
YQ
9702015-10-12 Yao Qi <yao.qi@linaro.org>
971
972 * linux-aarch64-low.c: Update all callers of function renaming
973 from emit_insn to aarch64_emit_insn.
974
b6542f81
YQ
9752015-10-12 Yao Qi <yao.qi@linaro.org>
976
977 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
978 arch/aarch64-insn.h.
979 (struct aarch64_memory_operand): Likewise.
980 (ENCODE): Likewise.
981 (emit_insn): Move to arch/aarch64-insn.c.
982 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
983 (emit_load_store): Move to arch/aarch64-insn.c.
984 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
985 (can_encode_int32): Remove.
986
246994ce
YQ
9872015-10-12 Yao Qi <yao.qi@linaro.org>
988
989 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
990 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
991 (aarch64_relocate_instruction): Likewise.
992 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
993 (struct aarch64_insn_visitor): Likewise.
994
0badd99f
YQ
9952015-10-12 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch64-low.c (struct aarch64_insn_data): New.
998 (struct aarch64_insn_visitor): New.
999 (struct aarch64_insn_relocation_data): New.
1000 (aarch64_ftrace_insn_reloc_b): New function.
1001 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1002 (aarch64_ftrace_insn_reloc_cb): Likewise.
1003 (aarch64_ftrace_insn_reloc_tb): Likewise.
1004 (aarch64_ftrace_insn_reloc_adr): Likewise.
1005 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1006 (aarch64_ftrace_insn_reloc_others): Likewise.
1007 (visitor): New.
1008 (aarch64_relocate_instruction): Use visitor.
1009
dfaffe9d
YQ
10102015-10-12 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1013 int. Add argument buf.
1014 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1015 aarch64_relocate_instruction.
1016
70b439f0
YQ
10172015-10-12 Yao Qi <yao.qi@linaro.org>
1018
1019 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1020 argument insn. Remove local variable insn. Don't call
1021 target_read_uint32.
1022 (aarch64_install_fast_tracepoint_jump_pad): Call
1023 target_read_uint32.
1024
7781c06f
YQ
10252015-09-30 Yao Qi <yao.qi@linaro.org>
1026
1027 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1028 (emit_load_store_pair): Likewise.
1029
9a3c8263
SM
10302015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1031
1032 * dll.c (match_dll): Add cast(s).
1033 (unloaded_dll): Likewise.
1034 * linux-low.c (second_thread_of_pid_p): Likewise.
1035 (delete_lwp_callback): Likewise.
1036 (count_events_callback): Likewise.
1037 (select_event_lwp_callback): Likewise.
1038 (linux_set_resume_request): Likewise.
1039 * server.c (accumulate_file_name_length): Likewise.
1040 (emit_dll_description): Likewise.
1041 (handle_qxfer_threads_worker): Likewise.
1042 (visit_actioned_threads): Likewise.
1043 * thread-db.c (any_thread_of): Likewise.
1044 * tracepoint.c (same_process_p): Likewise.
1045 (match_blocktype): Likewise.
1046 (build_traceframe_info_xml): Likewise.
1047
224c3ddb
SM
10482015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1051 assignment.
1052 (gdb_unparse_agent_expr): Likewise.
1053 * hostio.c (require_data): Likewise.
1054 (handle_pread): Likewise.
1055 * linux-low.c (disable_regset): Likewise.
1056 (fetch_register): Likewise.
1057 (store_register): Likewise.
1058 (get_dynamic): Likewise.
1059 (linux_qxfer_libraries_svr4): Likewise.
1060 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1061 (set_fast_tracepoint_jump): Likewise.
1062 (uninsert_fast_tracepoint_jumps_at): Likewise.
1063 (reinsert_fast_tracepoint_jumps_at): Likewise.
1064 (validate_inserted_breakpoint): Likewise.
1065 (clone_agent_expr): Likewise.
1066 * regcache.c (init_register_cache): Likewise.
1067 * remote-utils.c (putpkt_binary_1): Likewise.
1068 (decode_M_packet): Likewise.
1069 (decode_X_packet): Likewise.
1070 (look_up_one_symbol): Likewise.
1071 (relocate_instruction): Likewise.
1072 (monitor_output): Likewise.
1073 * server.c (handle_search_memory): Likewise.
1074 (handle_qxfer_exec_file): Likewise.
1075 (handle_qxfer_libraries): Likewise.
1076 (handle_qxfer): Likewise.
1077 (handle_query): Likewise.
1078 (handle_v_cont): Likewise.
1079 (handle_v_run): Likewise.
1080 (captured_main): Likewise.
1081 * target.c (write_inferior_memory): Likewise.
1082 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1083 * tracepoint.c (init_trace_buffer): Likewise.
1084 (add_tracepoint_action): Likewise.
1085 (add_traceframe): Likewise.
1086 (add_traceframe_block): Likewise.
1087 (cmd_qtdpsrc): Likewise.
1088 (cmd_qtdv): Likewise.
1089 (cmd_qtstatus): Likewise.
1090 (response_source): Likewise.
1091 (response_tsv): Likewise.
1092 (cmd_qtnotes): Likewise.
1093 (gdb_collect): Likewise.
1094 (initialize_tracepoint): Likewise.
1095
afbe19f8
PL
10962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1097
1098 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1099 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1100 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1101 <NOP>: New.
1102 (enum aarch64_condition_codes): New enum.
1103 (w0): New static global.
1104 (fp): Likewise.
1105 (lr): Likewise.
1106 (struct aarch64_memory_operand) <type>: New
1107 MEMORY_OPERAND_POSTINDEX type.
1108 (postindex_memory_operand): New helper function.
1109 (emit_ret): New function.
1110 (emit_load_store_pair): New function, factored out of emit_stp
1111 with support for MEMORY_OPERAND_POSTINDEX.
1112 (emit_stp): Rewrite using emit_load_store_pair.
1113 (emit_ldp): New function.
1114 (emit_load_store): Likewise.
1115 (emit_ldr): Mention post-index instruction in comment.
1116 (emit_ldrh): New function.
1117 (emit_ldrb): New function.
1118 (emit_ldrsw): Mention post-index instruction in comment.
1119 (emit_str): Likewise.
1120 (emit_subs): New function.
1121 (emit_cmp): Likewise.
1122 (emit_and): Likewise.
1123 (emit_orr): Likewise.
1124 (emit_orn): Likewise.
1125 (emit_eor): Likewise.
1126 (emit_mvn): Likewise.
1127 (emit_lslv): Likewise.
1128 (emit_lsrv): Likewise.
1129 (emit_asrv): Likewise.
1130 (emit_mul): Likewise.
1131 (emit_sbfm): Likewise.
1132 (emit_sbfx): Likewise.
1133 (emit_ubfm): Likewise.
1134 (emit_ubfx): Likewise.
1135 (emit_csinc): Likewise.
1136 (emit_cset): Likewise.
1137 (emit_nop): Likewise.
1138 (emit_ops_insns): New helper function.
1139 (emit_pop): Likewise.
1140 (emit_push): Likewise.
1141 (aarch64_emit_prologue): New function.
1142 (aarch64_emit_epilogue): Likewise.
1143 (aarch64_emit_add): Likewise.
1144 (aarch64_emit_sub): Likewise.
1145 (aarch64_emit_mul): Likewise.
1146 (aarch64_emit_lsh): Likewise.
1147 (aarch64_emit_rsh_signed): Likewise.
1148 (aarch64_emit_rsh_unsigned): Likewise.
1149 (aarch64_emit_ext): Likewise.
1150 (aarch64_emit_log_not): Likewise.
1151 (aarch64_emit_bit_and): Likewise.
1152 (aarch64_emit_bit_or): Likewise.
1153 (aarch64_emit_bit_xor): Likewise.
1154 (aarch64_emit_bit_not): Likewise.
1155 (aarch64_emit_equal): Likewise.
1156 (aarch64_emit_less_signed): Likewise.
1157 (aarch64_emit_less_unsigned): Likewise.
1158 (aarch64_emit_ref): Likewise.
1159 (aarch64_emit_if_goto): Likewise.
1160 (aarch64_emit_goto): Likewise.
1161 (aarch64_write_goto_address): Likewise.
1162 (aarch64_emit_const): Likewise.
1163 (aarch64_emit_call): Likewise.
1164 (aarch64_emit_reg): Likewise.
1165 (aarch64_emit_pop): Likewise.
1166 (aarch64_emit_stack_flush): Likewise.
1167 (aarch64_emit_zero_ext): Likewise.
1168 (aarch64_emit_swap): Likewise.
1169 (aarch64_emit_stack_adjust): Likewise.
1170 (aarch64_emit_int_call_1): Likewise.
1171 (aarch64_emit_void_call_2): Likewise.
1172 (aarch64_emit_eq_goto): Likewise.
1173 (aarch64_emit_ne_goto): Likewise.
1174 (aarch64_emit_lt_goto): Likewise.
1175 (aarch64_emit_le_goto): Likewise.
1176 (aarch64_emit_gt_goto): Likewise.
1177 (aarch64_emit_ge_got): Likewise.
1178 (aarch64_emit_ops_impl): New static global variable.
1179 (aarch64_emit_ops): New target function, return
1180 &aarch64_emit_ops_impl.
1181 (struct linux_target_ops): Install it.
1182
bb903df0
PL
11832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1184
1185 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1186 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1187 aarch64-ipa.o.
1188 * linux-aarch64-ipa.c: New file.
1189 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1190 and endian.h.
1191 (aarch64_get_thread_area): New target method.
1192 (extract_signed_bitfield): New helper function.
1193 (aarch64_decode_ldr_literal): New function.
1194 (enum aarch64_opcodes): New enum.
1195 (struct aarch64_register): New struct.
1196 (struct aarch64_operand): New struct.
1197 (x0): New static global.
1198 (x1): Likewise.
1199 (x2): Likewise.
1200 (x3): Likewise.
1201 (x4): Likewise.
1202 (w2): Likewise.
1203 (ip0): Likewise.
1204 (sp): Likewise.
1205 (xzr): Likewise.
1206 (aarch64_register): New helper function.
1207 (register_operand): Likewise.
1208 (immediate_operand): Likewise.
1209 (struct aarch64_memory_operand): New struct.
1210 (offset_memory_operand): New helper function.
1211 (preindex_memory_operand): Likewise.
1212 (enum aarch64_system_control_registers): New enum.
1213 (ENCODE): New macro.
1214 (emit_insn): New helper function.
1215 (emit_b): New function.
1216 (emit_bcond): Likewise.
1217 (emit_cb): Likewise.
1218 (emit_tb): Likewise.
1219 (emit_blr): Likewise.
1220 (emit_stp): Likewise.
1221 (emit_ldp_q_offset): Likewise.
1222 (emit_stp_q_offset): Likewise.
1223 (emit_load_store): Likewise.
1224 (emit_ldr): Likewise.
1225 (emit_ldrsw): Likewise.
1226 (emit_str): Likewise.
1227 (emit_ldaxr): Likewise.
1228 (emit_stxr): Likewise.
1229 (emit_stlr): Likewise.
1230 (emit_data_processing_reg): Likewise.
1231 (emit_data_processing): Likewise.
1232 (emit_add): Likewise.
1233 (emit_sub): Likewise.
1234 (emit_mov): Likewise.
1235 (emit_movk): Likewise.
1236 (emit_mov_addr): Likewise.
1237 (emit_mrs): Likewise.
1238 (emit_msr): Likewise.
1239 (emit_sevl): Likewise.
1240 (emit_wfe): Likewise.
1241 (append_insns): Likewise.
1242 (can_encode_int32_in): New helper function.
1243 (aarch64_relocate_instruction): New function.
1244 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1245 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1246 (struct linux_target_ops): Install aarch64_get_thread_area,
1247 aarch64_install_fast_tracepoint_jump_pad and
1248 aarch64_get_min_fast_tracepoint_insn_len.
1249
787749ea
PL
12502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1251
1252 * Makefile.in (aarch64-insn.o): New rule.
1253 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1254
9812b2e6
YQ
12552015-09-21 Yao Qi <yao.qi@linaro.org>
1256
1257 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1258
18fe412b
YQ
12592015-09-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * tracepoint.c (max_jump_pad_size): Remove.
1262
a0cc84cd
YQ
12632015-09-18 Yao Qi <yao.qi@linaro.org>
1264
1265 * linux-aarch64-low.c: Don't include sys/uio.h.
1266 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1267
d78908cf
WW
12682015-09-16 Wei-cheng Wang <cole945@gmail.com>
1269
1270 * tracepoint.c (eval_result_type): Change prototype.
1271 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1272
d57e0d50
PA
12732015-09-15 Pedro Alves <palves@redhat.com>
1274
1275 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1276 Check whether to report exec events instead of checking whether
1277 multiprocess is enabled.
1278
5a676acc
PA
12792015-09-15 Pedro Alves <palves@redhat.com>
1280
1281 PR remote/18965
1282 * remote-utils.c (prepare_resume_reply): Merge
1283 TARGET_WAITKIND_VFORK_DONE switch case with the
1284 TARGET_WAITKIND_FORKED case.
1285
7c5d0fad
YQ
12862015-09-15 Yao Qi <yao.qi@linaro.org>
1287
1288 * server.c (handle_query): Check string comparison using
1289 "else if" instead of "if".
1290
750ce8d1
YQ
12912015-09-15 Yao Qi <yao.qi@linaro.org>
1292
1293 * server.c (vCont_supported): New global variable.
1294 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1295 matches. Append ";vContSupported+" to own_buf.
1296 (handle_v_requests): Append ";s;S" to own_buf if target supports
1297 hardware single step or vCont_supported is false.
1298 (capture_main): Set vCont_supported to zero.
1299
70b90b91
YQ
13002015-09-15 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1303 it to ...
1304 (linux_supports_hardware_single_step): ... New function.
1305 (linux_target_ops): Update.
1306 * lynx-low.c (lynx_target_ops): Set field
1307 supports_hardware_single_step to target_can_do_hardware_single_step.
1308 * nto-low.c (nto_target_ops): Likewise.
1309 * spu-low.c (spu_target_ops): Likewise.
1310 * win32-low.c (win32_target_ops): Likewise.
1311 * target.c (target_can_do_hardware_single_step): New function.
1312 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1313 Remove. <supports_hardware_single_step>: New field.
1314 (target_supports_conditional_breakpoints): Remove.
1315 (target_supports_hardware_single_step): New macro.
1316 (target_can_do_hardware_single_step): Declare.
1317 * server.c (handle_query): Use target_supports_hardware_single_step
1318 instead of target_supports_conditional_breakpoints.
1319
ade90bde
YQ
13202015-09-15 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1323 function.
1324 (struct linux_target_ops the_low_target): Install
1325 aarch64_linux_siginfo_fixup.
1326
94585166
DB
13272015-09-11 Don Breazeal <donb@codesourcery.com>
1328 Luis Machado <lgustavo@codesourcery.com>
1329
1330 * linux-low.c (linux_mourn): Static declaration.
1331 (linux_arch_setup): Move in front of
1332 handle_extended_wait.
1333 (linux_arch_setup_thread): New function.
1334 (handle_extended_wait): Handle exec events. Call
1335 linux_arch_setup_thread. Make event_lwp argument a
1336 pointer-to-a-pointer.
1337 (check_zombie_leaders): Do not check stopped threads.
1338 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1339 (linux_low_filter_event): Add lwp and thread for exec'ing
1340 non-leader thread if leader thread has been deleted.
1341 Refactor code into linux_arch_setup_thread and call it.
1342 Pass child lwp pointer by reference to handle_extended_wait.
1343 (linux_wait_for_event_filtered): Update comment.
1344 (linux_wait_1): Prevent clobbering exec event status.
1345 (linux_supports_exec_events): New function.
1346 (linux_target_ops) <supports_exec_events>: Initialize new member.
1347 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1348 new member.
1349 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1350 * server.c (report_exec_events): New global variable.
1351 (handle_query): Handle qSupported query for exec-events feature.
1352 (captured_main): Initialize report_exec_events.
1353 * server.h (report_exec_events): Declare new global variable.
1354 * target.h (struct target_ops) <supports_exec_events>: New
1355 member.
1356 (target_supports_exec_events): New macro.
1357 * win32-low.c (win32_target_ops) <supports_exec_events>:
1358 Initialize new member.
1359
0568462b
MM
13602015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1361
1362 * linux-low.c (linux_low_enable_btrace): Remove.
1363 (linux_target_ops): Replace linux_low_enable_btrace with
1364 linux_enable_btrace.
1365
39edd165
YQ
13662015-09-03 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-aarch64-low.c (aarch64_insert_point): Call
1369 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1370 returns true.
1371
1db33b5a
UW
13722015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1373
1374 * linux-low.c (check_stopped_by_breakpoint): Use
1375 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1376
ab290430
PA
13772015-08-27 Pedro Alves <palves@redhat.com>
1378
1379 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1380
8d749320
SM
13812015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1382
6711b7f8
SM
1383 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1384 the XNEW-family equivalent.
8d749320
SM
1385 (compile_bytecodes): Likewise.
1386 * dll.c (loaded_dll): Likewise.
1387 * event-loop.c (append_callback_event): Likewise.
1388 (create_file_handler): Likewise.
1389 (create_file_event): Likewise.
1390 * hostio.c (handle_open): Likewise.
1391 * inferiors.c (add_thread): Likewise.
1392 (add_process): Likewise.
1393 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1394 * linux-arm-low.c (arm_new_process): Likewise.
1395 (arm_new_thread): Likewise.
1396 * linux-low.c (add_to_pid_list): Likewise.
1397 (linux_add_process): Likewise.
1398 (handle_extended_wait): Likewise.
1399 (add_lwp): Likewise.
1400 (enqueue_one_deferred_signal): Likewise.
1401 (enqueue_pending_signal): Likewise.
1402 (linux_resume_one_lwp_throw): Likewise.
1403 (linux_resume_one_thread): Likewise.
1404 (linux_read_memory): Likewise.
1405 (linux_write_memory): Likewise.
1406 * linux-mips-low.c (mips_linux_new_process): Likewise.
1407 (mips_linux_new_thread): Likewise.
1408 (mips_add_watchpoint): Likewise.
1409 * linux-x86-low.c (initialize_low_arch): Likewise.
1410 * lynx-low.c (lynx_add_process): Likewise.
1411 * mem-break.c (set_raw_breakpoint_at): Likewise.
1412 (set_breakpoint): Likewise.
1413 (add_condition_to_breakpoint): Likewise.
1414 (add_commands_to_breakpoint): Likewise.
1415 (clone_agent_expr): Likewise.
1416 (clone_one_breakpoint): Likewise.
1417 * regcache.c (new_register_cache): Likewise.
1418 * remote-utils.c (look_up_one_symbol): Likewise.
1419 * server.c (queue_stop_reply): Likewise.
1420 (start_inferior): Likewise.
1421 (queue_stop_reply_callback): Likewise.
1422 (handle_target_event): Likewise.
1423 * spu-low.c (fetch_ppc_memory): Likewise.
1424 (store_ppc_memory): Likewise.
1425 * target.c (set_target_ops): Likewise.
1426 * thread-db.c (thread_db_load_search): Likewise.
1427 (try_thread_db_load_1): Likewise.
1428 * tracepoint.c (add_tracepoint): Likewise.
1429 (add_tracepoint_action): Likewise.
1430 (create_trace_state_variable): Likewise.
1431 (cmd_qtdpsrc): Likewise.
1432 (cmd_qtro): Likewise.
1433 (add_while_stepping_state): Likewise.
1434 * win32-low.c (child_add_thread): Likewise.
1435 (get_image_name): Likewise.
1436
ed8b7b42
YQ
14372015-08-25 Yao Qi <yao.qi@linaro.org>
1438
1439 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1440
db3cb7cb
YQ
14412015-08-25 Yao Qi <yao.qi@linaro.org>
1442
1443 * Makefile.in (aarch64-linux.o): New rule.
1444 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1445 srv_tgtobj.
1446 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1447 (aarch64_init_debug_reg_state): Make it extern.
1448 (aarch64_linux_prepare_to_resume): Remove.
1449
f6011a1c
YQ
14502015-08-25 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1453 lwp_arch_private_info and ptid_of_lwp.
1454
88e2cf7e
YQ
14552015-08-25 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1458 Find proc_info by find_process_pid. All callers updated.
1459
5e35436e
YQ
14602015-08-25 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1463 Remove.
1464 (debug_reg_change_callback): Remove.
1465 (aarch64_notify_debug_reg_change): Remove.
1466
4a8a7965
YQ
14672015-08-25 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1470 Call current_lwp_ptid.
1471
32a271ee
YQ
14722015-08-25 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-aarch64-low.c (debug_reg_change_callback): Use
1475 debug_printf.
1476
0d51c8d7
YQ
14772015-08-25 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1480
31a43dd5
YQ
14812015-08-25 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1484
8ee52567
YQ
14852015-08-25 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1488 the code.
1489
ff3f0f45
YQ
14902015-08-25 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1493 Remove.
1494 (debug_reg_change_callback): Remove argument entry and add argument
1495 lwp. Remove local variable thread. Don't print thread id in the
1496 debugging output. Don't check whether pid of thread equals to pid.
1497 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1498 iterate_over_lwps instead find_inferior.
1499
3d40fbb5
PA
15002015-08-24 Pedro Alves <palves@redhat.com>
1501
1502 * inferiors.c (get_first_process): New function.
1503 * inferiors.h (get_first_process): New declaration.
1504 * remote-utils.c (read_ptid): Default to the first process in the
1505 list, instead of to the current thread's process.
1506
438e1e42
PA
15072015-08-24 Pedro Alves <palves@redhat.com>
1508
1509 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1510 * event-loop.c: Likewise.
1511 * remote-utils.c: Likewise.
1512 * tracepoint.c: Likewise.
1513
a8c6d4fc
PA
15142015-08-24 Pedro Alves <palves@redhat.com>
1515
1516 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1517 ptid_get_lwp.
1518
99b0bb12
PA
15192015-08-21 Pedro Alves <palves@redhat.com>
1520
1521 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1522 instead of literal 1.
1523
f8904751
PA
15242015-08-21 Pedro Alves <palves@redhat.com>
1525
1526 * tdesc.c (default_description): Explicitly zero-initialize.
1527
465a859e
PA
15282015-08-21 Pedro Alves <palves@redhat.com>
1529
1530 PR gdb/18749
1531 * inferiors.c (remove_thread): Discard any pending stop reply for
1532 this thread.
1533 * server.c (remove_all_on_match_pid): Rename to ...
1534 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1535 instead of a pid.
1536 (discard_queued_stop_replies): Change parameter to a ptid. Now
1537 extern.
1538 (handle_v_kill, kill_inferior_callback, captured_main)
1539 (process_serial_event): Adjust.
1540 * server.h (discard_queued_stop_replies): Declare.
1541
f0db101d
PA
15422015-08-21 Pedro Alves <palves@redhat.com>
1543
1544 * linux-low.c (wait_for_sigstop): Always switch to no thread
1545 selected if the previously current thread dies.
1546 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1547 process instead of the current thread's.
1548 * remote-utils.c (input_interrupt): Don't check if there's no
1549 current thread.
1550 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1551 current thread to the general thread fails, error out.
1552 (handle_qxfer_auxv, handle_qxfer_libraries)
1553 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1554 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1555 (handle_query): Check if there's a thread selected instead of
1556 checking whether there's any thread in the thread list.
1557 (handle_qxfer_threads, handle_qxfer_btrace)
1558 (handle_qxfer_btrace_conf): Don't error out early if there's no
1559 thread in the thread list.
1560 (handle_v_cont, myresume): Don't set the current thread to the
1561 continue thread.
1562 (process_serial_event) <Hg handling>: Also set thread_id if the
1563 previous general thread is still alive.
1564 (process_serial_event) <g/G handling>: If setting the current
1565 thread to the general thread fails, error out.
1566 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1567 thread's lwp instead of the current thread's.
1568 * target.c (set_desired_thread): If the desired thread was not
1569 found, leave the current thread pointing to NULL. Return an int
1570 (boolean) indicating success.
1571 * target.h (set_desired_thread): Change return type to int.
1572
40045d91
MF
15732015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1574
1575 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1576 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1577 #includes.
1578 (ps_get_thread_area): New function.
1579
45face3b
GB
15802015-08-19 Gary Benson <gbenson@redhat.com>
1581
1582 * hostio.c (handle_pread): Do not attempt to read more data
1583 than hostio_reply_with_data can fit in a packet.
1584
16d5f642
JB
15852015-08-18 Joel Brobecker <brobecker@adacore.com>
1586
1587 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1588
a738da3a
MF
15892015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1590
1591 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1592
33ebda9d
PA
15932015-08-06 Pedro Alves <palves@redhat.com>
1594
1595 * tracepoint.c (expr_eval_result): Now an int.
1596
a44892be
PA
15972015-08-06 Pedro Alves <palves@redhat.com>
1598
1599 * gdbthread.h (struct regcache): Forward declare.
1600 (struct thread_info) <regcache_data>: Now a struct regcache
1601 pointer.
1602 * inferiors.c (inferior_regcache_data)
1603 (set_inferior_regcache_data): Now work with struct regcache
1604 pointers.
1605 * inferiors.h (struct regcache): Forward declare.
1606 (inferior_regcache_data, set_inferior_regcache_data): Now work
1607 with struct regcache pointers.
1608 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1609 (free_register_cache_thread): Remove struct regcache pointer
1610 casts.
1611
608a1e46
PA
16122015-08-06 Pedro Alves <palves@redhat.com>
1613
1614 * server.c (captured_main): On error, print the exception message
1615 to stderr, and if run_once is set, throw a quit.
1616
f0ce0d3a
PA
16172015-08-06 Pedro Alves <palves@redhat.com>
1618
1619 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1620 the current thread.
1621
bf47e248
PA
16222015-08-06 Pedro Alves <palves@redhat.com>
1623
1624 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1625 reading beyond the passed in buffer length.
1626
b6b9ffcc
PL
16272015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1628
1629 * tracepoint.c (symbol_list) <required>: Remove.
1630
863d01bd
PA
16312015-08-06 Pedro Alves <palves@redhat.com>
1632
1633 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1634 count if stopping and suspending threads.
1635 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1636 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1637 (linux_detach): Complete an ongoing step-over.
1638 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1639 throughout.
1640 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1641 (linux_wait_1): If passing a signal to the inferior after
1642 finishing a step-over, unsuspend and re-resume all lwps. If we
1643 see a single-step event but the thread should be continuing, don't
1644 pass the trap to gdb.
1645 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1646 internal_error instead of gdb_assert.
1647 (enqueue_pending_signal): New function.
1648 (check_ptrace_stopped_lwp_gone): Add debug output.
1649 (start_step_over): Use internal_error instead of gdb_assert.
1650 (complete_ongoing_step_over): New function.
1651 (linux_resume_one_thread): Don't resume a suspended thread.
1652 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1653 it stepping.
1654
00db26fa
PA
16552015-08-06 Pedro Alves <palves@redhat.com>
1656
1657 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1658 (linux_thread_alive): Use lwp_is_marked_dead.
1659 (extended_event_reported): Delete.
1660 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1661 instead of extended_event_reported.
1662 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1663 as well.
1664 (lwp_is_marked_dead): New function.
1665 (lwp_running): Use lwp_is_marked_dead.
1666 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1667 comment.
1668
ad071a30
PA
16692015-08-06 Pedro Alves <palves@redhat.com>
1670
1671 * linux-low.c (linux_wait_1): Move fork event output out of the
1672 !report_to_gdb check. Pass event_child->waitstatus to
1673 target_waitstatus_to_string instead of ourstatus.
1674
524b57e6
YQ
16752015-08-04 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1678 if current_thread is 32 bit.
1679
6085d6f6
YQ
16802015-08-04 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1683 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1684 * server.c (extended_protocol): Remove "static".
1685 * server.h (extended_protocol): Declare it.
1686
8a7e4587
YQ
16872015-08-04 Yao Qi <yao.qi@linaro.org>
1688
1689 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1690 both aarch64 and aarch32.
1691 (aarch64_set_pc): Likewise.
1692
3b53ae99
YQ
16932015-08-04 Yao Qi <yao.qi@linaro.org>
1694
1695 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1696 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1697 arm-with-neon.xml to srv_xmlfiles.
1698 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1699 (is_64bit_tdesc): New function.
1700 (aarch64_linux_read_description): New function.
1701 (aarch64_arch_setup): Call aarch64_linux_read_description.
1702 (regs_info): Rename to regs_info_aarch64.
1703 (aarch64_regs_info): Return right regs_info.
1704 (initialize_low_arch): Call initialize_low_arch_aarch32.
1705
bd9e6534
YQ
17062015-08-04 Yao Qi <yao.qi@linaro.org>
1707
1708 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1709 * linux-aarch32-low.c: New file.
1710 * linux-aarch32-low.h: New file.
1711 * linux-arm-low.c (arm_fill_gregset): Move it to
1712 linux-aarch32-low.c.
1713 (arm_store_gregset): Likewise.
1714 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1715 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1716 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1717 (regs_info): Rename to regs_info_arm.
1718 (arm_regs_info): Return regs_info_aarch32 if
1719 have_ptrace_getregset is 1 and target description is
1720 arm_with_neon or arm_with_vfpv3.
1721 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1722 Call initialize_low_arch_aarch32 instead.
1723
ded48a5e
YQ
17242015-08-04 Yao Qi <yao.qi@linaro.org>
1725
1726 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1727 * linux-low.c: ... here.
1728 * linux-low.h (have_ptrace_getregset): Declare it.
1729
96e9210f
PA
17302015-08-04 Pedro Alves <palves@redhat.com>
1731
1732 * thread-db.c (struct thread_db): Use new typedefs.
1733 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1734 CHK calls.
1735 (disable_thread_event_reporting): Cast result of dlsym to
1736 destination function pointer type.
1737 (thread_db_mourn): Use td_ta_delete_ftype.
1738
af60a1ef
SL
17392015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1740
1741 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1742 arch variant.
1743 (CDX_BREAKPOINT): Define for R2.
1744 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1745 (the_low_target): Add comments.
1746
e8b41681
YQ
17472015-07-30 Yao Qi <yao.qi@linaro.org>
1748
1749 * linux-arm-low.c (arm_hwcap): Remove it.
1750 (arm_read_description): New local variable arm_hwcap. Don't
1751 set arm_hwcap to zero.
1752
89abb039
YQ
17532015-07-30 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1756 Use regcache->tdesc instead.
1757 (arm_store_wmmxregset): Likewise.
1758 (arm_fill_vfpregset): Likewise.
1759 (arm_store_vfpregset): Likewise.
1760
deca266c
YQ
17612015-07-30 Yao Qi <yao.qi@linaro.org>
1762
1763 * linux-arm-low.c: Include arch/arm.h.
1764 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1765 (arm_store_gregset): Likewise.
1766
aa58a496
SM
17672015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1768
1769 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1770 ptrace's 4th parameter.
1771
50904b25
YQ
17722015-07-27 Yao Qi <yao.qi@linaro.org>
1773
1774 * configure.srv (case aarch64*-*-linux*): Don't set
1775 srv_linux_usrregs.
1776
5826e159
PA
17772015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1778
1779 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1780 sys/ptrace.h.
1781 * linux-arm-low.c: Likewise.
1782 * linux-cris-low.c: Likewise.
1783 * linux-crisv32-low.c: Likewise.
1784 * linux-low.c: Likewise.
1785 * linux-m68k-low.c: Likewise.
1786 * linux-mips-low.c: Likewise.
1787 * linux-nios2-low.c: Likewise.
1788 * linux-s390-low.c: Likewise.
1789 * linux-sparc-low.c: Likewise.
1790 * linux-tic6x-low.c: Likewise.
1791 * linux-tile-low.c: Likewise.
1792 * linux-x86-low.c: Likewise.
1793
54019719
PA
17942015-07-24 Pedro Alves <palves@redhat.com>
1795
1796 * config.in: Regenerate.
1797 * configure: Regenerate.
1798
eb7aa561
PA
17992015-07-24 Pedro Alves <palves@redhat.com>
1800
1801 * acinclude.m4: Include ../ptrace.m4.
1802 * configure.ac: Call GDB_AC_PTRACE.
1803 * config.in, configure: Regenerate.
1804
55d7b841
YQ
18052015-07-24 Yao Qi <yao.qi@linaro.org>
1806
1807 * linux-low.c (linux_create_inferior): Remove setting to
1808 proc->priv->new_inferior.
1809 (linux_attach): Likewise.
1810 (linux_low_filter_event): Likewise.
1811 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1812
c06cbd92
YQ
18132015-07-24 Yao Qi <yao.qi@linaro.org>
1814
1815 * linux-low.c (linux_arch_setup): New function.
1816 (linux_low_filter_event): If proc->tdesc is NULL and
1817 proc->attached is true, call the_low_target.arch_setup.
1818 Otherwise, keep status pending, and return.
1819 (linux_resume_one_lwp_throw): Don't call get_pc if
1820 thread->while_stepping isn't NULL. Don't call
1821 get_thread_regcache if proc->tdesc is NULL.
1822 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1823 (linux_target_ops): Install arch_setup.
1824 * server.c (start_inferior): Call the_target->arch_setup.
1825 * target.h (struct target_ops) <arch_setup>: New field.
1826 (target_arch_setup): New marco.
1827 * lynx-low.c (lynx_target_ops): Update.
1828 * nto-low.c (nto_target_ops): Update.
1829 * spu-low.c (spu_target_ops): Update.
1830 * win32-low.c (win32_target_ops): Update.
1831
5ae3ebba
YQ
18322015-07-24 Yao Qi <yao.qi@linaro.org>
1833
1834 * linux-low.c (linux_add_process): Don't set
1835 proc->priv->new_inferior.
1836 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1837 (linux_attach): Likewise.
1838
eb97750b
YQ
18392015-07-24 Yao Qi <yao.qi@linaro.org>
1840
1841 * server.c (start_inferior): Code refactor.
1842
51aee833
YQ
18432015-07-24 Yao Qi <yao.qi@linaro.org>
1844
1845 * server.c (process_serial_event): Set general_thread.
1846
af1b22f3
YQ
18472015-07-21 Yao Qi <yao.qi@linaro.org>
1848
1849 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1850 aarch64_linux_get_debug_reg_capacity.
1851
554717a3
YQ
18522015-07-17 Yao Qi <yao.qi@linaro.org>
1853
1854 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1855 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1856 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1857 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1858 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1859 (AARCH64_HWP_ALIGNMENT): Likewise.
1860 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1861 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1862 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1863 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1864 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1865 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1866 (struct aarch64_debug_reg_state): Likewise.
1867 (struct arch_lwp_info): Likewise.
1868 (aarch64_align_watchpoint): Likewise.
1869 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1870 (aarch64_watchpoint_length): Likewise.
1871 (aarch64_point_encode_ctrl_reg): Likewise
1872 (aarch64_point_is_aligned): Likewise.
1873 (aarch64_align_watchpoint): Likewise.
1874 (aarch64_linux_set_debug_regs):
1875 (aarch64_dr_state_insert_one_point): Likewise.
1876 (aarch64_dr_state_remove_one_point): Likewise.
1877 (aarch64_handle_breakpoint): Likewise.
1878 (aarch64_handle_aligned_watchpoint): Likewise.
1879 (aarch64_handle_unaligned_watchpoint): Likewise.
1880 (aarch64_handle_watchpoint): Likewise.
1881
c67ca4de
YQ
18822015-07-17 Yao Qi <yao.qi@linaro.org>
1883
1884 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1885 and don't aarch64_get_debug_reg_state. All callers update.
1886 (aarch64_handle_aligned_watchpoint): Likewise.
1887 (aarch64_handle_unaligned_watchpoint): Likewise.
1888 (aarch64_handle_watchpoint): Likewise.
1889 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1890 (aarch64_remove_point): Likewise.
1891
25abf979
YQ
18922015-07-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1895 debug_printf.
1896 (aarch64_handle_unaligned_watchpoint): Likewise.
1897
db1ff28b
JK
18982015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1899
1900 Revert the previous 3 commits:
1901 Move gdb_regex* to common/
1902 Move linux_find_memory_regions_full & co.
1903 gdbserver build-id attribute generator
1904
700ca40f
JK
19052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1906 Jan Kratochvil <jan.kratochvil@redhat.com>
1907
1908 gdbserver build-id attribute generator.
1909 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1910 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1911 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1912 (find_phdr): New.
1913 (get_dynamic): Use find_pdhr to traverse program headers.
1914 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1915 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1916 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1917 (get_hex_build_id): New.
1918 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1919 to reply XML document.
1920
9904185c
JK
19212015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1922 Jan Kratochvil <jan.kratochvil@redhat.com>
1923
1924 * target.c: Include target/target-utils.h and fcntl.h.
1925 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1926 (target_fileio_read_stralloc): New functions.
1927
6e5b4429
JK
19282015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1929
1930 * Makefile.in (OBS): Add gdb_regex.o.
1931 (gdb_regex.o): New.
1932 * config.in: Rebuilt.
1933 * configure: Rebuilt.
1934
ddc98fbf
JK
19352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1936 Jan Kratochvil <jan.kratochvil@redhat.com>
1937
1938 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1939 * Makefile.in (OBS): Add target-utils.o.
1940 (linux-maps.o, target-utils.o): New.
1941 * configure.srv (srv_linux_obj): Add linux-maps.o.
1942
e57bb7a0
PL
19432015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1944
1945 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1946 function, return 1.
1947 (the_low_target): Install it.
1948
586b02a9
PA
19492015-07-14 Pedro Alves <palves@redhat.com>
1950
1951 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1952 Instead, ignore ECHILD, and throw an error for other errnos.
1953
58c1b36c
PA
19542015-07-10 Pedro Alves <palves@redhat.com>
1955
1956 * event-loop.c (struct callback_event) <data>: Change type to
1957 gdb_client_data instance instead of gdb_client_data pointer.
1958 (append_callback_event): Adjust.
1959
421530db
PL
19602015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1961
1962 * linux-aarch64-low.c: Add comments for each linux_target_ops
1963 method. Remove comments already covered in target_ops and
1964 linux_target_ops definitions.
1965 (the_low_target): Add comments for each unimplemented method.
1966
c2d65f38
YQ
19672015-07-09 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-aarch64-low.c (aarch64_regmap): Remove.
1970 (aarch64_usrregs_info): Remove.
1971 (regs_info): Set field usrregs to NULL.
1972
b20a6524
MM
19732015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1974
1975 * linux-low.c: Include "rsp-low.h"
1976 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1977 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1978 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1979 (handle_btrace_enable_pt): New.
1980 (handle_btrace_general_set): Support "pt".
1981 (handle_btrace_conf_general_set): Support "pt:size".
1982
96c97461
PL
19832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1984
1985 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1986 Z_PACKET_SW_BP.
1987
37d66942
PL
19882015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1989
1990 * linux-aarch64-low.c: Remove comment about endianness.
1991 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1992 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1993 memcmp.
1994
dc06243f
GB
19952015-06-24 Gary Benson <gbenson@redhat.com>
1996
1997 * linux-i386-ipa.c (stdint.h): Do not include.
1998 * lynx-i386-low.c (stdint.h): Likewise.
1999 * lynx-ppc-low.c (stdint.h): Likewise.
2000 * mem-break.c (stdint.h): Likewise.
2001 * thread-db.c (stdint.h): Likewise.
2002 * tracepoint.c (stdint.h): Likewise.
2003 * win32-low.c (stdint.h): Likewise.
2004
124e13d9
SM
20052015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2006
2007 * server.c (write_qxfer_response): Update call to
2008 remote_escape_output.
2009
909c2cda
JK
20102015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2011 Jan Kratochvil <jan.kratochvil@redhat.com>
2012
2013 Merge multiple hex conversions.
2014 * gdbreplay.c (tohex): Rename to 'fromhex'.
2015 (logchar): Use fromhex.
2016
24c05f46
JK
20172015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2018
2019 * server.c (handle_qxfer_libraries): Set `version' attribute for
2020 <library-list>.
2021
14d2069a
GB
20222015-06-10 Gary Benson <gbenson@redhat.com>
2023
2024 * target.h (struct target_ops) <multifs_open>: New field.
2025 <multifs_unlink>: Likewise.
2026 <multifs_readlink>: Likewise.
2027 * linux-low.c (nat/linux-namespaces.h): New include.
2028 (linux_target_ops): Initialize the_target->multifs_open,
2029 the_target->multifs_unlink and the_target->multifs_readlink.
2030 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2031 * hostio.c (hostio_fs_pid): New static variable.
2032 (hostio_handle_new_gdb_connection): New function.
2033 (handle_setfs): Likewise.
2034 (handle_open): Use the_target->multifs_open as appropriate.
2035 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2036 (handle_readlink): Use the_target->multifs_readlink as
2037 appropriate.
2038 (handle_vFile): Handle vFile:setfs packets.
2039 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2040 after target_handle_new_gdb_connection.
2041
4b8b5e72
GB
20422015-06-10 Gary Benson <gbenson@redhat.com>
2043
2044 * configure.ac (AC_CHECK_FUNCS): Add setns.
2045 * config.in: Regenerate.
2046 * configure: Likewise.
2047 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2048 (linux-namespaces.o): New rule.
2049 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2050
3ac2e371
GB
20512015-06-09 Gary Benson <gbenson@redhat.com>
2052
2053 * hostio.c (handle_open): Process mode argument with
2054 fileio_to_host_mode.
2055
ca9b78ce
YQ
20562015-06-01 Yao Qi <yao.qi@linaro.org>
2057
2058 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2059 * linux-x86-low.c: Likewise.
2060
bfacd19d
DB
20612015-05-28 Don Breazeal <donb@codesourcery.com>
2062
2063 * linux-low.c (handle_extended_wait): Initialize
2064 thread_info.last_resume_kind for new fork children.
2065
452003ef
PA
20662015-05-15 Pedro Alves <palves@redhat.com>
2067
2068 * target.h (target_handle_new_gdb_connection): Rewrite using if
2069 wrapped in do/while.
2070
1041a03c
JB
20712015-05-14 Joel Brobecker <brobecker@adacore.com>
2072
2073 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2074 * configure, config.in: Regenerate.
2075 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2076 Declare typedef.
2077
c269dbdb
DB
20782015-05-12 Don Breazeal <donb@codesourcery.com>
2079
2080 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2081 PTRACE_EVENT_VFORK_DONE.
2082 (linux_low_ptrace_options, extended_event_reported): Add vfork
2083 events.
2084 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2085 and "vforkdone" for RSP 'T' Stop Reply Packet.
2086 * server.h (report_vfork_events): Declare
2087 global variable.
2088
3a8a0396
DB
20892015-05-12 Don Breazeal <donb@codesourcery.com>
2090
2091 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2092 (the_low_target) <new_fork>: Initialize new member.
2093 * linux-arm-low.c (arm_new_fork): New function.
2094 (the_low_target) <new_fork>: Initialize new member.
2095 * linux-low.c (handle_extended_wait): Call new target function
2096 new_fork.
2097 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2098 * linux-mips-low.c (mips_add_watchpoint): New function
2099 extracted from mips_insert_point.
2100 (the_low_target) <new_fork>: Initialize new member.
2101 (mips_linux_new_fork): New function.
2102 (mips_insert_point): Call mips_add_watchpoint.
2103 * linux-x86-low.c (x86_linux_new_fork): New function.
2104 (the_low_target) <new_fork>: Initialize new member.
2105
de0d863e
DB
21062015-05-12 Don Breazeal <donb@codesourcery.com>
2107
2108 * linux-low.c (handle_extended_wait): Implement return value,
2109 rename argument 'event_child' to 'event_lwp', handle
2110 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2111 (linux_low_ptrace_options): New function.
2112 (linux_low_filter_event): Call linux_low_ptrace_options,
2113 use different argument fo linux_enable_event_reporting,
2114 use return value from handle_extended_wait.
2115 (extended_event_reported): New function.
2116 (linux_wait_1): Call extended_event_reported and set
2117 status to report fork events.
2118 (linux_write_memory): Add pid to debug message.
2119 (reset_lwp_ptrace_options_callback): New function.
2120 (linux_handle_new_gdb_connection): New function.
2121 (linux_target_ops): Initialize new structure member.
2122 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2123 * lynx-low.c: Initialize new structure member.
2124 * remote-utils.c (prepare_resume_reply): Implement stop reason
2125 "fork" for "T" stop message.
2126 * server.c (handle_query): Call handle_new_gdb_connection.
2127 * server.h (report_fork_events): Declare global flag.
2128 * target.h (struct target_ops) <handle_new_gdb_connection>:
2129 New member.
2130 (target_handle_new_gdb_connection): New macro.
2131 * win32-low.c: Initialize new structure member.
2132
ddcbc397
DB
21332015-05-12 Don Breazeal <donb@codesourcery.com>
2134
2135 * mem-break.c (APPEND_TO_LIST): Define macro.
2136 (clone_agent_expr): New function.
2137 (clone_one_breakpoint): New function.
2138 (clone_all_breakpoints): New function.
2139 * mem-break.h: Declare new functions.
2140
89245bc0
DB
21412015-05-12 Don Breazeal <donb@codesourcery.com>
2142
2143 * linux-low.c (linux_supports_fork_events): New function.
2144 (linux_supports_vfork_events): New function.
2145 (linux_target_ops): Initialize new structure members.
2146 (initialize_low): Call linux_check_ptrace_features.
2147 * lynx-low.c (lynx_target_ops): Initialize new structure
2148 members.
2149 * server.c (report_fork_events, report_vfork_events):
2150 New global flags.
2151 (handle_query): Add new features to qSupported packet and
2152 response.
2153 (captured_main): Initialize new global variables.
2154 * target.h (struct target_ops) <supports_fork_events>:
2155 New member.
2156 <supports_vfork_events>: New member.
2157 (target_supports_fork_events): New macro.
2158 (target_supports_vfork_events): New macro.
2159 * win32-low.c (win32_target_ops): Initialize new structure
2160 members.
2161
835205d0
GB
21622015-05-12 Gary Benson <gbenson@redhat.com>
2163
2164 * server.c (handle_qxfer_exec_file): Use current process
2165 if annex is empty.
2166
21e94bd9
SL
21672015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2168
2169 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2170 Remove HAVE_PTRACE_GETREGS conditionals.
2171 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2172 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2173
45614f15
YQ
21742015-05-08 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-low.c (linux_supports_conditional_breakpoints): New
2177 function.
2178 (linux_target_ops): Install new target method.
2179 * lynx-low.c (lynx_target_ops): Install NULL hook for
2180 supports_conditional_breakpoints.
2181 * nto-low.c (nto_target_ops): Likewise.
2182 * spu-low.c (spu_target_ops): Likewise.
2183 * win32-low.c (win32_target_ops): Likewise.
2184 * server.c (handle_query): Check
2185 target_supports_conditional_breakpoints.
2186 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2187 New field.
2188 (target_supports_conditional_breakpoints): New macro.
2189
80ad801e
PA
21902015-05-06 Pedro Alves <palves@redhat.com>
2191
2192 PR server/18081
2193 * server.c (start_inferior): If the process exits, mourn it.
2194
819843c7
GB
21952015-04-21 Gary Benson <gbenson@redhat.com>
2196
2197 * hostio.c (fileio_open_flags_to_host): Factored out to
2198 fileio_to_host_openflags in common/fileio.c. Single use
2199 updated.
2200
a2d5a9d7
MF
22012015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2202
2203 * linux-xtensa-low.c (xtensa_fill_gregset)
2204 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2205 XCHAL_HAVE_LOOP.
2206
deb44829
MF
22072015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2208
2209 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2210 (regs_info): Replace usrregs pointer with NULL.
2211
e57f1de3
GB
22122015-04-17 Gary Benson <gbenson@redhat.com>
2213
2214 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2215 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2216 * server.c (handle_qxfer_exec_file): New function.
2217 (qxfer_packets): Add exec-file entry.
2218 (handle_query): Report qXfer:exec-file:read as supported packet.
2219
62828379
RN
22202015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2221
2222 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2223
b88bb450
GB
22242015-04-09 Gary Benson <gbenson@redhat.com>
2225
2226 * hostio-errno.c (errno_to_fileio_error): Remove function.
2227 Update caller to use remote_fileio_to_fio_error.
2228
c8f4bfdd
YQ
22292015-04-09 Yao Qi <yao.qi@linaro.org>
2230
2231 * linux-low.c (linux_insert_point): Call
2232 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2233 (linux_remove_point): Call remove_memory_breakpoint if type is
2234 raw_bkpt_type_sw.
2235 * linux-x86-low.c (x86_insert_point): Don't call
2236 insert_memory_breakpoint.
2237 (x86_remove_point): Don't call remove_memory_breakpoint.
2238
41f98f02
PA
22392015-04-01 Pedro Alves <palves@redhat.com>
2240 Cleber Rosa <crosa@redhat.com>
2241
2242 * server.c (gdbserver_usage): Reorganize and extend the usage
2243 message.
2244
2bf6fb9d
PA
22452015-03-24 Pedro Alves <palves@redhat.com>
2246
2247 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2248 output. Also dump TRAP_TRACE.
2249 (linux_low_filter_event): In debug output, distinguish a
2250 resume_stop SIGSTOP from a delayed SIGSTOP.
2251
369f6daa
GB
22522015-03-24 Gary Benson <gbenson@redhat.com>
2253
2254 * linux-x86-low.c (x86_linux_new_thread): Moved to
2255 nat/x86-linux.c.
2256 (x86_linux_prepare_to_resume): Likewise.
2257
8e5d4070
GB
22582015-03-24 Gary Benson <gbenson@redhat.com>
2259
2260 * Makefile.in (x86-linux-dregs.o): New rule.
2261 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2262 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2263 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2264 (x86_linux_dr_get): Likewise.
2265 (x86_linux_dr_set): Likewise.
2266 (update_debug_registers_callback): Likewise.
2267 (x86_linux_dr_set_addr): Likewise.
2268 (x86_linux_dr_get_addr): Likewise.
2269 (x86_linux_dr_set_control): Likewise.
2270 (x86_linux_dr_get_control): Likewise.
2271 (x86_linux_dr_get_status): Likewise.
2272 (x86_linux_update_debug_registers): Likewise.
2273
2b95d440
GB
22742015-03-24 Gary Benson <gbenson@redhat.com>
2275
2276 * linux-x86-low.c (x86_linux_update_debug_registers):
2277 New function, factored out from...
2278 (x86_linux_prepare_to_resume): ...this.
2279
14b0bc68
GB
22802015-03-24 Gary Benson <gbenson@redhat.com>
2281
2282 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2283 (x86_linux_dr_set): Likewise.
2284 (update_debug_registers_callback): Likewise.
2285 (x86_linux_dr_set_addr): Likewise.
2286 (x86_linux_dr_get_addr): Likewise.
2287 (x86_linux_dr_set_control): Likewise.
2288 (x86_linux_dr_get_control): Likewise.
2289 (x86_linux_dr_get_status): Likewise.
2290 (x86_linux_prepare_to_resume): Likewise.
2291
5dfe6ca8
GB
22922015-03-24 Gary Benson <gbenson@redhat.com>
2293
2294 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2295 Use perror_with_name. Pass string through gettext.
2296 (x86_linux_dr_set): Likewise.
2297
d33472ad
GB
22982015-03-24 Gary Benson <gbenson@redhat.com>
2299
2300 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2301 (x86_linux_dr_set_addr): ...this.
2302 (x86_dr_low_get_addr): Rename to...
2303 (x86_linux_dr_get_addr): ...this.
2304 (x86_dr_low_set_control): Rename to...
2305 (x86_linux_dr_set_control): ...this.
2306 (x86_dr_low_get_control): Rename to...
2307 (x86_linux_dr_get_control): ...this.
2308 (x86_dr_low_get_status): Rename to...
2309 (x86_linux_dr_get_status): ...this.
2310 (x86_dr_low): Update with new function names.
2311
4b134ca1
GB
23122015-03-24 Gary Benson <gbenson@redhat.com>
2313
2314 * Makefile.in (x86-linux.o): New rule.
2315 * configure.srv: Add x86-linux.o to relevant targets.
2316 * linux-low.c (lwp_set_arch_private_info): New function.
2317 (lwp_arch_private_info): Likewise.
2318 * linux-x86-low.c: Include nat/x86-linux.h.
2319 (arch_lwp_info): Removed structure.
2320 (update_debug_registers_callback):
2321 Use lwp_set_debug_registers_changed.
2322 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2323 and lwp_set_debug_registers_changed.
2324 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2325
34c703da
GB
23262015-03-24 Gary Benson <gbenson@redhat.com>
2327
2328 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2329 * linux-arm-low.c (arm_new_thread): Likewise.
2330 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2331 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2332 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2333 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2334
cff068da
GB
23352015-03-24 Gary Benson <gbenson@redhat.com>
2336
2337 * linux-low.c (ptid_of_lwp): New function.
2338 (lwp_is_stopped): Likewise.
2339 (lwp_stop_reason): Likewise.
2340 * linux-x86-low.c (update_debug_registers_callback):
2341 Use lwp_is_stopped.
2342 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2343 lwp_stop_reason.
2344
b2f7c7e8
GB
23452015-03-24 Gary Benson <gbenson@redhat.com>
2346
2347 * linux-low.h (linux_stop_lwp): Remove declaration.
2348
6d4ee8c6
GB
23492015-03-24 Gary Benson <gbenson@redhat.com>
2350
2351 * linux-low.h: Include nat/linux-nat.h.
2352 * linux-low.c (iterate_over_lwps_args): New structure.
2353 (iterate_over_lwps_filter): New function.
2354 (iterate_over_lwps): Likewise.
2355 * linux-x86-low.c (update_debug_registers_callback):
2356 Update signature to what iterate_over_lwps expects.
2357 Remove PID check that iterate_over_lwps now performs.
2358 (x86_dr_low_set_addr): Use iterate_over_lwps.
2359 (x86_dr_low_set_control): Likewise.
2360
70a0bb6b
GB
23612015-03-24 Gary Benson <gbenson@redhat.com>
2362
2363 * linux-x86-low.c (x86_debug_reg_state): New function.
2364 (x86_linux_prepare_to_resume): Use the above.
2365
7b669087
GB
23662015-03-24 Gary Benson <gbenson@redhat.com>
2367
2368 * linux-low.c (current_lwp_ptid): New function.
2369 * linux-x86-low.c: Include nat/linux-nat.h.
2370 (x86_dr_low_get_addr): Use current_lwp_ptid.
2371 (x86_dr_low_get_control): Likewise.
2372 (x86_dr_low_get_status): Likewise.
2373
eef49a3d
PA
23742015-03-20 Pedro Alves <palves@redhat.com>
2375
2376 * tracepoint.c (cmd_qtstatus): Make "str" const.
2377
b2333d22
PA
23782015-03-20 Pedro Alves <palves@redhat.com>
2379
2380 * server.c (handle_general_set): Make "req_str" const.
2381
23f238d3
PA
23822015-03-19 Pedro Alves <palves@redhat.com>
2383
2384 * linux-low.c (linux_resume_one_lwp): Rename to ...
2385 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2386 instead call perror_with_name.
2387 (check_ptrace_stopped_lwp_gone): New function.
2388 (linux_resume_one_lwp): Reimplement as wrapper around
2389 linux_resume_one_lwp_throw that swallows errors if the LWP is
2390 gone.
2391
91baf43f
PA
23922015-03-19 Pedro Alves <palves@redhat.com>
2393
2394 * linux-low.c (count_events_callback, select_event_lwp_callback):
2395 No longer check whether the thread has resume_stop as last resume
2396 kind.
2397
8bf3b159
PA
23982015-03-19 Pedro Alves <palves@redhat.com>
2399
2400 * linux-low.c (count_events_callback, select_event_lwp_callback):
2401 Use the lwp's status_pending_p field, not the thread's.
2402
b90fc188
PA
24032015-03-19 Pedro Alves <palves@redhat.com>
2404
2405 * linux-low.c (select_event_lwp_callback): Update comments to
2406 no longer mention SIGTRAP.
2407
464b0089
GB
24082015-03-18 Gary Benson <gbenson@redhat.com>
2409
2410 * server.c (handle_query): Do not report vFile:fstat as supported.
2411
aa9e327f
GB
24122015-03-11 Gary Benson <gbenson@redhat.com>
2413
2414 * hostio.c (sys/types.h): New include.
2415 (sys/stat.h): Likewise.
2416 (common-remote-fileio.h): Likewise.
2417 (handle_fstat): New function.
2418 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2419
791c0056
GB
24202015-03-11 Gary Benson <gbenson@redhat.com>
2421
2422 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2423 struct stat.st_blocks and struct stat.st_blksize.
2424 * configure: Regenerate.
2425 * config.in: Likewise.
2426 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2427 (OBS): Add common-remote-fileio.o.
2428 (common-remote-fileio.o): New rule.
2429
9a9df970
PA
24302015-03-09 Pedro Alves <palves@redhat.com>
2431
2432 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2433 'struct sockaddr' pointer in 'accept' call.
2434
9eb1356e
PA
24352015-03-09 Pedro Alves <palves@redhat.com>
2436
2437 Revert:
2438 2015-03-07 Pedro Alves <palves@redhat.com>
2439 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2440 or <winsock2.h> here. Instead include "gdb_socket.h".
2441 (remote_open): Use union gdb_sockaddr_u.
2442 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2443 or <winsock2.h> here. Instead include "gdb_socket.h".
2444 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2445 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2446 or <sys/un.h>.
2447 (init_named_socket, gdb_agent_helper_thread): Use union
2448 gdb_sockaddr_u.
2449
aac331e4
PA
24502015-03-07 Pedro Alves <palves@redhat.com>
2451
2452 * configure.ac (build_warnings): Move
2453 -Wdeclaration-after-statement to the C-specific set.
2454 * configure: Regenerate.
2455
366c75fc
PA
24562015-03-07 Pedro Alves <palves@redhat.com>
2457
2458 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2459 or <winsock2.h> here. Instead include "gdb_socket.h".
2460 (remote_open): Use union gdb_sockaddr_u.
2461 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2462 or <winsock2.h> here. Instead include "gdb_socket.h".
2463 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2464 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2465 or <sys/un.h>.
2466 (init_named_socket, gdb_agent_helper_thread): Use union
2467 gdb_sockaddr_u.
2468
492d29ea
PA
24692015-03-07 Pedro Alves <palves@redhat.com>
2470
2471 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2472 instead.
2473
60a191ed
YQ
24742015-03-06 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-aarch64-low.c (aarch64_insert_point): Use
2477 show_debug_regs as a boolean.
2478 (aarch64_remove_point): Likewise.
2479
f5771b1d
PA
24802015-03-05 Pedro Alves <palves@redhat.com>
2481
2482 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2483 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2484 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2485 * nto-low.c (nto_target_ops): Likewise.
2486 * spu-low.c (spu_target_ops): Likewise.
2487 * win32-low.c (win32_target_ops): Likewise.
2488
3e572f71
PA
24892015-03-04 Pedro Alves <palves@redhat.com>
2490
72f4393d 2491 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2492 Decide whether a breakpoint triggered based on the SIGTRAP's
2493 siginfo.si_code.
72f4393d
L
2494 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2495 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2496 (linux_low_filter_event): Check for breakpoints before checking
2497 watchpoints.
2498 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2499 siginfo.si_code.
72f4393d
L
2500 (linux_stopped_by_sw_breakpoint)
2501 (linux_supports_stopped_by_sw_breakpoint)
2502 (linux_stopped_by_hw_breakpoint)
2503 (linux_supports_stopped_by_hw_breakpoint): New functions.
2504 (linux_target_ops): Install new target methods.
3e572f71 2505
1ec68e26
PA
25062015-03-04 Pedro Alves <palves@redhat.com>
2507
2508 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2509 * server.c (swbreak_feature, hwbreak_feature): New globals.
2510 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2511 (captured_main): Clear swbreak_feature and hwbreak_feature.
2512 * server.h (swbreak_feature, hwbreak_feature): Declare.
2513 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2514 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2515 supports_stopped_by_hw_breakpoint>: New fields.
2516 (target_supports_stopped_by_sw_breakpoint)
2517 (target_stopped_by_sw_breakpoint)
2518 (target_supports_stopped_by_hw_breakpoint)
2519 (target_stopped_by_hw_breakpoint): Declare.
2520
15c66dd6
PA
25212015-03-04 Pedro Alves <palves@redhat.com>
2522
2523 enum lwp_stop_reason -> enum target_stop_reason
2524 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2525 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2526 (linux_wait_1, stuck_in_jump_pad_callback)
2527 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2528 (linux_stopped_by_watchpoint):
2529 * linux-low.h (enum lwp_stop_reason): Delete.
2530 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2531 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2532
98fc70d6
YQ
25332015-03-04 Yao Qi <yao.qi@linaro.org>
2534
2535 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2536
dd2ac174
GB
25372015-03-03 Gary Benson <gbenson@redhat.com>
2538
2539 * hostio.c (handle_vFile): Fix prefix lengths.
2540
d68e53f4
MM
25412015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2542
2543 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2544 ptr_bits.
2545
bf2d68ab
AA
25462015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2547
2548 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2549 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2550 (clean): Add "rm -f" for above C files.
2551 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2552 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2553 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2554 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2555 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2556 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2557 (init_registers_s390x_vx_linux64)
2558 (init_registers_s390x_tevx_linux64)
2559 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2560 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2561 declarations.
2562 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2563 (s390_store_vxrs_high): New functions.
2564 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2565 NT_S390_VXRS_HIGH.
2566 (s390_arch_setup): Add logic for selecting one of the new target
2567 descriptions. Activate the new vector regsets if applicable.
2568 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2569 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2570 and init_registers_s390x_tevx_linux64.
2571
c966a859
PA
25722015-03-01 Pedro Alves <palves@redhat.com>
2573
2574 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2575 parameter.
2576
4180215b
PA
25772015-02-27 Pedro Alves <palves@redhat.com>
2578
2579 * linux-x86-low.c (u_debugreg_offset): New function.
2580 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2581
749bab01
PA
25822015-02-27 Pedro Alves <palves@redhat.com>
2583
2584 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2585 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2586 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2587 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2588 (ps_lsetfpregs, ps_getpid)
2589 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2590 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2591 (ps_lsetxregs, ps_plog): Declare.
2592
3c14e5a3
PA
25932015-02-27 Pedro Alves <palves@redhat.com>
2594
2595 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2596 IP_AGENT_EXPORT_FUNC.
2597 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2598 IP_AGENT_EXPORT_FUNC.
2599 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2600 (IP_AGENT_EXPORT): Delete.
2601 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2602 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2603 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2604 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2605 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2606 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2607 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2608 (traceframe_read_count, traceframe_write_count)
2609 (traceframes_created, trace_state_variables, get_raw_reg)
2610 (get_trace_state_variable_value, set_trace_state_variable_value)
2611 (ust_loaded, helper_thread_id, cmd_buf): Use
2612 IPA_SYM_EXPORTED_NAME.
2613 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2614 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2615 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2616 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2617 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2618 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2619 EXTERN_C_PUSH/EXTERN_C_POP.
2620 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2621 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2622 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2623 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2624 (traceframe_write_count, traceframe_read_count)
2625 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2626 (about_to_request_buffer_space, get_trace_state_variable_value)
2627 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2628 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2629 EXTERN_C_PUSH/EXTERN_C_POP.
2630 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2631 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2632 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2633 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2634 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2635 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2636 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2637 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2638 Define.
2639 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2640 (IP_AGENT_EXPORT_VAR_DECL): Define.
2641 (tracing): Declare.
2642 (gdb_agent_get_raw_reg): Declare.
2643
fe978cb0
PA
26442015-02-27 Tom Tromey <tromey@redhat.com>
2645 Pedro Alves <palves@redhat.com>
2646
2647 Rename symbols whose names are reserved C++ keywords throughout.
2648
3bc3d82a
PA
26492015-02-27 Pedro Alves <palves@redhat.com>
2650
2651 * Makefile.in (COMPILER): New, get it from autoconf.
2652 (CXX): Get from autoconf instead.
2653 (COMPILE.pre): Use COMPILER.
2654 (CC-LD): Rename to ...
2655 (CC_LD): ... this. Use COMPILER.
2656 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2657 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2658 * acinclude.m4: Include build-with-cxx.m4.
2659 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2660 Disable -Werror by default if building in C++ mode.
2661 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2662 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2663 the C++ compiler. Save/restore CXXFLAGS too.
2664 * configure: Regenerate.
2665
07697489
PA
26662015-02-27 Pedro Alves <palves@redhat.com>
2667
2668 * acinclude.m4: Include libiberty.m4.
2669 * configure.ac: Call libiberty_INIT.
2670 * config.in, configure: Regenerate.
2671
9beb7c4e
PA
26722015-02-26 Pedro Alves <palves@redhat.com>
2673
2674 * linux-low.c (linux_wait_1): When incrementing the PC past a
2675 program breakpoint always use the_low_target.breakpoint_len as
2676 increment, rather than the maximum between that and
2677 the_low_target.decr_pc_after_break.
2678
8090aef2
PA
26792015-02-23 Pedro Alves <palves@redhat.com>
2680
2681 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2682 thread was doing a step-over; always adjust the PC if
2683 we stepped over a permanent breakpoint.
2684 (linux_wait_1): If we stepped over breakpoint that was on top of a
2685 permanent breakpoint, manually advance the PC past it.
2686
bc9540e8
PA
26872015-02-23 Pedro Alves <palves@redhat.com>
2688
2689 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2690 modes.
2691 (x86_fill_gregset, x86_store_gregset): Use it when handling
2692 $orig_eax.
2693
2db9a427
PA
26942015-02-20 Pedro Alves <palves@redhat.com>
2695
2696 * thread-db.c: Include "nat/linux-procfs.h".
2697 (thread_db_init): Skip listing new threads if the kernel supports
2698 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2699
afa8d396
PA
27002015-02-20 Pedro Alves <palves@redhat.com>
2701
2702 * linux-low.c (status_pending_p_callback): Use ptid_match.
2703
c9587f88
AT
27042015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 PR breakpoints/16812
2707 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2708 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2709 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2710
b05ec7a5
AT
27112015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2712
2713 PR breakpoints/15956
2714 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2715
d33501a5
MM
27162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2717
2718 * linux-low.c (linux_low_btrace_conf): Print size.
2719 * server.c (handle_btrace_conf_general_set): New.
2720 (hanle_general_set): Call handle_btrace_conf_general_set.
2721 (handle_query): Report Qbtrace-conf:bts:size as supported.
2722
f4abbc16
MM
27232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2724
2725 * linux-low.c (linux_low_enable_btrace): Update parameters.
2726 (linux_low_btrace_conf): New.
2727 (linux_target_ops)<to_btrace_conf>: Initialize.
2728 * server.c (current_btrace_conf): New.
2729 (handle_btrace_enable): Rename to ...
2730 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2731 to target_enable_btrace. Update comment. Update users.
2732 (handle_qxfer_btrace_conf): New.
2733 (qxfer_packets): Add btrace-conf entry.
2734 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2735 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2736 (target_ops)<read_btrace_conf>: New.
2737 (target_enable_btrace): Update parameters.
2738 (target_read_btrace_conf): New.
2739
043c3577
MM
27402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2741
2742 * server.c (handle_btrace_general_set): Remove call to
2743 target_supports_btrace.
2744 (supported_btrace_packets): New.
2745 (handle_query): Call supported_btrace_packets.
2746 * target.h: include btrace-common.h.
2747 (btrace_target_info): Removed.
2748 (supports_btrace, target_supports_btrace): Update parameters.
2749
734b0e4b
MM
27502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2751
2752 * Makefile.in (SFILES): Add common/btrace-common.c.
2753 (OBS): Add common/btrace-common.o.
2754 (btrace-common.o): Add build rules.
2755 * linux-low: Include btrace-common.h.
2756 (linux_low_read_btrace): Use struct btrace_data. Call
2757 btrace_data_init and btrace_data_fini.
2758
d6c146e9
PA
27592015-02-06 Pedro Alves <palves@redhat.com>
2760
2761 * thread-db.c (find_new_threads_callback): Add debug output.
2762
20ba1ce6
PA
27632015-02-04 Pedro Alves <palves@redhat.com>
2764
2765 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2766 (resume_stopped_resumed_lwps): New function.
2767 (linux_wait_for_event_filtered): Use it.
2768
8cc73a39
SDJ
27692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2770
2771 * Makefile.in (SFILES): Add linux-personality.c.
2772 (linux-personality.o): New rule.
2773 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2774 list of objects to be built.
2775 * linux-low.c: Include nat/linux-personality.h.
2776 (linux_create_inferior): Remove code to disable address space
2777 randomization (moved to ../nat/linux-personality.c). Create
2778 cleanup to disable address space randomization.
2779
fb23d554
SDJ
27802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2781
2782 * Makefile.in (posix-strerror.o): New rule.
2783 (mingw-strerror.o): Likewise.
2784 * configure: Regenerated.
2785 * configure.ac: Source file ../common/common.host. Initialize new
2786 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2787
cdf43629
YQ
27882015-01-14 Yao Qi <yao@codesourcery.com>
2789
2790 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2791 (ppc-linux.o): New rule.
2792 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2793 * configure.ac: AC_CHECK_FUNCS(getauxval).
2794 * config.in: Re-generated.
2795 * configure: Re-generated.
2796 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2797 ppc64_64bit_inferior_p
2798
514c5338
YQ
27992015-01-14 Yao Qi <yao@codesourcery.com>
2800
2801 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2802 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2803 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2804 (PT_ORIG_R3, PT_TRAP): Likewise.
2805 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2806 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2807 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2808
3368c1e5
JB
28092015-01-10 Joel Brobecker <brobecker@adacore.com>
2810
2811 * i387-fp.c (i387_cache_to_xsave): In look over
2812 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2813 zmmh_low_space field by use of zmmh_high_space.
2814
582511be
PA
28152015-01-09 Pedro Alves <palves@redhat.com>
2816
2817 * linux-low.c (step_over_bkpt): Move higher up in the file.
2818 (handle_extended_wait): Don't store the stop_pc here.
2819 (get_stop_pc): Adjust comments and rename to ...
2820 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2821 stopped for a software breakpoint or hardware breakpoint.
2822 (thread_still_has_status_pending_p): New function.
2823 (status_pending_p_callback): Use
2824 thread_still_has_status_pending_p. If the event is no longer
2825 interesting, resume the LWP.
2826 (handle_tracepoints): Add assert.
2827 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2828 (wstatus_maybe_breakpoint): New function.
2829 (cancel_breakpoint): Delete function.
2830 (check_stopped_by_watchpoint): New function, factored out from
2831 linux_low_filter_event.
2832 (lp_status_maybe_breakpoint): Delete function.
2833 (linux_low_filter_event): Remove filter_ptid argument.
2834 Leave thread group exits pending here. Store the LWP's stop PC.
2835 Always leave events pending.
2836 (linux_wait_for_event_filtered): Pull all events out of the
2837 kernel, and leave them all pending.
2838 (count_events_callback, select_event_lwp_callback): Consider all
2839 events.
2840 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2841 (select_event_lwp): Only give preference to the stepping LWP in
2842 all-stop mode. Adjust comments.
2843 (ignore_event): New function.
2844 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2845 references to cancel_breakpoints. Adjust to renames. Also give
2846 equal priority to all LWPs that have had events in non-stop mode.
2847 If reporting a software breakpoint event, unadjust the LWP's PC.
2848 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2849 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2850 Adjust.
2851 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2852 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2853 (linux_stopped_by_watchpoint): Adjust.
2854 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2855 * linux-low.h (enum lwp_stop_reason): New.
2856 (struct lwp_info) <stop_pc>: Adjust comment.
2857 <stopped_by_watchpoint>: Delete field.
2858 <stop_reason>: New field.
2859 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2860 * mem-break.c (software_breakpoint_inserted_here)
2861 (hardware_breakpoint_inserted_here): New function.
2862 * mem-break.h (software_breakpoint_inserted_here)
2863 (hardware_breakpoint_inserted_here): Declare.
2864 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2865 (cancel_breakpoints): Delete.
2866 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2867 (upload_fast_traceframes): Remove references to
2868 cancel_breakpoints.
2869
a33e3959
PA
28702015-01-09 Pedro Alves <palves@redhat.com>
2871
2872 * thread-db.c (find_new_threads_callback): Ignore thread if the
2873 kernel thread ID is -1.
2874
8784d563
PA
28752015-01-09 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.c (linux_attach_fail_reason_string): Move to
2878 nat/linux-ptrace.c, and rename.
2879 (linux_attach_lwp): Update comment.
2880 (attach_proc_task_lwp_callback): New function.
2881 (linux_attach): Adjust to rename and use
2882 linux_proc_attach_tgid_threads.
2883 (linux_attach_fail_reason_string): Delete declaration.
2884
76f2b779
JB
28852015-01-01 Joel Brobecker <brobecker@adacore.com>
2886
2887 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2888 * server.c (gdbserver_version): Likewise.
2889
fafcc06a
SDJ
28902014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2891
2892 * remote-utils.c: Include ctype.h.
2893 (input_interrupt): Explicitly handle the case when the char
2894 received is the NUL byte. Improve the printing of non-ASCII
2895 characters.
2896
beed38b8
JB
28972014-12-16 Joel Brobecker <brobecker@adacore.com>
2898
2899 * linux-low.c (linux_low_filter_event): Update call to
2900 linux_enable_event_reporting following the addition of
2901 a new parameter to that function.
2902
bf330350
CU
29032014-12-16 Catalin Udma <catalin.udma@freescale.com>
2904
2905 PR server/17457
2906 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2907 (AARCH64_FPCR_REGNO): Likewise.
2908 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2909 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2910 (aarch64_store_fpregset): Likewise.
2911
5227d625
JB
29122014-12-15 Joel Brobecker <brobecker@adacore.com>
2913
2914 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2915 Remove FIXME comment about assumption about N.
2916
f93b65a0
JB
29172014-12-13 Joel Brobecker <brobecker@adacore.com>
2918
2919 * configure.ac: If large-file support is disabled in GDBserver,
2920 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2921 * configure: Regenerate.
2922
e5a9158d
AA
29232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2924
2925 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2926 warning upon ENODATA from ptrace.
2927 * linux-s390-low.c (s390_store_tdb): New.
2928 (s390_regsets): Add regset for NT_S390_TDB.
2929
feea5f36
AA
29302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2931
2932 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2933 without a fill_function.
2934 * linux-s390-low.c (s390_fill_last_break): Remove.
2935 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2936 (s390_arch_setup): Use regset's size instead of fill_function for
2937 loop end condition.
2938
098dbe61
AA
29392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2940
2941 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2942 the regset's store function when ptrace returned an error.
2943 * regcache.c (get_thread_regcache): Invalidate register cache
2944 before fetching inferior's registers.
2945
28eef672
AA
29462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2947
2948 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2949 while-loop as for-loop.
2950 (regsets_store_inferior_registers): Likewise.
2951
bdca27a2
YQ
29522014-11-28 Yao Qi <yao@codesourcery.com>
2953
2954 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2955 * config.in, configure: Re-generate.
2956 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2957 is defined.
2958
9c232dda
YQ
29592014-11-21 Yao Qi <yao@codesourcery.com>
2960
2961 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2962 (AC_CHECK_HEADERS): Remove malloc.h.
2963 * configure: Re-generated.
2964 * config.in: Re-generated.
2965 * server.h: Don't include alloca.h and malloc.h.
2966 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2967 Don't include malloc.h.
2968
43968415
JB
29692014-11-17 Joel Brobecker <brobecker@adacore.com>
2970
2971 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2972 corresponding ERRNO check in same block.
2973
40e91bc7
PA
29742014-11-12 Pedro Alves <palves@redhat.com>
2975
2976 * server.c (cont_thread): Update comment.
2977 (start_inferior, attach_inferior): No longer clear cont_thread.
2978 (handle_v_cont): No longer set cont_thread.
2979 (captured_main): Clear cont_thread each time a GDB connects.
2980
c2c118cf
PA
29812014-11-12 Pedro Alves <palves@redhat.com>
2982
2983 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2984 thread, and don't resume all threads if the Hc thread has exited.
2985
78708b7c
PA
29862014-11-12 Pedro Alves <palves@redhat.com>
2987
2988 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2989 the process group instead of to a specific LWP.
2990
a2abc7de
PA
29912014-10-15 Pedro Alves <palves@redhat.com>
2992
2993 PR server/17487
2994 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2995 parameter.
2996 (arm_set_thread_context): Delete.
2997 (the_low_target): Adjust.
2998 * win32-i386-low.c (debug_registers_changed)
2999 (debug_registers_used): Delete.
3000 (update_debug_registers_callback): New function.
3001 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3002 needing to update their debug registers.
3003 (win32_get_current_dr): New function.
3004 (x86_dr_low_get_addr, x86_dr_low_get_control)
3005 (x86_dr_low_get_status): Fetch the debug register from the thread
3006 record's context.
3007 (i386_initial_stuff): Adjust.
3008 (i386_get_thread_context): Remove current_event parameter. Don't
3009 clear debug_registers_changed nor copy DR values to
3010 debug_reg_state.
3011 (i386_set_thread_context): Delete.
3012 (i386_prepare_to_resume): New function.
3013 (i386_thread_added): Mark the thread as needing to update irs
3014 debug registers.
3015 (the_low_target): Remove i386_set_thread_context and install
3016 i386_prepare_to_resume.
3017 * win32-low.c (win32_get_thread_context): Adjust.
3018 (win32_set_thread_context): Use SetThreadContext
3019 directly.
3020 (win32_prepare_to_resume): New function.
3021 (win32_require_context): New function, factored out from ...
3022 (thread_rec): ... this.
3023 (continue_one_thread): Call win32_prepare_to_resume on each thread
3024 we're about to continue.
3025 (win32_resume): Call win32_prepare_to_resume on the event thread.
3026 * win32-low.h (struct win32_thread_info)
3027 <debug_registers_changed>: New field.
3028 (struct win32_target_ops): Change prototype of set_thread_context,
3029 delete set_thread_context and add prepare_to_resume.
3030 (win32_require_context): New declaration.
3031
a442d071
GB
30322014-10-08 Gary Benson <gbenson@redhat.com>
3033
3034 * server.h: Do not include common-exceptions.h.
3035
6f1947e8
GB
30362014-10-08 Gary Benson <gbenson@redhat.com>
3037
3038 * server.h: Do not include cleanups.h.
3039
63b434a4
JH
30402014-09-30 James Hogan <james.hogan@imgtec.com>
3041
3042 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3043 mips64-dsp-linux.c.
3044
c4d9ceb6
YQ
30452014-09-23 Yao Qi <yao@codesourcery.com>
3046
3047 * linux-low.c (lp_status_maybe_breakpoint): New function.
3048 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3049 (count_events_callback): Likewise.
3050 (select_event_lwp_callback): Likewise.
3051 (cancel_breakpoints_callback): Likewise.
3052
89a5711c
DB
30532014-09-19 Don Breazeal <donb@codesourcery.com>
3054
3055 * linux-low.c (handle_extended_wait): Call
3056 linux_ptrace_get_extended_event.
3057 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3058 linux_is_extended_waitstatus.
3059
bffc0964
JB
30602014-09-16 Joel Brobecker <brobecker@adacore.com>
3061
3062 * Makefile.in (CPPFLAGS): Define.
3063 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3064 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3065
0bfdf32f
GB
30662014-09-16 Gary Benson <gbenson@redhat.com>
3067
3068 * inferiors.h (current_inferior): Renamed as...
3069 (current_thread): New variable. All uses updated.
3070 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3071 (maybe_move_out_of_jump_pad): Likewise.
3072 (cancel_breakpoint): Likewise.
3073 (linux_low_filter_event): Likewise.
3074 (wait_for_sigstop): Likewise.
3075 (linux_resume_one_lwp): Likewise.
3076 (need_step_over_p): Likewise.
3077 (start_step_over): Likewise.
3078 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3079 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3080 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3081 and save_inferior as saved_thread.
3082 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3083 saved_thread.
3084 (regcache_invalidate_thread): Likewise.
3085 * remote-utils.c (prepare_resume_reply): Likewise.
3086 * thread-db.c (thread_db_get_tls_address): Likewise.
3087 (disable_thread_event_reporting): Likewise.
3088 (remove_thread_event_breakpoints): Likewise.
3089 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3090 as saved_thread.
3091 * target.h (set_desired_inferior): Renamed as...
3092 (set_desired_thread): New declaration. All uses updated.
3093 * server.c (myresume): Updated comment to reference thread instead
3094 of inferior.
3095 (handle_serial_event): Likewise.
3096 (handle_target_event): Likewise.
3097
361c8ade
GB
30982014-09-12 Tom Tromey <tromey@redhat.com>
3099 Gary Benson <gbenson@redhat.com>
3100
3101 * regcache.h: Include common-regcache.h.
3102 (regcache_read_pc): Don't declare.
3103 * regcache.c (get_thread_regcache_for_ptid): New function.
3104
bd9269f7
GB
31052014-09-11 Tom Tromey <tromey@redhat.com>
3106 Gary Benson <gbenson@redhat.com>
3107
3108 * symbol.c: New file.
3109 * Makefile.in (SFILES): Add symbol.c.
3110 (OBS): Add symbol.o.
3111
f8c1d06b
GB
31122014-09-11 Gary Benson <gbenson@redhat.com>
3113
3114 * target.c (target_stop_ptid, target_continue_ptid): New
3115 functions.
3116
721ec300
GB
31172014-09-11 Tom Tromey <tromey@redhat.com>
3118 Gary Benson <gbenson@redhat.com>
3119
3120 * target.h: Include target/target.h.
3121 * target.c (target_read_memory, target_read_uint32)
3122 (target_write_memory): New functions.
3123
c5e92cca
GB
31242014-09-11 Gary Benson <gbenson@redhat.com>
3125
3126 * server.h (debug_hw_points): Don't declare.
3127 * server.c (debug_hw_points): Don't define. Replace all uses
3128 with show_debug_regs.
3129 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3130 all uses with show_debug_regs.
3131
2e4bb98a
EBM
31322014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3133
3134 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3135 endianness into account.
3136 (ppc_supply_ptrace_register): Likewise.
3137
ac740bc7
JH
31382014-09-03 James Hogan <james.hogan@imgtec.com>
3139
3140 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3141 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3142
97ea6506
GB
31432014-09-03 Gary Benson <gbenson@redhat.com>
3144
3145 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3146 ALL_DEBUG_ADDRESS_REGISTERS.
3147
df7e5265
GB
31482014-09-02 Gary Benson <gbenson@redhat.com>
3149
3150 * i386-low.h: Renamed as...
3151 * x86-low.h: New file. All type, function and variable name
3152 prefixes changed from "i386_" to "x86_". All references updated.
3153 * i386-low.c: Renamed as...
3154 * x86-low.c: New file. All type, function and variable name
3155 prefixes changed from "i386_" to "x86_". All references updated.
3156
ed859da7
GB
31572014-09-02 Gary Benson <gbenson@redhat.com>
3158
3159 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3160 (x86_linux_new_thread): Likewise.
3161
860789c7
GB
31622014-08-29 Gary Benson <gbenson@redhat.com>
3163
3164 * server.h (setjmp.h): Do not include.
3165 (toplevel): Do not declare.
3166 (common-exceptions.h): Include.
3167 (cleanups.h): Likewise.
3168 * server.c (toplevel): Do not define.
3169 (exit_code): New static global.
3170 (detach_or_kill_for_exit_cleanup): New function.
3171 (main): New function. Original main renamed to...
3172 (captured_main): New function.
3173 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3174
ff55e1b5
GB
31752014-08-29 Gary Benson <gbenson@redhat.com>
3176
3177 * Makefile.in (SFILES): Add common/common-exceptions.c.
3178 (OBS): Add common-exceptions.o.
3179 (common-exceptions.o): New rule.
3180 * utils.c (prepare_to_throw_exception): New function.
3181
e9bcb658
GB
31822014-08-29 Gary Benson <gbenson@redhat.com>
3183
3184 * config.in: Regenerate.
3185 * configure: Likewise.
3186
e3180625
GB
31872014-08-29 Gary Benson <gbenson@redhat.com>
3188
3189 * Makefile.in (SFILES): Add common/cleanups.c.
3190 (OBS): cleanups.o.
3191 (cleanups.o): New rule.
3192
e3d6ba5d
GB
31932014-08-29 Gary Benson <gbenson@redhat.com>
3194
3195 * utils.c (internal_vwarning): New function.
3196
7096e886
GB
31972014-08-28 Gary Benson <gbenson@redhat.com>
3198
3199 * utils.h (fatal): Remove declaration.
3200 * utils.c (fatal): Remove function.
3201
14ce3192
GB
32022014-08-28 Gary Benson <gbenson@redhat.com>
3203
3204 * tracepoint.c (gdb_agent_init): Replace fatal with
3205 perror_with_name.
3206 (initialize_tracepoint): Likewise.
3207
50278d59
GB
32082014-08-28 Gary Benson <gbenson@redhat.com>
3209
3210 * remote-utils.c (remote_prepare): Replace fatal with error.
3211
aa96c426
GB
32122014-08-28 Gary Benson <gbenson@redhat.com>
3213
3214 * linux-low.c (linux_async): Replace fatal with warning.
3215 Tidy up and return.
3216 (linux_start_non_stop): Return -1 if linux_async failed.
3217
f7160e97
GB
32182014-08-28 Gary Benson <gbenson@redhat.com>
3219
3220 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3221 gdb_assert.
3222 (i386_dr_low_get_addr): Remove vague comment.
3223 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3224 gdb_assert.
3225
38e08fca
GB
32262014-08-28 Gary Benson <gbenson@redhat.com>
3227
3228 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3229 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3230 internal_error.
3231 (linux_resume_one_lwp): Likewise.
3232 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3233 gdb_assert.
3234 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3235 with internal_error.
3236 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3237 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3238 (find_register_by_name): Replace fatal with internal_error.
3239 (find_regno): Likewise.
3240 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3241 * thread-db.c (thread_db_create_event): Likewise.
3242 (thread_db_load_search): Likewise.
3243 (try_thread_db_load_1): Likewise.
3244 * tracepoint.c (get_jump_space_head): Replace fatal with
3245 internal_error.
3246 (claim_trampoline_space): Likewise.
3247 (have_fast_tracepoint_trampoline_buffer): Likewise.
3248 (cmd_qtstart): Likewise.
3249 (stop_tracing): Likewise.
3250 (fast_tracepoint_collecting): Likewise.
3251 (target_malloc): Likewise.
3252 (download_tracepoint): Likewise.
3253 (download_trace_state_variables): Replace check with gdb_assert.
3254 (upload_fast_traceframes): Replace fatal with internal_error.
3255
34abf635
GB
32562014-08-19 Tom Tromey <tromey@redhat.com>
3257 Gary Benson <gbenson@redhat.com>
3258
3259 * Makefile.in (SFILES): Add common/common-debug.c.
3260 (OBS): Add common-debug.o.
3261 (common-debug.o): New rule.
3262 * debug.h (debug_printf): Don't declare.
3263 * debug.c (debug_printf): Renamed and rewritten as...
3264 (debug_vprintf): New function.
3265
f6e94d78
GB
32662014-08-19 Gary Benson <gbenson@redhat.com>
3267
3268 * utils.h: Do not include print-utils.h.
3269
9239eeab
GB
32702014-08-19 Tom Tromey <tromey@redhat.com>
3271 Gary Benson <gbenson@redhat.com>
3272
3273 * server.h: Add static assertion.
3274 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3275
ef87c8bb
GB
32762014-08-19 Tom Tromey <tromey@redhat.com>
3277 Gary Benson <gbenson@redhat.com>
3278
3279 * Makefile.in (SFILES): Add common/errors.c.
3280 (OBS): Add errors.o.
3281 (IPA_OBS): Add errors-ipa.o.
3282 (errors.o): New rule.
3283 (errors-ipa.o): Likewise.
3284 * utils.h (perror_with_name, error, warning): Don't declare.
3285 * utils.c (warning): Renamed and rewritten as...
3286 (vwarning): New function.
3287 (error): Renamed and rewritten as...
3288 (verror): New function.
3289 (internal_error): Renamed and rewritten as...
3290 (internal_verror): New function.
3291
bb974a24
GB
32922014-08-07 Gary Benson <gbenson@redhat.com>
3293
3294 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3295 * configure: Regenerate.
3296 * config.in: Likewise.
3297 * server.h: Do not include errno.h.
3298 * event-loop.c: Likewise.
3299 * hostio-errno.c: Likewise.
3300 * linux-low.c: Likewise.
3301 * remote-utils.c: Likewise.
3302 * spu-low.c: Likewise.
3303 * utils.c: Likewise.
3304 * gdbreplay.c: Unconditionally include errno.h.
3305
6d3d12eb
GB
33062014-08-07 Gary Benson <gbenson@redhat.com>
3307
3308 * server.h: Do not include string.h.
3309 * event-loop.c: Likewise.
3310 * linux-low.c: Likewise.
3311 * regcache.c: Likewise.
3312 * remote-utils.c: Likewise.
3313 * spu-low.c: Likewise.
3314 * utils.c: Likewise.
3315
dccbb609
GB
33162014-08-07 Gary Benson <gbenson@redhat.com>
3317
3318 * server.h: Do not include gdb_assert.h.
3319
e76df0d0
GB
33202014-08-07 Gary Benson <gbenson@redhat.com>
3321
3322 * server.h: Do not include common-utils.h.
3323
4cb9c816
GB
33242014-08-07 Gary Benson <gbenson@redhat.com>
3325
3326 * server.h: Do not include ptid.h.
3327 * notif.h: Likewise.
3328
3995eeee
GB
33292014-08-07 Gary Benson <gbenson@redhat.com>
3330
3331 * server.h: Do not include gdb_locale.h.
3332
cb9f1a9b
GB
33332014-08-07 Gary Benson <gbenson@redhat.com>
3334
3335 * server.h: Do not include gdb/signals.h.
3336 * win32-low.c: Likewise.
3337
a5fceff8
GB
33382014-08-07 Gary Benson <gbenson@redhat.com>
3339
3340 * server.h: Do not include pathmax.h.
3341
b9391142
GB
33422014-08-07 Gary Benson <gbenson@redhat.com>
3343
3344 * server.h: Do not include libiberty.h.
3345 * linux-bfin-low.c: Likewise.
3346
0e443c87
GB
33472014-08-07 Gary Benson <gbenson@redhat.com>
3348
3349 * server.h: Do not include ansidecl.h.
3350
8ebb3f56
GB
33512014-08-07 Gary Benson <gbenson@redhat.com>
3352
3353 * linux-x86-low.c: Do not include stddef.h.
3354 * lynx-ppc-low.c: Likewise.
3355 * tracepoint.c: Likewise.
3356
8980bdf6
GB
33572014-08-07 Gary Benson <gbenson@redhat.com>
3358
3359 * server.h: Do not include stdarg.h.
3360 * nto-low.c: Likewise.
3361
d7096f71
GB
33622014-08-07 Gary Benson <gbenson@redhat.com>
3363
3364 * server.h: Do not include stdlib.h.
3365 * inferiors.c: Likewise.
3366 * linux-low.c: Likewise.
3367 * regcache.c: Likewise.
3368 * spu-low.c: Likewise.
3369 * tracepoint.c: Likewise.
3370 * utils.c: Likewise.
3371
d02f550d
GB
33722014-08-07 Gary Benson <gbenson@redhat.com>
3373
3374 * server.h: Do not include stdio.h.
3375 * linux-low.c: Likewise.
3376 * remote-utils.c: Likewise.
3377 * spu-low.c: Likewise.
3378 * utils.c: Likewise.
3379 * wincecompat.c: Likewise.
3380
87f6c4e3
GB
33812014-08-06 Gary Benson <gbenson@redhat.com>
3382
3383 * regcache.c (init_register_cache): Move conditionals inside if.
3384
7089dca4
GB
33852014-08-06 Gary Benson <gbenson@redhat.com>
3386
3387 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3388
462f517e
GB
33892014-07-31 Gary Benson <gbenson@redhat.com>
3390
3391 * ax.h: Do not include server.h.
3392 * gdbthread.h: Likewise.
3393 * lynx-low.h: Likewise.
3394 * notif.h: Likewise.
3395
976411d6
GB
33962014-07-30 Gary Benson <gbenson@redhat.com>
3397
3398 * server.h: Include common-defs.h.
3399 Do not include config.h or build-gnulib-gdbserver/config.h.
3400
d41f6d8e
GB
34012014-07-30 Gary Benson <gbenson@redhat.com>
3402
3403 * hostio-errno.c: Move server.h to top of includes list.
3404 * inferiors.c: Likewise.
3405 * linux-x86-low.c: Likewise.
3406 * notif.c: Include server.h.
3407
314c6a35
TT
34082014-07-24 Tom Tromey <tromey@redhat.com>
3409 Gary Benson <gbenson@redhat.com>
3410
3411 * server.h (CORE_ADDR): Now unsigned.
3412
69ff6be5
PA
34132014-07-16 Pedro Alves <palves@redhat.com>
3414
3415 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3416
ce9e3fe7
PA
34172014-07-15 Pedro Alves <palves@redhat.com>
3418
3419 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3420 copy.
3421
e76126e8
PA
34222014-07-11 Pedro Alves <palves@redhat.com>
3423
3424 * linux-low.c (kill_wait_lwp): New function, based on
3425 kill_one_lwp_callback, but use my_waitpid directly.
3426 (kill_one_lwp_callback, linux_kill): Use it.
3427
8e9db26e
PA
34282014-06-23 Pedro Alves <palves@redhat.com>
3429
3430 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3431 before setting DR0..DR3.
3432
698b3e08
GB
34332014-06-20 Gary Benson <gbenson@redhat.com>
3434
3435 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3436 * configure: Regenerated.
3437 * config.in: Likewise.
3438
125f8a3d
GB
34392014-06-20 Gary Benson <gbenson@redhat.com>
3440
3441 * Makefile.in (SFILES): Update locations for files moved
3442 from common to nat.
3443 (object file files): Reordered.
3444
42995dbd
GB
34452014-06-20 Gary Benson <gbenson@redhat.com>
3446
3447 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3448 (i386_dr_low_set_addr): Likewise.
3449 (i386_dr_low_get_addr): Likewise.
3450 (i386_dr_low_can_set_control): Likewise.
3451 (i386_dr_low_set_control): Likewise.
3452 (i386_dr_low_get_control): Likewise.
3453 (i386_dr_low_get_status): Likewise.
3454 (i386_get_debug_register_length): Likewise.
3455 * linux-x86-low.c (i386_dr_low_set_addr):
3456 Changed signature. Made static.
3457 (i386_dr_low_get_addr): Likewise.
3458 (i386_dr_low_set_control): Likewise.
3459 (i386_dr_low_get_control): Likewise.
3460 (i386_dr_low_get_status): Likewise.
3461 (i386_dr_low): New global variable.
3462 * win32-i386-low.c (i386_dr_low_set_addr):
3463 Changed signature. Made static.
3464 (i386_dr_low_get_addr): Likewise.
3465 (i386_dr_low_set_control): Likewise.
3466 (i386_dr_low_get_control): Likewise.
3467 (i386_dr_low_get_status): Likewise.
3468 (i386_dr_low): New global variable.
3469
e1d2394b
MS
34702014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3471
3472 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3473 * Makefile.in (AR, AR_FLAGS): Define.
3474 * configure: Regenerate.
3475
3a8ee006
GB
34762014-06-19 Gary Benson <gbenson@redhat.com>
3477
3478 * Makefile.in (i386-dregs.o): New rule.
3479 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3480 * i386-low.c (target.h): Remove include.
3481 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3482 (DR_CONTROL_SHIFT): Likewise.
3483 (DR_CONTROL_SIZE): Likewise.
3484 (DR_RW_EXECUTE): Likewise.
3485 (DR_RW_WRITE): Likewise.
3486 (DR_RW_READ): Likewise.
3487 (DR_RW_IORW): Likewise.
3488 (DR_LEN_1): Likewise.
3489 (DR_LEN_2): Likewise.
3490 (DR_LEN_4): Likewise.
3491 (DR_LEN_8): Likewise.
3492 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3493 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3494 (DR_ENABLE_SIZE): Likewise.
3495 (DR_LOCAL_SLOWDOWN): Likewise.
3496 (DR_GLOBAL_SLOWDOWN): Likewise.
3497 (DR_CONTROL_RESERVED): Likewise.
3498 (I386_DR_CONTROL_MASK): Likewise.
3499 (I386_DR_VACANT): Likewise.
3500 (I386_DR_LOCAL_ENABLE): Likewise.
3501 (I386_DR_GLOBAL_ENABLE): Likewise.
3502 (I386_DR_DISABLE): Likewise.
3503 (I386_DR_SET_RW_LEN): Likewise.
3504 (I386_DR_GET_RW_LEN): Likewise.
3505 (I386_DR_WATCH_HIT): Likewise.
3506 (i386_wp_op_t): Likewise.
3507 (i386_show_dr): Likewise.
3508 (i386_length_and_rw_bits): Likewise.
3509 (i386_insert_aligned_watchpoint): Likewise.
3510 (i386_remove_aligned_watchpoint): Likewise.
3511 (i386_handle_nonaligned_watchpoint): Likewise.
3512 i386_update_inferior_debug_regs(): Likewise.
3513 (i386_dr_insert_watchpoint): Likewise.
3514 (i386_dr_remove_watchpoint): Likewise.
3515 (i386_dr_region_ok_for_watchpoint): Likewise.
3516 (i386_dr_stopped_data_address): Likewise.
3517 (i386_dr_stopped_by_watchpoint): Likewise.
3518
8f26655c
GB
35192014-06-19 Gary Benson <gbenson@redhat.com>
3520
3521 * i386-low.c (i386_dr_show): Renamed to
3522 i386_show_dr and made static. All uses updated.
3523 (i386_dr_length_and_rw_bits): Renamed to
3524 i386_length_and_rw_bits and made static.
3525 All uses updated.
3526 (i386_dr_insert_aligned_watchpoint): Renamed to
3527 i386_insert_aligned_watchpoint and made static.
3528 All uses updated.
3529 (i386_dr_remove_aligned_watchpoint): Renamed to
3530 i386_remove_aligned_watchpoint and made static.
3531 All uses updated.
3532 (i386_dr_update_inferior_debug_regs): Renamed to
3533 i386_update_inferior_debug_regs and made static.
3534 All uses updated.
3535
b9228891
GB
35362014-06-18 Gary Benson <gbenson@redhat.com>
3537
5171def3
GB
3538 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3539 (i386_dr_low_can_set_control): Likewise.
3540 (i386_get_debug_register_length): Likewise.
3541 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3542 (i386_dr_low_can_set_control): Likewise.
3543 (i386_get_debug_register_length): Likewise.
3544
35452014-06-17 Gary Benson <gbenson@redhat.com>
3546
b9228891
GB
3547 * i386-low.h (i386-dregs.h): New include.
3548 (DR_FIRSTADDR): Now in i386-dregs.h.
3549 (DR_LASTADDR): Likewise.
3550 (DR_NADDR): Likewise.
3551 (DR_STATUS): Likewise.
3552 (DR_CONTROL): Likewise.
3553 (i386_debug_reg_state): Likewise.
3554 (i386_dr_insert_watchpoint): Likewise.
3555 (i386_dr_remove_watchpoint): Likewise.
3556 (i386_dr_region_ok_for_watchpoint): Likewise.
3557 (i386_dr_stopped_data_address): Likewise.
3558 (i386_dr_stopped_by_watchpoint): Likewise.
3559 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3560
4be83cc2
GB
35612014-06-18 Gary Benson <gbenson@redhat.com>
3562
3563 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3564 i386_dr_insert_watchpoint.
3565 (i386_low_remove_watchpoint): Renamed to
3566 i386_dr_remove_watchpoint.
3567 (i386_low_region_ok_for_watchpoint): Renamed to
3568 i386_dr_region_ok_for_watchpoint.
3569 (i386_low_stopped_data_address): Renamed to
3570 i386_dr_stopped_data_address.
3571 (i386_low_stopped_by_watchpoint): Renamed to
3572 i386_dr_stopped_by_watchpoint.
3573 * i386-low.c (i386_show_dr): Renamed to
3574 i386_dr_show and made nonstatic. All uses updated.
3575 (i386_length_and_rw_bits): Renamed to
3576 i386_dr_length_and_rw_bits and made nonstatic.
3577 All uses updated.
3578 (i386_insert_aligned_watchpoint): Renamed to
3579 i386_dr_insert_aligned_watchpoint and made nonstatic.
3580 All uses updated.
3581 (i386_remove_aligned_watchpoint): Renamed to
3582 i386_dr_remove_aligned_watchpoint and made nonstatic.
3583 All uses updated.
3584 (i386_update_inferior_debug_regs): Renamed to
3585 i386_dr_update_inferior_debug_regs and made nonstatic.
3586 All uses updated.
3587 (i386_low_insert_watchpoint): Renamed to
3588 i386_dr_insert_watchpoint. All uses updated.
3589 (i386_low_remove_watchpoint): Renamed to
3590 i386_dr_remove_watchpoint. All uses updated.
3591 (i386_low_region_ok_for_watchpoint): Renamed to
3592 i386_dr_region_ok_for_watchpoint. All uses updated.
3593 (i386_low_stopped_data_address): Renamed to
3594 i386_dr_stopped_data_address. All uses updated.
3595 (i386_low_stopped_by_watchpoint): Renamed to
3596 i386_dr_stopped_by_watchpoint. All uses updated.
3597
131aa0d4
GB
35982014-06-18 Gary Benson <gbenson@redhat.com>
3599
3600 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3601 (i386_dr_low_can_set_control): Likewise.
3602 (i386_insert_aligned_watchpoint): New check.
3603
d9305f7f
GB
36042014-06-18 Gary Benson <gbenson@redhat.com>
3605
3606 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3607 Renamed to state.
3608
e927c9fc
GB
36092014-06-18 Gary Benson <gbenson@redhat.com>
3610
3611 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3612 instead of fatal and error.
3613 (i386_handle_nonaligned_watchpoint): Likewise.
3614
1b6d4134
GB
36152014-06-18 Gary Benson <gbenson@redhat.com>
3616
3617 * i386-low.c (i386_get_debug_register_length): New macro.
3618 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3619 (i386_show_dr): Use debug_printf instead of fprintf. Use
3620 phex to format values.
3621
6e62758f
GB
36222014-06-18 Gary Benson <gbenson@redhat.com>
3623
3624 * i386-low.h: Comment changes.
3625 * i386-low.c: Likewise.
3626
fc6e2f03
GB
36272014-06-18 Gary Benson <gbenson@redhat.com>
3628
3629 * i386-low.c: Whitespace changes.
3630
f9d1eeed
TT
36312014-06-12 Tom Tromey <tromey@redhat.com>
3632
3633 * utils.c (freeargv): Remove.
3634
0b04e523
TT
36352014-06-12 Tom Tromey <tromey@redhat.com>
3636
3637 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3638 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3639 (parse_debug_format_options): Likewise.
3640 (gdbserver_usage): Likewise.
3641 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3642 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3643 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3644 against libiberty.
3645 ($(LIBGNU)): Depend on libiberty.
3646 (all-lib): Recurse into all subdirs.
3647 (install-only): Invoke "install" target in subdirs.
3648 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3649 targets.
3650 * configure: Rebuild.
3651 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3652 for vasprintf, vsnprintf, or gettimeofday.
3653 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3654 srv_tgtobj.
3655
270c9937
JB
36562014-06-05 Joel Brobecker <brobecker@adacore.com>
3657
3658 * development.sh: Delete.
3659 * Makefile.in (config.status): Adjust dependency on development.sh.
3660 * configure.ac: Adjust development.sh source call.
3661 * configure: Regenerate.
3662
0a261ed8
PA
36632014-06-02 Pedro Alves <palves@redhat.com>
3664
3665 * ax.c (gdb_free_agent_expr): New function.
3666 * ax.h (gdb_free_agent_expr): New declaration.
3667 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3668 list.
3669 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3670 static.
3671 (clear_breakpoint_conditions_and_commands): New function.
3672 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3673 (clear_breakpoint_conditions_and_commands): New declaration.
3674
e9dae05e
RR
36752014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3676
3677 * linux-aarch64-low.c (asm/ptrace.h): Include.
3678
5876f503
JK
36792014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3680
3681 Fix TLS access for -static -pthread.
3682 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3683 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3684 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3685
802e8e6d
PA
36862014-05-20 Pedro Alves <palves@redhat.com>
3687
3688 * linux-aarch64-low.c (aarch64_insert_point)
3689 (aarch64_remove_point): No longer check whether the type is
3690 supported here. Adjust to new interface.
3691 (the_low_target): Install aarch64_supports_z_point_type as
3692 supports_z_point_type method.
3693 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3694 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3695 instead of a Z packet char. Adjust.
3696 (arm_supports_z_point_type): New function.
3697 (arm_insert_point, arm_remove_point): Adjust to new interface.
3698 (the_low_target): Install arm_supports_z_point_type.
3699 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3700 (cris_insert_point, cris_remove_point): Adjust to new interface.
3701 Don't check whether the type is supported here.
3702 (the_low_target): Install cris_supports_z_point_type.
3703 * linux-low.c (linux_supports_z_point_type): New function.
3704 (linux_insert_point, linux_remove_point): Adjust to new interface.
3705 * linux-low.h (struct linux_target_ops) <insert_point,
3706 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3707 raw_breakpoint pointer parameter.
3708 <supports_z_point_type>: New method.
3709 * linux-mips-low.c (mips_supports_z_point_type): New function.
3710 (mips_insert_point, mips_remove_point): Adjust to new interface.
3711 Use mips_supports_z_point_type.
3712 (the_low_target): Install mips_supports_z_point_type.
3713 * linux-ppc-low.c (the_low_target): Install NULL as
3714 supports_z_point_type method.
3715 * linux-s390-low.c (the_low_target): Install NULL as
3716 supports_z_point_type method.
3717 * linux-sparc-low.c (the_low_target): Install NULL as
3718 supports_z_point_type method.
3719 * linux-x86-low.c (x86_supports_z_point_type): New function.
3720 (x86_insert_point): Adjust to new insert_point interface. Use
3721 insert_memory_breakpoint. Adjust to new
3722 i386_low_insert_watchpoint interface.
3723 (x86_remove_point): Adjust to remove_point interface. Use
3724 remove_memory_breakpoint. Adjust to new
3725 i386_low_remove_watchpoint interface.
3726 (the_low_target): Install x86_supports_z_point_type.
3727 * lynx-low.c (lynx_target_ops): Install NULL as
3728 supports_z_point_type callback.
3729 * nto-low.c (nto_supports_z_point_type): New.
3730 (nto_insert_point, nto_remove_point): Adjust to new interface.
3731 (nto_target_ops): Install nto_supports_z_point_type.
3732 * mem-break.c: Adjust intro comment.
3733 (struct raw_breakpoint) <raw_type, size>: New fields.
3734 <inserted>: Update comment.
3735 <shlib_disabled>: Delete field.
3736 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3737 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3738 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3739 (raw_bkpt_type_to_target_hw_bp_type): New function.
3740 (find_enabled_raw_code_breakpoint_at): New function.
3741 (find_raw_breakpoint_at): New type and size parameters. Use them.
3742 (insert_memory_breakpoint): New function, based off
3743 set_raw_breakpoint_at.
3744 (remove_memory_breakpoint): New function.
3745 (set_raw_breakpoint_at): Reimplement.
3746 (set_breakpoint): New, based on set_breakpoint_at.
3747 (set_breakpoint_at): Reimplement.
3748 (delete_raw_breakpoint): Go through the_target->remove_point
3749 instead of assuming memory breakpoints.
3750 (find_gdb_breakpoint_at): Delete.
3751 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3752 (find_gdb_breakpoint): New function.
3753 (set_gdb_breakpoint_at): Delete.
3754 (z_type_supported): New function.
3755 (set_gdb_breakpoint_1): New function, loosely based off
3756 set_gdb_breakpoint_at.
3757 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3758 (delete_gdb_breakpoint_at): Delete.
3759 (delete_gdb_breakpoint_1): New function, loosely based off
3760 delete_gdb_breakpoint_at.
3761 (delete_gdb_breakpoint): New function.
3762 (clear_gdb_breakpoint_conditions): Rename to ...
3763 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3764 breakpoint.
3765 (add_condition_to_breakpoint): Make static.
3766 (add_breakpoint_condition): Take a struct breakpoint pointer
3767 instead of an address. Adjust.
3768 (gdb_condition_true_at_breakpoint): Rename to ...
3769 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3770 z_type parameter.
3771 (gdb_condition_true_at_breakpoint): Reimplement.
3772 (add_breakpoint_commands): Take a struct breakpoint pointer
3773 instead of an address. Adjust.
3774 (gdb_no_commands_at_breakpoint): Rename to ...
3775 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3776 parameter. Return true if no breakpoint was found. Change debug
3777 output.
3778 (gdb_no_commands_at_breakpoint): Reimplement.
3779 (run_breakpoint_commands): Rename to ...
3780 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3781 and change return type to boolean.
3782 (run_breakpoint_commands): New function.
3783 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3784 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3785 breakpoint. Go through the_target->remove_point instead of
3786 assuming memory breakpoint.
3787 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3788 software and hardware breakpoints.
3789 (reinsert_raw_breakpoint): Go through the_target->insert_point
3790 instead of assuming memory breakpoint.
3791 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3792 software and hardware breakpoints.
3793 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3794 Check both software and hardware breakpoints.
3795 (validate_inserted_breakpoint): Assert the breakpoint is a
3796 software breakpoint. Set the inserted flag to -1 instead of
3797 setting shlib_disabled.
3798 (delete_disabled_breakpoints): Adjust.
3799 (validate_breakpoints): Only validate software breakpoints.
3800 Adjust to inserted flag change.
3801 (check_mem_read, check_mem_write): Skip breakpoint types other
3802 than software breakpoints. Adjust to inserted flag change.
3803 * mem-break.h (enum raw_bkpt_type): New enum.
3804 (raw_breakpoint, struct process_info): Forward declare.
3805 (Z_packet_to_target_hw_bp_type): Delete declaration.
3806 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3807 (set_gdb_breakpoint, delete_gdb_breakpoint)
3808 (clear_breakpoint_conditions): New declarations.
3809 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3810 (breakpoint_inserted_here): Update comment.
3811 (add_breakpoint_condition, add_breakpoint_commands): Replace
3812 address parameter with a breakpoint pointer parameter.
3813 (gdb_breakpoint_here): Update comment.
3814 (delete_gdb_breakpoint_at): Delete.
3815 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3816 * server.c (process_point_options): Take a struct breakpoint
3817 pointer instead of an address. Adjust.
3818 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3819 delete_gdb_breakpoint.
3820 * spu-low.c (spu_target_ops): Install NULL as
3821 supports_z_point_type method.
3822 * target.h: Include mem-break.h.
3823 (struct target_ops) <prepare_to_access_memory>: Update comment.
3824 <supports_z_point_type>: New field.
3825 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3826 instead of a char. Also take a raw breakpoint pointer.
3827 * win32-arm-low.c (the_low_target): Install NULL as
3828 supports_z_point_type.
3829 * win32-i386-low.c (i386_supports_z_point_type): New function.
3830 (i386_insert_point, i386_remove_point): Adjust to new interface.
3831 (the_low_target): Install i386_supports_z_point_type.
3832 * win32-low.c (win32_supports_z_point_type): New function.
3833 (win32_insert_point, win32_remove_point): Adjust to new interface.
3834 (win32_target_ops): Install win32_supports_z_point_type.
3835 * win32-low.h (struct win32_target_ops):
3836 <supports_z_point_type>: New method.
3837 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3838 instead of a char. Also take a raw breakpoint pointer.
3839
932539e3
PA
38402014-05-20 Pedro Alves <palves@redhat.com>
3841
3842 * mem-break.h: Include break-common.h.
3843 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3844 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3845 (Z_packet_to_target_hw_bp_type): New declaration.
3846 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3847 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3848 (Z_PACKET_ACCESS_WP): Delete macros.
3849 (Z_packet_to_hw_type): Delete function.
3850 * i386-low.h: Don't include break-common.h here.
3851 (Z_packet_to_hw_type): Delete declaration.
3852 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3853 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3854 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3855 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3856 * linux-aarch64-low.c: Don't include break-common.h here.
3857 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3858 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3859 (Z_packet_to_target_hw_bp_type): Delete function.
3860 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3861 function.
3862 (mips_insert_point, mips_remove_point): Use
3863 Z_packet_to_target_hw_bp_type.
3864
4ff0d3d8
PA
38652014-05-20 Pedro Alves <palves@redhat.com>
3866
3867 * linux-aarch64-low.c: Include break-common.h.
3868 (enum target_point_type): Delete.
3869 (Z_packet_to_point_type): Rename to ...
3870 (Z_packet_to_target_hw_bp_type): ... this, and return a
3871 target_hw_bp_type instead.
3872 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3873 instead of an enum target_point_type.
3874 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3875 breakpoint type.
3876 (aarch64_dr_state_insert_one_point)
3877 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3878 (aarch64_handle_aligned_watchpoint)
3879 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3880 Take an enum target_hw_bp_type instead of an enum
3881 target_point_type.
3882 (aarch64_supports_z_point_type): New function.
3883 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3884 use Z_packet_to_target_hw_bp_type.
3885
786dc519
JB
38862014-05-20 Joel Brobecker <brobecker@adacore.com>
3887
3888 * configure.ac: Only use -Werror by default when DEVELOPMENT
3889 is true.
3890 * configure: Regenerate.
3891
9e0aa64f
JK
38922014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3893
3894 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3895 * linux-x86-low.c (X86_64_USER_REGS): New.
3896 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3897
2b577b92
YQ
38982014-04-28 Yao Qi <yao@codesourcery.com>
3899
3900 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3901 name.
3902
94611da2
PA
39032014-04-25 Pedro Alves <palves@redhat.com>
3904
3905 PR server/16255
3906 * linux-low.c (linux_attach_fail_reason_string): New function.
3907 (linux_attach_lwp): Delete.
3908 (linux_attach_lwp_1): Rename to ...
3909 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3910 argument. Remove "initial" parameter. Return int instead of
3911 void. Don't error or warn here.
3912 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3913 failure to attach to the tgid. Call warning when failing to
3914 attach to an lwp.
3915 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3916 argument. Remove "initial" parameter. Return int instead of
3917 void. Don't error or warn here.
3918 (linux_attach_fail_reason_string): New declaration.
3919 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3920 interface change. Use linux_attach_fail_reason_string.
3921
01f9f808
MS
39222014-04-24 Michael Sturm <michael.sturm@mintel.com>
3923 Walfred Tedeschi <walfred.tedeschi@intel.com>
3924
3925 * Makefile.in: Added rules to handle new files
3926 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3927 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3928 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3929 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3930 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3931 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3932 x32-avx512-linux.o.
3933 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3934 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3935 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3936 i386/x32-avx512.xml.
3937 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3938 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3939 i386/x32-avx512-linux.xml.
3940 * i387-fp.c (num_avx512_k_registers): New constant for number
3941 of K registers.
3942 (num_avx512_zmmh_low_registers): New constant for number of
3943 lower ZMM registers (0-15).
3944 (num_avx512_zmmh_high_registers): New constant for number of
3945 higher ZMM registers (16-31).
3946 (num_avx512_ymmh_registers): New contant for number of higher
3947 YMM registers (ymm16-31 added by avx521 on x86_64).
3948 (num_avx512_xmm_registers): New constant for number of higher
3949 XMM registers (xmm16-31 added by AVX512 on x86_64).
3950 (struct i387_xsave): Add space for AVX512 registers.
3951 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3952 Add code to handle AVX512 registers.
3953 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3954 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3955 prototypei from generated file.
3956 (tdesc_amd64_avx512_linux): Likewise.
3957 (init_registers_x32_avx512_linux): Likewise.
3958 (tdesc_x32_avx512_linux): Likewise.
3959 (init_registers_i386_avx512_linux): Likewise.
3960 (tdesc_i386_avx512_linux): Likewise.
3961 (x86_64_regmap): Add AVX512 registers.
3962 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3963 mask.
3964 (initialize_low_arch): Add code to initialize AVX512 registers.
3965
51aa91f9
PA
39662014-04-23 Pedro Alves <palves@redhat.com>
3967
3968 * mem-break.c (find_gdb_breakpoint_at): Make static.
3969 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3970
a4165e94
PA
39712014-04-23 Pedro Alves <palves@redhat.com>
3972
3973 * i386-low.c: Don't include break-common.h here.
3974 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3975 prototype to take target_hw_bp_type as argument instead of a Z
3976 packet char.
3977 * i386-low.h: Include break-common.h here.
3978 (Z_packet_to_hw_type): Declare.
3979 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3980 prototypes.
3981 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3982 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3983 (x86_remove_point): Convert the packet number to a
3984 target_hw_bp_type before calling i386_low_remove_watchpoint.
3985 * win32-i386-low.c (i386_insert_point): Convert the packet number
3986 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3987 (i386_remove_point): Convert the packet number to a
3988 target_hw_bp_type before calling i386_low_remove_watchpoint.
3989
b8acf843
PA
39902014-04-23 Pedro Alves <palves@redhat.com>
3991
3992 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3993
d708bcd1
PA
39942014-04-10 Pedro Alves <palves@redhat.com>
3995
3996 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3997 Check if the condition or command is NULL before checking if the
3998 breakpoint is known. On success, return true.
3999 * mem-break.h (add_breakpoint_condition): Document return.
4000 (add_breakpoint_commands): Add describing comment.
4001 * server.c (skip_to_semicolon): New function.
4002 (process_point_options): Use it.
4003
2eec7d5b
PA
40042014-04-09 Pedro Alves <palves@redhat.com>
4005
4006 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4007 to lwpid_of.
4008
fa96cb38
PA
40092014-02-27 Pedro Alves <palves@redhat.com>
4010
4011 PR 12702
4012 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4013 macros.
4014 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4015 output.
4016 (last_thread_of_process_p): Take a PID argument instead of a
4017 thread pointer.
4018 (linux_wait_for_lwp): Delete.
4019 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4020 functions.
4021 (linux_low_filter_event): New function, party factored out from
4022 linux_wait_for_event.
4023 (linux_wait_for_event): Rename to ...
4024 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4025 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4026 sigsuspend. Check for zombie leaders.
4027 (linux_wait_for_event): Reimplement as wrapper around
4028 linux_wait_for_event_filtered.
4029 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4030 a normal or signal exit is seen, it's the whole process exiting.
4031 (wait_for_sigstop): No longer a for_each_inferior callback.
4032 Rewrite on top of linux_wait_for_event_filtered.
4033 (stop_all_lwps): Call wait_for_sigstop directly.
4034 * server.c (resume, handle_target_event): Handle
4035 TARGET_WAITKIND_NO_RESUMED.
4036
d763de10
JB
40372014-02-26 Joel Brobecker <brobecker@adacore.com>
4038
4039 * win32-low.c (psapi_get_dll_name,
4040 * win32_CreateToolhelp32Snapshot): Delete.
4041 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4042 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4043 Delete.
4044 (handle_load_dll): Add function description.
4045 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4046
850a0f76
JB
40472014-02-26 Joel Brobecker <brobecker@adacore.com>
4048
4049 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4050 Add comment.
4051 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4052 base address when calling win32_add_one_solib.
4053 (handle_load_dll): Delete local variable load_addr.
4054 Remove 0x1000 offset applied to DLL base address when calling
4055 win32_add_one_solib.
4056 (handle_unload_dll): Add comment.
4057
f25b3fc3
JB
40582014-02-26 Joel Brobecker <brobecker@adacore.com>
4059
4060 * win32-low.c (win32_add_all_dlls): Renames
4061 win32_ensure_ntdll_loaded. Rewrite function documentation.
4062 Adjust implementation to always load all DLLs.
4063 Add 0x1000 offset to DLL base address when calling
4064 win32_add_one_solib.
4065 (child_initialization_done): New static global.
4066 (do_initial_child_stuff): Set child_initialization_done to
4067 zero during child initialization, and 1 after. Replace call
4068 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4069 Add comment.
4070 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4071 (handle_unload_dll): Add function documentation.
4072 (get_child_debug_event): Ignore load and unload DLL events
4073 during child initialization.
4074
d86d4aaf
DE
40752014-02-20 Doug Evans <dje@google.com>
4076
3bc32da3 4077 Remove global all_lwps.
d86d4aaf
DE
4078 * inferiors.h (ptid_of): Move here from linux-low.h.
4079 (pid_of, lwpid_of): Ditto.
4080 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4081 parameter is a struct thread_info * now.
4082 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4083 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4084 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4085 directly.
4086 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4087 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4088 * linux-arm-low.c (update_registers_callback): Update, "entry"
4089 parameter is a struct thread_info * now.
4090 Fetch lwpid from current_inferior directly.
4091 (arm_insert_point): Pass &all_threads to find_inferior instead of
4092 &all_lwps.
4093 (arm_remove_point): Ditto.
4094 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4095 (arm_prepare_to_resume): Fetch pid from thread.
4096 (arm_read_description): Fetch lwpid from current_inferior directly.
4097 * linux-low.c (all_lwps): Delete.
4098 (delete_lwp): Delete call to remove_inferior.
4099 (handle_extended_wait): Fetch lwpid from thread.
4100 (add_lwp): Don't set lwp->entry.id. Remove call to
4101 add_inferior_to_list.
4102 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4103 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4104 (kill_one_lwp_callback): Ditto.
4105 (linux_kill): Don't dereference NULL pointer.
4106 Fetch ptid,lwpid from thread.
4107 (get_detach_signal): Fetch ptid from thread.
4108 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4109 Simplify call to regcache_invalidate_thread.
4110 (delete_lwp_callback): Update, "entry" parameter is a
4111 struct thread_info * now. Fetch pid from thread.
4112 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4113 (status_pending_p_callback): Update, "entry" parameter is a
4114 struct thread_info * now. Fetch ptid from thread.
4115 (find_lwp_pid): Update, "entry" parameter is a
4116 struct thread_info * now.
4117 (linux_wait_for_lwp): Fetch pid from thread.
4118 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4119 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4120 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4121 (dequeue_one_deferred_signal): Ditto.
4122 (cancel_breakpoint): Fetch ptid from current_inferior.
4123 (linux_wait_for_event): Pass &all_threads to find_inferior,
4124 not &all_lwps. Fetch ptid, lwpid from thread.
4125 (count_events_callback): Update, "entry" parameter is a
4126 struct thread_info * now.
4127 (select_singlestep_lwp_callback): Ditto.
4128 (select_event_lwp_callback): Ditto.
4129 (cancel_breakpoints_callback): Ditto.
4130 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4131 not &all_lwps.
4132 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4133 (unsuspend_one_lwp): Update, "entry" parameter is a
4134 struct thread_info * now.
4135 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4136 not &all_lwps.
4137 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4138 Fetch lwpid from thread, not lwp.
4139 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4140 Pass &all_threads to find_inferior, not &all_lwps.
4141 (send_sigstop): Fetch lwpid from thread, not lwp.
4142 (send_sigstop_callback): Update, "entry" parameter is a
4143 struct thread_info * now.
4144 (suspend_and_send_sigstop_callback): Ditto.
4145 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4146 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4147 struct thread_info * now.
4148 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4149 from thread, lwp.
4150 (lwp_running): Update, "entry" parameter is a
4151 struct thread_info * now.
4152 (stop_all_lwps): Fetch ptid from thread.
4153 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4154 (linux_resume_one_lwp): Fetch lwpid from thread.
4155 (linux_set_resume_request): Update, "entry" parameter is a
4156 struct thread_info * now. Fetch pid, lwpid from thread.
4157 (resume_status_pending_p): Update, "entry" parameter is a
4158 struct thread_info * now.
4159 (need_step_over_p): Ditto. Fetch lwpid from thread.
4160 (start_step_over): Fetch lwpid from thread.
4161 (linux_resume_one_thread): Update, "entry" parameter is a
4162 struct thread_info * now. Fetch lwpid from thread.
4163 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4164 (proceed_one_lwp): Update, "entry" parameter is a
4165 struct thread_info * now. Fetch lwpid from thread.
4166 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4167 struct thread_info * now.
4168 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4169 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4170 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4171 directly.
4172 (regsets_store_inferior_registers): Ditto.
4173 (fetch_register, store_register): Ditto.
4174 (linux_read_memory, linux_write_memory): Ditto.
4175 (linux_request_interrupt): Ditto.
4176 (linux_read_auxv): Ditto.
4177 (linux_xfer_siginfo): Ditto.
4178 (linux_qxfer_spu): Ditto.
4179 (linux_qxfer_libraries_svr4): Ditto.
4180 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4181 moved to inferiors.h.
4182 (get_lwp): Delete.
4183 (get_thread_lwp): Update.
4184 (struct lwp_info): Delete member "entry". Simplify comment for
4185 member "thread".
4186 (all_lwps): Delete.
4187 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4188 current_inferior directly.
4189 (update_watch_registers_callback): Update, "entry" parameter is a
4190 struct thread_info * now. Fetch pid from thread.
4191 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4192 (mips_insert_point): Fetch lwpid from current_inferior.
4193 Pass &all_threads to find_inferior, not &all_lwps.
4194 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4195 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4196 directly.
4197 (mips_stopped_data_address): Ditto.
4198 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4199 directly.
4200 * linux-tile-low.c (tile_arch_setup): Ditto.
4201 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4202 (update_debug_registers_callback): Update, "entry" parameter is a
4203 struct thread_info * now. Fetch pid from thread.
4204 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4205 Pass &all_threads to find_inferior, not &all_lwps.
4206 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4207 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4208 Pass &all_threads to find_inferior, not &all_lwps.
4209 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4210 (i386_dr_low_get_status): Ditto.
4211 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4212 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4213 (x86_linux_read_description): Ditto.
4214 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4215
3b8361aa
DE
42162014-02-20 Doug Evans <dje@google.com>
4217
4218 * inferiors.c (get_first_inferior): Fix buglet.
4219
f7667f0d
DE
42202014-02-19 Doug Evans <dje@google.com>
4221
4222 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4223 * inferiors.c (add_thread): Change result type to struct thread_info *.
4224 All callers updated.
4225 (add_lwp): Call add_thread here instead of in callers.
4226 All callers updated.
4227 * linux-low.h (get_lwp_thread): Rewrite.
4228 (struct lwp_info): New member "thread".
4229
b3312d80
DE
42302014-02-19 Doug Evans <dje@google.com>
4231
4232 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4233 All callers updated.
4234
ecc6f45c
DE
42352014-02-19 Doug Evans <dje@google.com>
4236
4237 * inferiors.c (add_thread): Fix whitespace.
4238
649ebbca
DE
42392014-02-19 Doug Evans <dje@google.com>
4240
4241 * dll.c (clear_dlls): Replace accessing list implemention details
4242 with API function.
4243 * gdbthread.h (get_first_thread): Declare.
4244 * inferiors.c (for_each_inferior_with_data): New function.
4245 (get_first_thread): New function.
4246 (find_thread_ptid): Simplify.
4247 (get_first_inferior): New function.
4248 (clear_list): Delete.
4249 (one_inferior_p): New function.
4250 (clear_inferior_list): New function.
4251 (clear_inferiors): Update.
4252 * inferiors.h (for_each_inferior_with_data): Declare.
4253 (clear_inferior_list): Declare.
4254 (one_inferior_p): Declare.
4255 (get_first_inferior): Declare.
4256 * linux-low.c (linux_wait_for_event): Replace accessing list
4257 implemention details with API function.
4258 * server.c (target_running): Ditto.
4259 (accumulate_file_name_length): New function.
4260 (emit_dll_description): New function.
4261 (handle_qxfer_libraries): Replace accessing list implemention
4262 details with API function.
4263 (handle_qxfer_threads_worker): New function.
4264 (handle_qxfer_threads_proper): Replace accessing list implemention
4265 details with API function.
4266 (handle_query): Ditto.
4267 (visit_actioned_threads_callback_ftype): New typedef.
4268 (visit_actioned_threads_data): New struct.
4269 (visit_actioned_threads): Rewrite to be find_inferior callback.
4270 (resume): Call find_inferior.
4271 (handle_status): Replace accessing list implemention
4272 details with API function.
4273 (process_serial_event): Replace accessing list implemention details
4274 with API function.
4275 * target.c (set_desired_inferior): Replace accessing list implemention
4276 details with API function.
4277 * tracepoint.c (same_process_p): New function.
4278 (gdb_agent_about_to_close): Replace accessing list implemention
4279 details with API function.
4280 * win32-low.c (child_delete_thread): Replace accessing list
4281 implemention details with API function.
4282 (match_dll_by_basename): New function.
4283 (dll_is_loaded_by_basename): New function.
4284 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4285 details call to dll_is_loaded_by_basename.
4286
80894984
DE
42872014-02-19 Doug Evans <dje@google.com>
4288
4289 * dll.h (struct dll_info): Add comment.
4290 * gdbthread.h (struct thread_info): Add comment.
4291 (current_ptid): Simplify.
4292 * inferiors.c (add_process): Update.
4293 (remove_process): Update.
4294 * inferiors.h (struct process_info): Rename member "head" to "entry".
4295 * linux-low.c (delete_lwp): Update.
4296 (add_lwp): Update.
4297 (last_thread_of_process_p): Update.
4298 (kill_one_lwp_callback, linux_kill): Update.
4299 (status_pending_p_callback): Update.
4300 (wait_for_sigstop): Update. Simplify read of ptid.
4301 (start_step_over): Update.
4302 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4303 (get_lwp_thread): Update.
4304 (struct lwp_info): Rename member "head" to "entry".
4305 * regcache.h (inferior_list_entry): Delete.
4306 * server.c (kill_inferior_callback): Update.
4307 (detach_or_kill_inferior_callback): Update.
4308 (print_started_pid): Update.
4309 (print_attached_pid): Update.
4310 (process_serial_event): Simplify read of ptid.
4311 * thread-db.c (thread_db_create_event): Update.
4312 (thread_db_get_tls_address): Update.
4313 * win32-low.c (current_inferior_ptid): Simplify.
4314
46917d26
TT
43152014-02-19 Tom Tromey <tromey@redhat.com>
4316
4317 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4318 argument.
4319 (target_supports_btrace): Update.
4320
0759a81e
YQ
43212014-02-14 Yao Qi <yao@codesourcery.com>
4322
4323 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4324 (rsp-low-ipa.o): New target.
4325
a7191e8b
TT
43262014-02-12 Tom Tromey <tromey@redhat.com>
4327
4328 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4329 convert_ascii_to_int.
4330 * regcache.c (registers_to_string): Likewise.
4331 * remote-utils.c (decode_M_packet): Likewise.
4332 * server.c (process_serial_event): Likewise.
4333
ff0e980e
TT
43342014-02-12 Tom Tromey <tromey@redhat.com>
4335
4336 * server.c (handle_query, handle_v_run): Use hex2bin, not
4337 unhexify.
4338 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4339
e9371aff
TT
43402014-02-12 Tom Tromey <tromey@redhat.com>
4341
4342 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4343 convert_int_to_ascii.
4344 * regcache.c (registers_to_string, collect_register_as_string):
4345 Likewise.
4346 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4347 Likewise.
4348 * server.c (process_serial_event): Likewise.
4349 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4350 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4351
971dc0b8
TT
43522014-02-12 Tom Tromey <tromey@redhat.com>
4353
4354 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4355 bin2hex, not hexify.
4356 * tracepoint.c (cmd_qtstatus): Likewise.
4357
0a822afb
TT
43582014-02-12 Tom Tromey <tromey@redhat.com>
4359
4360 * remote-utils.c (monitor_output): Pass explicit length to
4361 hexify.
4362
9c3d6531
TT
43632014-02-12 Tom Tromey <tromey@redhat.com>
4364
4365 * tracepoint.c: Include rsp-low.h.
4366 * server.c: Include rsp-low.h.
4367 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4368 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4369 declare.
4370 * remote-utils.c: Include rsp-low.h.
4371 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4372 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4373 (convert_int_to_ascii, convert_ascii_to_int): Move to
4374 common/rsp-low.c.
4375 * regcache.c: Include rsp-low.h.
4376 * ax.c: Include rsp-low.h.
4377 * Makefile.in (SFILES): Add common/rsp-low.c.
4378 (OBS): Add rsp-low.o.
4379 (rsp-low.o): New target.
4380
01fd3ea5
TT
43812014-02-12 Tom Tromey <tromey@redhat.com>
4382
4383 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4384 Include print-utils.h.
4385 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4386 (plongest, thirty_two, phex_nz): Remove.
4387 * Makefile.in (SFILES): Add common/print-utils.c.
4388 (OBS): Add print-utils.o.
4389 (print-utils-ipa.o): New target.
4390 (print-utils.o): New target.
4391 (IPA_OBJS): Add print-utils-ipa.o.
4392
e99dc820
TT
43932014-02-06 Tom Tromey <tromey@redhat.com>
4394
4395 * Makefile.in (SFILES): Fix indentation.
4396
ee1e2d4f
DE
43972014-02-05 Doug Evans <dje@google.com>
4398
4399 * linux-low.c (linux_wait_for_event): Improve comment.
4400 (linux_wait_1): Keep current_inferior in sync with event_child.
4401
f5a02773
DE
44022014-01-22 Doug Evans <dje@google.com>
4403
4404 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4405
87ce2a04
DE
44062014-01-22 Doug Evans <dje@google.com>
4407
4408 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4409 * configure: Regenerate.
4410 * config.in: Regenerate.
4411 * Makefile.in (SFILES): Add debug.c.
4412 (OBS): Add debug.o.
4413 * debug.c: New file.
4414 * debug.h: New file.
4415 * linux-aarch64-low.c (*): Update all debugging printfs to use
4416 debug_printf instead of fprintf.
4417 * linux-arm-low.c (*): Ditto.
4418 * linux-cris-low.c (*): Ditto.
4419 * linux-crisv32-low.c (*): Ditto.
4420 * linux-m32r-low.c (*): Ditto.
4421 * linux-sparc-low.c (*): Ditto.
4422 * linux-x86.c (*): Ditto.
4423 * linux-low.c (*): Ditto.
4424 (linux_wait_1): Add calls to debug_enter, debug_exit.
4425 (linux_wait): Remove redundant debugging printf.
4426 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4427 (linux_resume, unstop_all_lwps): Ditto.
4428 * mem-break.c (*): Update all debugging printfs to use
4429 debug_printf instead of fprintf.
4430 * remote-utils.c (*): Ditto.
4431 * thread-db.c (*): Ditto.
4432 * server.c #include <ctype.h>, "gdb_vecs.h".
4433 (debug_threads): Moved to debug.c.
4434 (*): Update all debugging printfs to use debug_printf instead of
4435 fprintf.
4436 (start_inferior): Replace call to fflush with call to debug_flush.
4437 (monitor_show_help): Mention set debug-format.
4438 (parse_debug_format_options): New function.
4439 (handle_monitor_command): Handle "monitor set debug-format".
4440 (gdbserver_usage): Mention --debug-format.
4441 (main): Parse --debug-format.
4442 * server.h (debug_threads): Declaration moved to debug.h.
4443 #include "debug.h".
4444 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4445 trace_debug_1 that uses debug_printf.
4446 (tracepoint_look_up_symbols): Update all debugging printfs to use
4447 debug_printf instead of fprintf.
4448
e671835b
BS
44492014-01-20 Baruch Siach <baruch@tkos.co.il>
4450
4451 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4452 sys/ptrace.h.
4453
b5737fa9
PA
44542014-01-17 Pedro Alves <palves@redhat.com>
4455
ea38d2a9 4456 PR build/16445
c7faa97a
PA
4457 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4458 defined after including gdb_proc_service.h.
b5737fa9 4459
40ed484e
DE
44602014-01-16 Doug Evans <dje@google.com>
4461
4462 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4463 (match_dll): Use it.
4464
969c39fb
MM
44652014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4466
4467 * target.h (target_ops) <read_btrace>: Change parameters and
4468 return type to allow error reporting.
4469 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4470 trace reading errors on.
4471 * linux-low.c (linux_low_read_btrace): Pass trace reading
4472 errors on.
4473 (linux_low_disable_btrace): New.
4474
ab7f45ba
DE
44752014-01-15 Doug Evans <dje@google.com>
4476
4477 * inferiors.c (thread_id_to_gdb_id): Delete.
4478 * inferiors.h (thread_id_to_gdb_id): Delete.
4479
66af0f44
EZ
44802014-01-13 Eli Zaretskii <eliz@gnu.org>
4481
4482 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4483 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4484 versions.
4485
9939e131
PA
44862014-01-08 Pedro Alves <palves@redhat.com>
4487
4488 * server.c (handle_status): Don't discard previous queued stop
4489 replies or thread's pending status here.
4490 (main) <disconnection>: Do it here instead.
4491
b7ea362b
PA
44922014-01-08 Pedro Alves <palves@redhat.com>
4493
4494 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4495 * server.c (visit_actioned_threads, handle_pending_status): New
4496 function.
4497 (handle_v_cont): Factor out parts to ...
4498 (resume): ... this new function. If in all-stop, and a thread
4499 being resumed has a pending status, report it without actually
4500 resuming.
4501 (myresume): Adjust to use the new 'resume' function.
4502 (clear_pending_status_callback, set_pending_status_callback)
4503 (find_status_pending_thread_callback): New functions.
4504 (handle_status): Handle the case of multiple threads having
4505 interesting statuses to report. Report threads' real last signal
4506 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4507 with an interesting thread to report the status for, instead of
4508 always reporting the status of the first thread.
4509
28498c42
JB
45102014-01-01 Joel Brobecker <brobecker@adacore.com>
4511
4512 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4513 * gdbreplay.c (gdbreplay_version): Likewise.
4514
f45c82da
YZ
45152013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4516
4517 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4518 iov.iov_len with the real length in use.
4519
379a5e2d
JB
45202013-12-13 Joel Brobecker <brobecker@adacore.com>
4521
4522 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4523 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4524 for all targets that use win32-low.c.
4525 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4526 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4527
4210d83e
PA
45282013-12-13 Pedro Alves <palves@redhat.com>
4529
4530 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4531 if equal to TARGET_WAITKIND_LOADED.
4532 * win32-low.c (cached_status): New static global.
4533 (win32_wait): Add declaration.
4534 (do_initial_child_stuff): Flush all initial pending debug events
4535 up to the initial breakpoint.
4536 (win32_wait): If CACHED_STATUS was set, return that instead
4537 of doing a real wait. Remove the code resuming the execution
4538 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4539 during the initial phase. Also remove the code changing
4540 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4541 TARGET_WAITKIND_STOPPED.
4542
e7f0d979
YQ
45432013-12-11 Yao Qi <yao@codesourcery.com>
4544
4545 * notif.c (handle_notif_ack): Return 0 if no notification
4546 matches.
4547
ebcf782c
DE
45482013-11-20 Doug Evans <dje@google.com>
4549
4550 * linux-low.c (linux_set_resume_request): Fix comment.
4551
20ad9378
DE
45522013-11-20 Doug Evans <dje@google.com>
4553
4554 * linux-low.c (resume_status_pending_p): Tweak comment.
4555
a196ebeb
WT
45562013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4557
4558 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4559 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4560 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4561 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4562 (srv_amd64_regobj): Add amd64-mpx.o.
4563 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4564 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4565 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4566 * i387-fp.c (num_pl_bnd_register) Added constant.
4567 (num_pl_bnd_cfg_registers) Added constant.
4568 (struct i387_xsave) Added reserved area and MPX fields.
4569 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4570 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4571 function.
4572 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4573 (init_registers_amd64_mpx_linux): Declare new function.
4574 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4575 (x86_64_regmap): Add MPX registers.
4576 (x86_linux_read_description): Add MPX case.
4577 (initialize_low_arch): Initialize MPX targets.
4578
0080a2f6
TT
45792013-11-18 Tom Tromey <tromey@redhat.com>
4580
4581 * configure: Rebuild.
4582 * configure.ac: Don't check for stdlib.h.
4583 * gdbreplay.c: Unconditionally include stdlib.h.
4584
2978b111
TT
45852013-11-18 Tom Tromey <tromey@redhat.com>
4586
4587 * config.in: Rebuild.
4588 * configure: Rebuild.
4589 * configure.ac: Don't use AC_HEADER_DIRENT.
4590
a3d08894
TT
45912013-11-18 Tom Tromey <tromey@redhat.com>
4592
4593 * server.h: Don't check HAVE_STRING_H.
4594 * gdbreplay.c: Don't check HAVE_STRING_H.
4595 * configure: Rebuild.
4596
0a5dd17d
TT
45972013-11-18 Tom Tromey <tromey@redhat.com>
4598
4599 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4600 LIBGNU.
4601
1bd2f0ba
TT
46022013-11-08 Tom Tromey <tromey@redhat.com>
4603
4604 * configure, config.in: Rebuild.
4605 * configure.ac: Remove unused configury.
4606
3266f10b
TT
46072013-11-08 Tom Tromey <tromey@redhat.com>
4608
4609 * acinclude.m4: Include common.m4, codeset.m4.
4610 * configure, config.in: Rebuild.
4611 * configure.ac: Use GDB_AC_COMMON.
4612
6682d959
AA
46132013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4614
4615 * linux-s390-low.c (HWCAP_S390_TE): New define.
4616 (s390_arch_setup): Consider the TE field in the HWCAP for
4617 determining 'have_regset_tdb'.
4618
fd0a4d76
SDJ
46192013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4620
4621 PR gdb/16014
4622 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4623 call to sizeof.
4624
1a3d890b
PA
46252013-10-02 Pedro Alves <palves@redhat.com>
4626
4627 * server.c (process_serial_event): Don't output "GDBserver
4628 exiting" if GDB is connected through stdio.
4629 * target.c (mywait): Likewise, be silent if GDB is connected
4630 through stdio.
4631
97ad4581
JB
46322013-10-01 Joel Brobecker <brobecker@adacore.com>
4633
4634 * lynx-low.c (lynx_add_threads_after_attach): New function.
4635 (lynx_attach): Remove call to add_thread. Add call to
4636 lynx_add_threads_after_attach instead.
4637
5b4e221c
MF
46382013-09-28 Mike Frysinger <vapier@gentoo.org>
4639
4640 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4641 * config.in, configure: Regenerated.
4642
ee47b2f8
YQ
46432013-09-18 Yao Qi <yao@codesourcery.com>
4644
4645 PR server/15959
4646 * server.c (start_inferior): Clear 'resume_info'.
4647
d6707650 46482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4649
d6707650
JW
4650 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4651 for each register.
4652
9243dd0e 46532013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4654
9243dd0e
JW
4655 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4656 linux-tile-low.o to srv_tgtobj.
4657
c623a6ef
WN
46582013-09-16 Will Newton <will.newton@linaro.org>
4659
4660 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4661 out regs.
4662
fb71d39e
PA
46632013-09-06 Pedro Alves <palves@redhat.com>
4664
4665 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4666 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4667 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4668 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4669 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4670 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4671
8e7e9910
PA
46722013-09-06 Pedro Alves <palves@redhat.com>
4673
4674 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4675 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4676
7c3a12ca
PA
46772013-09-06 Pedro Alves <palves@redhat.com>
4678
4679 * linux-amd64-ipa.c: Include tracepoint.h.
4680 * linux-i386-ipa.c: Include tracepoint.h.
4681
8eb3d7b6
RW
46822013-09-06 Ricard Wanderlof <ricardw@axis.com>
4683
4684 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4685 (ps_get_thread_area): New function.
4686
eddddb9d
RW
46872013-09-06 Ricard Wanderlof <ricardw@axis.com>
4688
4689 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4690 (initialize_low_arch): Call init_registers_crisv32 rather than
4691 init_register_crisv32.
4692
533b0600
PA
46932013-09-05 Pedro Alves <palves@redhat.com>
4694
4695 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4696 to ...
4697 * hostio.h: ... this new file.
4698 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4699 win32-low.c: Include hostio.h.
4700
0ce3d3b5
PA
47012013-09-05 Pedro Alves <palves@redhat.com>
4702
4703 * server.h (gdb_client_data, handler_func, callback_handler_func)
4704 (delete_file_handler, add_file_handler, append_callback_event)
4705 (delete_callback_event, start_event_loop, initialize_event_loop):
4706 Move to event-loop.h and include it.
4707 * event-loop.h: New file.
4708
799cdc37
PA
47092013-09-05 Pedro Alves <palves@redhat.com>
4710
4711 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4712 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4713 (loaded_dll, unloaded_dll): Move to ...
4714 * dll.h: ... this new file.
4715 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4716
6a6bbd9d
PA
47172013-09-05 Pedro Alves <palves@redhat.com>
4718
4719 * server.h (current_process, get_thread_process, all_processes)
4720 (add_inferior_to_list, for_each_inferior, current_inferior)
4721 (remove_inferior, add_process, remove_process, find_process_pid)
4722 (have_started_inferiors_p, have_attached_inferiors_p)
4723 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4724 (clear_inferiors, find_inferior, find_inferior_id)
4725 (inferior_target_data, set_inferior_target_data)
4726 (inferior_regcache_data, set_inferior_regcache_data): Move to
4727 inferiors.h, and include it.
4728 * inferiors.h: New file.
4729
f699aaba
PA
47302013-09-05 Pedro Alves <palves@redhat.com>
4731
4732 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4733 Move ...
72f4393d 4734 * ax.h: ... here.
f699aaba 4735
c144c7a0
PA
47362013-09-05 Pedro Alves <palves@redhat.com>
4737
4738 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4739 tracepoint.h.
4740 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4741 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4742 (handle_tracepoint_general_set, handle_tracepoint_query)
4743 (tracepoint_finished_step, tracepoint_was_hit)
4744 (release_while_stepping_state_list, current_traceframe)
4745 (in_readonly_region, traceframe_read_mem)
4746 (fetch_traceframe_registers, traceframe_read_sdata)
4747 (traceframe_read_info, struct fast_tpoint_collect_status)
4748 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4749 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4750 (supply_fast_tracepoint_registers)
4751 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4752 (ipa_tdesc, claim_trampoline_space)
4753 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4754 (agent_mem_read, agent_get_trace_state_variable_value)
4755 (agent_set_trace_state_variable_value, agent_tsv_read)
4756 (agent_mem_read_string, get_raw_reg_func_addr)
4757 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4758 * tracepoint.h: ... this new file.
4759
ff42e6ab
PA
47602013-09-05 Pedro Alves <palves@redhat.com>
4761
4762 * server.h (perror_with_name, error, fatal, warning, paddress)
4763 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4764 include it.
4765 * utils.h: New file.
4766
541af0f4
PA
47672013-09-05 Pedro Alves <palves@redhat.com>
4768
4769 * server.h (remote_debug, noack_mode, transport_is_reliable)
4770 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4771 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4772 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4773 (write_enn, initialize_async_io, enable_async_io)
4774 (disable_async_io, check_remote_input_interrupt_request)
4775 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4776 (dead_thread_notify, prepare_resume_reply)
4777 (decode_address_to_semicolon, decode_address, decode_m_packet)
4778 (decode_M_packet, decode_X_packet, decode_xfer_write)
4779 (decode_search_memory_packet, unhexify, hexify)
4780 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4781 (look_up_one_symbol, relocate_instruction)
4782 (monitor_output): Move to remote-utils.h, and include it.
4783 * remote-utils.h: New file.
4784
eebdf26b
PA
47852013-09-05 Pedro Alves <palves@redhat.com>
4786
4787 * server.h (_): Delete.
4788
3aafd2ff
PA
47892013-09-02 Pedro Alves <palves@redhat.com>
4790
4791 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4792 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4793 allocated.
4794 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4795
cee83bcb
PM
47962013-09-02 Pierre Muller <muller@sourceware.org>
4797
4798 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4799 or WriteProcessMemory complete successfully and handle
4800 ERROR_PARTIAL_COPY error.
4801
9a13b2fa
PA
48022013-09-02 Pedro Alves <palves@redhat.com>
4803
4804 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4805 error instead of EIO.
4806
602e3198
JK
48072013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4808
4809 PR server/15604
4810 * linux-low.c: Include filestuff.h.
4811 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4812 * lynx-low.c: Include filestuff.h.
4813 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4814 * server.c: Include filestuff.h.
4815 (main): Call notice_open_fds.
4816 * spu-low.c: Include filestuff.h.
4817 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4818
96d7229d
LM
48192013-08-22 Luis Machado <lgustavo@codesourcery.com>
4820
4821 * Makefile.in: Explain why ../target and ../nat are not
4822 listed as include file search paths.
4823 (linux-waitpid.o): New object file rule.
4824 * configure.srv (srv_native_linux_obj): New variable.
4825 Replace all occurrences of linux native object files with
4826 $srv_native_linux_obj.
4827 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4828 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4829 (linux_enable_event_reporting): Remove declaration.
4830 (my_waitpid): Moved to common/linux-waitpid.c.
4831 (linux_wait_for_event): Pass ptid when calling
4832 linux_enable_event_reporting.
4833 (linux_supports_tracefork_flag): Remove.
4834 (linux_enable_event_reporting): Likewise.
4835 (linux_tracefork_grandchild): Remove.
4836 (STACK_SIZE): Moved to common/linux-ptrace.c.
4837 (linux_tracefork_child): Remove.
4838 (linux_test_for_tracefork): Remove.
4839 (linux_look_up_symbols): Call linux_supports_traceclone.
4840 (initialize_low): Remove call to linux_test_for_tracefork.
4841 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4842 common/linux-ptrace.h.
4843 (PTRACE_TYPE_ARG4): Likewise.
4844 Include linux-ptrace.h.
4845
32940073
PA
48462013-08-21 Pedro Alves <palves@redhat.com>
4847
4848 * config.in: Renegerate.
4849
33b60d58 48502013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4851
33b60d58
LM
4852 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4853 (SFILES): Remove $(srcdir)/common/target-common.c and
4854 add $(srcdir)/target/waitstatus.c.
4855 (OBS): Remove target-common.o and add waitstatus.o.
4856 (server_h): Remove $(srcdir)/../common/target-common.h and
4857 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4858 and $(srcdir)/../target/waitstatus.h.
4859 (target-common.o): Remove.
4860 (waitstatus.o): New target object file.
4861 * target.h: Do not include target-common.h and
4862 include target/resume.h, target/wait.h and
4863 target/waitstatus.h.
4864
b8e1b30e
LM
48652013-08-13 Luis Machado <lgustavo@codesourcery.com>
4866
4867 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4868 to PTRACE_TYPE_ARG3.
4869 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4870 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4871 PTRACE_TYPE_ARG4.
4872 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4873 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4874
7a60ad40
YQ
48752013-07-27 Jie Zhang <jie@codesourcery.com>
4876 Daniel Jacobowitz <dan@codesourcery.com>
4877 Yao Qi <yao@codesourcery.com>
4878
4879 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4880 (mips-linux-watch.o): New rule.
4881 (mips_linux_watch_h): New variable.
4882 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4883 srv_tgtobj.
4884 * linux-mips-low.c: Include mips-linux-watch.h.
4885 (struct arch_process_info, struct arch_lwp_info): New.
4886 (update_watch_registers_callback): New function.
4887 (mips_linux_new_process, mips_linux_new_thread) New functions.
4888 (mips_linux_prepare_to_resume, mips_insert_point): New
4889 functions.
4890 (mips_remove_point, mips_stopped_by_watchpoint): New
4891 functions.
4892 (rsp_bp_type_to_target_hw_bp_type): New function.
4893 (mips_stopped_data_address): New function.
4894 (the_low_target): Add watchpoint support functions.
4895
de6f69ad
YQ
48962013-07-27 Yao Qi <yao@codesourcery.com>
4897
4898 * i386-low.c: Include break-common.h.
4899 (enum target_hw_bp_type): Remove.
4900
3360c0bf
LM
49012013-07-24 Luis Machado <lgustavo@codesourcery.com>
4902
4903 * Makefile.in (SFILES): /common/target-common.c.
4904 (OBS): Add target-common.o.
4905 (server_h): Add $(srcdir)/../common/target-common.h.
4906 (target-common.o): New target.
4907 * server.c (queue_stop_reply_callback): Free
4908 status string after use.
4909 * target.c (target_waitstatus_to_string): Remove.
4910 * target.h: Include target-common.h.
4911 (resume_kind): Likewise.
4912 (target_waitkind): Likewise.
4913 (target_waitstatus): Likewise.
4914 (TARGET_WNOHANG): Likewise.
4915
bd885420
YQ
49162013-07-04 Yao Qi <yao@codesourcery.com>
4917
4918 * Makefile.in (host_alias): Use @host_noncanonical@.
4919 (target_alias): Use @target_noncanonical@.
4920 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4921 ACX_NONCANONICAL_HOST.
4922 * configure: Regenerated.
4923
4924 Revert:
4925 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4926
4927 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4928 * configure: Rebuild.
4929 * Makefile.in (version_host, version_target): Get from configure.
4930 (version.c): Use $(version_host) and $(version_target).
4931
17ef446e
PA
49322013-07-03 Pedro Alves <palves@redhat.com>
4933
4934 * Makefile.in (config.status): Depend on development.sh.
4935 * acinclude.m4: Include libmcheck.m4.
4936 * configure: Regenerate.
4937
7a9a7487
MG
49382013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4939
4940 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4941 attribute inside the parentheses.
4942 (winapi_DebugSetProcessKillOnExit): Ditto.
4943 (winapi_DebugBreakProcess): Ditto.
4944 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4945
49b64de6
MG
49462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4947
4948 * notif.h (notif_event): Add a dummy member to avoid compiler
4949 errors.
4950
d5749ee7
PA
49512013-07-01 Pedro Alves <palves@redhat.com>
4952
4953 * hostio.c (HOSTIO_PATH_MAX): Define.
4954 (require_filename, handle_open, handle_unlink, handle_readlink):
4955 Use it.
4956
d8d2a3ee
PA
49572013-07-01 Pedro Alves <palves@redhat.com>
4958
4959 * server.h: Include "pathmax.h".
4960 * linux-low.c: Don't include sys/param.h.
4961 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4962 MAXPATHLEN.
4963 * win32-low.c: Don't include sys/param.h.
4964 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4965
bc7dea8d
PA
49662013-07-01 Pedro Alves <palves@redhat.com>
4967
4968 * event-loop.c: Don't check HAVE_UNISTD_H before including
4969 <unistd.h>.
4970 * gdbreplay.c: Likewise.
4971 * remote-utils.c: Likewise.
4972 * server.c: Likewise.
4973 * configure.ac: Don't check for unistd.h.
4974 * configure: Regenerate.
4975
d6c2da54
TT
49762013-06-28 Tom Tromey <tromey@redhat.com>
4977
4978 * Makefile.in (version.c): Use version.in, not
4979 common/version.in.
4980
257b6bec
MG
49812013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4982
4983 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4984 * configure: Rebuild.
4985 * Makefile.in (version_host, version_target): Get from configure.
4986 (version.c): Use $(version_host) and $(version_target).
4987
86ebe149
DK
49882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4989
4990 Fix trace-status to output user name without trailing colon.
4991 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4992
f30aa5af
DK
49932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4994
4995 Fix trace-status to output proper start-time and stop-time.
4996 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4997 output start time and stop time in hex as gdb expects.
4998
28a93511
YQ
49992013-06-26 Pedro Alves <pedro@codesourcery.com>
5000
5001 * tracepoint.c (build_traceframe_info_xml): Output trace state
5002 variables present in the trace buffer.
5003
01208463
TT
50042013-06-24 Tom Tromey <tromey@redhat.com>
5005
5006 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5007 create-version.sh.
5008 (version.o): Remove.
5009 * gdbreplay.c: Include version.h.
5010 (version, host_name): Don't declare.
5011 * server.h: Include version.h.
5012 (version, host_name): Don't declare.
5013
760256f9
PA
50142013-06-12 Pedro Alves <palves@redhat.com>
5015
5016 * linux-x86-low.c (linux_is_elf64): Delete global.
5017 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5018 with local linux_pid_exe_is_elf_64_file use.
5019
030031ee
PA
50202013-06-11 Pedro Alves <palves@redhat.com>
5021
5022 * linux-low.c (regset_disabled, disable_regset): New functions.
5023 (regsets_fetch_inferior_registers)
5024 (regsets_store_inferior_registers): Use them.
5025 (initialize_regsets_info); Don't allocate the disabled_regsets
5026 array here.
5027 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5028 comment.
5029
5da6eb0a
PA
50302013-06-11 Pedro Alves <palves@redhat.com>
5031
5032 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5033 xmalloc.
5034
7e5aaa09
PA
50352013-06-11 Pedro Alves <palves@redhat.com>
5036
5037 * linux-x86-low.c (initialize_low_arch): Call
5038 init_registers_x32_avx_linux.
5039
d878444c
JK
50402013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5041
5042 Fix compatibility with Android Bionic.
5043 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5044 it is not empty.
5045
3aee8918
PA
50462013-06-07 Pedro Alves <palves@redhat.com>
5047
5f2b57b5 5048 PR server/14823
3aee8918
PA
5049 * Makefile.in (OBS): Add tdesc.o.
5050 (IPA_OBJS): Add tdesc-ipa.o.
5051 (tdesc-ipa.o): New rule.
5052 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5053 interface.
5054 * linux-low.c (new_inferior): Delete.
5055 (disabled_regsets, num_regsets): Delete.
5056 (linux_add_process): Adjust to set the new per-process
5057 new_inferior flag.
5058 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5059 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5060 was a stop. When calling arch_setup, switch the current inferior
5061 to the thread that got an event.
5062 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5063 (regsets_fetch_inferior_registers)
5064 (regsets_store_inferior_registers): New regsets_info parameter.
5065 Adjust to use it.
5066 (linux_register_in_regsets): New regs_info parameter. Adjust to
5067 use it.
5068 (register_addr, fetch_register, store_register): New usrregs_info
5069 parameter. Adjust to use it.
5070 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5071 parameter regs_info. Adjust to use it.
5072 (linux_fetch_registers): Get the current inferior's regs_info, and
5073 adjust to use it.
5074 (linux_store_registers): Ditto.
5075 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5076 (initialize_low): Don't initialize the target_regsets here. Call
5077 initialize_low_arch.
5078 * linux-low.h (target_regsets): Delete declaration.
5079 (struct regsets_info): New.
5080 (struct usrregs_info): New.
5081 (struct regs_info): New.
5082 (struct process_info_private) <new_inferior>: New field.
5083 (struct linux_target_ops): Delete the num_regs, regmap, and
5084 regset_bitmap fields. New field regs_info.
5085 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5086 * i387-fp.c (num_xmm_registers): Delete.
5087 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5088 calls to new interface.
5089 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5090 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5091 Infer the number of xmm registers from the regcache's target
5092 description.
5093 * i387-fp.h (num_xmm_registers): Delete.
5094 * inferiors.c (add_thread): Don't install the thread's regcache
5095 here.
5096 * proc-service.c (gregset_info): Fetch the current inferior's
5097 regs_info. Adjust to use it.
5098 * regcache.c: Include tdesc.h.
5099 (register_bytes, reg_defs, num_registers)
5100 (gdbserver_expedite_regs): Delete.
5101 (get_thread_regcache): If the thread doesn't have a regcache yet,
5102 create one, instead of aborting gdbserver.
5103 (regcache_invalidate_one): Rename to ...
5104 (regcache_invalidate_thread): ... this.
5105 (regcache_invalidate_one): New.
5106 (regcache_invalidate): Only invalidate registers of the current
5107 process.
5108 (init_register_cache): Add target_desc parameter, and use it.
5109 (new_register_cache): Ditto. Assert the target description has a
5110 non zero registers_size.
5111 (regcache_cpy): Add assertions. Adjust.
5112 (realloc_register_cache, set_register_cache): Delete.
5113 (registers_to_string, registers_from_string): Adjust.
5114 (find_register_by_name, find_regno, find_register_by_number)
5115 (register_cache_size): Add target_desc parameter, and use it.
5116 (free_register_cache_thread, free_register_cache_thread_one)
5117 (regcache_release, register_cache_size): New.
5118 (register_size): Add target_desc parameter, and use it.
5119 (register_data, supply_register, supply_register_zeroed)
5120 (supply_regblock, supply_register_by_name, collect_register)
5121 (collect_register_as_string, collect_register_by_name): Adjust.
5122 * regcache.h (struct target_desc): Forward declare.
5123 (struct regcache) <tdesc>: New field.
5124 (init_register_cache, new_register_cache): Add target_desc
5125 parameter.
5126 (regcache_invalidate_thread): Declare.
5127 (regcache_invalidate_one): Delete declaration.
5128 (regcache_release): Declare.
5129 (find_register_by_number, register_cache_size, register_size)
5130 (find_regno): Add target_desc parameter.
5131 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5132 declarations.
5133 * remote-utils.c: Include tdesc.h.
5134 (outreg, prepare_resume_reply): Adjust.
5135 * server.c: Include tdesc.h.
5136 (gdbserver_xmltarget): Delete declaration.
5137 (get_features_xml, process_serial_event): Adjust.
5138 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5139 declare.
5140 (struct process_info) <tdesc>: New field.
5141 (ipa_tdesc): Declare.
5142 * tdesc.c: New file.
5143 * tdesc.h: New file.
5144 * tracepoint.c: Include tdesc.h.
5145 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5146 (get_context_regcache): Adjust to pass ipa_tdesc down.
5147 (do_action_at_tracepoint): Adjust to get the register cache size
5148 from the context regcache's description.
5149 (traceframe_walk_blocks): Adjust to get the register cache size
5150 from the current trace frame's description.
5151 (traceframe_get_pc): Adjust to get current trace frame's
5152 description and pass it down.
5153 (gdb_collect): Adjust to get the register cache size from the
5154 IPA's description.
5155 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5156 (gdbserver_xmltarget): Delete.
5157 (initialize_low_tracepoint): Set the ipa's target description.
5158 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5159 (initialize_low_tracepoint): Set the ipa's target description.
5160 * linux-x86-low.c: Include tdesc.h.
5161 [__x86_64__] (is_64bit_tdesc): New.
5162 (ps_get_thread_area, x86_get_thread_area): Use it.
5163 (i386_cannot_store_register): Rename to ...
5164 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5165 (i386_cannot_fetch_register): Rename to ...
5166 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5167 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5168 to new interface.
5169 (target_regsets): Rename to ...
5170 (x86_regsets): ... this.
5171 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5172 interface.
5173 (x86_siginfo_fixup): Use is_64bit_tdesc.
5174 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5175 (tdesc_x32_avx_linux, tdesc_x32_linux)
5176 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5177 Declare.
5178 (x86_linux_update_xmltarget): Delete.
5179 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5180 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5181 (AMD64_LINUX_USER64_CS): New.
5182 (x86_linux_read_description): New, based on
5183 x86_linux_update_xmltarget.
5184 (same_process_callback): New.
5185 (x86_arch_setup_process_callback): New.
5186 (x86_linux_update_xmltarget): New.
5187 (x86_regsets_info): New.
5188 (amd64_linux_regs_info): New.
5189 (i386_linux_usrregs_info): New.
5190 (i386_linux_regs_info): New.
5191 (x86_linux_regs_info): New.
5192 (x86_arch_setup): Reimplement.
5193 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5194 (x86_emit_ops): Ditto.
5195 (the_low_target): Adjust. Install x86_linux_regs_info,
5196 x86_cannot_fetch_register, and x86_cannot_store_register.
5197 (initialize_low_arch): New.
5198 * linux-ia64-low.c (tdesc_ia64): Declare.
5199 (ia64_fetch_register): Adjust.
5200 (ia64_usrregs_info, regs_info): New globals.
5201 (ia64_regs_info): New function.
5202 (the_low_target): Adjust.
5203 (initialize_low_arch): New function.
5204 * linux-sparc-low.c (tdesc_sparc64): Declare.
5205 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5206 Adjust.
5207 (sparc_arch_setup): New function.
5208 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5209 (the_low_target): Adjust.
5210 (initialize_low_arch): New function.
5211 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5212 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5213 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5214 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5215 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5216 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5217 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5218 (tdesc_powerpc_isa205_vsx64l): Declare.
5219 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5220 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5221 (ppc_set_pc, ppc_get_hwcap): Adjust.
5222 (ppc_usrregs_info): Forward declare.
5223 (!__powerpc64__) ppc_regmap_adjusted: New global.
5224 (ppc_arch_setup): Adjust to the current process'es target
5225 description.
5226 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5227 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5228 (ppc_store_evrregset): Adjust.
5229 (target_regsets): Rename to ...
5230 (ppc_regsets): ... this, and make static.
5231 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5232 (ppc_regs_info): New function.
5233 (the_low_target): Adjust.
5234 (initialize_low_arch): New function.
5235 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5236 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5237 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5238 (tdesc_s390x_linux64v2): Declare.
5239 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5240 (s390_fill_gregset, s390_store_last_break): Adjust.
5241 (target_regsets): Rename to ...
5242 (s390_regsets): ... this, and make static.
5243 (s390_get_pc, s390_set_pc): Adjust.
5244 (s390_get_hwcap): New target_desc parameter, and use it.
5245 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5246 (s390_arch_setup): Adjust to set the current process'es target
5247 description. Don't adjust the regmap.
5248 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5249 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5250 (regs_info_3264): New globals.
5251 (s390_regs_info): New function.
5252 (the_low_target): Adjust.
5253 (initialize_low_arch): New function.
5254 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5255 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5256 [__mips64] (init_registers_mips_linux)
5257 (init_registers_mips_dsp_linux): Delete defines.
5258 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5259 (have_dsp): New global.
5260 (mips_read_description): New, based on mips_arch_setup.
5261 (mips_arch_setup): Reimplement.
5262 (get_usrregs_info): New function.
5263 (mips_cannot_fetch_register, mips_cannot_store_register)
5264 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5265 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5266 (target_regsets): Rename to ...
5267 (mips_regsets): ... this, and make static.
5268 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5269 (dsp_regs_info, regs_info): New globals.
5270 (mips_regs_info): New function.
5271 (the_low_target): Adjust.
5272 (initialize_low_arch): New function.
5273 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5274 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5275 Declare.
5276 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5277 (arm_read_description): New, with bits factored from
5278 arm_arch_setup.
5279 (arm_arch_setup): Reimplement.
5280 (target_regsets): Rename to ...
5281 (arm_regsets): ... this, and make static.
5282 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5283 (arm_regs_info): New function.
5284 (the_low_target): Adjust.
5285 (initialize_low_arch): New function.
5286 * linux-m68k-low.c (tdesc_m68k): Declare.
5287 (target_regsets): Rename to ...
5288 (m68k_regsets): ... this, and make static.
5289 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5290 (m68k_regs_info): New function.
5291 (m68k_arch_setup): New function.
5292 (the_low_target): Adjust.
5293 (initialize_low_arch): New function.
5294 * linux-sh-low.c (tdesc_sharch): Declare.
5295 (target_regsets): Rename to ...
5296 (sh_regsets): ... this, and make static.
5297 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5298 (sh_regs_info, sh_arch_setup): New functions.
5299 (the_low_target): Adjust.
5300 (initialize_low_arch): New function.
5301 * linux-bfin-low.c (tdesc_bfin): Declare.
5302 (bfin_arch_setup): New function.
5303 (bfin_usrregs_info, regs_info): New globals.
5304 (bfin_regs_info): New function.
5305 (the_low_target): Adjust.
5306 (initialize_low_arch): New function.
5307 * linux-cris-low.c (tdesc_cris): Declare.
5308 (cris_arch_setup): New function.
5309 (cris_usrregs_info, regs_info): New globals.
5310 (cris_regs_info): New function.
5311 (the_low_target): Adjust.
5312 (initialize_low_arch): New function.
5313 * linux-cris-low.c (tdesc_crisv32): Declare.
5314 (cris_arch_setup): New function.
5315 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5316 (cris_regs_info): New function.
5317 (the_low_target): Adjust.
5318 (initialize_low_arch): New function.
5319 * linux-m32r-low.c (tdesc_m32r): Declare.
5320 (m32r_arch_setup): New function.
5321 (m32r_usrregs_info, regs_info): New globals.
5322 (m32r_regs_info): Adjust.
5323 (initialize_low_arch): New function.
5324 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5325 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5326 (tic6x_usrregs_info): Forward declare.
5327 (tic6x_read_description): New function, based on ...
5328 (tic6x_arch_setup): ... this. Reimplement.
5329 (target_regsets): Rename to ...
5330 (tic6x_regsets): ... this, and make static.
5331 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5332 (tic6x_regs_info): New function.
5333 (the_low_target): Adjust.
5334 (initialize_low_arch): New function.
5335 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5336 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5337 (target_regsets): Rename to ...
5338 (xtensa_regsets): ... this, and make static.
5339 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5340 globals.
5341 (xtensa_arch_setup, xtensa_regs_info): New functions.
5342 (the_low_target): Adjust.
5343 (initialize_low_arch): New function.
5344 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5345 (nios2_arch_setup): Set the current process'es tdesc.
5346 (target_regsets): Rename to ...
5347 (nios2_regsets): ... this.
5348 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5349 (nios2_regs_info): New function.
5350 (the_low_target): Adjust.
5351 (initialize_low_arch): New function.
a261b8f5
PA
5352 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5353 (aarch64_arch_setup): Set the current process'es tdesc.
5354 (target_regsets): Rename to ...
5355 (aarch64_regsets): ... this.
5356 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5357 (aarch64_regs_info): New function.
5358 (the_low_target): Adjust.
5359 (initialize_low_arch): New function.
3aee8918
PA
5360 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5361 globals.
5362 (target_regsets): Rename to ...
5363 (tile_regsets): ... this.
5364 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5365 (tile_regs_info): New function.
5366 (tile_arch_setup): Set the current process'es tdesc.
5367 (the_low_target): Adjust.
5368 (initialize_low_arch): New function.
5369 * spu-low.c (tdesc_spu): Declare.
5370 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5371 * win32-arm-low.c (tdesc_arm): Declare.
5372 (arm_arch_setup): New function.
5373 (the_low_target): Install arm_arch_setup instead of
5374 init_registers_arm.
5375 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5376 (init_windows_x86): Rename to ...
5377 (i386_arch_setup): ... this. Set `win32_tdesc'.
5378 (the_low_target): Adjust.
5379 * win32-low.c (win32_tdesc): New global.
5380 (child_add_thread): Don't create the thread cache here.
5381 (do_initial_child_stuff): Set the new process'es tdesc.
5382 * win32-low.h (struct target_desc): Forward declare.
5383 (win32_tdesc): Declare.
5384 * lynx-i386-low.c (tdesc_i386): Declare global.
5385 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5386 * lynx-low.c (lynx_tdesc): New global.
5387 (lynx_add_process): Set the new process'es tdesc.
5388 * lynx-low.h (struct target_desc): Forward declare.
5389 (lynx_tdesc): Declare global.
5390 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5391 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5392 * nto-low.c (nto_tdesc): New global.
5393 (do_attach): Set the new process'es tdesc.
5394 * nto-low.h (struct target_desc): Forward declare.
5395 (nto_tdesc): Declare.
5396 * nto-x86-low.c (tdesc_i386): Declare.
5397 (nto_x86_arch_setup): Set `nto_tdesc'.
5398
b1fbec62
GB
53992013-06-04 Gary Benson <gbenson@redhat.com>
5400
5401 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5402 to qSupported response when appropriate.
5403 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5404 with nonzero-length annex.
5405 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5406 arguments supplied in annex.
5407
d1ec4ce7
DE
54082013-05-31 Doug Evans <dje@google.com>
5409
ac44adcb 5410 PR server/15594
d1ec4ce7
DE
5411 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5412 64 bits in 64-cross-32 environment.
5413
9b25f2d3
PA
54142013-05-28 Pedro Alves <palves@redhat.com>
5415
5416 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5417 (aarch64-without-fpu.c): Delete rule.
5418 * configure.srv (aarch64*-*-linux*): Remove references to
5419 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5420 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5421 declaration.
5422
6740dc9c
PA
54232013-05-24 Pedro Alves <palves@redhat.com>
5424
5425 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5426 instead of strchr/decode_address. Error if the range isn't split
5427 with a ','. Don't assume there's be a ':' in the action.
5428
c2d6af84
PA
54292013-05-23 Yao Qi <yao@codesourcery.com>
5430 Pedro Alves <palves@redhat.com>
5431
5432 * linux-low.c (lwp_in_step_range): New function.
5433 (linux_wait_1): If the thread was range stepping and stopped
5434 outside the stepping range, report the stop to GDB. Otherwise,
5435 continue stepping. Add range stepping debug output.
5436 (linux_set_resume_request): Copy the step range from the resume
5437 request to the lwp.
5438 (linux_supports_range_stepping): New.
5439 (linux_target_ops) <supports_range_stepping>: Set to
5440 linux_supports_range_stepping.
5441 * linux-low.h (struct linux_target_ops)
5442 <supports_range_stepping>: New field.
5443 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5444 * linux-x86-low.c (x86_supports_range_stepping): New.
5445 (the_low_target) <supports_range_stepping>: Set to
5446 x86_supports_range_stepping.
5447 * server.c (handle_v_cont): Handle 'r' action.
5448 (handle_v_requests): Append ";r" if the target supports range
5449 stepping.
5450 * target.h (struct thread_resume) <step_range_start,
5451 step_range_end>: New fields.
5452 (struct target_ops) <supports_range_stepping>:
5453 New field.
5454 (target_supports_range_stepping): New macro.
5455
58794e1a
JB
54562013-05-17 Joel Brobecker <brobecker@adacore.com>
5457
5458 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5459 confusion in comment.
5460
d631c5a7
JB
54612013-05-17 Joel Brobecker <brobecker@adacore.com>
5462
5463 * lynx-low.c (struct process_info_private): New type.
5464 (lynx_add_process): New function.
5465 (lynx_create_inferior, lynx_attach): Replace calls to
5466 add_process by calls to lynx_add_process.
5467 (lynx_resume): If PTID is null, then try using
5468 current_process()->private->last_wait_event_ptid.
5469 Add comments.
5470 (lynx_clear_inferiors): Delete. The contents of that function
5471 has been inlined in lynx_mourn;
5472 (lynx_wait_1): Save the ptid in the process's private data.
5473 (lynx_mourn): Free the process' private data. Replace call
5474 to lynx_clear_inferiors by call to clear_inferiors.
5475
96f7a20f
YQ
54762013-05-17 Yao Qi <yao@codesourcery.com>
5477
5478 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5479 the right place.
5480
db0dfaa0
LM
54812013-05-16 Luis Machado <lgustavo@codesourcery.com>
5482
5483 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5484 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5485 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5486 PT_TEXT_END_ADDR guards. Update comments.
5487 (linux_target_op) <read_offsets>: Conditionally define to
5488 linux_read_offsets if the target is UCLIBC and if it defines
5489 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5490
68f5f838
SL
54912013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5492 Andrew Jenner <andrew@codesourcery.com>
5493
5494 * Makefile.in (SFILES): Add linux-nios2-low.c.
5495 (clean): Add action to delete nios2-linux.c.
5496 (nios2-linux.c): New rule.
5497 * configure.srv: Add nios2*-*-linux*.
5498 * linux-nios2-low.c: New.
5499
1ebff1fd
HAQ
55002013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5501
5502 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5503
f6150862
HZ
55042013-04-25 Hui Zhu <hui@codesourcery.com>
5505
5506 PR gdb/15186
f6150862
HZ
5507 * ax.c (ax_printf): Add fflush.
5508
614c279d
TT
55092013-04-22 Tom Tromey <tromey@redhat.com>
5510
5511 * Makefile.in (SFILES): Add filestuff.c.
5512 (OBS): Add filestuff.o.
5513 (filestuff.o): New target.
5514 * config.in, configure: Rebuild.
5515 * configure.ac: Check for fdwalk, pipe2.
5516
7d4e5717
PA
55172013-04-17 Pedro Alves <palves@redhat.com>
5518
5519 * configure.ac (USE_THREAD_DB): Delete variable.
5520 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5521 Don't AC_SUBST USE_THREAD_DB.
5522 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5523 * config.in, configure: Regenerate.
5524
d5c93e41
PA
55252013-04-16 Pedro Alves <palves@redhat.com>
5526
5527 * linux-low.h (struct lwp_info) <thread_known>: Move under
5528 the USE_THREAD_DB #ifdef.
5529
04f5fe89
PA
55302013-04-16 Pedro Alves <palves@redhat.com>
5531
5532 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5533 (linux-low.o): Delete rule.
5534 * linux-low.h: Always include "gdb_thread_db.h" instead of
5535 conditionally including thread_db.h.
5536 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5537 HAVE_THREAD_DB_H.
5538
480b27bf
JK
55392013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5540
5541 * Makefile.in (install-only): Fix make install regression.
5542
43662968
JK
55432013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5544
5545 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5546 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5547 installation.
5548 * gdbserver.1: Remove.
5549
3e74e146
PA
55502013-03-22 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c (handle_extended_wait): Don't call
5553 linux_enable_event_reporting.
5554
a8347a2a
TT
55552013-03-15 Tony Theodore <tonyt@logyst.com>
5556
5557 PR build/9098:
5558 * Makefile.in (SHELL): Use @SHELL@.
5559
eeb56fa7
SDJ
55602013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5561
5562 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5563 compiler warning.
5564
4fa7e2ff
JB
55652013-03-13 Joel Brobecker <brobecker@adacore.com>
5566
5567 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5568 Remove extraneous NULL element.
5569
8ddb1965
YQ
55702013-03-13 Yao Qi <yao@codesourcery.com>
5571
5572 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5573 'V' block in trace frame.
5574
9accd112
MM
55752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5576
5577 * target.h (struct target_ops): Add btrace ops.
5578 (target_supports_btrace): New macro.
5579 (target_enable_btrace): New macro.
5580 (target_disable_btrace): New macro.
5581 (target_read_btrace): New macro.
5582 * gdbthread.h (struct thread_info): Add btrace field.
5583 * server.c: Include btrace-common.h.
5584 (handle_btrace_general_set): New function.
5585 (handle_btrace_enable): New function.
5586 (handle_btrace_disable): New function.
5587 (handle_general_set): Call handle_btrace_general_set.
5588 (handle_qxfer_btrace): New function.
5589 (struct qxfer qxfer_packets[]): Add btrace entry.
5590 * inferiors.c (remove_thread): Disable btrace.
5591 * linux-low: Include linux-btrace.h.
5592 (linux_low_enable_btrace): New function.
5593 (linux_low_read_btrace): New function.
5594 (linux_target_ops): Add btrace ops.
5595 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5596 Add srv_linux_btrace=yes.
5597 (x86_64-*-linux*): Add linux-btrace.o.
5598 Add srv_linux_btrace=yes.
5599 * configure.ac: Define HAVE_LINUX_BTRACE.
5600 * config.in: Regenerated.
5601 * configure: Regenerated.
5602
5cc22e4c
MM
56032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5604
5605 * server.c (handle_qxfer): Preserve error message if -3 is
5606 returned.
5607 (qxfer): Document the -3 return value.
5608
7c97f91e
MM
56092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5610
5611 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5612 (linux_btrace_h): New variable.
5613 (linux-btrace.o): New rule.
5614
be9a119c 56152013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5616 Hafiz Abid Qadeer <abidh@codesourcery.com>
5617
5618 * tracepoint.c (trace_buffer_size): New global.
5619 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5620 (init_trace_buffer): Change to one-argument function. Allocate
5621 trace buffer memory.
5622 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5623 handle QTBuffer:size packet.
5624 (cmd_bigqtbuffer_size): New function.
5625 (initialize_tracepoint): Call init_trace_buffer with
5626 DEFAULT_TRACE_BUFFER_SIZE.
5627 * server.c (handle_query): Add QTBuffer:size in the
5628 supported packets.
5629
e64f7499
YQ
56302013-03-07 Yao Qi <yao@codesourcery.com>
5631
5632 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5633 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5634 of -1.
5635 (cmd_qtsp): Adjust condition. Do post increment.
5636 Set cur_action and cur_step_action back to 0.
5637
f0ae6fc3
PA
56382013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5639
5640 PR server/15236
5641 * linux-low.c (linux_write_memory): Return early success if LEN is
5642 zero.
5643
b5b0b0af
CV
56442013-03-05 Corinna Vinschen <vinschen@redhat.de>
5645
334ad4a8 5646 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5647
589bc927
TT
56482013-02-28 Tom Tromey <tromey@redhat.com>
5649
5650 * configure.ac: Invoke AC_SYS_LARGEFILE.
5651 * configure, config.in: Rebuild.
5652
dfe07582
CV
56532013-02-28 Corinna Vinschen <vinschen@redhat.com>
5654
5655 * win32-low.c: Throughout, fix format strings and casts of
5656 printf-like functions to avoid type related warnings on all
5657 platforms.
5658 (get_child_debug_event): Print dwDebugEventCode as hex since
5659 that's how it's usually documented.
5660
736cd585
YQ
56612013-02-28 Yao Qi <yao@codesourcery.com>
5662
5663 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5664 pulongest.
5665
e1f58301
JW
56662013-02-27 Jiong Wang <jiwang@tilera.com>
5667
5668 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5669 (reg-tilegx32.c): New rule.
5670 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5671 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5672 different register info initializer according to elf class.
5673 (init_registers_tilgx32): New function. The tilegx32 register info
5674 initializer.
5675 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5676 (tile_store_gregset): Likewise.
5677
d171ca78
YQ
56782013-02-27 Yao Qi <yao@codesourcery.com>
5679
5680 * server.c (process_point_options): Print debug message when
5681 debug_threads is true.
5682
282bbdf3
YQ
56832013-02-26 Yao Qi <yao@codesourcery.com>
5684
5685 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5686
aca22551
PA
56872013-02-19 Pedro Alves <palves@redhat.com>
5688 Kai Tietz <ktietz@redhat.com>
5689
5690 PR gdb/15161
5691
5692 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5693 instead of strtoul to extract address from packet.
5694 (process_serial_event) <'z'>: Likewise.
5695
4f3cee1c
YQ
56962013-02-18 Yao Qi <yao@codesourcery.com>
5697
5698 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5699
8e1d55a3
PA
57002013-02-14 Pedro Alves <palves@redhat.com>
5701
5702 Plug memory leak.
5703
5704 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5705 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5706
458820da
PA
57072013-02-14 Pedro Alves <palves@redhat.com>
5708
5709 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5710
baea0dae
PA
57112013-02-14 Pedro Alves <palves@redhat.com>
5712
5713 * tracepoint.c (save_string): Delete.
5714 (add_tracepoint_action): Use savestring instead of save_string.
5715
0b1afbb3
PA
57162013-02-12 Pedro Alves <palves@redhat.com>
5717
5718 * linux-xtensa-low.c: Ditto.
5719 * xtensa-xtregs.c: Ditto.
5720
8a4ac37e
PA
57212013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5722
5723 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5724 thread_db.
5725
148de6bb
MS
57262013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5727
5728 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5729 aarch64_num_wp_regs and aarch64_num_bp_regs to
5730 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5731
55fac6e0
MS
57322013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5733
5734 * linux-aarch64-low.c (ps_get_thread_area): Replace
5735 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5736
176eb98c
MS
57372013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5738 Marcus Shawcroft <marcus.shawcroft@arm.com>
5739 Nigel Stephens <nigel.stephens@arm.com>
5740 Yufeng Zhang <yufeng.zhang@arm.com>
5741
5742 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5743 (aarch64.c, aarch64-without-fpu.c): New targets.
5744 * configure.srv (aarch64*-*-linux*): New.
5745 * linux-aarch64-low.c: New file.
5746
56f7af9c
MS
57472013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5748
43aaf8b6 5749 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5750 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5751 (dequeue_one_deferred_signal, linux_resume_one_thread)
5752 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5753 (linux_tracefork_grandchild, linux_test_for_tracefork)
5754 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5755 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5756 where the argument is 0.
5757
60f662b0
YQ
57582013-01-25 Yao Qi <yao@codesourcery.com>
5759
5760 * event-loop.c: Include "queue.h".
5761 (gdb_event_p): New typedef.
5762 (struct gdb_event) <next_event>: Remove.
5763 (event_queue): Change to QUEUE(gdb_event_p).
5764 (async_queue_event): Remove.
5765 (gdb_event_xfree): New.
5766 (initialize_event_loop): New.
5767 (process_event): Use API from QUEUE.
5768 (wait_for_event): Likewise.
5769 * server.c (main): Call initialize_event_loop.
5770 * server.h (initialize_event_loop): Declare.
5771
5ae4861a
YQ
57722013-01-18 Yao Qi <yao@codesourcery.com>
5773
5774 * ax.h (struct eval_agent_expr_context): New.
5775 (gdb_eval_agent_expr): Update declaration.
5776 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5777 TFRAME. Add new argument CTX.
5778 * server.h (struct eval_agent_expr_context): Declare.
5779 (agent_mem_read, agent_tsv_read): Update declaration.
5780 (agent_mem_read_string): Likewise.
5781 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5782 (add_traceframe_block): Add new argument TPOINT.
5783 Increase TPOINT->traceframe_usage.
5784 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5785 eval_tracepoint_agent_expr.
5786 (condition_true_at_tracepoint): Likewise.
5787 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5788 (agent_mem_read_string, agent_tsv_read): Likewise.
5789
85e00e85
YQ
57902013-01-16 Yao Qi <yao@codesourcery.com>
5791
5792 * linux-low.c (linux_resume_one_lwp): Don't check
5793 'lwp->bp_reinsert != 0'.
5794
4039cf45
JB
57952013-01-07 Joel Brobecker <brobecker@adacore.com>
5796 Pedro Alves <palves@redhat.com>
5797
5798 * lynx-low.c (ptrace_request_to_str): Define a temporary
5799 macro and use it to simplify this function's implementation.
5800
9044dee2
JB
58012013-01-07 Joel Brobecker <brobecker@adacore.com>
5802
5803 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5804 sets errno.
5805
e6352c8f
JB
58062013-01-07 Joel Brobecker <brobecker@adacore.com>
5807
5808 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5809
50681a27
JB
58102013-01-07 Joel Brobecker <brobecker@adacore.com>
5811
5812 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5813
3f6e77ef
JB
58142013-01-07 Joel Brobecker <brobecker@adacore.com>
5815
5816 * lynx-low.c (lynx_resume): Use the resume_info parameter
5817 to determine the ptid for the lynx_ptrace call, unless
5818 it is equal to minus_one_ptid, in which case we use the
5819 ptid of the current_inferior.
5820 (lynx_wait_1): After having received a thread create/exit
5821 event, resume the inferior's execution using the signaling
5822 thread's ptid, rather than the old ptid.
5823
7fda33ae
JB
58242013-01-07 Joel Brobecker <brobecker@adacore.com>
5825
5826 * lynx-low.c (lynx_resume): Delete variable ret.
5827
b9786c74
JB
58282013-01-01 Joel Brobecker <brobecker@adacore.com>
5829
5830 * gdbreplay.c (gdbreplay_version): Update copyright year.
5831 * server.c (gdbserver_version): Likewise.
5832
8b93d60f
JB
58332012-12-17 Joel Brobecker <brobecker@adacore.com>
5834
5835 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5836 new thread.
5837
037335a7
JB
58382012-12-17 Joel Brobecker <brobecker@adacore.com>
5839
5840 * lynx-low.c (ptrace_request_to_str): Add handling for
5841 PTRACE_GETTRACESIG.
5842
52d4cbd8
JB
58432012-12-17 Joel Brobecker <brobecker@adacore.com>
5844
5845 * lynx-low.c (lynx_attach): Delete variable new_process.
5846
ab8f6ca9
JB
58472012-12-17 Joel Brobecker <brobecker@adacore.com>
5848
5849 * lynx-low.c (lynx_create_inferior): Delete variable
5850 new_process.
5851
78cbc024
JB
58522012-12-17 Joel Brobecker <brobecker@adacore.com>
5853
5854 * lynx-low.c (ptrace_request_to_str): Do not handle
5855 PTRACE_GETTHREADLIST if this macro does not exist.
5856
14a00470
YQ
58572012-12-15 Yao Qi <yao@codesourcery.com>
5858
5859 * Makefile.in (OBS): Add notif.o.
5860 * notif.c, notif.h: New.
5861 * server.c: Include "notif.h".
5862 (struct vstop_notif) <next>: Remove.
5863 <base>: New field.
5864 (queue_stop_reply): Update.
5865 (push_event, send_next_stop_reply): Remove.
5866 (discard_queued_stop_replies): Update.
5867 (notif_stop): New variable.
5868 (handle_v_stopped): Remove.
5869 (handle_v_requests): Don't call handle_v_stopped. Call
5870 handle_ack_notif instead.
5871 (queue_stop_reply_callback): Call notif_event_enque instead
5872 of queue_stop_reply.
5873 (handle_status): Don't call send_next_stop_reply, call
5874 notif_write_event instead.
5875 (kill_inferior_callback): Likewise.
5876 (detach_or_kill_inferior_callback): Likewise.
5877 (main): Call initialize_notif.
5878 (process_serial_event): Call QUEUE_is_empty.
5879 (handle_target_event): Call notif_push instead of push event.
5880 * server.h (push_event): Remove declaration.
5881
61c125b9
TT
58822012-12-10 Tom Tromey <tromey@redhat.com>
5883
5884 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5885 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5886 macros.
5887 (.c.o): Rewrite.
5888 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5889 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5890 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5891 (amd64-linux-ipa.o, ax.o): Rewrite.
5892 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5893 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5894 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5895 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5896 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5897 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5898 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5899 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5900 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5901 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5902 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5903 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5904 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5905 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5906 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5907 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5908 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5909 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5910 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5911 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5912 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5913 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5914 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5915 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5916 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5917 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5918 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5919 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5920 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5921 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5922 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5923 (reg-tilegx.o): Remove.
5924 (all_object_files): New macro.
5925 Include .deps files.
5926 * aclocal.m4, configure: Rebuild.
5927 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5928 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5929 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5930
e90e9ad9
TT
59312012-12-05 Tom Tromey <tromey@redhat.com>
5932
5933 PR gdb/14917:
5934 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5935
02d403bf 59362012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5937
5938 * configure.ac: Check for linux/perf_event.h.
5939 * config.in: Regenerated.
5940 * configure: Regenerated.
5941
0270a750
PA
59422012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5943
5944 * hostio.c (handle_readlink): Decrease buffer size
5945 parameter passed to readlink by one byte.
5946
8c29b58e
YQ
59472012-11-26 Yao Qi <yao@codesourcery.com>
5948
5949 * configure.ac (build_warnings): Append '-Wempty-body'.
5950 * configure: Regenerated.
5951 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5952 body.
5953
8bdce1ff
PM
59542012-11-15 Pierre Muller <muller@sourceware.org>
5955
5956 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5957 * config.in: Regenerate.
5958 * configure: Regenerate.
5959 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5960 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5961 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5962 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5963 header.
5964 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5965 instead of <sys/wait.h> header.
5966 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5967
02d403bf 59682012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5969
5970 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5971 (various make rules): Remove -DGDBSERVER
5972
fbd5db48
YQ
59732012-11-09 Yao Qi <yao@codesourcery.com>
5974
5975 * spu-low.c (current_ptid): Move it to ..
5976 * gdbthread.h: ... here. New.
5977 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5978 * server.c (myresume, process_serial_event): Likewise.
5979 * thread-db.c (thread_db_find_new_threads): Likewise.
5980 * tracepoint.c (run_inferior_command): Likewise.
5981
b3dc46ff
AB
59822012-10-01 Andrew Burgess <aburgess@broadcom.com>
5983
5984 * server.c (handle_search_memory_1): Include access length in
5985 warning message.
5986
07c04788
HPN
59872012-09-05 Michael Brandt <michael.brandt@axis.com>
5988
5989 * linux-crisv32-low.c: Fix compile errors.
5990
918d227b
YQ
59912012-09-04 Yao Qi <yao@codesourcery.com>
5992
5993 * tracepoint.c (cmd_qtsv): Adjust debug message.
5994 Don't check CUR_TPOINT.
5995
18c1b81a
YQ
59962012-08-28 Yao Qi <yao@codesourcery.com>
5997
5998 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5999 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6000 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6001 Remove declarations of xmalloc, xreallloc, xstrdup and
6002 freeargv.
6003 * Makefile.in (libiberty_h): New.
6004 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6005 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6006
dc82f37b
YQ
60072012-08-23 Yao Qi <yao@codesourcery.com>
6008
6009 * server.h: Remove declaration of 'xsnprintf'.
6010
406b1477
KS
60112012-08-22 Keith Seitz <keiths@redhat.com>
6012
6013 * server.h: Include build-gnulib-gbserver/config.h.
6014 * gdbreplay.c: Likewise.
6015
e6712ff1
DE
60162012-08-08 Doug Evans <dje@google.com>
6017
6018 * Makefile.in (SFILES): Add gdb_vecs.c.
6019 (OBS): Add gdb_vecs.o.
6020 (gdb_vecs_h, host_defs_h): New variables.
6021 (thread-db.o): Add $(gdb_vecs_h) dependency.
6022 (gdb_vecs.o): New rule.
6023 * thread-db.c: #include "gdb_vecs.h".
6024 (thread_db_load_search): Use a vector to iterate over path elements.
6025 Handle text appearing after "$pdir".
6026
6027 * configure.ac: Add check for strstr.
6028 * config.in: Regenerate.
6029 * configure: Regenerate.
6030
7c3270ae
UW
60312012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6032
6033 * hostio.c (handle_pread): If pread fails, fall back to attempting
6034 lseek/read.
6035 (handle_pwrite): Likewise for pwrite.
6036
b62e2b27
UW
60372012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6038
6039 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6040 between unsupported TYPE and unimplementable ADDR/LEN combination.
6041 (arm_insert_point): Act on new return value.
6042
78a99e91
PA
60432012-07-31 Pedro Alves <palves@redhat.com>
6044
6045 * server.c (process_point_options): Only skip tokens if we find
6046 one that is unrecognized. Don't treat 'X' specially while
6047 skipping unrecognized tokens.
6048
fcf303ab
UW
60492012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6050
6051 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6052 to 4-byte-align HW breakpoint addresses for Thumb.
6053
7255706c
YQ
60542012-07-27 Yao Qi <yao@codesourcery.com>
6055
6056 PR remote/14161.
6057
6058 * server.h: Declare gdb_agent_about_to_close.
6059 * target.c (kill_inferior): Include "agent.h".
6060 New. Send command 'kill'.
6061 * target.h (kill_inferior): Removed macro.
6062 * tracepoint.c (gdb_agent_about_to_close): New.
6063 (gdb_agent_helper_thread): Handle command 'close'.
6064 Wait endlessly until the inferior stops.
6065 Install gdb_agent_remove_socket to atexit hook.
6066 (agent_socket_name): New static variable.
6067 (gdb_agent_socket_init): Replace local variable 'name' with
6068 'agent_socket_name'.
6069 (gdb_agent_remove_socket): New.
6070
5a3f286f
YQ
60712012-07-27 Yao Qi <yao@codesourcery.com>
6072
6073 * server.c (process_point_options): Stop at 'X' when parsing.
6074
961bd387
ME
60752012-07-19 Michael Eager <eager@eagercon.com>
6076
a261b8f5 6077 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6078 to hw_execute.
6079 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6080 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6081 hardware breakpoint.
6082
aa7c7447
JK
60832012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6084
6085 * gdbserver/linux-low.c (initialize_low): Call
6086 linux_ptrace_init_warnings.
6087
7f216e7c
DE
60882012-07-02 Doug Evans <dje@google.com>
6089
6090 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6091 pointer to int.
6092
d3ce09f5
SS
60932012-07-02 Stan Shebs <stan@codesourcery.com>
6094
6095 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6096 (ax.o): Add it to build rule.
6097 (ax-ipa.o): Ditto.
6098 (OBS): Add format.o.
6099 (IPA_OBS): Add format.o.
6100 * server.c (handle_query): Claim support for breakpoint commands.
6101 (process_point_options): Add command case.
6102 (process_serial_event): Leave running if there are printfs in
6103 effect.
6104 * mem-break.h (any_persistent_commands): Declare.
6105 (add_breakpoint_commands): Declare.
6106 (gdb_no_commands_at_breakpoint): Declare.
6107 (run_breakpoint_commands): Declare.
6108 * mem-break.c (struct point_command_list): New struct.
6109 (struct breakpoint): New field command_list.
6110 (any_persistent_commands): New function.
6111 (add_commands_to_breakpoint): New function.
6112 (add_breakpoint_commands): New function.
6113 (gdb_no_commands_at_breakpoint): New function.
6114 (run_breakpoint_commands): New function.
6115 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6116 locally.
6117 * ax.c: Include format.h.
6118 (ax_printf): New function.
6119 (gdb_eval_agent_expr): Add printf opcode.
6120
2f8f6aed
YQ
61212012-06-13 Yao Qi <yao@codesourcery.com>
6122
6123 * server.c (start_inferior): Remove duplicated writes to fields
6124 'last_resume_kind' and 'last_status' of 'current_inferior'.
6125
0c9070b3
YQ
61262012-06-12 Yao Qi <yao@codesourcery.com>
6127 Pedro Alves <palves@redhat.com>
6128
6129 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6130 comment.
6131 * server.c (handle_v_cont): Extend comment.
6132
c52daf70
YQ
61332012-06-11 Yao Qi <yao@codesourcery.com>
6134
6135 * linux-low.c (linux_attach): Add 'static'.
6136
d38bbb0a
YQ
61372012-06-06 Yao Qi <yao@codesourcery.com>
6138
6139 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6140
89dc0afd
JK
61412012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6142
6143 Fix gcc -flto compilation warning.
6144 * server.c (main): Make variable multi_mode and attach volatile.
6145
75f62ce7
TJB
61462012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6147
6148 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6149 if the platform doesn't know about it.
6150
65f479b6
PA
61512012-05-30 Jeff Kenton <jkenton@tilera.com>
6152
6153 * Makefile.in (SFILES): Add linux-tile-low.c.
6154 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6155 * configure.srv: Handle tilegx-*-linux*.
6156 * linux-tile-low.c: New file.
6157
0c5bf5a9
JK
61582012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6159
6160 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6161
a493e3e2
PA
61622012-05-24 Pedro Alves <palves@redhat.com>
6163
6164 PR gdb/7205
6165
43aaf8b6 6166 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6167
2ea28649
PA
61682012-05-24 Pedro Alves <palves@redhat.com>
6169
6170 PR gdb/7205
6171
6172 Replace target_signal with gdb_signal throughout.
6173
8d409d16
MR
61742012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6175
6176 * linux-low.c (linux_store_registers): Avoid the copying sequence
6177 when no data has been retrieved by ptrace.
6178
23512c01
MGD
61792012-05-22 Will Deacon <will.deacon@arm.com>
6180
6181 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6182 Include asm/ptrace.h.
6183 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6184 already defined.
6185
4934b29e
MR
61862012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6187
6188 * linux-low.c (linux_store_registers): Don't re-retrieve data
6189 with ptrace that has already been obtained from /proc. Always
6190 copy any data retrieved with ptrace to the buffer supplied.
6191
bde24c0a
PA
61922012-05-11 Yao Qi <yao@codesourcery.com>
6193 Pedro Alves <palves@redhat.com>
6194
6195 * linux-low.c (enum stopping_threads_kind): New.
6196 (stopping_threads): Change type to `enum stopping_threads_kind'.
6197 (handle_extended_wait): If stopping and suspending threads, leave
6198 the new_lwp suspended too.
6199 (linux_wait_for_event): Adjust.
6200 (stop_all_lwps): Set `stopping_threads' to
6201 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6202 whether we're suspending threads or just stopping them. Assert no
6203 recursion happens.
6204
623b6bdf
YQ
62052012-04-29 Yao Qi <yao@codesourcery.com>
6206
6207 * server.h: Move some code to ...
6208 * gdbthread.h: ... here. New.
6209 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6210 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6211 (nto-low.o, win32-low.o): Likewise.
6212 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6213 * regcache.c, remote-utils.c, server.c: Likewise.
6214 * target.c, tracepoint.c, win32-low.c: Likewise.
6215
f15f9948
TJB
62162012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6217
6218 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6219 (PTRACE_ARG4_TYPE): Likewise.
6220 (PTRACE_XFER_TYPE): Likewise.
6221 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6222 ptrace to PTRACE_ARG3_TYPE.
6223 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6224 (PTRACE_ARG4_TYPE): Likewise.
6225 (PTRACE_XFER_TYPE): Likewise.
6226 (linux_detach_one_lwp): Cast fourth argument of
6227 ptrace to long then PTRACE_ARG4_TYPE.
6228 (regsets_fetch_inferior_registers): Cast third argument of
6229 ptrace to long then PTRACE_ARG3_TYPE.
6230 (regsets_store_inferior_registers): Likewise.
6231
38ea300a
PA
62322012-04-20 Pedro Alves <palves@redhat.com>
6233
6234 * configure: Regenerate.
6235
c971b7fa
PA
62362012-04-19 Pedro Alves <palves@redhat.com>
6237
43aaf8b6 6238 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6239 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6240 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6241 (all, install-only, uninstall, clean-info, all-lib, clean): No
6242 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6243 (maintainer-clean realclean distclean): Use subdir_do.
6244 (subdir_do): New.
6245 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6246 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6247 * acinclude.m4: Include acx_configure_dir.m4.
6248 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6249 calls. Call AC_PROG_RANLIB. Configure gnulib using
6250 ACX_CONFIGURE_DIR.
6251 (GNULIB): New.
6252 (GNULIB_STDINT_H): Adjust.
6253 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6254 * gdbreplay.c: Include build-gnulib/config.h.
6255 * server.h: Likewise.
6256 * aclocal.m4: Regenerate.
6257 * config.in: Regenerate.
6258 * configure: Regenerate.
c971b7fa 6259
809277f8
PA
62602012-04-19 Pedro Alves <palves@redhat.com>
6261
6262 * Makefile.in (LIBGNU, INCGNU): Adjust.
6263 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6264 (all, install-only, uninstall, clean-info, all-lib, clean)
6265 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6266 * configure.ac: Adjust AC_OUTPUT output.
6267 * aclocal.m4: Regenerate.
6268 * configure: Regenerate.
6269
fd9bb8b8
PA
62702012-04-19 Pedro Alves <palves@redhat.com>
6271
6272 * Makefile.in (generated_files): New.
6273 (server_h): Remove the explicit dependency on config.h, and depend
6274 on $generated_files.
6275
1c298c66
PA
62762012-04-19 Pedro Alves <palves@redhat.com>
6277
6278 * Makefile.in (INCGNU): Add -Ignulib.
6279
57c4b50b
PA
62802012-04-19 Pedro Alves <palves@redhat.com>
6281
6282 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6283 (INCGNU): ... this, and spell out -I here.
6284 (GNULIB_LIB): Rename to ...
6285 (LIBGNU): ... this.
6286 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6287
1030e047
PA
62882012-04-19 Pedro Alves <palves@redhat.com>
6289
6290 * config.in: Regenerate.
6291
447d4319
PA
62922012-04-19 Pedro Alves <palves@redhat.com>
6293
6294 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6295 * server.h (memmem): Remove declaration.
6296 * config.in: Regenerate.
6297 * configure: Regenerate.
6298
aad9eab9
YQ
62992012-04-19 Yao Qi <yao@codesourcery.com>
6300
6301 * Makefile.in (SFILES): Add common/vec.c.
6302 (OBS): Add vec.o.
6303 (vec.o): New rule.
6304
3e10640f
YQ
63052012-04-19 Yao Qi <yao@codesourcery.com>
6306
6307 * remote-utils.c (prepare_resume_reply): Replace with macro
6308 target_core_of_thread.
6309 * server.c (handle_qxfer_threads_proper): Likewise.
6310 * target.h (traget_core_of_thread): New macro.
6311
71622373
PA
63122012-04-18 Pedro Alves <palves@redhat.com>
6313
6314 * aclocal.m4: Regenerate.
6315 * configure: Regenerate.
6316
80d26939
YQ
63172012-04-16 Yao Qi <yao@codesourcery.com>
6318
6319 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6320 duplicated on address.
6321
42476b70
YQ
63222012-04-16 Yao Qi <yao@codesourcery.com>
6323
6324 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6325 (struct tracepoint_action_ops) <send>: New field.
6326 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6327 (agent_expr_send, x_tracepoint_action_send): New.
6328 (l_tracepoint_action_send): New.
6329 (cmd_qtdp): Download and install tracepoint
6330 according to `use_agent'.
6331 (run_inferior_command): Add one more parameter `len'.
6332 Update callers.
6333 (tracepoint_send_agent): New.
6334 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6335
7bc83639
YQ
63362012-04-16 Yao Qi <yao@codesourcery.com>
6337
6338 * tracepoint.c (download_tracepoints): Moved to ...
6339 (cmd_qtstart): ... here.
6340
5f18041e
YQ
63412012-04-14 Yao Qi <yao@codesourcery.com>
6342
6343 * tracepoint.c: Include inttypes.h.
6344 (struct collect_memory_action): Use sized types.
6345 (struct tracepoint): Likewise.
6346 (cmd_qtdp, stop_tracing): Update print specifiers.
6347 (cmd_qtp, response_tracepoint): Likewise.
6348 (collect_data_at_tracepoint): Likewise.
6349 (collect_data_at_step): Likewise.
6350
55a8c076
YQ
63512012-04-14 Yao Qi <yao@codesourcery.com>
6352
6353 Import gnulib module inttypes.
6354 * aclocal.m4, config.in, configure: Regenerated.
6355
dc750257
YQ
63562012-04-14 Yao Qi <yao@codesourcery.com>
6357
6358 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6359 Makefile and config.status at last.
6360
0ab5faf9
YQ
63612012-04-13 Yao Qi <yao@codesourcery.com>
6362
6363 * tracepoint.c: Include stdint.h unconditionally.
6364
18f5fd81
TJB
63652012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6366
6367 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6368 on BFD_HAVE_SYS_PROCFS_TYPE.
6369 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6370 * configure: Regenerate.
6371 * config.in: Likewise.
6372
4d47af5c
L
63732012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6374
6375 * Makefile.in (clean): Also remove x32.c x32-linux.c
6376 x32-avx.c x32-avx-linux.c.
6377 (x32.o): New target.
6378 (x32.c): Likewise.
6379 (x32-linux.o): Likewise.
6380 (x32-linux.c): Likewise.
6381 (x32-avx.o): Likewise.
6382 (x32-avx.c): Likewise.
6383 (x32-avx-linux.o): Likewise.
6384 (x32-avx-linux.c): Likewise.
6385
6386 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6387 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6388 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6389 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6390 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6391 i386/x32-avx-linux.xml.
6392
6393 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6394 (init_registers_x32_avx_linux): Likwise.
6395 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6396 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6397
ecedbe58
PA
63982012-04-13 Pedro Alves <palves@redhat.com>
6399
6400 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6401 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6402 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6403 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6404 the sub-make.
6405
c92b5177
L
64062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6407
6408 * linux-x86-low.c (compat_x32_clock_t): New.
6409 (compat_x32_siginfo_t): Likewise.
6410 (compat_x32_siginfo_from_siginfo): Likewise.
6411 (siginfo_from_compat_x32_siginfo): Likewise.
6412 (linux_is_elf64): Likewise.
6413 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6414 and siginfo_from_compat_x32_siginfo for x32.
6415 (x86_arch_setup): Set linux_is_elf64.
6416
214d508e
L
64172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6418
6419 PR gdb/13969
6420 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6421 e_machine field.
6422 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6423 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6424 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6425 compatible with process.
6426
c9a1864a
YQ
64272012-04-12 Yao Qi <yao@codesourcery.com>
6428
6429 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6430 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6431 (install-only, install-info, clean): Handle sub dir gnulib.
6432 (all-lib, am--refresh): New targets.
6433 (memmem.o): Remove target.
6434 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6435 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6436 (AC_REPLACE_FUNCS): Remove memmem.
6437 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6438 (AC_OUTPUT): Generate Makefile in gnulib/.
6439 * aclocal.m4, config.in, configure: Regenerated.
6440
367ba2c2
MR
64412012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6442
6443 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6444
9d236627
PA
64452012-04-05 Pedro Alves <palves@redhat.com>
6446
6447 -Werror=strict-aliasing
6448
6449 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6450 pointer.
6451
111217b3
PA
64522012-04-04 Pedro Alves <palves@redhat.com>
6453
6454 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6455 (sparc_store_gregset_from_stack, sparc_store_gregset)
6456 (sparc_breakpoint_at): Fix formatting.
6457
8365dcf5
TJB
64582012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6459
6460 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6461 are available.
6462 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6463 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6464 * config.in: Regenerate.
6465 * configure: Likewise.
6466
689cc2ae
PA
64672012-03-29 Pedro Alves <palves@redhat.com>
6468
6469 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6470 Correct ptrace arguments.
6471
c14dfd32
PA
64722012-03-28 Pedro Alves <palves@redhat.com>
6473
6474 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6475 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6476 (IA64_FR1_REGNUM): New defines.
6477 (ia64_fetch_register): New.
6478 (the_low_target): Install it.
6479 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6480 field.
6481 * linux-low.c (linux_fetch_registers): Try the
6482 the_low_target.fetch_register hook first.
6483
6484 * linux-arm-low.c (the_low_target): Adjust.
6485 * linux-bfin-low.c (the_low_target): Adjust.
6486 * linux-cris-low.c (the_low_target): Adjust.
6487 * linux-crisv32-low.c (the_low_target): Adjust.
6488 * linux-m32r-low.c (the_low_target): Adjust.
6489 * linux-m68k-low.c (the_low_target): Adjust.
6490 * linux-mips-low.c (the_low_target): Adjust.
6491 * linux-ppc-low.c (the_low_target): Adjust.
6492 * linux-s390-low.c (the_low_target): Adjust.
6493 * linux-sh-low.c (the_low_target): Adjust.
6494 * linux-sparc-low.c (the_low_target): Adjust.
6495 * linux-tic6x-low.c (the_low_target): Adjust.
6496 * linux-x86-low.c (the_low_target): Adjust.
6497 * linux-xtensa-low.c (the_low_target): Adjust.
6498
63c88e13
PA
64992012-03-26 Pedro Alves <palves@redhat.com>
6500
6501 * server.c (handle_qxfer_libraries): Don't bail early if
6502 the_target->qxfer_libraries_svr4 is not NULL.
6503
fb723180
PA
65042012-03-26 Pedro Alves <palves@redhat.com>
6505
6506 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6507
0afae3cf
PA
65082012-03-23 Pedro Alves <palves@redhat.com>
6509
6510 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6511 "library-list-svr4" element's start tag when the the DSO list is
6512 empty.
6513
485f1ee4
PA
65142012-03-23 Pedro Alves <palves@redhat.com>
6515
6516 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6517 a variable whose type size is the same as the inferior's pointer
6518 size.
6519
a5362b9a
TS
65202012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6521
6522 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6523 struct siginfo.
6524 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6525 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6526 * linux-low.h: Include <signal.h>.
6527 (struct siginfo): Remove forward declaration.
6528 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6529 struct siginfo.
6530
d226c142
MF
65312012-03-21 Mike Frysinger <vapier@gentoo.org>
6532
6533 * .gitignore: Ignore more files.
6534
122f36ef
PA
65352012-03-19 Pedro Alves <palves@redhat.com>
6536 Jan Kratochvil <jan.kratochvil@redhat.com>
6537
6538 * server.c (cont_thread, general_thread): Add describing comments.
6539 (start_inferior): Clear `cont_thread'.
6540 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6541 of a process.
6542
fc3e5175
YQ
65432012-03-15 Yao Qi <yao@codesourcery.com>
6544
6545 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6546 handling to ...
6547 (cmd_qtdp): ... here.
6548
8d0d92cd
YQ
65492012-03-15 Yao Qi <yao@codesourcery.com>
6550
6551 * tracepoint.c (struct tracepoint_action_ops): New.
6552 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6553 (m_tracepoint_action_download): New.
6554 (r_tracepoint_action_download): New.
6555 (x_tracepoint_action_download): New.
6556 (l_tracepoint_action_download): New.
6557 (add_tracepoint_action): Install `action->ops' according type.
6558 (download_tracepoint_1): Move code `download' function pointer
6559 of various tracepoint_action_ops.
6560
87b0bb13
JK
65612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6562
6563 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6564 linux_ptrace_attach_warnings.
6565
5f572dec
JK
65662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6567
6568 * Makefile.in (linux-ptrace.o): New.
6569 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6570 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6571 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6572 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6573 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6574 of these targets.
6575 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6576
f4647387
YQ
65772012-03-08 Yao Qi <yao@codesourcery.com>
6578 Pedro Alves <palves@redhat.com>
6579
6580 Fix PR server/13392.
6581 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6582 offset of JMP insn.
6583 * tracepoint.c (remove_tracepoint): New.
6584 (cmd_qtdp): Call remove_tracepoint when failed to install.
6585
9b224c5e
PA
65862012-03-07 Pedro Alves <palves@redhat.com>
6587
6588 * linux-low.c (get_detach_signal): New.
6589 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6590 Pass on pending signals to PTRACE_DETACH. Check the result of the
6591 ptrace call.
6592 * server.c (program_signals, program_signals_p): New.
6593 (handle_general_set): Handle QProgramSignals.
6594 * server.h (program_signals, program_signals_p): Declare.
6595
e237a7e2
JK
65962012-03-05 Pedro Alves <palves@redhat.com>
6597 Jan Kratochvil <jan.kratochvil@redhat.com>
6598
6599 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6600 New comment why.
6601
5808517f
YQ
66022012-03-03 Yao Qi <yao@codesourcery.com>
6603
6604 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6605 agent_look_up_symbols.
6606
58b4daa5
YQ
66072012-03-03 Yao Qi <yao@codesourcery.com>
6608
6609 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6610 (linux-x86-low.o): Likewise.
6611 * server.h: Remove in_process_agent_loaded.
6612 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6613 common/agent.c.
6614 Update callers.
6615
8ffcbaaf
YQ
66162012-03-03 Yao Qi <yao@codesourcery.com>
6617
6618 * tracepoint.c (gdb_agent_capability): New global.
6619 (in_process_agent_loaded_ust): Renamed to
6620 `in_process_agent_supports_ust'.
6621 Update callers.
6622 (in_process_agent_supports_ust): Call agent_capability_check.
6623 (clear_installed_tracepoints): Assert that agent supports
6624 agent.
6625
d1feda86
YQ
66262012-03-03 Yao Qi <yao@codesourcery.com>
6627
6628 * linux-low.c (linux_supports_agent): New.
6629 (linux_target_ops): Initialize field `supports_agent' with
6630 linux_supports_agent.
6631 * target.h (struct target_ops) <supports_agent>: New.
6632 (target_supports_agent): New macro.
6633 * server.c (handle_general_set): Handle packet 'QAgent'.
6634 (handle_query): Send `QAgent+'.
6635 * Makefile.in (server.o): Depends on agent.h.
6636
2fa291ac
YQ
66372012-03-03 Yao Qi <yao@codesourcery.com>
6638
6639 * Makefile.in (OBS): Add agent.o.
6640 Add new rule for agent.o.
6641 Track dependence of tracepoint.c on agent.h.
6642 * tracepoint.c (run_inferior_command_1):
6643 (run_inferior_command): Call agent_run_command.
6644 (gdb_ust_connect_sync_socket): Deleted. Move it to
6645 common/agent.c.
6646 (resume_thread, stop_thread): Likewise.
6647 (gdb_ust_socket_init): Renamed to ...
6648 (gdb_agent_socket_init): ... New.
6649 (gdb_ust_thread): Renamed to ...
6650 (gdb_agent_helper_thread): ... New.
6651 (gdb_ust_init): Move some code to ...
6652 (gdb_agent_init): ... here. New.
6653 [HAVE_UST]: Call gdb_ust_init.
6654 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6655 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6656 * config.in, configure: Regenerated.
6657
05044653
PA
66582012-03-02 Pedro Alves <palves@redhat.com>
6659
6660 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6661 * linux-low.c (struct simple_pid_list): New.
6662 (stopped_pids): New a struct simple_pid_list pointer.
6663 (add_to_pid_list, pull_pid_from_list): New.
6664 (handle_extended_wait): Don't assume the first signal new children
6665 report is SIGSTOP. Adjust call to pull_pid_from_list.
6666 (linux_wait_for_lwp): Adjust.
6667
8d00225b
YQ
66682012-03-02 Yao Qi <yao@codesourcery.com>
6669
6670 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6671 debug log.
6672
19560ba5
YQ
66732012-03-02 Yao Qi <yao@codesourcery.com>
6674
6675 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6676 `stop_pc' and `tpoint'. Update caller.
6677
1faeff08
MR
66782012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6679
6680 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6681 * linux-low.c (use_linux_regsets): New macro.
6682 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6683 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6684 (linux_register_in_regsets): New function.
6685 (usr_fetch_inferior_registers): Skip registers covered by
6686 regsets.
6687 (usr_store_inferior_registers): Likewise.
6688 (usr_fetch_inferior_registers): New macro.
6689 (usr_store_inferior_registers): Likewise.
6690 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6691 (linux_store_registers): Likewise.
6692 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6693 prototype.
6694 (init_registers_mips64_dsp_linux): Likewise.
6695 (init_registers_mips_linux): New macro.
6696 (init_registers_mips_dsp_linux): Likewise.
6697 (mips_dsp_num_regs): Likewise.
6698 (DSP_BASE, DSP_CONTROL): New fallback macros.
6699 (mips_base_regs): New macro.
6700 (mips_regmap): Use it. Fix the size.
6701 (mips_dsp_regmap): New variable.
6702 (mips_dsp_regset_bitmap): Likewise.
6703 (mips_arch_setup): New function.
6704 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6705 than mips_regmap.
6706 (mips_cannot_store_register): Likewise.
6707 (the_low_target): Update .arch_setup, .num_regs and .regmap
6708 initializers. Add .regset_bitmap initializer.
6709 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6710 initializer.
6711 * linux-bfin-low.c (the_low_target): Likewise.
6712 * linux-cris-low.c (the_low_target): Likewise.
6713 * linux-crisv32-low.c (the_low_target): Likewise.
6714 * linux-ia64-low.c (the_low_target): Likewise.
6715 * linux-m32r-low.c (the_low_target): Likewise.
6716 * linux-m68k-low.c (the_low_target): Likewise.
6717 * linux-ppc-low.c (the_low_target): Likewise.
6718 * linux-s390-low.c (the_low_target): Likewise.
6719 * linux-sh-low.c (the_low_target): Likewise.
6720 * linux-sparc-low.c (the_low_target): Likewise.
6721 * linux-tic6x-low.c (the_low_target): Likewise.
6722 * linux-x86-low.c (the_low_target): Likewise.
6723 * linux-xtensa-low.c (the_low_target): Likewise.
6724 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6725 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6726 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6727 srv_xmlfiles.
6728 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6729 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6730
c03e6ccc
YQ
67312012-02-29 Yao Qi <yao@codesourcery.com>
6732 Pedro Alves <palves@redhat.com>
6733
6734 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6735 `step_over_finished' is true.
6736
644cebc9
PA
67372012-02-27 Pedro Alves <palves@redhat.com>
6738
6739 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6740 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6741
c14d7ab2
PA
67422012-02-27 Pedro Alves <palves@redhat.com>
6743
6744 PR server/9684
6745 * linux-low.c (pid_is_stopped): New.
6746 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6747
412c89dd
LM
67482012-02-25 Luis Machado <lgustavo@codesourcery.com>
6749
6750 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6751 of conditions.
6752
b745defe
MR
67532012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6754
6755 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6756
9f3a5c85
LM
67572012-02-24 Luis Machado <lgustavo@codesourcery>
6758
6759 * server.c (handle_query): Advertise support for target-side
6760 breakpoint condition evaluation.
6761 (process_point_options): New function.
6762 (process_serial_event): When inserting a breakpoint, check for
6763 a target-side condition that should be evaluated.
6764
6765 * mem-break.c: Include regcache.h and ax.h.
6766 (point_cond_list_t): New data structure.
6767 (breakpoint) <cond_list>: New field.
6768 (find_gdb_breakpoint_at): Make non-static.
6769 (delete_gdb_breakpoint_at): Clear any target-side
6770 conditions.
6771 (clear_gdb_breakpoint_conditions): New function.
6772 (add_condition_to_breakpoint): Likewise.
6773 (add_breakpoint_condition): Likewise.
6774 (gdb_condition_true_at_breakpoint): Likewise.
6775 (gdb_breakpoint_here): Return result directly instead
6776 of going through a local variable.
6777
6778 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6779 (clear_gdb_breakpoint_conditions): Likewise.
6780 (add_breakpoint_condition): Likewise.
6781 (gdb_condition_true_at_breakpoint): Likewise.
6782
6783 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6784 (need_step_over_p): Take target-side breakpoint condition into
6785 consideration.
6786
5e1dc496
LM
67872012-02-24 Luis Machado <lgustavo@codesourcery>
6788
6789 * server.h: Include tracepoint.h.
6790 (agent_mem_read, agent_get_trace_state_variable_value,
6791 agent_set_trace_state_variable_value,
6792 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6793 get_set_tsv_func_addr): New prototypes.
6794
6795 * ax.h: New include file.
6796 * ax.c: New source file.
6797
6798 * tracepoint.c: Include ax.h.
6799 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6800 agent_expr, eval_result_type): Move to ax.h.
6801 (parse_agent_expr): Rename to ...
6802 (gdb_parse_agent_expr): ... this, make it non-static and move
6803 to ax.h.
6804 (unparse_agent_expr) Rename to ...
6805 (gdb_unparse_agent_expr): ... this, make it non-static and move
6806 to ax.h.
6807 (eval_agent_expr): Rename to ...
6808 (eval_tracepoint_agent_expr): ... this.
6809 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6810 forward declarations.
6811 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6812 (agent_get_trace_state_variable_value): New function.
6813 (agent_set_trace_state_variable_value): New function.
6814 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6815 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6816 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6817 (condition_true_at_tracepoint): Likewise.
6818 (parse_agent_expr): Rename to ...
6819 (gdb_parse_agent_expr): ... this and move to ax.c.
6820 (unparse_agent_expr): Rename to ...
6821 (gdb_unparse_agent_expr): ... this and move to ax.c.
6822 (gdb_agent_op_name): Move to ax.c.
6823 (eval_agent_expr): Rename to ...
6824 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6825 and move to ax.c.
6826 (eval_tracepoint_agent_expr): New function.
6827 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6828 non-static.
5e1dc496
LM
6829 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6830 ax.c.
6831 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6832 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6833 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6834 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6835 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6836 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6837 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6838 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6839 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6840 (compile_bytecodes): Remove forward declaration.
6841 (is_goto_target): Move to ax.c.
6842 (compile_bytecodes): Move to ax.c and call
6843 agent_get_trace_state_variable_value (...) and
6844 agent_set_trace_state_variable_value (...).
6845
6846 * Makefile.in: Update ax.c and IPA dependencies.
6847
277e4e52
PA
68482012-02-24 Pedro Alves <palves@redhat.com>
6849
6850 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6851 (cmd_bigqtbuffer_circular): ... this. Only handle
6852 'QTBuffer:circular:'.
6853 (handle_tracepoint_general_set): Adjust.
6854
bf4c19f7
YQ
68552012-02-16 Yao Qi <yao@codesourcery.com>
6856
6857 * inferiors.c: Move code to ...
6858 * dll.c: .... here. New.
6859 * server.h: Declare clear_dlls.
6860 * Makefile.in (SFILES): Add dll.c.
6861 (OBS): Add dll.o
6862 (dll.o): New rule.
6863
d73f2619
YQ
68642012-02-11 Yao Qi <yao@codesourcery.com>
6865
6866 * server.c: (handle_monitor_command): Add a new parameter
6867 `own_buf'.
6868 (handle_query): Update caller.
6869
f8255c2a
JB
68702012-02-09 Joel Brobecker <brobecker@adacore.com>
6871
6872 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6873 * configure, config.in: Regenerate.
6874 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6875 is not defined.
6876
da84f473
PA
68772012-02-02 Pedro Alves <palves@redhat.com>
6878
6879 Try SIGKILL first, then PTRACE_KILL.
6880 * linux-low.c (linux_kill_one_lwp): New.
6881 (linux_kill_one_lwp): Rename to ...
6882 (kill_one_lwp_callback): ... this. Use the new
6883 linux_kill_one_lwp.
6884
e886a173
PA
68852012-02-02 Pedro Alves <palves@redhat.com>
6886
6887 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6888 inferior.
6889
be07f1a2
PA
68902012-01-27 Pedro Alves <palves@redhat.com>
6891
6892 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6893 (elf_64_file_p): Make static.
6894 (linux_pid_exe_is_elf_64_file): New.
6895 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6896 Delete declarations.
6897 (linux_pid_exe_is_elf_64_file): Declare.
6898 * linux-x86-low.c (x86_arch_setup): Use
6899 linux_pid_exe_is_elf_64_file.
6900
d8301ad1
JK
69012012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6902
6903 * linux-low.c (linux_wait_for_event_1): Rename to ...
6904 (linux_wait_for_event): ... here and merge it with former
6905 linux_wait_for_event - new variable wait_ptid, use it.
6906 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6907
01b17894
PA
69082012-01-23 Pedro Alves <palves@redhat.com>
6909
6910 * server.c (main): Avoid yet another case of infinite loop while
6911 detaching/killing after a longjmp.
6912
e825046f
JK
69132012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6914
6915 Code cleanup.
6916 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6917
b9e7b9c3
UW
69182012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6919
6920 * hostio.c (handle_readlink): New function.
6921 (handle_vFile): Call it to handle "vFile:readlink" packets.
6922
901f9912
UW
69232012-01-20 Pedro Alves <palves@redhat.com>
6924 Ulrich Weigand <ulrich.weigand@linaro.org>
6925
6926 * server.c (handle_v_requests): Only support vAttach and vRun to
6927 start multiple processes when in extended protocol mode.
6928
fc1ab1a0
PA
69292012-01-17 Pedro Alves <palves@redhat.com>
6930
6931 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6932 memalign plus mprotect to allocate the scratch buffer.
6933
7d5d4e98
PA
69342012-01-13 Pedro Alves <palves@redhat.com>
6935
6936 * server.c (attach_inferior): Clear `cont_thread'.
6937
f128d5e9
PA
69382012-01-13 Pedro Alves <palves@redhat.com>
6939
6940 * server.c (main): Avoid infinite loop while detaching/killing
6941 after a longjmp.
6942
06db92f0
DE
69432012-01-09 Doug Evans <dje@google.com>
6944
6945 * server.c (start_inferior): Set last_ptid in --wrapper case.
6946
32d92999
YQ
69472012-01-06 Yao Qi <yao@codesourcery.com>
6948
6949 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6950 defined.
6951 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6952
5e0a92a9
YQ
69532012-01-04 Yao Qi <yao@codesourcery.com>
6954
6955 * tracepoint.c (cmd_qtdp): Print debug message
6956 for static tracepoint.
6957
ae639e8c
YQ
69582012-01-04 Yao Qi <yao@codesourcery.com>
6959
6960 * tracepoint.c (trace_vdebug): Differentiate debug message
6961 between gdbserver and IPA.
6962
f72429c5
YQ
69632012-01-03 Yao Qi <yao@codesourcery.com>
6964
6965 * tracepoint.c (tracepoint_was_hit): Don't collect for
6966 static tracepoint.
6967
12c3e59c
JB
69682012-01-02 Joel Brobecker <brobecker@adacore.com>
6969
6970 * terminal.h: Reformat copyright header.
6971
67827812
JB
69722012-01-02 Joel Brobecker <brobecker@adacore.com>
6973
6974 * server.c (gdbserver_version): Update copyright year.
6975 * gdbreplay.c (gdbreplay_version): Likewise.
6976
3e52c33d
JK
69772011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6978
6979 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6980
6981 Revert:
6982 2011-12-18 Hui Zhu <teawater@gmail.com>
6983 * linux-low.c (linux_create_inferior): Save return value to ret.
6984
66f1260e
HZ
69852011-12-18 Hui Zhu <teawater@gmail.com>
6986
6987 * linux-low.c (linux_create_inferior): Save return value to ret.
6988
e77616d7
DE
69892011-12-16 Doug Evans <dje@google.com>
6990
e7b06c57
DE
6991 * linux-low.c (linux_create_inferior): If stdio connection,
6992 redirect stdin from /dev/null, stdout to stderr.
6993 * remote-utils.c (remote_is_stdio): New static global.
6994 (remote_connection_is_stdio): New function.
6995 (remote_prepare): Handle stdio connection.
6996 (remote_open): Ditto.
6997 (remote_close): Don't close stdin for stdio connections.
6998 (read_prim,write_prim): New functions. Replace all calls to
6999 read/write to these.
7000 * server.c (main): Watch for "-" argument. Move call to
7001 remote_prepare before start_inferior.
7002 * server.h (STDIO_CONNECTION_NAME): New macro.
7003 (remote_connection_is_stdio): Declare.
7004
e77616d7
DE
7005 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7006 in debugging output.
7007
82067193
YQ
70082011-12-15 Yao Qi <yao@codesourcery.com>
7009
7010 * tracepoint.c: Include sys/syscall.h.
7011 (gdb_ust_thread): Remove preprocessor conditional.
7012
82bfbe7e
PA
70132011-12-14 Pedro Alves <pedro@codesourcery.com>
7014
7015 * linux-low.c (linux_detach_one_lwp): Call
7016 the_low_target.prepare_to_resume before detaching.
7017
712c6575
YQ
70182011-12-14 Yao Qi <yao@codesourcery.com>
7019
7020 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7021 of write.
7022
d54d1edf
YQ
70232011-12-14 Yao Qi <yao@codesourcery.com>
7024
7025 * i386-low.c (i386_low_stopped_data_address): Initialize local
7026 variable `control'.
7027
6210a125
PA
70282011-12-13 Pedro Alves <pedro@codesourcery.com>
7029
7030 PR remote/13492
7031
7032 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7033 DR_CONTROL unless necessary. Extend comments.
7034 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7035 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7036
2ece8244
YQ
70372011-12-13 Yao Qi <yao@codesourcery.com>
7038
7039 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7040 macros.
7041 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7042
784867a5
JK
70432011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7044
7045 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7046 Print new debug message for such case.
7047
6bf36717
JK
70482011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7049
7050 Fix overlapping memcpy.
7051 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7052 the read_inferior_memory transfer.
7053 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7054 write_inferior_memory transfer.
7055 (set_fast_tracepoint_jump): New variable buf. Use it for the
7056 read_inferior_memory and write_inferior_memory transfers.
7057 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7058 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7059 Use it for the write_inferior_memory transfer.
7060 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7061 buffers.
7062
50275556
MR
70632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7064
7065 * linux-low.c (fetch_register, store_register): Make code
7066 consistent, fix formatting.
7067
7325beb4
MR
70682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7069
7070 * linux-low.c (usr_store_inferior_registers): Factor out code
7071 to handle individual registers into...
7072 (store_register): ... this new function.
7073
c642a434
UW
70742011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7075
7076 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7077 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7078 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7079 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7080 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7081 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7082 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7083 (srv_xmlfiles): Add new XML files.
7084
7085 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7086 and <sys/uio.h>.
7087 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7088 (init_registers_s390_linux32v1): Add prototype.
7089 (init_registers_s390_linux32v2): Likewise.
7090 (init_registers_s390_linux64v1): Likewise.
7091 (init_registers_s390_linux64v2): Likewise.
7092 (init_registers_s390x_linux64v1): Likewise.
7093 (init_registers_s390x_linux64v2): Likewise.
7094 (s390_num_regs): Increment to 52.
7095 (s390_regmap): Add orig_r2 register.
7096 (s390_num_regs_3264): Increment to 68.
7097 (s390_regmap_3264): Add orig_r2 register.
7098 (s390_collect_ptrace_register): Handle orig_r2 register.
7099 (s390_supply_ptrace_register): Likewise.
7100 (s390_fill_last_break): New function.
7101 (s390_store_last_break): Likewise.
7102 (s390_fill_system_call): New function.
7103 (s390_store_system_call): Likewise.
7104 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7105 register sets.
7106 (s390_check_regset): New function.
7107 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7108 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7109 Update target_regsets for available register sets.
7110
2268b414
JK
71112011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7112 Jan Kratochvil <jan.kratochvil@redhat.com>
7113
7114 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7115 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7116 New.
7117 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7118 * linux-low.h (struct process_info_private): New member r_debug.
7119 * server.c (handle_qxfer_libraries): Call
7120 the_target->qxfer_libraries_svr4.
7121 (handle_qxfer_libraries_svr4): New function.
7122 (qxfer_packets): New entry "libraries-svr4".
7123 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7124 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7125 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7126 PACKET_qXfer_libraries_svr4.
7127
d6db1fab
UW
71282011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7129
7130 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7131 PSW address/mask between 8-byte and 16-byte formats.
7132 (s390_supply_ptrace_register): Likewise.
7133 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7134 basic addressing mode bit.
7135
242f5f1c
SS
71362011-11-24 Stan Shebs <stan@codesourcery.com>
7137
7138 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7139
f196051f
SS
71402011-11-17 Stan Shebs <stan@codesourcery.com>
7141
7142 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7143 (tracing_start_time): New global.
7144 (tracing_stop_time): New global.
7145 (tracing_user_name): New global.
7146 (tracing_notes): New global.
7147 (tracing_stop_note): New global.
7148 (cmd_qtstart): Set traceframe_usage, start_time.
7149 (stop_tracing): Set stop_time.
7150 (cmd_qtstatus): Report additional status.
7151 (cmd_qtp): New function.
7152 (handle_tracepoint_query): Call it.
7153 (cmd_qtnotes): New function.
7154 (handle_tracepoint_general_set): Call it.
7155 (get_timestamp): Rename from tsv_get_timestamp.
7156
405f8e94
SS
71572011-11-14 Stan Shebs <stan@codesourcery.com>
7158 Kwok Cheung Yeung <kcy@codesourcery.com>
7159
7160 * linux-x86-low.c (small_jump_insn): New.
7161 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7162 trampoline and error message, build a trampoline and issue a small
7163 jump instruction to it.
7164 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7165 trampoline and error message.
7166 (x86_get_min_fast_tracepoint_insn_len): New.
7167 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7168 * linux-low.h (struct linux_target_ops): Add arguments to
7169 install_fast_tracepoint_jump_pad operation, add new operation.
7170 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7171 arguments.
7172 (linux_get_min_fast_tracepoint_insn_len): New function.
7173 (linux_target_op): Add new operation.
7174 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7175 (gdb_trampoline_buffer_end): Ditto.
7176 (gdb_trampoline_buffer_error): Ditto.
7177 (struct ipa_sym_addresses): Add fields for new IPA variables.
7178 (symbol_list): Add entries for new IPA variables.
7179 (struct tracepoint): Add fields to hold the address range of the
7180 trampoline used by the tracepoint.
7181 (trampoline_buffer_head): New static variable.
7182 (trampoline_buffer_tail): Ditto.
7183 (claim_trampoline_space): New function.
7184 (have_fast_tracepoint_trampoline_buffer): New function.
7185 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7186 structure.
7187 (install_fast_tracepoint): Ditto, also add error buffer argument.
7188 (cmd_qtminftpilen): New function.
7189 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7190 (fast_tracepoint_from_trampoline_address): New function.
7191 (fast_tracepoint_collecting): Handle trampoline as part of jump
7192 pad space.
7193 (set_trampoline_buffer_space): New function.
7194 (initialize_tracepoint): Initialize new IPA variables.
7195 * target.h (struct target_ops): Add arguments to
7196 install_fast_tracepoint_jump_pad operation, add new
7197 get_min_fast_tracepoint_insn_len operation.
7198 (target_get_min_fast_tracepoint_insn_len): New.
7199 (install_fast_tracepoint_jump_pad): Add arguments.
7200 * server.h (IPA_BUFSIZ): Define.
7201 * linux-i386-ipa.c: Include extra header files.
7202 (initialize_fast_tracepoint_trampoline_buffer): New function.
7203 (initialize_low_tracepoint): Call it.
7204 * server.h (set_trampoline_buffer_space): Declare.
7205 (claim_trampoline_space): Ditto.
7206 (have_fast_tracepoint_trampoline_buffer): Ditto.
7207
1e4d1764
YQ
72082011-11-14 Yao Qi <yao@codesourcery.com>
7209
7210 * server.c (handle_query): Handle InstallInTrace for qSupported.
7211 * tracepoint.c (add_tracepoint): Sort list.
7212 (install_tracepoint, download_tracepoint): New.
7213 (cmd_qtdp): Call them to install and download tracepoints.
7214 (sort_tracepoints): Removed.
7215 (cmd_qtstart): Update.
7216
5c73ff4e
YQ
72172011-11-14 Yao Qi <yao@codesourcery.com>
7218
7219 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7220 * mem-break.h: Declare.
7221 * tracepoint.c (cmd_qtstart): Move some code to ...
7222 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7223 New.
7224 (download_tracepoints): Move some code to ...
7225 (download_tracepoint_1): ... here. New.
7226
86a30030
YQ
72272011-11-08 Yao Qi <yao@codesourcery.com>
7228
7229 * remote-utils.c (relocate_instruction): A comment fix.
7230
8d26e50c
JB
72312011-11-07 Joel Brobecker <brobecker@adacore.com>
7232
7233 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7234 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7235 dr_status_mirror and dr_control_mirror from debug_reg_state.
7236 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7237 (i386_initial_stuff): Remove use of deleted globals.
7238 (i386_get_thread_context, i386_set_thread_context,
7239 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7240 from debug_reg_state.
7241
a59306a3
YQ
72422011-11-05 Yao Qi <yao@codesourcery.com>
7243
7244 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7245 address as TPOINT's.
7246
3065dfb6
SS
72472011-11-02 Stan Shebs <stan@codesourcery.com>
7248
7249 * tracepoint.c (agent_mem_read_string): New function.
7250 (eval_agent_expr): Call it for tracenz.
7251 * server.c (handle_query): Report support for tracenz.
7252
fd0d8c7c
YQ
72532011-11-02 Yao Qi <yao@codesourcery.com>
7254
7255 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7256
609086b1
YQ
72572011-11-02 Yao Qi <yao@codesourcery.com>
7258
7259 * target.h: Fix a typo in comment.
7260
b9fd1791
PA
72612011-10-31 Pedro Alves <pedro@codesourcery.com>
7262
7263 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7264 clobber the breakpoints' shadows with fast tracepoint jumps.
7265 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7266 * target.c (write_inferior_memory): Also pass MYADDR down to
7267 check_mem_write.
7268
03583c20
UW
72692011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7270
7271 * configure.ac: Check support for personality routine.
7272 * configure: Regenerate.
7273 * config.in: Likewise.
7274 * linux-low.c: Include <sys/personality.h>.
7275 Define ADDR_NO_RANDOMIZE if necessary.
7276 (linux_create_inferior): Disable address space randomization when
7277 forking inferior, if requested.
7278 (linux_supports_disable_randomization): New function.
7279 (linux_target_ops): Install it.
7280 * server.h (disable_randomization): Declare.
7281 * server.c (disable_randomization): New global variable.
7282 (handle_general_set): Handle QDisableRandomization.
7283 (handle_query): Likewise for qSupported.
7284 (main): Support --disable-randomization and --no-disable-randomization
7285 command line arguments.
7286 * target.h (struct target_ops): Add supports_disable_randomization.
7287 (target_supports_disable_randomization): New macro.
7288
723b724b
MF
72892011-09-29 Mike Frysinger <vapier@gentoo.org>
7290
7291 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7292 ifdef check.
7293 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7294 [!PT_GETDSBT] (target_loadmap): New definition.
7295 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7296 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7297 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7298 and PT_GETDSBT to LINUX_LOADMAP.
7299 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7300 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7301
55329a5c 73022011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7303
7304 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7305 (arm_linux_hwbp_cap): New static variable.
7306 (arm_linux_get_hwbp_cap): Replace by ...
7307 (arm_linux_init_hwbp_cap): ... this new function.
7308 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7309 (arm_linux_get_hw_watchpoint_count): Likewise.
7310 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7311 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7312 (arm_prepare_to_resume): Use perror_with_name instead of error.
7313
55329a5c 73142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7315
7316 * linux-arm-low.c: Include <signal.h>.
7317 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7318 (struct arm_linux_hwbp_cap): New data type.
7319 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7320 (struct arm_linux_hw_breakpoint): New data type.
7321 (MAX_BPTS, MAX_WPTS): Define.
7322 (struct arch_process_info, struct arch_lwp_info): New data types.
7323 (arm_linux_get_hwbp_cap): New function.
7324 (arm_linux_get_hw_breakpoint_count): Likewise.
7325 (arm_linux_get_hw_watchpoint_count): Likewise.
7326 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7327 (arm_hwbp_control_initialize): Likewise.
7328 (arm_hwbp_control_is_enabled): Likewise.
7329 (arm_hwbp_control_is_initialized): Likewise.
7330 (arm_hwbp_control_disable): Likewise.
7331 (arm_linux_hw_breakpoint_equal): Likewise.
7332 (arm_linux_hw_point_initialize): Likewise.
7333 (struct update_registers_data): New data structure.
7334 (update_registers_callback: New function.
7335 (arm_insert_point): Likewise.
7336 (arm_remove_point): Likewise.
7337 (arm_stopped_by_watchpoint): Likewise.
7338 (arm_stopped_data_address): Likewise.
7339 (arm_new_process): Likewise.
7340 (arm_new_thread): Likewise.
7341 (arm_prepare_to_resume): Likewise.
7342 (the_low_target): Register arm_insert_point, arm_remove_point,
7343 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7344 arm_new_thread, and arm_prepare_to_resume.
7345
6b9801d4
SS
73462011-09-15 Stan Shebs <stan@codesourcery.com>
7347
7348 * server.h (struct emit_ops): Add compare-goto fields.
7349 * tracepoint.c (gdb_agent_op_sizes): New table.
7350 (emit_eq_goto): New function.
7351 (emit_ne_goto): New function.
7352 (emit_lt_goto): New function.
7353 (emit_le_goto): New function.
7354 (emit_gt_goto): New function.
7355 (emit_ge_goto): New function.
7356 (is_goto_target): New function.
7357 (compile_bytecodes): Recognize special cases of compare-goto
7358 combinations and call specialized emitters for them.
7359 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7360 (amd64_emit_ne_goto): New function.
7361 (amd64_emit_lt_goto): New function.
7362 (amd64_emit_le_goto): New function.
7363 (amd64_emit_gt_goto): New function.
7364 (amd64_emit_ge_goto): New function.
7365 (amd64_emit_ops): Add the new functions.
7366 (i386_emit_eq_goto): New function.
7367 (i386_emit_ne_goto): New function.
7368 (i386_emit_lt_goto): New function.
7369 (i386_emit_le_goto): New function.
7370 (i386_emit_gt_goto): New function.
7371 (i386_emit_ge_goto): New function.
7372 (i386_emit_ops): Add the new functions.
7373
bf15cbda
SS
73742011-09-08 Stan Shebs <stan@codesourcery.com>
7375
7376 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7377 (i386_emit_epilogue): Restore %ebx.
7378
943ca1dd
JZ
73792011-08-31 Jie Zhang <jzhang918@gmail.com>
7380
7381 * server.c (step_thread): Remove definition.
7382 (process_serial_event): Don't handle Hs.
7383 * server.h (step_thread): Remove declaration.
7384 * target.c (set_desired_inferior): Remove use of step_thread.
7385
e3deef73
LM
73862011-08-24 Luis Machado <lgustavo@codesourcery.com>
7387
7388 * linux-low.c: Include linux-procfs.h.
7389 (linux_attach_lwp_1): Update comments.
7390 (linux_attach): Scan for existing threads when attaching to a
7391 process that is the tgid.
7392 * Makefile.in: Update dependencies.
7393
13da1c97
LM
73942011-08-24 Luis Machado <lgustavo@codesourcery.com>
7395
7396 * configure.srv: Add linux-procfs.o dependencies.
7397
881127c9
YQ
73982011-08-14 Yao Qi <yao@codesourcery.com>
7399
7400 * target.h (struct target_ops): Fix indent.
7401 * win32-low.c (win32_target_ops): Fix comment.
7402
58dbd541
YQ
74032011-08-14 Andrew Jenner <andrew@codesourcery.com>
7404 Yao Qi <yao@codesourcery.com>
7405
7406 * Makefile.in (clean): Remove tic6x-*.c files.
7407 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7408 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7409 (tic6x-c64xp-linux.c): Likewise.
7410 * configure.srv: Add support for tic6x-*-uclinux.
7411 * linux-tic6x-low.c: New.
7412 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7413
78d85199
YQ
74142011-08-14 Andrew Stubbs <ams@codesourcery.com>
7415 Yao Qi <yao@codesourcery.com>
7416
7417 * target.h (struct target_ops): Add read_loadmap.
7418 * linux-low.c (struct target_loadseg): New type.
7419 (struct target_loadmap): New type.
7420 (linux_read_loadmap): New function.
7421 (linux_target_ops): Add linux_read_loadmap.
7422 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7423 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7424 to NULL.
78d85199 7425
a959a88d
EZ
74262011-08-05 Eli Zaretskii <eliz@gnu.org>
7427
7428 * win32-low.c: Include <stdint.h>.
7429
1ced966e
PA
74302011-07-22 Pedro Alves <pedro@codesourcery.com>
7431
7432 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7433 to the inferior here.
7434 (i386_remove_aligned_watchpoint): Ditto.
7435 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7436 fit part of the watchpoint in the debug registers.
7437 (i386_update_inferior_debug_regs): New.
7438 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7439 registers, and only update the inferior on success.
7440 (i386_low_remove_watchpoint): Ditto.
7441
d26e3629
KY
74422011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7443
7444 * linux-low.c (compare_ints, unique, list_threads, show_process,
7445 linux_core_of_thread): Delete.
7446 (linux_target_ops): Change linux_core_of_thread to
7447 linux_common_core_of_thread.
7448 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7449 * utils.c (malloc_failure): Change type of argument.
7450 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7451 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7452 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7453 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7454 (IPA_OBJS): Add common-utils-ipa.o.
7455 (ptid_h, linux_osdata_h): New macros.
7456 (server_h): Add common/common-utils.h, common/xml-utils.h,
7457 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7458 common/ptid.h.
7459 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7460 ptid.o, buffer.o): New rules.
7461 (linux-low.o): Add common/linux-osdata.h as a dependency.
7462 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7463 * configure.ac: Add AC_HEADER_DIRENT check.
7464 * config.in: Regenerate.
7465 * configure: Regenerate.
7466 * remote-utils.c (xml_escape_text): Delete.
7467 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7468 buffer_xml_printf): Move to common/buffer.c.
7469 * server.c (main): Remove call to initialize_inferiors.
7470 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7471 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7472 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7473 internal_error, gdb_assert, gdb_assert_fail): Delete.
7474 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7475 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7476 common/buffer.h.
7477 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7478 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7479 initialize_inferiors): Delete.
7480
2275a1a7
PA
74812011-07-20 Pedro Alves <pedro@codesourcery.com>
7482
7483 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7484 symbol error.
7485
0a5b1e09
PA
74862011-05-31 Pedro Alves <pedro@codesourcery.com>
7487
7488 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7489 assertion.
7490 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7491
6938fd34
YQ
74922011-05-26 Yao Qi <yao@codesourcery.com>
7493
7494 * Makefile.in (thread-db.o): Track dependence to
7495 common/gdb_thread_db.h.
7496 * thread-db.c: include gdb_thread_db.h from right place.
7497
b481f9e0
TT
74982011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7499
7500 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7501 __FILE__ and __LINE__ to internal_error.
7502
98a5dd13
DE
75032011-05-13 Doug Evans <dje@google.com>
7504
7505 * thread-db.c (try_thread_db_load_from_sdir): New function.
7506 (try_thread_db_load_from_dir): New function.
7507 (thread_db_load_search): Handle $sdir, ignore $pdir.
7508 Remove trying of system directories if search of
7509 libthread-db-search-path fails, that is now done via $sdir.
7510
d248b706
KY
75112011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7512
7513 * server.c (handle_query): Add EnableDisableTracepoints to the list
7514 of supported features.
43aaf8b6 7515 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7516 tracepoints.
43aaf8b6
PA
7517 (cmd_qtenable_disable): New.
7518 (cmd_qtstart): Install tracepoints even if disabled.
7519 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7520 receiving a QTEnable or QTDisable packet.
7521 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7522 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7523 tracepoints.
7524 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7525
84e578fb
DE
75262011-05-10 Doug Evans <dje@google.com>
7527
7528 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7529
71f55dd8
DE
75302011-05-04 Doug Evans <dje@google.com>
7531
7532 * linux-low.c (linux_join): Skip process lookup.
7533 * spu-low.c (spu_join): Ditto.
7534 * server.c (join_inferiors_callback): Delete.
7535 (process_serial_event): For 'D' packet (detach) call join_inferior
7536 directly.
7537
4d393d60
JM
75382011-05-04 Joseph Myers <joseph@codesourcery.com>
7539
7540 * README: Don't mention xscale*-*-linux*.
7541 * configure.srv (xscale*-*-linux*): Don't handle target.
7542
b00ad6ff
NF
75432011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7544
7545 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7546 casting pointers.
7547 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7548 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7549 (i386_emit_void_call_2): Likewise.
7550
af96c192
YQ
75512011-04-26 Yao Qi <yao@codesourcery.com>
7552
43aaf8b6
PA
7553 * linux-low.c: Move common macros to linux-ptrace.h.
7554 Include linux-ptrace.h.
af96c192
YQ
7555 * Makefile.in (linux_ptrace_h): New.
7556 (linux-low.o): Depends on linux-ptrace.h.
7557
03f2bd59
JK
75582011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7559
7560 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7561 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7562 (remote_prepare): New function with most of the TCP code from ...
7563 (remote_open): ... here. Detect PORT here unconditionally. Move also
7564 setting transport_is_reliable.
7565 * server.c (run_once): New variable.
7566 (gdbserver_usage): Document it.
7567 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7568 the first run if RUN_ONCE.
7569 * server.h (run_once, remote_prepare): New declarations.
7570
7a9dd1b2
TT
75712011-04-19 Tom Tromey <tromey@redhat.com>
7572
7573 * win32-low.c (handle_load_dll): Remove duplicate "the".
7574
81239425
PM
75752011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7576
7577 Remove support for old Cygwin 1.5 versions.
7578 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7579 function to avoid warning.
7580 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7581 warning.
7582
9e0627f1
PM
75832011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7584
7585 * gdbserver/server.h (Macro _): Define it if not available.
7586
588eebee
MS
75872011-03-14 Michael Snyder <msnyder@vmware.com>
7588
348af9f7 7589 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7590
43f70d4c
JB
75912011-03-10 Joel Brobecker <brobecker@adacore.com>
7592
7593 * Makefile.in (maintainer-clean realclean distclean): Remove
7594 "make ... subdir_do" command.
7595
348af9f7
MS
75962011-03-10 Michael Snyder <msnyder@vmware.com>
7597
7598 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7599
7600 * server.c (handle_v_run): Free alloced buffer on early return.
7601
e637a4f5
YQ
76022011-03-09 Yao Qi <yao@codesourcery.com>
7603
7604 Revert:
7605 2011-03-04 Yao Qi <yao@codesourcery.com>
7606
7607 * Makefile.in: Remove GNU make feature --directory.
7608
7609 2011-03-05 Yao Qi <yao@codesourcery.com>
7610
7611 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7612 (subdir_do): New make target. Copied from gdb/Makefile.
7613 (maintainer-clean, realclean, distclean, clean): Call corresponding
7614 make targets in common/Makefile.
7615
7616 2011-02-11 Yao Qi <yao@codesourcery.com>
7617
7618 * configure.ac: Call AC_PROG_RANLIB.
7619 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7620 * configure: Regenerate.
7621
e6edda56
JK
76222011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7623
7624 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7625
e5141119
JB
76262011-03-06 Yao Qi <yao@codesourcery.com>
7627
7628 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7629
64794aa4
JB
76302011-03-05 Yao Qi <yao@codesourcery.com>
7631
7632 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7633 (subdir_do): New make target. Copied from gdb/Makefile.
7634 (maintainer-clean, realclean, distclean, clean): Call corresponding
7635 make targets in common/Makefile.
7636
7a762829
YQ
76372011-03-04 Yao Qi <yao@codesourcery.com>
7638
7639 * Makefile.in: Remove GNU make feature --directory.
7640
348af9f7
MS
76412011-03-04 Michael Snyder <msnyder@vmware.com>
7642
7643 * server.c (queue_stop_reply): Call xmalloc not malloc.
7644
76452011-03-02 Michael Snyder <msnyder@vmware.com>
7646
7647 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7648
9f72fee2
MS
76492011-02-28 Michael Snyder <msnyder@vmware.com>
7650
588eebee
MS
7651 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7652 (cmd_qtframe): Ditto.
7653 (cmd_qtbuffer): Ditto.
7654 (cmd_bigqtbuffer): Ditto.
7655
9f72fee2
MS
7656 * utils.c (decimal2str): Initialize 'width' to nine, then
7657 don't mess with it.
7658
8040bd49
UW
76592011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7660
7661 * hostio.c (require_data): Free *data, not data.
7662
7e52cbd0
JK
76632011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7664
7665 * hostio.c (require_data): Use free, not xfree.
7666
9130f83e
MS
76672011-02-27 Michael Snyder <msnyder@vmware.com>
7668
4b812f4e
MS
7669 * server.c (handle_query): Discard unused value.
7670
9130f83e
MS
7671 * hostio.c (require_data): Free malloc memory before returning
7672 error.
7673
69d37113
MS
76742011-02-26 Michael Snyder <msnyder@vmware.com>
7675
7676 * linux-low.c (list_threads): Call closedir for dirent.
7677
35f5825a
MS
76782011-02-27 Michael Snyder <msnyder@vmware.com>
7679
2a589cef
MS
7680 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7681 a case statement falls through.
7682
0adea5f7
MS
7683 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7684
35f5825a
MS
7685 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7686 in comparison.
7687
238f1c74
MS
76882011-02-26 Michael Snyder <msnyder@vmware.com>
7689
7690 * utils.c (decimal2str): Eliminate dead code and dead param.
7691 (pulongest): Drop dead param from call to decimal2str.
7692 (plongest): Ditto.
7693
633ff500
JB
76942011-02-24 Joel Brobecker <brobecker@adacore.com>
7695
7696 Revert the following patch (not approved yet):
7697 2011-02-21 Hui Zhu <teawater@gmail.com>
7698 * tracepoint.c (tp_printf): New function.
7699 (eval_agent_expr): Handle gdb_agent_op_printf.
7700
f9c6ff72
HZ
77012011-02-21 Hui Zhu <teawater@gmail.com>
7702
7703 * tracepoint.c (tp_printf): New function.
7704 (eval_agent_expr): Handle gdb_agent_op_printf.
7705
94d5e490
TT
77062011-02-18 Tom Tromey <tromey@redhat.com>
7707
7708 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7709 (tracepoint.o): Likewise.
7710 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7711 (gdb_agent_op_names): Likewise.
7712
c7f96d2b
TT
77132011-02-18 Tom Tromey <tromey@redhat.com>
7714
7715 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7716 gdb_agent_op_rot>: New constants.
7717 (gdb_agent_op_names): Add pick and roll.
7718 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7719 cases.
7720
0feedb2c
JK
77212011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7722
7723 * aclocal.m4: Regenerated with aclocal-1.11.1.
7724
b3b9301e
PA
77252011-02-14 Pedro Alves <pedro@codesourcery.com>
7726
7727 * server.c (handle_qxfer_traceframe_info): New.
7728 (qxfer_packets): Register "traceframe-info".
7729 (handle_query): Report support for qXfer:traceframe-info:read+.
7730 * tracepoint.c (match_blocktype): New.
7731 (traceframe_find_block_type): Rename to ...
7732 (traceframe_walk_blocks): ... this. Add callback filter argument,
7733 and use it.
7734 (traceframe_find_block_type): New, reimplemented on top of
7735 traceframe_walk_blocks.
7736 (build_traceframe_info_xml): New.
7737 (traceframe_read_info): New.
7738 * server.h (traceframe_read_info): Declare.
7739
4f3e6fb7
YQ
77402011-02-11 Yao Qi <yao@codesourcery.com>
7741
7742 * configure.ac: Call AC_PROG_RANLIB.
7743 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7744 * configure: Regenerate.
7745
764880b7
PA
77462011-02-07 Pedro Alves <pedro@codesourcery.com>
7747
7748 * server.c (gdb_read_memory): Change return semantics to allow
7749 partial transfers.
7750 (handle_search_memory_1): Adjust.
7751 (process_serial_event) <'m' packet>: Handle partial transfers.
7752 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7753
1c79eb8a
PA
77542011-01-28 Pedro Alves <pedro@codesourcery.com>
7755
7756 * regcache.c (init_register_cache): Initialize
7757 regcache->register_status.
7758 (free_register_cache): Release regcache->register_status.
7759 (regcache_cpy): Copy register_status.
7760 (registers_to_string): Print 'x's for unavailable registers.
7761 (supply_register): Mark the register's status valid or
7762 unavailable, depending on whether a buffer was passed in or not.
7763 (supply_register_zeroed): New.
7764 (supply_regblock): Mark the registers' status valid or
7765 unavailable, depending on whether a buffer was passed in or not.
7766 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7767 (struct regcache): New `register_status' field.
7768 (supply_register_zeroed): Declare.
7769 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7770 supply_register_zeroed, rather than passing a NULL buffer to
7771 supply_register.
7772 * tracepoint.c (fetch_traceframe_registers): Update comment.
7773
85724a0e
PA
77742011-01-28 Pedro Alves <pedro@codesourcery.com>
7775
7776 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7777 buffer explicit.
7778
d08aafef
PA
77792011-01-25 Pedro Alves <pedro@codesourcery.com>
7780
7781 * server.h (decode_xfer_write): Change prototype.
7782 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7783 and don't extract the annex here.
7784 * server.c (decode_xfer_read): Remove `annex' parameter,
7785 and don't extract the annex here.
7786 (decode_xfer): New.
7787 (struct qxfer): New.
7788 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7789 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7790 (handle_qxfer_statictrace): New functions, abstracted out from
7791 handle_query, and made to use the struct qxfer interface.
7792 (handle_threads_qxfer_proper): Rename to ...
7793 (handle_qxfer_threads_proper): ... this.
7794 (handle_threads_qxfer): Rename to ...
7795 (handle_qxfer_threads): ... this. Adjust.
7796 (qxfer_packets): New array.
7797 (handle_qxfer): New function.
7798 (handle_query): Use handle_qxfer.
7799
493e2a69
MS
78002011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7801
7802 * gdbreplay.c: Shorten lines of >= 80 columns.
7803 * linux-low.c: Ditto.
7804 * linux-ppc-low.c: Ditto.
7805 * linux-s390-low.c: Ditto.
7806 * linux-sparc-low.c: Ditto.
7807 * linux-x86-low.c: Ditto.
7808 * linux-xtensa-low.c: Ditto.
7809 * mem-break.c: Ditto.
7810 * nto-low.c: Ditto.
7811 * regcache.h: Ditto.
7812 * remote-utils.c: Ditto.
7813 * server.c: Ditto.
7814 * server.h: Ditto.
7815 * thread-db.c: Ditto.
7816 * tracepoint.c: Ditto.
7817 * utils.c: Ditto.
7818 * win32-low.h: Ditto.
7819
44944448
JB
78202011-01-05 Joel Brobecker <brobecker@adacore.com>
7821
7822 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7823 update.
7824
71ce852c
JB
78252011-01-01 Joel Brobecker <brobecker@adacore.com>
7826
7827 * server.c (gdbserver_version): Update copyright year in version
7828 output.
7829 * gdbreplay.c (gdbreplay_version): Ditto.
7830
eb826dc6
MF
78312010-12-29 Jie Zhang <jie.zhang@analog.com>
7832
7833 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7834 * linux-bfin-low.c: New file.
7835 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7836 PT_DATA_ADDR for BFIN targets.
7837 * Makefile.in (SFILES): Add linux-bfin-low.c.
7838 (clean): Remove reg-bfin.c.
7839 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7840 * README: Mention supported Blackfin targets.
7841
39ab222a
MF
78422010-12-23 Mike Frysinger <vapier@gentoo.org>
7843
7844 * .gitignore: New file.
7845
a1f2ce7d
MF
78462010-11-16 Mike Frysinger <vapier@gentoo.org>
7847
7848 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7849
f474844c
JZ
78502010-10-22 Jie Zhang <jie@codesourcery.com>
7851
7852 * Makefile.in: Add FLAGS_TO_PASS variable.
7853 (install): Remove dependency of install-only and recursively
7854 invoke make for install-only.
7855
f1048712
DE
78562010-10-04 Doug Evans <dje@google.com>
7857
7858 * Makefile.in (uninstall): Use $(DESTDIR).
7859
b53a1623
PA
78602010-09-24 Pedro Alves <pedro@codesourcery.com>
7861
e6ee044d
PA
7862 PR gdb/11842
7863
b53a1623
PA
7864 * linux-x86-low.c (compat_siginfo_from_siginfo)
7865 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7866 si_code is < 0. Check for si_code == SI_TIMER before checking for
7867 si_code < 0.
7868
fa1bd1e4
JB
78692010-09-13 Joel Brobecker <brobecker@adacore.com>
7870
7871 * lynx-i386-low.c: New file.
7872 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7873
47fac8f8
JB
78742010-09-13 Joel Brobecker <brobecker@adacore.com>
7875
7876 * lynx-low.c (ptrace_request_to_str): Remove handling for
7877 request values that have been removed in LynxOS 5.x.
7878
1adfc54d
JB
78792010-09-13 Joel Brobecker <brobecker@adacore.com>
7880
7881 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7882 <ptrace.h>
7883
c2a66c29
NS
78842010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7885
7886 * configure.ac: Add --enable-inprocess-agent option.
7887 * configure: Rebuilt.
7888
32fcada3
YQ
78892010-09-06 Yao Qi <yao@codesourcery.com>
7890
7891 * linux-low.c (linux_kill): Remove unused variable.
7892 (linux_stabilize_threads): Likewise.
7893 * server.c (start_inferior): Likewise.
7894 (queue_stop_reply_callback): Likewise.
7895 * tracepoint.c (do_action_at_tracepoint): Likewise.
7896
0cccb683
YQ
78972010-09-06 Yao Qi <yao@codesourcery.com>
7898
7899 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7900 on return.
7901
423ec54c
JK
79022010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7903
7904 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7905
12ac6819
PA
79062010-09-06 Pedro Alves <pedro@codesourcery.com>
7907
7908 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7909 "$(IPA_DEPFILES)".
7910
8ed54b31
JB
79112010-09-01 Joel Brobecker <brobecker@adacore.com>
7912
7913 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7914 gdbserver/lynx-ppc-low.c: New files.
7915 * Makefile.in (lynx_low_h): New variable.
7916 (lynx-low.o, lynx-ppc-low.o): New rules.
7917 * configure.ac: On LynxOS, link with -lnetinet.
7918 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7919 * configure: regenerate.
7920
bb0116a4
JB
79212010-09-01 Joel Brobecker <brobecker@adacore.com>
7922
7923 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7924 * configure.ac: Add check for vasprintf and vsnprintf.
7925 * configure, config.in: Regenerate.
7926 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7927
a778ab81 79282010-09-01 Joel Brobecker <brobecker@adacore.com>
7929
7930 * gdbreplay.c: Move include of alloca.h up, next to include of
7931 malloc.h.
7932 * server.h: Add include of malloc.h.
7933 * mem-break.c: Remove include of malloc.h.
7934 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7935
8b034a19 79362010-09-01 Joel Brobecker <brobecker@adacore.com>
7937
7938 * Makefile.in (memmem.o): Build with -Wno-error.
7939
79402010-09-01 Joel Brobecker <brobecker@adacore.com>
7941
7942 * utils.c (xsnprintf): Make non-static.
7943 * server.h: Add xsnprintf declaration.
7944 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7945 replace calls to snprintf by calls to xsnprintf throughout.
7946
79472010-09-01 Joel Brobecker <brobecker@adacore.com>
7948
7949 * configure.ac: Add configure check for alloca.
7950 * configure, config.in: Regenerate.
7951 * server.h: Include alloca.h if it exists.
7952 * gdbreplay.c: Include alloca.h if it exists.
7953
1a981360
PA
79542010-08-28 Pedro Alves <pedro@codesourcery.com>
7955
7956 * linux-low.c (__SIGRTMIN): Define if not already defined.
7957 (linux_create_inferior): Check for __ANDROID__ rather than
7958 __SIGRTMIN.
7959 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7960 are already deferred.
7961 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7962 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7963 stopped and already has a pending signal to report.
7964 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7965 a pending signal to report or is moving out of a jump pad.
7966 (linux_init_signals): Check for __ANDROID__ rather than
7967 __SIGRTMIN.
7968
b4d51a55
PA
79692010-08-28 Pedro Alves <pedro@codesourcery.com>
7970
7971 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7972 debug_threads check. Avoid a linear search when not doing debug
7973 output.
7974
ec48365d
PA
79752010-08-27 Pedro Alves <pedro@codesourcery.com>
7976
7977 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7978 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7979 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7980 (process_event): Change local fd's type to gdb_fildes_t.
7981 (create_file_handler): Adjust prototype.
7982 (delete_file_handler): Adjust prototype.
7983 (handle_file_event): Adjust prototype. Use pfildes.
7984 (create_file_event): Adjsut prototype.
7985 * remote-utils.c (remote_desc, listen_desc): Change type to
7986 gdb_fildes_t.
7987 * server.h: New gdb_fildes_t typedef.
7988 [USE_WIN32API]: Include winsock2.h.
7989 (delete_file_handler, add_file_handler): Adjust prototypes.
7990 (pfildes): Declare.
7991 * utils.c (pfildes): New.
7992
854d88f0
PA
79932010-08-27 Pedro Alves <pedro@codesourcery.com>
7994
7995 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7996 * configure: Regenerate.
7997
0146f85b
PA
79982010-08-27 Pedro Alves <pedro@codesourcery.com>
7999
8000 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8001 (linux_done_accessing_memory): ... this.
8002 (linux_target_ops): Adjust.
8003 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8004 * nto-low.c (nto_target_ops): Adjust comment.
8005 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8006 * spu-low.c (spu_target_ops): Adjust comment.
8007 * target.h (target_ops): Rename unprepare_to_access_memory field
8008 to done_accessing_memory.
8009 (unprepare_to_access_memory): Rename to ...
8010 (done_accessing_memory): ... this.
8011
90d74c30
PA
80122010-08-26 Pedro Alves <pedro@codesourcery.com>
8013
8014 * linux-low.c (linux_prepare_to_access_memory): New.
8015 (linux_unprepare_to_access_memory): New.
8016 (linux_target_ops): Install them.
8017 * server.c (read_memory): Rename to ...
8018 (gdb_read_memory): ... this. Use
8019 prepare_to_access_memory/prepare_to_access_memory.
8020 (write_memory): Rename to ...
8021 (gdb_write_memory): ... this. Use
8022 prepare_to_access_memory/prepare_to_access_memory.
8023 (handle_search_memory_1): Adjust.
8024 (process_serial_event): Adjust.
8025 * target.h (struct target_ops): New fields
8026 prepare_to_access_memory and unprepare_to_access_memory.
8027 (prepare_to_access_memory, unprepare_to_access_memory): New.
8028 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8029 prepare_to_access_memory/prepare_to_access_memory.
8030 * nto-low.c (nto_target_ops): Adjust.
8031 * spu-low.c (spu_target_ops): Adjust.
8032 * win32-low.c (win32_target_ops): Adjust.
8033
fd467969
PA
80342010-08-26 Pedro Alves <pedro@codesourcery.com>
8035
8036 * Makefile.in (WARN_CFLAGS): Get it from configure.
8037 (WERROR_CFLAGS): New.
8038 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8039 * configure.ac: Introduce --enable-werror, which adds -Werror to
8040 the compiler command line. Enabled by default. Disable with
8041 --disable-werror. Add -Wdeclaration-after-statement
8042 Wpointer-arith and -Wformat-nonliteral to warning flags.
8043 * configure: Regenerate.
8044
331e2f5f
PA
80452010-08-26 Pedro Alves <pedro@codesourcery.com>
8046
8047 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8048
e581f2b4
PA
80492010-08-26 Pedro Alves <pedro@codesourcery.com>
8050
8051 * gdbreplay.c (remote_error): New.
8052 (gdbchar): New.
8053 (expect): Use gdbchar. Check for error reading from GDB.
8054 Clarify sync error output.
8055 (play): Check for errors writing to GDB.
8056 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8057 * remote-utils.c (getpkt): Check for errors writing to the remote
8058 descriptor.
8059
3c11dd79
PA
80602010-08-25 Pedro Alves <pedro@codesourcery.com>
8061
8062 * linux-low.c (linux_wait_1): Move non-debugging code out of
8063 `debug_threads' control.
8064
d20a8ad9
PA
80652010-08-25 Pedro Alves <pedro@codesourcery.com>
8066
8067 * linux-low.c (linux_wait_1): Don't set last_status here.
8068 * server.c (push_event, queue_stop_reply_callback): Assert we're
8069 not pushing a TARGET_WAITKIND_IGNORE event.
8070 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8071 (myresume, handle_target_event): Set the thread's last_resume_kind
8072 and last_status from the target returned status.
8073
964e4306
PA
80742010-08-25 Pedro Alves <pedro@codesourcery.com>
8075
8076 PR threads/10729
8077
8078 * linux-x86-low.c (update_debug_registers_callback): New.
8079 (i386_dr_low_set_addr): Use it.
8080 (i386_dr_low_get_addr): New.
8081 (i386_dr_low_set_control): Use update_debug_registers_callback.
8082 (i386_dr_low_get_control): New.
8083 (i386_dr_low_get_status): Adjust.
8084 * linux-low.c (linux_stop_lwp): New.
8085 * linux-low.h (linux_stop_lwp): Declare.
8086
8087 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8088 argument instead of a i386_debug_reg_state.
8089 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8090 a i386_debug_reg_state.
8091 (i386_insert_aligned_watchpoint): Adjust.
8092 (i386_remove_aligned_watchpoint): Adjust.
8093 (i386_low_stopped_data_address): Read the debug registers from the
8094 inferior instead of from the mirrors.
8095 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8096 (i386_dr_low_get_addr): Declare.
8097 (i386_dr_low_get_control): Declare.
8098 (i386_dr_low_get_status): Change prototype.
8099
8100 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8101 (i386_dr_low_get_addr): New.
8102 (i386_dr_low_get_control): New.
8103 (i386_dr_low_get_status): Adjust prototype. Return
8104 dr_status_mirror.
8105 (i386_initial_stuff): Clear dr_status_mirror and
8106 dr_control_mirror.
8107 (i386_get_thread_context): Adjust.
8108 (i386_set_thread_context): Adjust.
8109 (i386_thread_added): Adjust.
8110
5f21a75b
PA
81112010-08-24 Pedro Alves <pedro@codesourcery.com>
8112
8113 * linux-low.h (linux_thread_area): Delete declaration.
8114
3e4c1235
TS
81152010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8116
8117 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8118 after its termination.
8119
1971b033
PA
81202010-08-09 Pedro Alves <pedro@codesourcery.com>
8121
8122 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8123 (gdb_wants_all_stopped): Delete.
8124 (linux_wait_1): Don't call them.
8125 * server.c (handle_v_cont): Tag all threads as want-stopped.
8126 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8127 stopped as "client-wants-stopped".
8128
310444ac
PA
81292010-07-31 Pedro Alves <pedro@codesourcery.com>
8130
8131 * Makefile.in (signals_h): New.
8132 (server_h): Depend on it.
8133 (server.o): Don't depend on $(signals_def).
8134 (signals.o): Depend on $(signals_def).
8135
a19cae16
JK
81362010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8137
8138 * Makefile.in (signals_def): New.
8139 (server_h): Append include/gdb/signals.h and signals_def.
8140 (server.o): Append signals_def.
8141
30d50328
JK
81422010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8143
8144 * server.c (handle_target_event): Use target_signal_to_host for
8145 resume_info.sig initialization.
8146 * target.h (struct thread_resume) <sig>: New comment.
8147
5c3216e2
OS
81482010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8149
c6f46ca0
OS
8150 * server.c (handle_query): strcpy() the returned string from paddress()
8151 instead of sprintf().
5c3216e2
OS
8152 * utils.c (paddress): Return phex_nz().
8153
6bd31874
JB
81542010-07-07 Joel Brobecker <brobecker@adacore.com>
8155
8156 * server.c (handle_v_cont): Call mourn_inferior if process
8157 just exited.
8158 (myresume): Likewise.
8159
0fb4aa4b
PA
81602010-07-01 Pedro Alves <pedro@codesourcery.com>
8161
8162 Static tracepoints, and integration with UST.
8163
8164 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8165 * mem-break.c (uninsert_all_breakpoints)
8166 (reinsert_all_breakpoints): New.
8167 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8168 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8169 (gdb_agent_ust_loaded, helper_thread_id)
8170 (gdb_agent_helper_thread_id): New macros.
8171 (struct ipa_sym_addresses): Add addr_ust_loaded,
8172 addr_helper_thread_id, addr_cmd_buf.
8173 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8174 (in_process_agent_loaded_ust): New.
8175 (write_e_ust_not_loaded): New.
8176 (maybe_write_ipa_ust_not_loaded): New.
8177 (struct collect_static_trace_data_action): New.
8178 (enum tracepoint_type) <static_tracepoint>: New.
8179 (struct tracepoint) <handle>: Mention static tracepoints.
8180 (struct static_tracepoint_ctx): New.
8181 (CMD_BUF_SIZE): New.
8182 (add_tracepoint_action): Handle static tracepoint actions.
8183 (unprobe_marker_at): New.
8184 (clear_installed_tracepoints): Handle static tracepoints.
8185 (cmd_qtdp): Handle static tracepoints.
8186 (probe_marker_at): New.
8187 (cmd_qtstart): Handle static tracepoints.
8188 (response_tracepoint): Handle static tracepoints.
8189 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8190 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8191 (get_context_regcache): Handle static tracepoints.
8192 (do_action_at_tracepoint): Handle static tracepoint actions.
8193 (traceframe_find_block_type): Handle static trace data blocks.
8194 (traceframe_read_sdata): New.
8195 (download_tracepoints): Download static tracepoint actions.
8196 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8197 (GDB_PROBE_NAME): New.
8198 (ust_ops): New.
8199 (GET_UST_SYM): New.
8200 (USTF): New.
8201 (dlsym_ust): New.
8202 (ust_marker_to_static_tracepoint): New.
8203 (gdb_probe): New.
8204 (collect_ust_data_at_tracepoint): New.
8205 (gdb_ust_probe): New.
8206 (UNIX_PATH_MAX, SOCK_DIR): New.
8207 (gdb_ust_connect_sync_socket): New.
8208 (resume_thread, stop_thread): New.
8209 (run_inferior_command): New.
8210 (init_named_socket): New.
8211 (gdb_ust_socket_init): New.
8212 (cstr_to_hexstr): New.
8213 (next_st): New.
8214 (first_marker, next_marker): New.
8215 (response_ust_marker): New.
8216 (cmd_qtfstm, cmd_qtsstm): New.
8217 (unprobe_marker_at, probe_marker_at): New.
8218 (cmd_qtstmat, gdb_ust_thread): New.
8219 (gdb_ust_init): New.
8220 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8221 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8222 (ST_REGENTRY): New.
8223 (x86_64_st_collect_regmap): New.
8224 (X86_64_NUM_ST_COLLECT_GREGS): New.
8225 (AMD64_RIP_REGNUM): New.
8226 (supply_static_tracepoint_registers): New.
8227 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8228 (ST_REGENTRY): New.
8229 (i386_st_collect_regmap): New.
8230 (i386_NUM_ST_COLLECT_GREGS): New.
8231 (supply_static_tracepoint_registers): New.
8232 * server.c (handle_query): Handle qXfer:statictrace:read.
8233 <qSupported>: Report support for StaticTracepoints, and
8234 qXfer:statictrace:read features.
8235 * server.h (traceframe_read_sdata)
8236 (supply_static_tracepoint_registers): Declare.
8237 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8238 (unpack_varlen_hex): Include in IPA build.
8239 * Makefile.in (ustlibs, ustinc): New.
8240 (IPA_OBJS): Add remote-utils-ipa.o.
8241 ($(IPA_LIB)): Link -ldl and -lpthread.
8242 (UST_CFLAGS): New.
8243 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8244 * config.in, configure: Regenerate.
8245
9e4344e5
PA
82462010-06-20 Ian Lance Taylor <iant@google.com>
8247 Pedro Alves <pedro@codesourcery.com>
8248
8249 * linux-x86-low.c (always_true): Delete.
8250 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8251 trying to fool the compiler with always_true.
8252
c6beb2cb
PA
82532010-06-20 Pedro Alves <pedro@codesourcery.com>
8254
8255 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8256 conditions in gdbserver.
8257
d2ed6730
UW
82582010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8259
8260 * spu-low.c (spu_read_memory): Wrap around local store limit.
8261 (spu_write_memory): Likewise.
8262
4e29fb54
PA
82632010-06-15 Pedro Alves <pedro@codesourcery.com>
8264
8265 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8266 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8267 LONGEST uses.
8268 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8269 uses.
8270 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8271 uses with LONGEST uses.
8272
6a271cae
PA
82732010-06-14 Stan Shebs <stan@codesourcery.com>
8274 Pedro Alves <pedro@codesourcery.com>
8275
8276 Bytecode compiler.
8277
8278 * linux-x86-low.c: Include limits.h.
8279 (add_insns): New.
8280 (always_true): New.
8281 (EMIT_ASM): New.
8282 (EMIT_ASM32): New.
8283 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8284 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8285 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8286 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8287 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8288 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8289 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8290 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8291 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8292 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8293 (amd64_emit_void_call_2): New.
8294 (amd64_emit_ops): New.
8295 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8296 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8297 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8298 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8299 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8300 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8301 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8302 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8303 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8304 (i386_emit_stack_adjust, i386_emit_int_call_1)
8305 (i386_emit_void_call_2): New.
8306 (i386_emit_ops): New.
8307 (x86_emit_ops): New.
8308 (the_low_target): Install x86_emit_ops.
8309 * server.h (struct emit_ops): New.
8310 (get_raw_reg_func_addr): Declare.
8311 (current_insn_ptr, emit_error): Declare.
8312 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8313 (set_trace_state_variable_value): New defines.
8314 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8315 addr_get_trace_state_variable_value and
8316 addr_set_trace_state_variable_value.
8317 (symbol_list): New fields for get_raw_reg,
8318 get_trace_state_variable_value and set_trace_state_variable_value.
8319 (condfn): New typedef.
8320 (struct tracepoint): New field `compiled_cond'.
8321 (do_action_at_tracepoint): Clear compiled_cond.
8322 (get_trace_state_variable_value, set_trace_state_variable_value):
8323 Export in the IPA.
8324 (condition_true_at_tracepoint): If there's a compiled condition,
8325 run that.
8326 (current_insn_ptr, emit_error): New globals.
8327 (struct bytecode_address): New.
8328 (get_raw_reg_func_addr): New.
8329 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8330 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8331 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8332 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8333 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8334 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8335 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8336 (compile_tracepoint_condition, compile_bytecodes): New.
8337 * target.h (emit_ops): Forward declare.
8338 (struct target_ops): New field emit_ops.
8339 (target_emit_ops): New.
8340 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8341 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8342 * linux-low.c (linux_emit_ops): New.
8343 (linux_target_ops): Install it.
8344 * linux-low.h (struct linux_target_ops): New field emit_ops.
8345
92b72907
UW
83462010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8347
8348 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8349 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8350
fa593d66
PA
83512010-06-01 Pedro Alves <pedro@codesourcery.com>
8352 Stan Shebs <stan@codesourcery.com>
8353
8354 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8355 (all): Depend on $(extra_libraries).
8356 (install-only): Install the IPA.
8357 (IPA_OBJS, IPA_LIB): New.
8358 (clean): Remove the IPA lib.
8359 (IPAGENT_CFLAGS): New.
8360 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8361 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8362 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8363 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8364 * configure.ac: Check for atomic builtins support in the compiler.
8365 (IPA_DEPFILES, extra_libraries): Define.
8366 * configure.srv (ipa_obj): Add description.
8367 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8368 (i[34567]86-*-linux*): Set ipa_obj.
8369 (x86_64-*-linux*): Set ipa_obj.
8370 * linux-low.c (stabilizing_threads): New.
8371 (supports_fast_tracepoints): New.
8372 (linux_detach): Stabilize threads before detaching.
8373 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8374 the lwp is either not stabilizing, or is moving out of a jump pad.
8375 (linux_fast_tracepoint_collecting): New.
8376 (maybe_move_out_of_jump_pad): New.
8377 (enqueue_one_deferred_signal): New.
8378 (dequeue_one_deferred_signal): New.
8379 (linux_wait_for_event_1): If moving out of a jump pad, defer
8380 pending signals to later.
8381 (linux_stabilize_threads): New.
8382 (linux_wait_1): Check if threads need moving out of jump pads, and
8383 do it if so.
8384 (stuck_in_jump_pad_callback): New.
8385 (move_out_of_jump_pad_callback): New.
8386 (lwp_running): New.
8387 (linux_resume_one_lwp): Handle moving out of jump pads.
8388 (linux_set_resume_request): Dequeue deferred signals.
8389 (need_step_over_p): Also step over fast tracepoint jumps.
8390 (start_step_over): Also uninsert fast tracepoint jumps.
8391 (finish_step_over): Also reinsert fast tracepoint jumps.
8392 (linux_install_fast_tracepoint_jump): New.
8393 (linux_target_ops): Install linux_stabilize_threads and
8394 linux_install_fast_tracepoint_jump_pad.
8395 * linux-low.h (linux_target_ops) <get_thread_area,
8396 install_fast_tracepoint_jump_pad>: New fields.
8397 (struct lwp_info) <collecting_fast_tracepoint,
8398 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8399 (linux_get_thread_area): Declare.
8400 * linux-x86-low.c (jump_insn): New.
8401 (x86_get_thread_area): New.
8402 (append_insns): New.
8403 (push_opcode): New.
8404 (amd64_install_fast_tracepoint_jump_pad): New.
8405 (i386_install_fast_tracepoint_jump_pad): New.
8406 (x86_install_fast_tracepoint_jump_pad): New.
8407 (the_low_target): Install x86_get_thread_area and
8408 x86_install_fast_tracepoint_jump_pad.
8409 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8410 (struct fast_tracepoint_jump): New.
8411 (fast_tracepoint_jump_insn): New.
8412 (fast_tracepoint_jump_shadow): New.
8413 (find_fast_tracepoint_jump_at): New.
8414 (fast_tracepoint_jump_here): New.
8415 (delete_fast_tracepoint_jump): New.
8416 (set_fast_tracepoint_jump): New.
8417 (uninsert_fast_tracepoint_jumps_at): New.
8418 (reinsert_fast_tracepoint_jumps_at): New.
8419 (set_breakpoint_at): Use write_inferior_memory.
8420 (uninsert_raw_breakpoint): Use write_inferior_memory.
8421 (check_mem_read): Mask out fast tracepoint jumps.
8422 (check_mem_write): Mask out fast tracepoint jumps.
8423 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8424 (set_fast_tracepoint_jump): Declare.
8425 (delete_fast_tracepoint_jump)
8426 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8427 (reinsert_fast_tracepoint_jumps_at): Declare.
8428 * regcache.c: Don't compile many functions when building the
8429 in-process agent library.
8430 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8431 the register buffer in the heap.
8432 (free_register_cache): If the register buffer isn't owned by the
8433 regcache, don't free it.
8434 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8435 pre-existing register caches.
8436 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8437 type.
8438 (convert_ascii_to_int): : Constify `from' parameter type.
8439 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8440 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8441 the needed buffer in-place.
8442 (relocate_instruction): New.
8443 * server.c (handle_query) <qSymbols>: If the target supports
8444 tracepoints, give it a chance of looking up symbols. Report
8445 support for fast tracepoints.
8446 (handle_status): Stabilize threads.
8447 (process_serial_event): Adjust.
8448 * server.h (struct fast_tracepoint_jump): Forward declare.
8449 (struct process_info) <fast_tracepoint_jumps>: New field.
8450 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8451 (decode_X_packet, decode_M_packet): Adjust.
8452 (relocate_instruction): Declare.
8453 (in_process_agent_loaded): Declare.
8454 (tracepoint_look_up_symbols): Declare.
8455 (struct fast_tpoint_collect_status): Declare.
8456 (fast_tracepoint_collecting): Declare.
8457 (force_unlock_trace_buffer): Declare.
8458 (handle_tracepoint_bkpts): Declare.
8459 (initialize_low_tracepoint)
8460 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8461 * target.h (struct target_ops) <stabilize_threads,
8462 install_fast_tracepoint_jump_pad>: New fields.
8463 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8464 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8465 [HAVE_STDINT_H]: Include stdint.h.
8466 (trace_debug_1): Rename to ...
8467 (trace_vdebug): ... this.
8468 (trace_debug): Rename to ...
8469 (trace_debug_1): ... this. Add `level' parameter.
8470 (trace_debug): New.
8471 (ATTR_USED, ATTR_NOINLINE): New.
8472 (IP_AGENT_EXPORT): New.
8473 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8474 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8475 (about_to_request_buffer_space, trace_buffer_is_full)
8476 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8477 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8478 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8479 (traceframe_write_count, traceframes_created)
8480 (trace_state_variables)
8481 New renaming defines.
8482 (struct ipa_sym_addresses): New.
8483 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8484 (symbol_list): New.
8485 (ipa_sym_addrs): New.
8486 (all_tracepoint_symbols_looked_up): New.
8487 (in_process_agent_loaded): New.
8488 (write_e_ipa_not_loaded): New.
8489 (maybe_write_ipa_not_loaded): New.
8490 (tracepoint_look_up_symbols): New.
8491 (debug_threads) [IN_PROCESS_AGENT]: New.
8492 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8493 (UNKNOWN_SIDE_EFFECTS): New.
8494 (stop_tracing): New.
8495 (flush_trace_buffer): New.
8496 (stop_tracing_bkpt): New.
8497 (flush_trace_buffer_bkpt): New.
8498 (read_inferior_integer): New.
8499 (read_inferior_uinteger): New.
8500 (read_inferior_data_pointer): New.
8501 (write_inferior_data_pointer): New.
8502 (write_inferior_integer): New.
8503 (write_inferior_uinteger): New.
8504 (struct collect_static_trace_data_action): Delete.
8505 (enum tracepoint_type): New.
8506 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8507 <actions_str, step_actions, step_actions_str>: Only include in
8508 GDBserver.
fa593d66
PA
8509 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8510 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8511 (tracepoints): Use IP_AGENT_EXPORT.
8512 (last_tracepoint): Don't include in the IPA.
8513 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8514 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8515 (alloced_trace_state_variables): New.
8516 (trace_state_variables): Use IP_AGENT_EXPORT.
8517 (traceframe_t): Delete unused variable.
8518 (circular_trace_buffer): Don't include in the IPA.
8519 (trace_buffer_start): Delete.
8520 (struct trace_buffer_control): New.
8521 (trace_buffer_free): Delete.
8522 (struct ipa_trace_buffer_control): New.
8523 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8524 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8525 New.
8526 (trace_buffer_ctrl): New.
8527 (TRACE_BUFFER_CTRL_CURR): New.
8528 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8529 Reimplement as macros.
8530 (trace_buffer_wrap): Delete.
8531 (traceframe_write_count, traceframe_read_count)
8532 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8533 (struct tracepoint_hit_ctx) <type>: New field.
8534 (struct fast_tracepoint_ctx): New.
8535 (memory_barrier): New.
8536 (cmpxchg): New.
8537 (record_tracepoint_error): Update atomically in the IPA.
8538 (clear_inferior_trace_buffer): New.
8539 (about_to_request_buffer_space): New.
8540 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8541 updating the same buffer.
8542 (add_tracepoint): Default the tracepoint's type to trap
8543 tracepoint, and orig_size to -1.
8544 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8545 internal variables.
8546 (create_trace_state_variable): New parameter `gdb'. Handle it.
8547 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8548 (cmd_qtdp): Handle fast tracepoints.
8549 (cmd_qtdv): Adjust.
8550 (max_jump_pad_size): New.
8551 (gdb_jump_pad_head): New.
8552 (get_jump_space_head): New.
8553 (claim_jump_space): New.
8554 (sort_tracepoints): New.
8555 (MAX_JUMP_SIZE): New.
8556 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8557 IPA.
8558 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8559 support. Upload fast traceframes, and delete internal IPA
8560 breakpoints.
8561 (stop_tracing_handler): New.
8562 (flush_trace_buffer_handler): New.
8563 (cmd_qtstop): Upload fast tracepoints.
8564 (response_tracepoint): Handle fast tracepoints.
8565 (tracepoint_finished_step): Upload fast traceframes. Set the
8566 tracepoint hit context's tracepoint type.
8567 (handle_tracepoint_bkpts): New.
8568 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8569 type. Add comment about fast tracepoints.
8570 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8571 non-existing action_str field.
8572 (get_context_regcache): Handle fast tracepoints.
8573 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8574 to the regcache.
8575 (fast_tracepoint_from_jump_pad_address): New.
8576 (fast_tracepoint_from_ipa_tpoint_address): New.
8577 (collecting_t): New.
8578 (force_unlock_trace_buffer): New.
8579 (fast_tracepoint_collecting): New.
8580 (collecting): New.
8581 (gdb_collect): New.
8582 (write_inferior_data_ptr): New.
8583 (target_tp_heap): New.
8584 (target_malloc): New.
8585 (download_agent_expr): New.
8586 (UALIGN): New.
8587 (download_tracepoints): New.
8588 (download_trace_state_variables): New.
8589 (upload_fast_traceframes): New.
8590 (IPA_FIRST_TRACEFRAME): New.
8591 (IPA_NEXT_TRACEFRAME_1): New.
8592 (IPA_NEXT_TRACEFRAME): New.
8593 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8594 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8595 (gdb_jump_pad_buffer_end): New.
8596 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8597 (initialize_tracepoint): Adjust.
8598 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8599 buffer. Initialize the low module.
8600 * utils.c (PREFIX, TOOLNAME): New.
8601 (malloc_failure): Use PREFIX.
8602 (error): In the IPA, an error causes an exit.
8603 (fatal, warning): Use PREFIX.
8604 (internal_error): Use TOOLNAME.
8605 (NUMCELLS): Increase to 10.
8606 * configure, config.in: Regenerate.
8607
d149dd1d
PA
86082010-06-01 Pedro Alves <pedro@codesourcery.com>
8609
8610 * server.c (handle_query) <qSupported>: Do two passes over the
8611 qSupported string to avoid nesting strtok.
8612
f6528abd
JK
86132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8614
8615 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8616 (CDEPS): New.
8617 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8618 -Wl,--dynamic-list.
8619 * configure: Regenerate.
8620 * proc-service.list: New.
8621
ca2a87a0
JK
86222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8623
8624 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8625 New comment.
8626
363a6e9f
OS
86272010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8628
8629 * gdbreplay.c (remote_open): Check error return from socket() call by
8630 its equality to -1 not by it being negative.
8631 * remote-utils.c (remote_open): Likewise.
8632
d23b6cb1
PA
86332010-05-23 Pedro Alves <pedro@codesourcery.com>
8634
8635 * config.h: Regenerate.
8636
28d3cf85
MK
86372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8638
8639 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8640 doesn't provide PTRACE_GET_THREAD_AREA.
8641
fea36a59
MK
86422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8643
8644 * linux-m68k-low.c: Include <asm/ptrace.h>
8645 (ps_get_thread_area): Implement.
8646
24b066ba
DE
86472010-05-03 Doug Evans <dje@google.com>
8648
8649 * event-loop.c (struct callback_event): New struct.
8650 (callback_list): New global.
8651 (append_callback_event, delete_callback_event): New functions.
8652 (process_callback): New function.
8653 (start_event_loop): Call it.
8654 * remote-utils.c (NOT_SCHEDULED): Define.
8655 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8656 moved out of readchar.
8657 (readchar): Rewrite. Call reschedule before returning.
8658 (reset_readchar): New function.
8659 (remote_close): Call it.
8660 (process_remaining, reschedule): New functions.
8661 * server.h (callback_handler_func): New typedef.
8662 (append_callback_event, delete_callback_event): Declare.
8663
9836d6ea
PA
86642010-05-03 Pedro Alves <pedro@codesourcery.com>
8665
8666 * proc-service.c (ps_pglobal_lookup): Use
8667 thread_db_look_up_one_symbol.
8668 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8669 parameter. Use it instead of all_symbols_looked_up.
8670 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8671 field.
8672 (all_symbols_looked_up): Don't declare.
8673 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8674 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8675 field.
8676 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8677 Set all_symbols_looked_up here.
8678 (thread_db_look_up_one_symbol): New.
8679 (thread_db_get_tls_address): Adjust.
8680 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8681 thread_db object on the heap, and tentatively set it in the
8682 process structure.
8683 (thread_db_init): Don't set all_symbols_looked_up here.
8684 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8685
7984d532
PA
86862010-05-03 Pedro Alves <pedro@codesourcery.com>
8687
8688 * linux-low.c (linux_kill, linux_detach): Adjust.
8689 (status_pending_p_callback): Remove redundant statement. Check
8690 for !TARGET_WAITIKIND_IGNORE, instead of
8691 TARGET_WAITKIND_STOPPED.
8692 (handle_tracepoints): Make sure LWP is locked. Adjust.
8693 (linux_wait_for_event_1): Adjust.
8694 (linux_cancel_breakpoints): New.
8695 (unsuspend_one_lwp): New.
8696 (unsuspend_all_lwps): New.
8697 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8698 (send_sigstop_callback): Change return type to int, add new
8699 `except' parameter and handle it.
8700 (suspend_and_send_sigstop_callback): New.
8701 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8702 pass them down. If SUSPEND, also increment the lwp's suspend
8703 count.
8704 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8705 (need_step_over_p): Don't consider suspended LWPs.
8706 (start_step_over): Adjust.
8707 (proceed_one_lwp): Change return type to int, add new `except'
8708 parameter and handle it.
8709 (unsuspend_and_proceed_one_lwp): New.
8710 (proceed_all_lwps): Use find_inferior instead of
8711 for_each_inferior.
8712 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8713 also decrement the suspend count of LWPs. Pass `except' down,
8714 instead of hacking its suspend count.
8715 (linux_pause_all): Add `freeze' parameter. Adjust.
8716 (linux_unpause_all): New.
8717 (linux_target_ops): Install linux_unpause_all.
8718 * server.c (handle_status): Adjust.
8719 * target.h (struct target_ops): New fields `unpause_all' and
8720 `cancel_breakpoints'. Add new parameter to `pause_all'.
8721 (pause_all): Add new `freeze' parameter.
8722 (unpause_all): New.
8723 (cancel_breakpoints): New.
8724 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8725 cancel breakpoints.
8726 (cmd_qtstart): Pause threads.
8727 (stop_tracing): Pause threads, and cancel breakpoints.
8728 * win32-low.c (win32_target_ops): Adjust.
8729
e471f25b
PA
87302010-05-03 Pedro Alves <pedro@codesourcery.com>
8731
8732 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8733 the inferior right away from here...
8734 (linux_wait_1): ... to here, and adjust to check the thread's
8735 last_resume_kind instead of the lwp's step or stop_expected flags.
8736
1915ef4f
PA
87372010-05-02 Pedro Alves <pedro@codesourcery.com>
8738
8739 * README: Use consistent `GDB' and `GDBserver' spellings.
8740
f9e39928
PA
87412010-05-02 Pedro Alves <pedro@codesourcery.com>
8742
8743 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8744 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8745 (linux_detach_one_lwp): Assume the lwp is stopped.
8746 (any_thread_of): Delete.
8747 (linux_detach): Stop all lwps here. Don't blindly delete all
8748 breakpoints.
8749 (delete_lwp_callback): New.
8750 (linux_mourn): Delete all lwps of the process that is gone.
8751 (linux_wait_1): Don't delete the last lwp of the process here.
8752 * mem-break.h (mark_breakpoints_out): Declare.
8753 * mem-break.c (mark_breakpoints_out): New.
8754 (free_all_breakpoints): Use it.
8755 * server.c (handle_target_event): If the process is gone, mark
8756 breakpoints out.
8757 * thread-db.c (struct thread_db) <create_bp>: New field.
8758 (thread_db_enable_reporting): Fix prototype. Store a thread event
8759 breakpoint reference in the thread_db struct.
8760 (thread_db_load_search): Clear the thread_db object.
8761 (try_thread_db_load_1): Ditto.
8762 (switch_to_process): New.
8763 (disable_thread_event_reporting): Use it.
8764 (remove_thread_event_breakpoints): New.
8765 (thread_db_detach, thread_db_mourn): Use it.
8766
1e7fc18c
PA
87672010-05-01 Pedro Alves <pedro@codesourcery.com>
8768
8769 * linux-low.c (linux_enable_event_reporting): New.
8770 (linux_wait_for_event_1, handle_extended_wait): Use it.
8771
02fc4de7
PA
87722010-04-30 Pedro Alves <pedro@codesourcery.com>
8773
8774 * linux-low.c (linux_kill_one_lwp, linux_kill)
8775 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8776 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8777 SIGSTOP even if the LWP is stopped.
8778 (send_sigstop_callback): New.
8779 (stop_all_lwps): Use send_sigstop_callback instead.
8780 (linux_resume_one_thread): Adjust.
8781 (proceed_one_lwp): Still proceed an LWP that the client has
8782 requested to stop, if we haven't reported it as stopped yet. Make
8783 sure that LWPs the client want stopped, have a pending SIGSTOP.
8784
bc3b5632
DE
87852010-04-26 Doug Evans <dje@google.com>
8786
ae1ada35
DE
8787 * server.c (handle_general_set): Make static.
8788
bc3b5632
DE
8789 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8790 Print received char after testing for error/eof instead of before.
8791 (input_interrupt): Tweak comment.
8792
65730243
DE
87932010-04-23 Doug Evans <dje@google.com>
8794
8795 * server.c (start_inferior): Print inferior argv if --debug.
8796
a8ae7dc0
AR
87972010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8798
8799 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8800 * nto-x86-low.c: Include server.h
8801
1c07cc19
PM
88022010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8803
8804 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8805 be consistent with other sources of this directory.
8806 (init_registers_amd64): Correct name of source file of this function
8807 in the comment.
8808
e0a61e09
PM
88092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8810
8811 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8812 64-bit executables.
8813
54709339
PM
88142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8815
8816 * win32-i386-low.c: Add 64-bit support.
8817 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8818 (init_registers_amd64): Declare.
8819 (mappings): Add 64-bit version of array.
8820 (init_windows_x86): New function.
8821 (the_low_target): Change init_arch field to init_windows_x86.
8822
e8f0053d
PM
88232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8824
8825 * win32-low.c: Adapt to support also 64-bit architecture.
8826 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8827 (get_image_name): Use SIZE_T type for local variable `done'.
8828 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8829 (toolhelp_get_dll_name): Idem.
8830 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8831 Use uintptr_t typecast to avoid warning.
8832 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8833 (handle_exception): Use phex_nz to avoid warning.
8834 (win32_wait): Remove unused local variable `process'.
8835
c481e77e
PM
88362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8837
8838 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8839 `amd64-avx.o'.
8840
12ea4b69
PM
88412010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8842
8843 * configure.ac: Use `ws2_32' library for srv_mingw.
8844 * configure: Regenerate.
8845 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8846 * remote-utils.c: Likewise.
8847
f6d1620c
L
88482010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8849
8850 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8851 if __x86_64__ is defined.
8852
8e642873
PM
88532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8854
8855 * configure: Regenerate.
8856
711e434b
PM
88572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8858
8859 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8860 * target.h (target_ops): New get_tib_address field.
8861 * win32-low.h (win32_thread_info): Add thread_local_base field.
8862 * win32-low.c (child_add_thread): Add tlb argument.
8863 Set thread_local_base field to TLB.
8864 (get_child_debug_event): Adapt to child_add_thread change.
8865 (win32_get_tib_address): New function.
8866 (win32_target_ops): Set get_tib_address field to
8867 win32_get_tib_address.
8868 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8869
505106cd
PA
88702010-04-12 Pedro Alves <pedro@codesourcery.com>
8871
505106cd
PA
8872 * linux-low.c (linux_mourn): Also remove the process.
8873 * server.c (handle_target_event): Don't remove the process here.
8874 * nto-low.c (nto_mourn): New.
8875 (nto_target_ops): Install it.
8876 * spu-low.c (spu_mourn): New.
8877 (spu_target_ops): Install it.
8878 * win32-low.c (win32_mourn): New.
8879 (win32_target_ops): Install it.
8880
e8470a06
PA
88812010-04-12 Pedro Alves <pedro@codesourcery.com>
8882
8883 * server.h (buffer_xml_printf): Remove redundant `;'.
8884
45ba0d02
PA
88852010-04-12 Pedro Alves <pedro@codesourcery.com>
8886
8887 * regcache.c (set_register_cache): Invalidate regcaches before
8888 changing the register cache layout.
8889 (regcache_invalidate_one): Allow a NULL regcache.
8890 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8891 regcaches before changing the register cache layout or the target
8892 regsets.
8893
59e04013
L
88942010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8895
8896 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8897 variable warning on Linux/x86-64.
8898
8336d594
PA
88992010-04-11 Pedro Alves <pedro@codesourcery.com>
8900
8901 GDBserver disconnected tracing support.
8902
8903 * linux-low.c (linux_remove_process): Delete.
8904 (add_lwp): Don't set last_resume_kind here.
8905 (linux_kill): Use `mourn'.
8906 (linux_detach): Use `thread_db_detach', and `mourn'.
8907 (linux_mourn): New.
8908 (linux_attach_lwp_1): Adjust comment.
8909 (linux_attach): last_resume_kind moved the thread_info; adjust.
8910 (status_pending_p_callback): Adjust.
8911 (linux_wait_for_event_1): Adjust.
8912 (count_events_callback, select_singlestep_lwp_callback)
8913 (select_event_lwp_callback, cancel_breakpoints_callback)
8914 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8915 (proceed_one_lwp): Adjust.
8916 (linux_async): Add debug output.
8917 (linux_thread_stopped): New.
8918 (linux_pause_all): New.
8919 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8920 linux_pause_all.
8921 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8922 (thread_db_free): Delete declaration.
8923 (thread_db_detach, thread_db_mourn): Declare.
8924 * thread-db.c (thread_db_init): Use thread_db_mourn.
8925 (thread_db_free): Delete, split in two.
8926 (disable_thread_event_reporting): New.
8927 (thread_db_detach): New.
8928 (thread_db_mourn): New.
8929
8930 * server.h (struct thread_info) <last_resume_kind>: New field.
8931 <attached>: Add comment.
8932 <gdb_detached>: New field.
8933 (handler_func): Change return type to int.
8934 (handle_serial_event, handle_target_event): Ditto.
8935 (gdb_connected): Declare.
8936 (tracing): Delete.
8937 (disconnected_tracing): Declare.
8938 (stop_tracing): Declare.
8939
8940 * server.c (handle_query) <qSupported>: Report support for
8941 disconnected tracing.
8942 (queue_stop_reply_callback): Account for running threads.
8943 (gdb_wants_thread_stopped): New.
8944 (gdb_wants_all_threads_stopped): New.
8945 (gdb_reattached_process): New.
8946 (handle_status): Clear the `gdb_detached' flag of all processes.
8947 In all-stop, stop all threads.
8948 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8949 (process_serial_event): If the remote connection breaks, or if an
8950 exit was forced with "monitor exit", force an event loop exit.
8951 Handle disconnected tracing on detach.
8952 (handle_serial_event): Adjust.
8953 (handle_target_event): If GDB isn't connected, forward events back
8954 to the inferior, unless the last process exited, in which case,
8955 exit gdbserver. Adjust interface.
8956
8957 * remote-utils.c (remote_open): Don't block in accept. Instead
8958 register an event loop source on the listen socket file
8959 descriptor. Refactor bits into ...
8960 (listen_desc): ... this new global.
8961 (gdb_connected): ... this new function.
8962 (enable_async_notification): ... this new function.
8963 (handle_accept_event): ... this new function.
8964 (remote_close): Clear remote_desc.
8965
8966 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8967
8968 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8969 New fields.
8970 (mourn_inferior): Define.
8971 (target_process_qsupported): Avoid the dangling else problem.
8972 (thread_stopped): Define.
8973 (pause_all): Define.
8974 (target_waitstatus_to_string): Declare.
8975 * target.c (target_waitstatus_to_string): New.
8976
8977 * tracepoint.c (tracing): Make extern.
8978 (disconnected_tracing): New.
8979 (stop_tracing): Make extern. Handle tracing stops due to GDB
8980 disconnecting.
8981 (cmd_qtdisconnected): New.
8982 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8983 (handle_tracepoint_general_set): Handle QTDisconnected.
8984
8985 * event-loop.c (event_handler_func): Change return type to int.
8986 (process_event): Bail out if the event handler wants the event
8987 loop to stop.
8988 (handle_file_event): Ditto.
8989 (start_event_loop): Bail out if the event handler wants the event
8990 loop to stop.
8991
8992 * nto-low.c (nto_target_ops): Adjust.
8993 * spu-low.c (spu_wait): Don't remove the process here.
8994 (spu_target_ops): Adjust.
8995 * win32-low.c (win32_wait): Don't remove the process here.
8996 (win32_target_ops): Adjust.
8997
5d267c4c
PA
89982010-04-11 Pedro Alves <pedro@codesourcery.com>
8999
9000 * regcache.c (realloc_register_cache): Invalidate inferior's
9001 regcache before recreating it.
9002
623ccd72
PA
90032010-04-09 Pedro Alves <pedro@codesourcery.com>
9004
9005 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9006
219f2f23
PA
90072010-04-09 Stan Shebs <stan@codesourcery.com>
9008 Pedro Alves <pedro@codesourcery.com>
9009
9010 * server.h (LONGEST): New.
9011 (struct thread_info) <while_stepping>: New field.
9012 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9013 Declare.
9014 (initialize_tracepoint, handle_tracepoint_general_set)
9015 (handle_tracepoint_query, tracepoint_finished_step)
9016 (tracepoint_was_hit, release_while_stepping_state_list):
9017 (current_traceframe): Declare.
9018 * server.c (handle_general_set): Handle tracepoint packets.
9019 (read_memory): New.
9020 (write_memory): New.
9021 (handle_search_memory_1): Use read_memory.
9022 (handle_query): Report support for conditional tracepoints, trace
9023 state variables, and tracepoint sources. Handle tracepoint
9024 queries.
9025 (main): Initialize the tracepoints module.
9026 (process_serial_event): Handle traceframe reads/writes.
9027
9028 * linux-low.c (handle_tracepoints): New.
9029 (linux_wait_1): Call it.
9030 (linux_resume_one_lwp): Handle while-stepping.
9031 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9032 (linux_target_ops): Install them.
9033 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9034 New field.
9035 * linux-x86-low.c (x86_supports_tracepoints): New.
9036 (the_low_target). Install it.
9037
9038 * mem-break.h (delete_breakpoint): Declare.
9039 * mem-break.c (delete_breakpoint): Make external.
9040
9041 * target.h (struct target_ops): Add `supports_tracepoints',
9042 `read_pc', and `write_pc' fields.
9043 (target_supports_tracepoints): Define.
9044 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9045 (phex_nz): New.
9046
9047 * regcache.h (struct regcache) <registers_owned>: New field.
9048 (init_register_cache, regcache_cpy): Declare.
9049 (regcache_read_pc, regcache_write_pc): Declare.
9050 (register_cache_size): Declare.
9051 (supply_regblock): Declare.
9052 * regcache.c (init_register_cache): New.
9053 (new_register_cache): Use it.
9054 (regcache_cpy): New.
9055 (register_cache_size): New.
9056 (supply_regblock): New.
9057 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9058
219f2f23
PA
9059 * tracepoint.c: New.
9060
9061 * Makefile.in (OBS): Add tracepoint.o.
9062 (tracepoint.o): New rule.
9063
3a13a53b
L
90642010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9065
9066 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9067 (i386-mmx.o): New.
9068 (i386-mmx.c): Likewise.
9069 (i386-mmx-linux.o): Likewise.
9070 (i386-mmx-linux.c): Likewise.
9071
9072 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9073 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9074 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9075 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9076
9077 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9078 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9079 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9080
1570b33e
L
90812010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9082
9083 * Makefile.in (clean): Updated.
9084 (i386-avx.o): New.
9085 (i386-avx.c): Likewise.
9086 (i386-avx-linux.o): Likewise.
9087 (i386-avx-linux.c): Likewise.
9088 (amd64-avx.o): Likewise.
9089 (amd64-avx.c): Likewise.
9090 (amd64-avx-linux.o): Likewise.
9091 (amd64-avx-linux.c): Likewise.
9092
9093 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9094 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9095 (srv_amd64_regobj): Add amd64-avx.o.
9096 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9097 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9098 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9099 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9100 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9101 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9102 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9103
9104 * i387-fp.c: Include "i386-xstate.h".
9105 (i387_xsave): New.
9106 (i387_cache_to_xsave): Likewise.
9107 (i387_xsave_to_cache): Likewise.
9108 (x86_xcr0): Likewise.
9109
9110 * i387-fp.h (i387_cache_to_xsave): Likewise.
9111 (i387_xsave_to_cache): Likewise.
9112 (x86_xcr0): Likewise.
9113
9114 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9115 * linux-crisv32-low.c (target_regsets): Likewise.
9116 * linux-m68k-low.c (target_regsets): Likewise.
9117 * linux-mips-low.c (target_regsets): Likewise.
9118 * linux-ppc-low.c (target_regsets): Likewise.
9119 * linux-s390-low.c (target_regsets): Likewise.
9120 * linux-sh-low.c (target_regsets): Likewise.
9121 * linux-sparc-low.c (target_regsets): Likewise.
9122 * linux-xtensa-low.c (target_regsets): Likewise.
9123
9124 * linux-low.c: Include <sys/uio.h>.
9125 (regsets_fetch_inferior_registers): Support nt_type.
9126 (regsets_store_inferior_registers): Likewise.
9127 (linux_process_qsupported): New.
9128 (linux_target_ops): Add linux_process_qsupported.
9129
9130 * linux-low.h (regset_info): Add nt_type.
9131 (linux_target_ops): Add process_qsupported.
9132
9133 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9134 and <sys/uio.h>.
9135 (init_registers_i386_avx_linux): New.
9136 (init_registers_amd64_avx_linux): Likewise.
9137 (xmltarget_i386_linux_no_xml): Likewise.
9138 (xmltarget_amd64_linux_no_xml): Likewise.
9139 (PTRACE_GETREGSET): Likewise.
9140 (PTRACE_SETREGSET): Likewise.
9141 (x86_fill_xstateregset): Likewise.
9142 (x86_store_xstateregset): Likewise.
9143 (use_xml): Likewise.
9144 (x86_linux_update_xmltarget): Likewise.
9145 (x86_linux_process_qsupported): Likewise.
9146 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9147 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9148 init_registers_i386_linux here. Call
9149 x86_linux_update_xmltarget.
9150 (the_low_target): Add x86_linux_process_qsupported.
9151
9152 * server.c (handle_query): Call target_process_qsupported.
9153
9154 * target.h (target_ops): Add process_qsupported.
9155 (target_process_qsupported): New.
9156
fc7238bb
PA
91572010-04-03 Pedro Alves <pedro@codesourcery.com>
9158
9159 * inferiors.c (add_thread): Set last_status kind to
9160 TARGET_WAITKIND_IGNORE.
9161 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9162 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9163 (linux_wait_1): Move `thread' local definition to block that uses
9164 it. Don't NULL initialize `event_child'.
9165 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9166 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9167 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9168
bdabb078
PA
91692010-04-01 Pedro Alves <pedro@codesourcery.com>
9170
9171 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9172 an extended waitstatus, or by a watchpoint.
9173 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9174 thread was stepping or has been stopped by a watchpoint.
9175
d3bbe7a0
PA
91762010-04-01 Pedro Alves <pedro@codesourcery.com>
9177
9178 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9179 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9180 of another, then delete the previous, and validate all
9181 breakpoints.
9182 (validate_inserted_breakpoint): New.
9183 (delete_disabled_breakpoints): New.
9184 (validate_breakpoints): New.
9185 (check_mem_read): Validate breakpoints before trusting their
9186 shadow. Delete disabled breakpoints.
9187 (check_mem_write): Validate breakpoints before trusting they
9188 should be inserted. Delete disabled breakpoints.
9189 * mem-break.h (validate_breakpoints):
9190 * server.c (handle_query): Validate breakpoints when we see a
9191 qSymbol query.
9192
8b07ae33
PA
91932010-04-01 Pedro Alves <pedro@codesourcery.com>
9194
9195 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9196 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9197 if we could tell there's a GDB breakpoint at stop_pc.
9198 (need_step_over_p): Don't do a step over if we find a GDB
9199 breakpoint at the resume PC.
9200
9201 * mem-break.c (struct raw_breakpoint): New.
9202 (enum bkpt_type): New type `gdb_breakpoint'.
9203 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9204 fields. New field `raw'.
9205 (find_raw_breakpoint_at): New.
9206 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9207 breakpoint instead.
9208 (set_breakpoint_at): Adjust.
9209 (delete_raw_breakpoint): New.
9210 (release_breakpoint): New.
9211 (delete_breakpoint): Rename to...
9212 (delete_breakpoint_1): ... this. Add proc parameter. Use
9213 release_breakpoint. Return ENOENT.
9214 (delete_breakpoint): Reimplement.
9215 (find_breakpoint_at): Delete.
9216 (find_gdb_breakpoint_at): New.
9217 (delete_breakpoint_at): Delete.
9218 (set_gdb_breakpoint_at): New.
9219 (delete_gdb_breakpoint_at): New.
9220 (gdb_breakpoint_here): New.
9221 (set_reinsert_breakpoint): Use release_breakpoint.
9222 (uninsert_breakpoint): Rename to ...
9223 (uninsert_raw_breakpoint): ... this.
9224 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9225 (reinsert_raw_breakpoint): Change parameter type to
9226 raw_breakpoint.
9227 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9228 instead.
9229 (check_breakpoints): Adjust. Use release_breakpoint.
9230 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9231 (breakpoint_inserted_here): Ditto.
9232 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9233 Don't trust the breakpoint's shadow if it is not inserted.
9234 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9235 (delete_all_breakpoints): Adjust.
9236 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9237 use delete_breakpoint_1.
9238
9239 * mem-break.h (breakpoints_supported): Delete declaration.
9240 (set_gdb_breakpoint_at): Declare.
9241 (gdb_breakpoint_here): Declare.
9242 (delete_breakpoint_at): Delete.
9243 (delete_gdb_breakpoint_at): Declare.
9244
9245 * server.h (struct raw_breakpoint): Forward declare.
9246 (struct process_info): New field `raw_breakpoints'.
9247
9248 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9249 breakpoints.
9250
6bf5e0ba
PA
92512010-03-24 Pedro Alves <pedro@codesourcery.com>
9252
9253 * linux-low.c (status_pending_p_callback): Fix comment.
9254 (linux_wait_for_event_1): Move most of the internal breakpoint
9255 handling from here...
9256 (linux_wait_1): ... to here.
9257 (count_events_callback): New.
9258 (select_singlestep_lwp_callback): New.
9259 (select_event_lwp_callback): New.
9260 (cancel_breakpoints_callback): New.
9261 (select_event_lwp): New.
9262 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9263 priority to all LWPs that have had events that should be reported
9264 to the client. Cancel breakpoints when about to reporting the
9265 event to the client, not while stopping lwps. No longer cancel
9266 finished single-steps here.
9267 (cancel_finished_single_step): Delete.
9268 (cancel_finished_single_steps): Delete.
9269
414a389f
PA
92702010-03-24 Pedro Alves <pedro@codesourcery.com>
9271
9272 * mem-break.c (enum bkpt_type): New.
9273 (struct breakpoint): New field `type'.
9274 (set_breakpoint_at): Change return type to struct breakpoint
9275 pointer. Set type to `other_breakpoint' by default.
9276 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9277 in the breakpoint list.
9278 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9279 (reinsert_breakpoint): Rename to ...
9280 (reinsert_raw_breakpoint): ... this.
9281 (reinsert_breakpoints_at): Adjust.
9282 * mem-break.h (struct breakpoint): Declare.
9283 (set_breakpoint_at): Change return type to struct breakpoint
9284 pointer.
9285
2280c721
PA
92862010-03-24 Pedro Alves <pedro@codesourcery.com>
9287
9288 * server.c (handle_query): Assign, not compare.
9289
d50171e4
PA
92902010-03-24 Pedro Alves <pedro@codesourcery.com>
9291
9292 Teach linux gdbserver to step-over-breakpoints.
9293
9294 * linux-low.c (can_hardware_single_step): New.
9295 (supports_breakpoints): New.
9296 (handle_extended_wait): If stopping threads, read the stop pc of
9297 the new cloned LWP.
9298 (get_pc): New.
9299 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9300 low target doesn't support retrieving the PC.
9301 (add_lwp): Set last_resume_kind to resume_continue.
9302 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9303 (linux_attach): Don't clear stop_expected. Set the lwp's
9304 last_resume_kind to resume_stop.
9305 (linux_detach_one_lwp): Don't check for removed breakpoints.
9306 (check_removed_breakpoint): Delete.
9307 (status_pending_p): Rename to ...
9308 (status_pending_p_callback): ... this. Don't check for removed
9309 breakpoints. Don't consider threads that are stopped from GDB's
9310 perspective.
9311 (linux_wait_for_lwp): Always read the stop_pc here.
9312 (cancel_breakpoint): New.
9313 (step_over_bkpt): New global.
9314 (linux_wait_for_event_1): Implement stepping over breakpoints.
9315 (gdb_wants_lwp_stopped): New.
9316 (gdb_wants_all_stopped): New.
9317 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9318 single-step traps here. Store the thread's last reported target
9319 wait status.
9320 (send_sigstop): Don't clear stop_expected. Always set it,
9321 instead.
9322 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9323 (cancel_finished_single_step): New.
9324 (cancel_finished_single_steps): New.
9325 (wait_for_sigstop): Don't cancel finished single-step traps here.
9326 (linux_resume_one_lwp): Don't check for removed breakpoints.
9327 Don't set `step' on non-hardware step archs.
9328 (linux_set_resume_request): Ignore resume_stop requests if already
9329 stopping or stopped. Set the lwp's last_resume_kind.
9330 (resume_status_pending_p): Don't check for removed breakpoints.
9331 (need_step_over_p): New.
9332 (start_step_over): New.
9333 (finish_step_over): New.
9334 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9335 requests. Clear the thread's last reported target waitstatus.
9336 Don't use the `suspended' flag. Don't consider pending breakpoints.
9337 (linux_resume): Start a step-over if necessary.
9338 (proceed_one_lwp): New.
9339 (proceed_all_lwps): New.
9340 (unstop_all_lwps): New.
9341 * linux-low.h (struct lwp_info): Rewrite comment for the
9342 `suspended' flag. Add the `stop_pc' field. Delete the
9343 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9344 Add `'last_resume_kind' and `need_step_over' fields.
9345 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9346 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9347 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9348 (set_raw_breakpoint_at): New.
9349 (set_breakpoint_at): Rewrite to use it.
9350 (reinsert_breakpoint_handler): Delete.
9351 (set_reinsert_breakpoint): New.
9352 (reinsert_breakpoint_by_bp): Delete.
9353 (delete_reinsert_breakpoints): New.
9354 (uninsert_breakpoint): Rewrite.
9355 (uninsert_breakpoints_at): New.
9356 (reinsert_breakpoint): Rewrite.
9357 (reinsert_breakpoints_at): New.
9358 (check_breakpoints): Rewrite.
9359 (breakpoint_here): New.
9360 (breakpoint_inserted_here): New.
9361 (check_mem_read): Adjust.
9362 * mem-break.h (breakpoints_supported, breakpoint_here)
9363 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9364 (reinsert_breakpoint_by_bp): Delete declaration.
9365 (delete_reinsert_breakpoints): Declare.
9366 (reinsert_breakpoint): Delete declaration.
9367 (reinsert_breakpoints_at): Declare.
9368 (uninsert_breakpoint): Delete declaration.
9369 (uninsert_breakpoints_at): Declare.
9370 (check_breakpoints): Adjust prototype.
9371 * server.h: Adjust include order.
9372 (struct thread_info): Declare here. Add a `last_status' field.
9373
30ba68cb
MS
93742010-03-23 Michael Snyder <msnyder@vmware.com>
9375
9376 * server.c (crc32): New function.
9377 (handle_query): Add handling for 'qCRC:' request.
9378
b9a881c2
PA
93792010-03-23 Pedro Alves <pedro@codesourcery.com>
9380
9381 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9382 lwp had been stopped by a watchpoint.
9383
e92d13d5
PA
93842010-03-16 Pedro Alves <pedro@codesourcery.com>
9385
9386 * server.h (internal_error): Declare.
9387 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9388 * utils.c (internal_error): New function.
9389
64daa791
AS
93902010-03-15 Andreas Schwab <schwab@redhat.com>
9391
9392 * configure.srv: Fix typo setting srv_regobj.
9393
f52cd8cd
PA
93942010-03-15 Pedro Alves <pedro@codesourcery.com>
9395
9396 * linux-low.c (fetch_register): Avoid passing a non string literal
9397 format to `error'.
9398 (usr_store_inferior_registers): Ditto.
9399
93ae6fdc
PA
94002010-03-14 Pedro Alves <pedro@codesourcery.com>
9401
9402 * linux-low.c (linux_write_memory): Bail out early if peeking
9403 memory failed.
9404
c3adc08c
PA
94052010-03-14 Pedro Alves <pedro@codesourcery.com>
9406
9407 * linux-low.h (struct lwp_info): New fields
9408 `stopped_by_watchpoint' and `stopped_data_address'.
9409 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9410 here, and cache them in the lwp object.
9411 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9412 directly.
9413 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9414 field.
9415 (linux_stopped_by_watchpoint): Rewrite.
9416 (linux_stopped_data_address): Rewrite.
9417
bce522a2
PA
94182010-03-06 Simo Melenius <simo.melenius@iki.fi>
9419
9420 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9421 switching the current inferior, not before.
9422
90884b2b
L
94232010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9424
9425 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9426 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9427 i386-linux.c and amd64-linux.c.
9428 (reg-i386.o): Removed.
9429 (reg-i386.c): Likewise.
9430 (reg-i386-linux.o): Likewise.
9431 (reg-i386-linux.c): Likewise.
9432 (reg-x86-64.o): Likewise.
9433 (reg-x86-64.c): Likewise.
9434 (reg-x86-64-linux.o): Likewise.
9435 (reg-x86-64-linux.c): Likewise.
9436 (i386.o): New.
9437 (i386.c): Likewise.
9438 (i386-linux.o): Likewise.
9439 (i386-linux.c): Likewise.
9440 (amd64.o): Likewise.
9441 (amd64.c): Likewise.
9442 (amd64-linux.o): Likewise.
9443 (amd64-linux.c): Likewise.
9444
9445 * configure.srv (srv_i386_regobj): New.
9446 (srv_i386_linux_regobj): Likewise.
9447 (srv_amd64_regobj): Likewise.
9448 (srv_amd64_linux_regobj): Likewise.
9449 (srv_i386_32bit_xmlfiles): Likewise.
9450 (srv_i386_64bit_xmlfiles): Likewise.
9451 (srv_i386_xmlfiles): Likewise.
9452 (srv_amd64_xmlfiles): Likewise.
9453 (srv_i386_linux_xmlfiles): Likewise.
9454 (srv_amd64_linux_xmlfiles): Likewise.
9455 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9456 srv_xmlfiles to $srv_i386_xmlfiles.
9457 (i[34567]86-*-mingw32ce*): Likewise.
9458 (i[34567]86-*-mingw*): Likewise.
9459 (i[34567]86-*-nto*): Likewise.
9460 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9461 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9462 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9463 (x86_64-*-linux*): Likewise.
9464
9465 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9466 (init_registers_amd64_linux): New.
9467 (x86_arch_setup): Replace init_registers_x86_64_linux with
9468 init_registers_amd64_linux.
9469
193f13e6
MK
94702010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9471
9472 * configure.ac: Check for libdl. If it is not available link against
9473 static libthread_db.
9474 * configure: Regenerate.
9475
85d721b8
PA
94762010-02-22 Pedro Alves <pedro@codesourcery.com>
9477
9478 PR9605
9479
9480 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9481 handing a read watchpoint.
9482 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9483
6076632b
DE
94842010-02-12 Doug Evans <dje@google.com>
9485
9486 * linux-low.c (linux_supports_tracefork_flag): Document.
9487 (linux_look_up_symbols): Add comment.
9488
3327ccf7
L
94892010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9490
9491 * regcache.c (supply_register): Clear regcache if buf is NULL.
9492
0718675c 94932010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9494 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9495
9496 * inferiors.c (find_inferior): Add function documentation.
9497 (unloaded_dll): Handle the case where the unloaded dll has not
9498 been previously registered in the dll list.
9499
177321bd
DJ
95002010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9503 (thumb2_breakpoint): New.
9504 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9505
2b009048
DJ
95062010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9507
9508 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9509 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9510 breakpoints.
9511
3be029c7
PA
95122010-01-21 Pedro Alves <pedro@codesourcery.com>
9513
9514 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9515
18f5de3b
JK
95162010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9517
9518 * linux-s390-low.c (s390_collect_ptrace_register)
9519 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9520
3743bb4f
DE
95212010-01-21 Doug Evans <dje@google.com>
9522
14ce3065
DE
9523 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9524 (PTRACE_ARG4_TYPE): New macro.
9525 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9526 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9527 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9528 (usr_store_inferior_registers): Ditto.
9529 (linux_read_memory, linux_write_memory): Ditto.
9530 (linux_test_for_tracefork): Ditto.
9531
3743bb4f
DE
9532 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9533 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9534
8b315be5
PA
95352010-01-21 Pedro Alves <pedro@codesourcery.com>
9536
9537 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9538 target.
9539
85492558
PA
95402010-01-21 Pedro Alves <pedro@codesourcery.com>
9541
9542 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9543 prototype to take a regcache. Adjust.
9544
442ea881
PA
95452010-01-20 Pedro Alves <pedro@codesourcery.com>
9546
9547 * regcache.h (struct thread_info): Forward declare.
9548 (struct regcache): New.
9549 (new_register_cache): Adjust prototype.
9550 (get_thread_regcache): Declare.
9551 (free_register_cache): Adjust prototype.
9552 (registers_to_string, registers_from_string): Ditto.
9553 (supply_register, supply_register_by_name, collect_register)
9554 (collect_register_as_string, collect_register_by_name): Ditto.
9555 * regcache.c (struct inferior_regcache_data): Delete.
9556 (get_regcache): Rename to ...
9557 (get_thread_regcache): ... this. Adjust. Switch inferior before
9558 fetching registers.
9559 (regcache_invalidate_one): Adjust.
9560 (regcache_invalidate): Fix prototype.
9561 (new_register_cache): Return the new register cache.
9562 (free_register_cache): Change prototype.
9563 (realloc_register_cache): Adjust.
9564 (registers_to_string): Change prototype to take a regcache. Adjust.
9565 (registers_from_string): Ditto.
9566 (register_data): Ditto.
9567 (supply_register): Ditto.
9568 (supply_register_by_name): Ditto.
9569 (collect_register): Ditto.
9570 (collect_register_as_string): Ditto.
9571 (collect_register_by_name): Ditto.
9572 * server.c (process_serial_event): Adjust.
9573 * linux-low.h (regset_fill_func, regset_store_func): Change
9574 prototype.
9575 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9576 Change prototype.
9577 * linux-low.c (get_stop_pc): Adjust.
9578 (check_removed_breakpoint): Adjust.
9579 (linux_wait_for_event): Adjust.
9580 (linux_resume_one_lwp): Adjust.
9581 (fetch_register): Add regcache parameter. Adjust.
9582 (usr_store_inferior_registers): Ditto.
9583 (regsets_fetch_inferior_registers): Ditto.
9584 (regsets_store_inferior_registers): Ditto.
9585 (linux_fetch_registers, linux_store_registers): Ditto.
9586 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9587 regcache. Adjust.
43aaf8b6
PA
9588 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9589 Ditto.
442ea881
PA
9590 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9591 prototype to take a regcache.
9592 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9593 * remote-utils.c (convert_ascii_to_int, outreg)
9594 (prepare_resume_reply): Change prototype to take a regcache.
9595 Adjust.
9596 * target.h (struct target_ops) <fetch_registers, store_registers>:
9597 Change prototype to take a regcache.
9598 (fetch_inferior_registers, store_inferior_registers): Change
9599 prototype to take a regcache. Adjust.
9600 * proc-service.c (ps_lgetregs): Adjust.
9601 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9602 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9603 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9604 take a regcache. Adjust.
9605 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9606 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9607 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9608 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9609 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9610 (cris_cannot_fetch_register):
9611 (cris_breakpoint_at): Change prototype to take a regcache.
9612 Adjust.
9613 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9614 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9615 to take a regcache. Adjust.
9616 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9617 Adjust.
9618 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9619 take a regcache. Adjust.
9620 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9621 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9622 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9623 * linux-mips-low.c (mips_get_pc):
9624 (mips_set_pc): Change prototype to take a regcache. Adjust.
9625 (mips_reinsert_addr): Adjust.
9626 (mips_collect_register): Change prototype to take a regcache.
9627 Adjust.
9628 (mips_supply_register):
9629 (mips_collect_register_32bit, mips_supply_register_32bit)
9630 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9631 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9632 * linux-ppc-low.c (ppc_supply_ptrace_register)
9633 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9634 (parse_spufs_run): Adjust.
9635 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9636 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9637 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9638 take a regcache. Adjust.
9639 * linux-s390-low.c (s390_collect_ptrace_register)
9640 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9641 (s390_set_pc): Change prototype to take a regcache. Adjust.
9642 (s390_arch_setup): Adjust.
9643 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9644 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9645 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9646 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9647 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9648 regcache. Adjust.
9649 (sparc_breakpoint_at): Adjust.
9650 * linux-xtensa-low.c (xtensa_fill_gregset):
9651 (xtensa_store_gregset):
9652 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9653 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9654 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9655 prototype to take a regcache. Adjust.
9656 * win32-arm-low.c (arm_fetch_inferior_register)
9657 (arm_store_inferior_register): Change prototype to take a
9658 regcache. Adjust.
9659 * win32-i386-low.c (i386_fetch_inferior_register)
9660 (i386_store_inferior_register): Change prototype to take a
9661 regcache. Adjust.
9662 * win32-low.c (child_fetch_inferior_registers)
9663 (child_store_inferior_registers): Change prototype to take a
9664 regcache. Adjust.
9665 (win32_wait): Adjust.
9666 (win32_fetch_inferior_registers): Change prototype to take a
9667 regcache. Adjust.
9668 (win32_store_inferior_registers): Adjust.
9669 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9670 store_inferior_register>: Change prototype to take a regcache.
9671
60c3d7b0
DE
96722010-01-20 Doug Evans <dje@google.com>
9673
9674 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9675 #ifdef.
9676 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9677 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9678
dc146f7c
VP
96792010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9680
9681 * linux-low.c (linux_core_of_thread): New.
9682 (compare_ints, show_process, list_threads): New.
9683 (linux_qxfer_osdata): Report threads and cores.
9684 (linux_target_op): Register linux_core_of_thread.
9685 * remote-utils.c (prepare_resume_reply): Report the core.
9686 (buffer_xml_printf): Support %d specifier.
9687 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9688 New.
9689 (handle_query): Handle qXfer:threads. Announce availability
9690 thereof.
9691 * target.h (struct target_ops): New field core_of_thread.
9692
7803799a
UW
96932010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9694
9695 * Makefile.in (clean): Remove new generated files.
9696 (reg-s390.o, reg-s390.c): Remove rules.
9697 (reg-s390x.o, reg-s390x.c): Likewise.
9698 (s390-linux32.o, s390-linux32.c): Add rules.
9699 (s390-linux64.o, s390-linux64.c): Likewise.
9700 (s390x-linux64.o, s390x-linux64.c): Likewise.
9701 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9702 * linux-s390-low.c: Include <elf.h>.
9703 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9704 (init_registers_s390): Remove prototype.
9705 (init_registers_s390x): Likewise.
9706 (init_registers_s390_linux32): Add prototype.
9707 (init_registers_s390_linux64): Likewise.
9708 (init_registers_s390x_linux64): Likewise.
9709 (s390_num_regs_3264): New define.
9710 (s390_regmap_3264): New global variable.
9711 (s390_cannot_fetch_register): Remove obsolete check.
9712 (s390_cannot_store_register): Likewise.
9713 (s390_collect_ptrace_register): Handle upper/lower register halves.
9714 (s390_supply_ptrace_register): Likewise.
9715 (s390_fill_gregset): Update to register number changes.
9716 (s390_get_hwcap): New routine.
9717 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9718 Install appropriate regmap and register set.
9719
6e7ffa39
JB
97202010-01-01 Joel Brobecker <brobecker@adacore.com>
9721
9722 * server.c (gdbserver_version): Update copyright year to 2010.
9723 * gdbreplay.c (gdbreplay_version): Likewise.
9724
957f3f49
DE
97252009-12-28 Doug Evans <dje@google.com>
9726
9727 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9728 elf/external.h. Include <elf.h> instead but only if necessary.
9729
ca5c370d
PA
97302009-12-28 Pedro Alves <pedro@codesourcery.com>
9731
9732 * linux-low.c (linux_remove_process): Remove `detaching'
9733 parameter. Don't release/detach from thread_db here.
9734 (linux_kill): Release/detach from thread_db here, ...
9735 (linux_detach): ... and here, before actually detaching.
9736 (linux_wait_1): ... and here, when a process exits.
9737 * thread-db.c (any_thread_of): New.
9738 (thread_db_free): Switch the current inferior to a thread of the
9739 passed in process.
9740
4ee62156
DE
97412009-12-21 Doug Evans <dje@google.com>
9742
d90e6a88
DE
9743 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9744
c5f62d5f
DE
9745 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9746 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9747 warning ifndef __NR_tkill. Move setting of errno there too.
9748 Delete unnecessary resetting of errno after syscall.
9749 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9750
10e86dd7
DE
9751 * configure.ac: Check for dladdr.
9752 * config.in: Regenerate.
9753 * configure: Regenerate.
9754 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9755 (try_thread_db_load): Update.
9756
4ee62156
DE
9757 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9758
00f515da
DE
97592009-12-18 Doug Evans <dje@google.com>
9760
e9464885
DE
9761 * event-loop.c: Include unistd.h if it exists.
9762
07d4f67e
DE
9763 * linux-low.c (my_waitpid): Move definition away from being in
9764 between linux_tracefork_child/linux_test_for_tracefork.
9765
00f515da
DE
9766 * gdb_proc_service.h (psaddr_t): Fix type.
9767 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9768 signature to match glibc.
9769
1de1badb
DE
97702009-12-16 Doug Evans <dje@google.com>
9771
9772 * linux-low.c (linux_read_memory): Fix argument to read.
9773
aeeb81d1
PA
97742009-11-26 Pedro Alves <pedro@codesourcery.com>
9775
9776 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9777 events, don't leave current_inferior pointing at null.
9778
10357975
PA
97792009-11-26 Pedro Alves <pedro@codesourcery.com>
9780
9781 * win32-low.c (LOG): Delete.
9782 (OUTMSG): Output to stderr.
9783 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9784 on compile time LOG macro.
9785 (win32_wait): Fix debug output.
9786
cf6e3471
PA
97872009-11-26 Pedro Alves <pedro@codesourcery.com>
9788
9789 * win32-low.c (win32_add_one_solib): If the dll name is
9790 "ntdll.dll", prepend the system directory to the dll path.
9791
0c85e18e
MK
97922009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9793
9794 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9795
9ac544ce 97962009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9797 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9798
9799 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9800 * configure.ac: Check for __mcoldfire__ and set
9801 gdb_cv_m68k_is_coldfire.
9802 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9803 reg-cf.o and reg-m68k.o.
9804 * configure: Regenerated.
9805
fd7dd3e6
PA
98062009-11-16 Pedro Alves <pedro@codesourcery.com>
9807
9808 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9809 Pass it to thread_db_free.
9810 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9811 proper `detaching' argument to linux_remove_process.
9812 * linux-low.h (thread_db_free): Add `detaching' parameter.
9813 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9814 to thread_db_free.
9815 (thread_db_free): Add `detaching' parameter. Only
9816 call td_ta_clear_event if detaching from process.
9817
75aa492e
MK
98182009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9819
9820 * thread-db.c (thread_db_free): Fix typo.
9821
21e1bee4
PP
98222009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9823
9824 PR gdb/10838
9825 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9826
8838b45e
NS
98272009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9828
9829 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9830 with an i686 compiler.
9831 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9832 needed.
9833 * configure: Rebuilt.
9834
8a35fb51
SL
98352009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9836
9837 PR gdb/10783
9838
9839 * server.c (handle_search_memory_1): Correct read_addr initialization
9840 in loop for searching subsequent chunks.
9841
96f15937
PP
98422009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9843
9844 * configure.ac: New --with-libthread-db option.
9845 * thread-db.c: Allow direct dependence on libthread_db.
9846 (thread_db_free): Adjust.
9847 * config.in: Regenerate.
9848 * configure: Likewise.
889bf7c5 9849
5f7d1694
PP
98502009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9851
9852 PR gdb/10757
9853 * thread-db.c (attach_thread): New function.
9854 (maybe_attach_thread): Return success/failure.
9855 (find_new_threads_callback): Adjust.
889bf7c5
PA
9856 (thread_db_find_new_threads): Loop until no new threads.
9857
88e3b899
PA
98582009-10-13 Pedro Alves <pedro@codesourcery.com>
9859
9860 * proc-service.c (ps_lgetregs): Formatting.
9861
cdbfd419
PP
98622009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9863
9864 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9865 * configure.ac: Adjust.
9866 * linux-low.h (struct process_info_private): Move members to struct
9867 thread_db.
9868 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9869 * linux-low.c (linux_remove_process): Adjust.
9870 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9871 * server.c (handle_query): Move code ...
9872 (handle_monitor_command): ... here. New function.
9873 * target.h (struct target_ops): New member.
9874 * thread-db.c (struct thread_db): New.
9875 (libthread_db_search_path): New variable.
9876 (thread_db_create_event, thread_db_enable_reporting)
9877 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9878 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9879 (try_thread_db_load_1, dladdr_to_soname): New functions.
9880 (try_thread_db_load, thread_db_load_search): New functions.
9881 (thread_db_init): Search for libthread_db.
9882 (thread_db_free): New function.
9883 (thread_db_handle_monitor_command): Likewise.
9884 * config.in: Regenerate.
9885 * configure: Regenerate.
889bf7c5 9886
4168d2d6
UW
98872009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9888
9889 * spu-low.c (spu_kill): Wait for inferior to terminate.
9890 Call clear_inferiors.
9891 (spu_detach): Call clear_inferiors.
9892
81ecdfbb
RW
98932009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9894
9895 * aclocal.m4: Regenerate.
9896 * config.in: Likewise.
9897 * configure: Likewise.
9898
0b9ff2c0
UW
98992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9900
9901 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9902 (parse_spufs_run): New function.
9903 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9904 (ppc_breakpoint_at): Handle SPU breakpoints.
9905
efcbbd14
UW
99062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9907
9908 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9909 (SPUFS_MAGIC): Define.
9910 (spu_enumerate_spu_ids): New function.
9911 (linux_qxfer_spu): New function.
9912 (linux_target_ops): Install linux_qxfer_spu.
9913
f4d9bade
UW
99142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9915
9916 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9917 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9918 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9919 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9920 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9921 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9922 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9923 (init_registers_powerpc_cell32l): Add prototype.
9924 (init_registers_powerpc_cell64l): Likewise.
9925 (ppc_arch_setup): Detect Cell/B.E. architecture.
9926
96e946ca
RW
99272009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9928
9929 * Makefile.in (datarootdir): New variable.
9930
58d6951d
DJ
99312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9932
9933 * linux-low.c (linux_write_memory): Update debugging output.
9934 * Makefile.in (clean): Add new descriptions.
9935 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9936 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9937 * configure.srv: Add new files for arm*-*-linux*.
9938 * linux-arm-low.c: Add new declarations.
9939 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9940 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9941 (HWCAP_VFPv3D16): New.
9942 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9943 instead of __IWMMXT__.
9944 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9945 (arm_arch_setup): New.
9946 (target_regsets): Remove #ifdef. Add VFP regset.
9947 (the_low_target): Use arm_arch_setup.
9948
12b42a12
DJ
99492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9952 the main thread again.
9953
ac8c974e
AR
99542009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9955
9956 Adding Neutrino gdbserver.
9957 * configure: Regenerated.
9958 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9959 * configure.srv (i[34567]86-*-nto*): New target.
9960 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9961 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9962 (nto_comctrl) [__QNX__]: New function.
9963 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9964
4424e0c3 99652009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9966
9967 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9968 srv_tgtobj.
9969
912cf4ba
PA
99702009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9971 Pedro Alves <pedro@codesourcery.com>
9972
9973 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9974 don't support CONTEXT_EXTENDED_REGISTERS.
9975 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9976 (the_low_target): Install them.
9977 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9978 failing with ERROR_PIPE_NOT_CONNECTED.
9979
aa5ca48f
DE
99802009-06-30 Doug Evans <dje@google.com>
9981 Pierre Muller <muller@ics.u-strasbg.fr>
9982
9983 Add h/w watchpoint support to x86-linux, win32-i386.
9984 * Makefile.in (SFILES): Add i386-low.c
9985 (i386_low_h): Define.
9986 (i386-low.o): Add dependencies.
9987 (linux-x86-low.o): Add i386-low.h dependency.
9988 (win32-i386-low.o): Ditto.
9989 * i386-low.c: New file.
9990 * i386-low.h: New file.
9991 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9992 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9993 * linux-low.c (linux_add_process): Initialize arch_private.
9994 (linux_remove_process): Free arch_private.
9995 (add_lwp): Initialize arch_private.
9996 (delete_lwp): Free arch_private.
9997 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9998 provided.
9999 * linux-low.h (process_info_private): New member arch_private.
10000 (lwp_info): New member arch_private.
10001 (linux_target_ops): New members new_process, new_thread,
10002 prepare_to_resume.
10003 (ptid_of): New macro.
10004 * linux-x86-low.c: Include stddef.h, i386-low.h.
10005 (arch_process_info): New struct.
10006 (arch_lwp_info): New struct.
10007 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10008 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10009 (i386_dr_low_get_status): New function.
10010 (x86_insert_point, x86_remove_point): New functions.
10011 (x86_stopped_by_watchpoint): New function.
10012 (x86_stopped_data_address): New function.
10013 (x86_linux_new_process, x86_linux_new_thread): New functions.
10014 (x86_linux_prepare_to_resume): New function.
10015 (the_low_target): Add entries for insert_point, remove_point,
10016 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10017 prepare_to_resume.
10018 * server.c (debug_hw_points): New global.
10019 (monitor_show_help): Document set debug-hw-points.
10020 (handle_query): Process "set debug-hw-points".
10021 * server.h (debug_hw_points): Declare.
10022 (paddress): Declare.
10023 * utils.c (NUMCELLS, CELLSIZE): New macros.
10024 (get_sell, xsnprintf, paddress): New functions.
10025 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10026 remove_point, stopped_by_watchpoint, stopped_data_address.
10027 * win32-i386-low.c: Include i386-low.h.
10028 (debug_reg_state): Replaces dr.
10029 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10030 (i386_dr_low_get_status): New function.
10031 (i386_insert_point, i386_remove_point): New functions.
10032 (i386_stopped_by_watchpoint): New function.
10033 (i386_stopped_data_address): New function.
10034 (i386_initial_stuff): Update.
10035 (get_thread_context,set_thread_context,i386_thread_added): Update.
10036 (the_low_target): Add entries for insert_point,
10037 remove_point, stopped_by_watchpoint, stopped_data_address.
10038 * win32-low.c (win32_insert_watchpoint): New function.
10039 (win32_remove_watchpoint): New function.
10040 (win32_stopped_by_watchpoint): New function.
10041 (win32_stopped_data_address): New function.
10042 (win32_target_ops): Add entries for insert_watchpoint,
10043 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10044 * win32-low.h (win32_target_ops): New members insert_point,
10045 remove_point, stopped_by_watchpoint, stopped_data_address.
10046
d993e290
PA
100472009-06-25 Pedro Alves <pedro@codesourcery.com>
10048
10049 * server.c (process_serial_event): Re-return unsupported, not
10050 error, if the type isn't recognized. Re-allow supporting only
10051 insert or remove packets. Also call require_running for
10052 breakpoints. Add missing break statement to default case. Tidy.
10053 * target.h (struct target_ops): Rename insert_watchpoint to
10054 insert_point, and remove_watchpoint to remove_point.
10055
10056 * linux-low.h (struct linux_target_ops): Likewise.
10057 * linux-low.c (linux_insert_watchpoint): Rename to ...
10058 (linux_insert_point): ... this. Adjust.
10059 (linux_remove_watchpoint): Rename to ...
10060 (linux_remove_point): ... this. Adjust.
10061 (linux_target_ops): Adjust.
10062 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10063 (cris_insert_point): ... this.
10064 (cris_remove_watchpoint): Rename to ...
10065 (cris_remove_point): ... this.
10066 (the_low_target): Adjust.
10067
0f54c268
PM
100682009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10069
10070 * server.c (handle_v_kill): Pass signal_pid to
10071 kill_inferior if multi_process is zero.
10072
c6314022
AR
100732009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10074
10075 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10076 * target.h (target_ops): Comment for *_watchpoint to make it clear
10077 the functions can get types '0' and '1'.
10078
4463ce24
AR
100792009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10080
10081 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10082 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10083 * regcache.c (get_regcache): Likewise.
10084 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10085 * win32-low.c (child_fetch_inferior_registers): Remove check for
10086 regno 0.
10087
cf8fd78b
PA
100882009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10089 Pedro Alves <pedro@codesourcery.com>
10090
10091 * target.h (struct target_ops) <supports_multi_process>: New
10092 callback.
10093 (target_supports_multi_process): New.
10094 * server.c (handle_query): Even if GDB reports support, only
10095 enable multi-process if the target also supports it. Report
10096 multi-process support only if the target backend supports it.
10097 * linux-low.c (linux_supports_multi_process): New function.
10098 (linux_target_ops): Install it as target_supports_multi_process
10099 callback.
10100
47c0c975
DE
101012009-05-24 Doug Evans <dje@google.com>
10102
e09875d4
DE
10103 Global renaming of find_thread_pid to find_thread_ptid.
10104 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10105 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10106 All callers updated.
10107
e27d73f6
DE
10108 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10109 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10110 directly.
10111
47c0c975
DE
10112 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10113 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10114 (linux_resume_one_lwp): Ditto.
10115
2acc282a
DE
101162009-05-23 Doug Evans <dje@google.com>
10117
10118 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10119 from struct inferior_list_entry * to struct lwp_info *.
10120 All callers updated.
10121
9f1036c1
DE
101222009-05-13 Doug Evans <dje@google.com>
10123
10124 * linux-x86-low.c: Don't include assert.h.
10125 (x86_siginfo_fixup): Use fatal, not assert.
10126 (x86_arch_setup): Fix comment.
10127
d0722149
DE
101282009-05-12 Doug Evans <dje@google.com>
10129
10130 Biarch support for i386/amd64 gdbserver.
10131 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10132 Add linux-x86-low.c.
10133 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10134 (linux-x86-low.o): Add.
10135 * linux-x86-64-low.c: Delete.
10136 * linux-i386-low.c: Delete.
10137 * linux-x86-low.c: New file.
10138 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10139 linux-x86-low.o.
10140 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10141 linux-x86-low.o.
10142 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10143 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10144 (linux_child_pid_to_exec_file): New function.
10145 (elf_64_header_p, elf_64_file_p): New functions.
10146 (siginfo_fixup): New function.
10147 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10148 give target a chance to convert layout.
10149 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10150 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10151
fdeb2a12
DE
101522009-05-07 Doug Evans <dje@google.com>
10153
10154 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10155 (regsets_store_inferior_registers): Ditto.
10156
a6dbe5df
PA
101572009-05-06 Pedro Alves <pedro@codesourcery.com>
10158
10159 PR server/10048
10160
10161 * linux-low.c (must_set_ptrace_flags): Delete.
10162 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10163 of the global.
10164 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10165 `lwp->must_set_ptrace_flags' instead.
ba42693b 10166 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10167 (linux_wait_1): ... not here.
10168
5091eb23
DE
101692009-04-30 Doug Evans <dje@google.com>
10170
9f767825
DE
10171 * inferiors.c (started_inferior_callback): New function.
10172 (attached_inferior_callback): New function.
10173 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10174 * server.c (print_started_pid, print_attached_pid): New functions.
10175 (detach_or_kill_for_exit): New function.
10176 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10177 * server.h (have_started_inferiors_p): Declare.
10178 (have_attached_inferiors_p): Declare.
10179
5091eb23
DE
10180 * inferiors.c (remove_process): Fix memory leak, free process.
10181 * linux-low.c (linux_remove_process): New function.
10182 (linux_kill): Call it instead of remove_process.
10183 (linux_detach, linux_wait_1): Ditto.
10184
155c8968
PA
101852009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10186
10187 * configure.srv: Add x86 Windows CE target.
10188
7fe519cb
UW
101892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10190
10191 * inferiors.c (get_thread_process): Make global.
10192 * server.h (get_thread_process): Add prototype.
10193 * thread-db.c (find_one_thread): Use get_thread_process
10194 instead of current_process.
10195 (thread_db_get_tls_address): Do not crash if called when
10196 thread layer is not yet initialized.
10197
5472f405
UW
101982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10199
10200 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10201 * spu-low.c (current_tid): Rename to ...
10202 (current_ptid): ... this.
10203 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10204 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10205 ptid_get_lwp (current_ptid) instead of current_tid.
10206 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10207 instead of current_tid. Use find_process_pid to verify pid
10208 argument is valid. Pass proper argument to remove_process.
10209 (spu_thread_alive): Compare current_ptid instead of current_tid.
10210 (spu_resume): Likewise.
10211
55ac2b99
PA
102122009-04-02 Pedro Alves <pedro@codesourcery.com>
10213
10214 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10215 variable.
10216
95954743
PA
102172009-04-01 Pedro Alves <pedro@codesourcery.com>
10218
10219 Implement the multiprocess extensions, and add linux multiprocess
10220 support.
10221
10222 * server.h (ULONGEST): Declare.
10223 (struct ptid, ptid_t): New.
10224 (minus_one_ptid, null_ptid): Declare.
10225 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10226 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10227 (struct inferior_list_entry): Change `id' type from unsigned from
10228 to ptid_t.
10229 (struct sym_cache, struct breakpoint, struct
10230 process_info_private): Forward declare.
10231 (struct process_info): Declare.
10232 (current_process): Declare.
10233 (all_processes): Declare.
10234 (initialize_inferiors): Declare.
10235 (add_thread): Adjust to use ptid_t.
10236 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10237 (add_process, remove_process, find_thread_pid): Declare.
10238 (find_inferior_id): Adjust to use ptid_t.
10239 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10240 (multi_process): Declare.
10241 (push_event): Adjust to use ptid_t.
10242 (read_ptid, write_ptid): Declare.
10243 (prepare_resume_reply): Adjust to use ptid_t.
10244 (clear_symbol_cache): Declare.
10245 * inferiors.c (all_processes): New.
10246 (null_ptid, minus_one_ptid): New.
10247 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10248 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10249 (add_thread): Change unsigned long to ptid. Remove gdb_id
10250 parameter. Adjust.
10251 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10252 (gdb_id_to_thread): Rename to ...
10253 (find_thread_pid): ... this. Change unsigned long to ptid.
10254 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10255 (loaded_dll, pull_pid_from_list): Adjust.
10256 (add_process, remove_process, find_process_pid)
10257 (get_thread_process, current_process, initialize_inferiors): New.
10258 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10259 (struct target_waitstatus) <related_pid>: Ditto.
10260 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10261 return type to int.
10262 (struct target_ops) <join>: Add `pid' argument.
10263 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10264 (struct target_ops) <wait>: Add `ptid' field. Change return type
10265 to ptid.
10266 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10267 (mywait): Add `ptid' argument. Change return type to ptid_t.
10268 (target_pid_to_str): Declare.
10269 * target.c (set_desired_inferior): Adjust to use ptids.
10270 (mywait): Add new `ptid' argument. Adjust.
10271 (target_pid_to_str): New.
10272 * mem-break.h (free_all_breakpoints): Declare.
10273 * mem-break.c (breakpoints): Delelete.
10274 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10275 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10276 to use per-process breakpoint list.
10277 (free_all_breakpoints): New.
10278 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10279 (symbol_cache, all_symbols_looked_up): Delete.
10280 (hexchars): New.
10281 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10282 read_ptid): New.
10283 (prepare_resume_reply): Change ptid argument's type from unsigned
10284 long to ptid_t. Adjust. Implement W;process and X;process.
10285 (free_sym_cache, clear_symbol_cache): New.
10286 (look_up_one_symbol): Adjust to per-process symbol cache. *
10287 * server.c (cont_thread, general_thread, step_thread): Change type
10288 to ptid_t.
10289 (attached): Delete.
10290 (multi_process): New.
10291 (last_ptid): Change type to ptid_t.
10292 (struct vstop_notif) <ptid>: Change type to ptid_t.
10293 (queue_stop_reply, push_event): Change `ptid' argument's type to
10294 ptid_t.
10295 (discard_queued_stop_replies): Add `pid' argument.
10296 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10297 changes. Don't reference the `attached' global.
10298 (attach_inferior): Adjust to mywait interface changes.
10299 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10300 features. Handle and report "multiprocess+". Handle
10301 "qAttached:PID".
10302 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10303 changes.
10304 (handle_v_kill): New.
10305 (handle_v_stopped): Adjust to use target_pid_to_str.
10306 (handle_v_requests): Allow multiple attaches and runs when
10307 multiprocess extensions are in effect. Handle "vKill".
10308 (myresume): Adjust to use ptids.
10309 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10310 (handle_status): Adjust to discard_queued_stop_replies interface
10311 change.
10312 (first_thread_of, kill_inferior_callback)
10313 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10314 (main): Call initialize_inferiors. Adjust to use ptids, killing
10315 and detaching from all inferiors. Handle multiprocess packet
10316 variants.
10317 * linux-low.h: Include gdb_proc_service.h.
10318 (struct process_info_private): New.
10319 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10320 <lwpid_of>: Use ptid_get_lwp.
10321 (get_lwp_thread): Adjust.
10322 (struct lwp_info): Add `dead' member.
10323 (find_lwp_pid): Declare.
10324 * linux-low.c (thread_db_active): Delete.
10325 (new_inferior): Adjust comment.
10326 (inferior_pid): Delete.
10327 (linux_add_process): New.
10328 (handle_extended_wait): Adjust.
10329 (add_lwp): Change unsigned long to ptid.
10330 (linux_create_inferior): Add process to processes table. Adjust
10331 to use ptids. Don't set new_inferior here.
10332 (linux_attach_lwp): Rename to ...
10333 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10334 it. Adjust to use ptids.
10335 (linux_attach_lwp): New.
10336 (linux_attach): Add process to processes table. Don't set
10337 new_inferior here.
10338 (struct counter): New.
10339 (second_thread_of_pid_p, last_thread_of_process_p): New.
10340 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10341 multiple processes.
10342 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10343 processes. Remove process from process table.
10344 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10345 to multiple processes.
10346 (any_thread_of): New.
10347 (linux_detach): Add `pid' argument, and handle it. Remove process
10348 from processes table.
10349 (linux_join): Add `pid' argument. Handle it.
10350 (linux_thread_alive): Change unsighed long argument to ptid_t.
10351 Consider dead lwps as not being alive.
10352 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10353 threads we're not interested in.
10354 (same_lwp, find_lwp_pid): New.
10355 (linux_wait_for_lwp): Change `pid' argument's type from int to
10356 ptid_t. Adjust.
10357 (linux_wait_for_event): Rename to ...
10358 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10359 from int to ptid_t. Adjust.
10360 (linux_wait_for_event): New.
10361 (linux_wait_1): Add `ptid' argument. Change return type to
10362 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10363 that exit from the process table.
10364 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10365 Adjust.
10366 (mark_lwp_dead): New.
10367 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10368 stopping all threads, mark its main lwp as dead.
10369 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10370 ptids.
10371 (fetch_register, usr_store_inferior_registers)
10372 (regsets_fetch_inferior_registers)
10373 (regsets_store_inferior_registers, linux_read_memory)
10374 (linux_write_memory): Inline `inferior_pid'.
10375 (linux_look_up_symbols): Adjust to use per-process
10376 `thread_db_active'.
10377 (linux_request_interrupt): Adjust to use ptids.
10378 (linux_read_auxv): Inline `inferior_pid'.
10379 (initialize_low): Don't reference thread_db_active.
10380 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10381 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10382 (ps_getpid): Return the pid of the current inferior.
10383 * thread-db.c (proc_handle, thread_agent): Delete.
10384 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10385 per-process data.
10386 (find_one_thread): Change argument type to ptid_t. Adjust to
10387 per-process data.
10388 (maybe_attach_thread): Adjust to per-process data and ptids.
10389 (thread_db_find_new_threads): Ditto.
10390 (thread_db_init): Ditto.
10391 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10392 processes table. Adjust to use ptids.
10393 (spu_kill, spu_detach): Adjust interface. Remove process from
10394 processes table.
10395 (spu_join, spu_thread_alive): Adjust interface.
10396 (spu_wait): Adjust interface. Remove process from processes
10397 table. Adjust to use ptids.
10398 * win32-low.c (current_inferior_tid): Delete.
10399 (current_inferior_ptid): New.
10400 (debug_event_ptid): New.
10401 (thread_rec): Take a ptid. Adjust.
10402 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10403 (child_delete_thread): Ditto.
10404 (do_initial_child_stuff): Add `attached' argument. Add process to
10405 processes table.
10406 (child_fetch_inferior_registers, child_store_inferior_registers):
10407 Adjust.
10408 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10409 (win32_attach): Pass 1 to do_initial_child_stuff.
10410 (win32_kill): Adjust interface. Remove process from processes
10411 table.
10412 (win32_detach): Ditto.
10413 (win32_join): Adjust interface.
10414 (win32_thread_alive): Take a ptid.
10415 (win32_resume): Adjust to use ptids.
10416 (get_child_debug_event): Ditto.
10417 (win32_wait): Adjust interface. Remove exiting process from
10418 processes table.
10419
bd99dc85
PA
104202009-04-01 Pedro Alves <pedro@codesourcery.com>
10421
10422 Non-stop mode support.
10423
10424 * server.h (non_stop): Declare.
10425 (gdb_client_data, handler_func): Declare.
10426 (delete_file_handler, add_file_handler, start_event_loop):
10427 Declare.
10428 (handle_serial_event, handle_target_event, push_event)
10429 (putpkt_notif): Declare.
10430 * target.h (enum resume_kind): New.
10431 (struct thread_resume): Replace `step' field by `kind' field.
10432 (TARGET_WNOHANG): Define.
10433 (struct target_ops) <wait>: Add `options' argument.
10434 <supports_non_stop, async, start_non_stop>: New fields.
10435 (target_supports_non_stop, target_async): New.
10436 (start_non_stop): Declare.
10437 (mywait): Add `options' argument.
10438 * target.c (mywait): Add `options' argument. Print child exit
10439 notifications here.
10440 (start_non_stop): New.
10441 * server.c (non_stop, own_buf, mem_buf): New globals.
10442 (struct vstop_notif): New.
10443 (notif_queue): New global.
10444 (queue_stop_reply, push_event, discard_queued_stop_replies)
10445 (send_next_stop_reply): New.
10446 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10447 interface changes.
10448 (attach_inferior): In non-stop mode, don't wait for the target
10449 here.
10450 (handle_general_set): Handle QNonStop.
10451 (handle_query): When handling qC, return the current general
10452 thread, instead of the first thread of the list.
10453 (handle_query): If the backend supports non-stop mode, include
10454 QNonStop+ in the qSupported query response.
10455 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10456 and non-stop mode.
10457 (handle_v_attach, handle_v_run): Handle non-stop mode.
10458 (handle_v_stopped): New.
10459 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10460 (myresume): Adjust to use resume_kind. Handle non-stop.
10461 (queue_stop_reply_callback): New.
10462 (handle_status): Handle non-stop mode.
10463 (main): Clear non_stop flag on reconnection. Use the event-loop.
10464 Refactor serial protocol handling from here ...
10465 (process_serial_event): ... to this new function. When GDB
10466 selects any thread, select one here. In non-stop mode, wait until
10467 GDB acks all pending events before exiting.
10468 (handle_serial_event, handle_target_event): New.
10469 * remote-utils.c (remote_open): Install remote_desc in the event
10470 loop.
10471 (remote_close): Remove remote_desc from the event loop.
10472 (putpkt_binary): Rename to...
10473 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10474 (putpkt_binary): New as wrapper around putpkt_binary_1.
10475 (putpkt_notif): New.
10476 (prepare_resume_reply): In non-stop mode, don't change the
10477 general_thread.
10478 * event-loop.c: New.
10479 * Makefile.in (OBJ): Add event-loop.o.
10480 (event-loop.o): New rule.
10481
10482 * linux-low.h (pid_of): Moved here.
10483 (lwpid_of): New.
10484 (get_lwp_thread): Use lwpid_of.
10485 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10486 * linux-low.c (pid_of): Delete.
10487 (inferior_pid): Use lwpid_of.
10488 (linux_event_pipe): New.
10489 (target_is_async_p): New.
10490 (delete_lwp): New.
10491 (handle_extended_wait): Use lwpid_of.
10492 (add_lwp): Don't set lwpid field.
10493 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10494 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10495 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10496 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10497 first. Adjust to linux_wait_for_event interface changes. Use
10498 lwpid_of.
10499 (linux_detach): Don't delete the main lwp here.
10500 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10501 (status_pending_p): Don't consider explicitly suspended lwps.
10502 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10503 pointer. Add OPTIONS argument. Change return type to int. Use
10504 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10505 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10506 pointer. Add status pointer argument. Return a pid instead of a
10507 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10508 changes. In non-stop mode, don't switch to a random thread.
10509 (linux_wait): Rename to...
10510 (linux_wait_1): ... this. Add target_options argument, and handle
10511 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10512 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10513 clean exit and signal exit code. Don't stop all threads in
10514 non-stop mode. In all-stop mode, only stop all threads when
10515 reporting a stop to GDB. Handle explicit thread stop requests.
10516 (async_file_flush, async_file_mark): New.
10517 (linux_wait): New.
10518 (send_sigstop): Use lwpid_of.
10519 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10520 interface changes. In non-stop mode, don't switch to a random
10521 thread.
10522 (linux_resume_one_lwp): Use lwpid_of.
10523 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10524 (linux_resume_one_thread): ... this. Handle resume_stop. In
10525 non-stop mode, don't look for pending flag in all threads.
10526 (resume_status_pending_p): Don't consider explicitly suspended
10527 threads.
10528 (my_waitpid): Reimplement. Emulate __WALL.
10529 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10530 Use lwpid_of.
10531 (sigchld_handler, linux_supports_non_stop, linux_async)
10532 (linux_start_non_stop): New.
10533 (linux_target_ops): Register linux_supports_non_stop, linux_async
10534 and linux_start_non_stop.
10535 (initialize_low): Install SIGCHLD handler.
10536 * thread-db.c (thread_db_create_event, find_one_thread)
10537 (thread_db_get_tls_address): Use lwpid_of.
10538 * win32-low.c (win32_detach): Adjust to use resume_kind.
10539 (win32_wait): Add `options' argument.
10540 * spu-low.c (spu_resume): Adjust to use resume_kind.
10541 (spu_wait): Add `options' argument.
10542
5b1c542e
PA
105432009-04-01 Pedro Alves <pedro@codesourcery.com>
10544
10545 Decouple target code from remote protocol.
10546
10547 * target.h (enum target_waitkind): New.
10548 (struct target_waitstatus): New.
10549 (struct target_ops) <wait>: Return an unsigned long. Take a
10550 target_waitstatus pointer instead of a char pointer.
10551 (mywait): Likewise.
10552 * target.c (mywait): Change prototype to return an unsigned long.
10553 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10554 * server.h (thread_from_wait, old_thread_from_wait): Delete
10555 declarations.
10556 (prepare_resume_reply): Change prototype to take a
10557 target_waitstatus.
10558 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10559 (last_status, last_ptid): New.
10560 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10561 pid instead of a signal.
10562 (attach_inferior): Remove "status" and "signal" parameters.
10563 Adjust.
10564 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10565 not as an address.
10566 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10567 (handle_v_requests, myresume): Remove "status" and "signal"
10568 parameters. Adjust.
10569 (handle_status): New.
10570 (main): Delete local `status'. Adjust.
10571 * remote-utils.c: Include target.h.
10572 (prepare_resume_reply): Change prototype to take a
10573 target_waitstatus. Adjust.
10574
10575 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10576 interface.
10577 * spu-low.c (spu_wait): Adjust.
10578 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10579 Delete.
10580 (win32_wait): Adjust.
10581
2bd7c093
PA
105822009-04-01 Pedro Alves <pedro@codesourcery.com>
10583
10584 * target.h (struct thread_resume): Delete leave_stopped member.
10585 (struct target_ops): Add a `n' argument to the `resume' callback.
10586 * server.c (start_inferior): Adjust.
10587 (handle_v_cont, myresume): Adjust.
10588 * linux-low.c (check_removed_breakpoint): Adjust to resume
10589 interface change, and to removed leave_stopped field.
10590 (resume_ptr): Delete.
10591 (struct thread_resume_array): New.
10592 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10593 resume interface change.
10594 (linux_continue_one_thread, linux_queue_one_thread)
10595 (resume_status_pending_p): Check if the resume field is NULL
10596 instead of checking the leave_stopped member.
10597 (linux_resume): Adjust to the target resume interface change.
10598 * spu-low.c (spu_resume): Adjust to the target resume interface
10599 change.
10600 * win32-low.c (win32_detach, win32_resume): Ditto.
10601
c35fafde
PA
106022009-04-01 Pedro Alves <pedro@codesourcery.com>
10603
10604 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10605 flag.
10606 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10607 pending.
10608 (linux_continue_one_thread): Only preserve the stepping flag if
10609 there's a pending breakpoint.
10610
0a59d50b
PA
106112009-03-31 Pedro Alves <pedro@codesourcery.com>
10612
10613 * server.c (main): After the inferior having exited, call
10614 remote_close before exiting gdbserver.
10615
f04c6d38
TJB
106162009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10617
10618 Fix size of FPSCR in Power 7 processors.
10619 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10620 (PPC_FEATURE_HAS_DFP): New #define.
10621 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10622 size of the FPSCR.
10623
78e5cee6
PA
106242009-03-23 Pedro Alves <pedro@codesourcery.com>
10625
10626 * server.c (handle_query) Whitespace and formatting.
10627
1b3f6016
PA
106282009-03-22 Pedro Alves <pedro@codesourcery.com>
10629
10630 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10631 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10632 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10633 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10634 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10635 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10636 Makefile.in, configure.ac: Fix whitespace throughout.
10637 * configure: Regenerate.
10638
a07b2135
PA
106392009-03-22 Pedro Alves <pedro@codesourcery.com>
10640
10641 * inferiors.c (find_inferior): Make it safe for the callback
10642 function to delete the currently iterated inferior.
10643
67cc2626
PA
106442009-03-22 Pedro Alves <pedro@codesourcery.com>
10645
10646 * Makefile.in (linuw_low_h): Move higher.
10647 (thread-db.o): Depend on $(linux_low_h).
10648
54a0b537
PA
106492009-03-17 Pedro Alves <pedro@codesourcery.com>
10650
10651 Rename "process" to "lwp" throughout.
10652
10653 * linux-low.c (all_processes): Rename to...
10654 (all_lwps): ... this.
10655 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10656 (add_process): Rename to ...
10657 (add_lwp): ... this. Adjust.
10658 (linux_create_inferior): Adjust.
10659 (linux_attach_lwp): Adjust.
10660 (linux_attach): Adjust.
10661 (linux_kill_one_process): Rename to ...
10662 (linux_kill_one_lwp): ... this. Adjust.
10663 (linux_kill): Adjust.
10664 (linux_detach_one_process): Rename to ...
10665 (linux_detach_one_lwp): ... this. Adjust.
10666 (linux_detach): Adjust.
10667 (check_removed_breakpoint): Adjust.
10668 (status_pending_p): Adjust.
10669 (linux_wait_for_process): Rename to ...
10670 (linux_wait_for_lwp): ... this. Adjust.
10671 (linux_wait_for_event): Adjust.
10672 (send_sigstop): Adjust.
10673 (wait_for_sigstop): Adjust.
10674 (stop_all_processes): Rename to ...
10675 (stop_all_lwps): ... this.
10676 (linux_resume_one_process): Rename to ...
10677 (linux_resume_one_lwp): ... this. Adjust.
10678 (linux_set_resume_request, linux_continue_one_thread)
10679 (linux_queue_one_thread, resume_status_pending_p)
10680 (usr_store_inferior_registers, regsets_store_inferior_registers)
10681 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10682 Adjust.
10683 * linux-low.h (get_process): Rename to ...
10684 (get_lwp): ... this. Adjust.
10685 (get_thread_process): Rename to ...
10686 (get_thread_lwp): ... this. Adjust.
10687 (get_process_thread): Rename to ...
10688 (get_lwp_thread): ... this. Adjust.
10689 (struct process_info): Rename to ...
10690 (struct lwp_info): ... this.
10691 (all_processes): Rename to ...
10692 (all_lwps): ... this.
10693 * proc-service.c (ps_lgetregs): Adjust.
10694 * thread-db.c (thread_db_create_event, find_one_thread)
10695 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10696
0b16c5cf
PA
106972009-03-14 Pedro Alves <pedro@codesourcery.com>
10698
10699 * server.c (handle_query): Handle "qAttached".
10700
32de4b9d
NS
107012009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10702
10703 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10704 GPLv3, update license URL.
10705
2aecd87f
DE
107062009-03-01 Doug Evans <dje@google.com>
10707
93efd302 10708 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10709 (server_h): Add gdb_signals.h.
10710 (signals.o): Update.
10711 * server.h (target_signal_from_host,target_signal_to_host_p)
10712 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10713
86b1f9c5
PM
107142009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10715
10716 * remote-utils.c (getpkt): Also generate remote-debug
10717 information if noack_mode is set.
10718
4aa995e1
PA
107192009-02-06 Pedro Alves <pedro@codesourcery.com>
10720
10721 * server.c (handle_query): Report qXfer:siginfo:read and
10722 qXfer:siginfo:write as supported and handle them.
10723 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10724 * linux-low.c (linux_xfer_siginfo): New.
10725 (linux_target_ops): Set it.
10726
62709adf
PA
107272009-01-26 Pedro Alves <pedro@codesourcery.com>
10728
10729 * server.c (gdbserver_usage): Mention --remote-debug.
10730 (main): Accept '--remote-debug' switch.
10731
aef93bd7
DE
107322009-01-18 Doug Evans <dje@google.com>
10733
10734 * regcache.c (new_register_cache): No need to check result of xcalloc.
10735 * server.c (handle_search_memory): Back out calls to xmalloc,
10736 result is checked and error is returned to user upon failure.
10737 (handle_query): Ditto. Add more checks for result of malloc.
10738 (handle_v_cont): Check result of malloc, report error back to
10739 user upon failure.
10740 (handle_v_run): Ditto. Call freeargv.
10741 * server.h (freeargv): Declare.
10742 * utils.c (freeargv): New fn.
10743
54363045
DE
107442009-01-15 Doug Evans <dje@google.com>
10745
f626972c
DE
10746 * gdbreplay.c (perror_with_name): Make arg const char *.
10747 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10748 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10749 * utils.c (perror_with_name): Make arg const char *.
54363045 10750
18aae699
PA
107512009-01-14 Pedro Alves <pedro@codesourcery.com>
10752
10753 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10754 when handling a EXIT_PROCESS_DEBUG_EVENT.
10755
ff703abe
JB
107562009-01-06 Joel Brobecker <brobecker@adacore.com>
10757
10758 * gdbreplay.c (gdbreplay_version): Update copyright year.
10759 * server.c (gdbserver_version): Likewise.
10760
f21cc1a2 107612009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10762
10763 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10764 (handle_extended_wait): Improve comment.
0e21c1ec 10765
bca929d3
DE
107662008-12-13 Doug Evans <dje@google.com>
10767
10768 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10769 * server.h (ATTR_MALLOC): New macro.
10770 (xmalloc,xcalloc,xstrdup): Declare.
10771 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10772 * inferiors.c: Ditto.
10773 * linux-low.c: Ditto.
10774 * mem-break.c: Ditto.
10775 * regcache.c: Ditto.
10776 * remote-utils.c: Ditto.
10777 * server.c: Ditto.
10778 * target.c: Ditto.
10779 * win32-low.c: Ditto.
10780
97438e3f
DE
107812008-12-12 Doug Evans <dje@google.com>
10782
896c7fbb
DE
10783 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10784 in debugging printf.
10785
97438e3f
DE
10786 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10787
e3b886f8
DE
107882008-12-09 Doug Evans <dje@google.com>
10789
10790 * linux-low.h (struct process_info): Delete member tid, unused.
10791 * thread-db.c (find_one_thread): Update.
10792 (maybe_attach_thread): Update.
10793
07e059b5
VP
107942008-12-02 Pedro Alves <pedro@codesourcery.com>
10795
889bf7c5
PA
10796 * target.h (struct target_ops): Add qxfer_osdata member.
10797 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10798 and dirent.h.
10799 (linux_qxfer_osdata): New functions.
10800 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10801 callback.
10802 * server.c (handle_query): Handle "qXfer:osdata:read:".
10803 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10804 (buffer_xml_printf): New functions.
10805 * server.h (struct buffer): New.
10806 (buffer_grow_str, buffer_grow_str0): New macros.
10807 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10808 (buffer_xml_printf): Declare.
07e059b5 10809
4cab47ab
DE
108102008-11-24 Doug Evans <dje@google.com>
10811
10812 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10813
f142445f
DJ
108142008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10815
10816 * server.c (handle_v_run): Always use the supplied argument list.
10817
d0107bb6 108182008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10819
d0107bb6
BW
10820 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10821 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10822
2c4ad781
TJB
108232008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10824
10825 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10826 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10827 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10828 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10829 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10830 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10831 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10832 XML target descriptions.
10833 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10834 when inferior is running on an ISA 2.05 or later processor. Add
10835 special case to return offset for full 64-bit slot of FPSCR when
10836 in 32-bits.
10837
dfb64f85
DJ
108382008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10839
10840 * Makefile.in (SFILES, clean): Added sparc64 files.
10841 (reg-sparc64.o, reg-sparc64.c): New.
10842 * configure.srv (sparc*-*-linux*): New configuration.
10843 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10844 syscall arguments for SPARC.
10845 (regsets_store_inferior_registers): Likewise.
10846 * linux-sparc-low.c: New file.
10847
66b6e1dd
DE
108482008-10-21 Doug Evans <dje@google.com>
10849
10850 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10851 (READLINE_DIR,READLINE_DEP): Delete.
10852 (INTERNAL_CFLAGS): Update.
10853 (LINTFLAGS): Update.
10854
9b710a42
PA
108552008-10-10 Pedro Alves <pedro@codesourcery.com>
10856
10857 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10858 whole argv from the last run, not just argv[0].
10859
5822d809
PA
108602008-09-08 Pedro Alves <pedro@codesourcery.com>
10861
10862 * regcache.c (new_register_cache): Return NULL if the register
10863 cache size isn't known yet.
10864 (free_register_cache): Avoid dereferencing a NULL regcache.
10865
74aac56f
DJ
108662008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * configure.srv: Merge MIPS and MIPS64.
10869
400b20f5
MR
108702008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10871
10872 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10873
677c5bb1
LM
108742008-08-18 Luis Machado <luisgpm@br.ibm.com>
10875
10876 * Makefile.in: Add required vsx dependencies.
10877
10878 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10879 Declare init_registers_powerpc_vsx32l.
10880 Declare init_registers_powerpc_vsx64l.
10881 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10882 (ppc_arch_setup): Check for VSX in hwcap.
10883 (ppc_fill_vsxregset): New function.
10884 (ppc_store_vsxregset): New function.
10885 Add new VSX entry in regset_info target_regsets.
10886
10887 * configure.srv: Add new VSX dependencies.
10888
a6f3e723
SL
108892008-08-12 Pedro Alves <pedro@codesourcery.com>
10890
10891 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10892 (remote_open): Set or clear transport_is_reliable.
10893 (putpkt_binary): Don't expect acks in noack mode.
10894 (getpkt): Don't send ack/nac in noack mode.
10895 * server.c (handle_general_set): Handle QStartNoAckMode.
10896 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10897 qSupported.
10898 (main): Reset noack_mode on every connection.
10899 * server.h (noack_mode): Declare.
10900
a417dc56
RW
109012008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10902
10903 * Makefile.in (GDBREPLAY_OBS): New variable.
10904 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10905
3221518c
UW
109062008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10907 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10910 (usr_store_inferior_registers): Likewise.
10911 (regsets_store_inferior_registers): Likewise.
10912
ec56be1b
PA
109132008-07-31 Rolf Jansen <rj@surtec.com>
10914 Pedro Alves <pedro@codesourcery.com>
10915
10916 * configure.ac: Check for memmem declaration.
10917 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10918 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10919 (disable_packet_qfThreadInfo): Unconditionally compile.
10920 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10921 * configure, config.in: Regenerate.
10922
2fe5e3ff
DE
109232008-07-28 Doug Kwan <dougkwan@google.com>
10924
10925 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10926 (linux_write_memory): Remove declaration of errno.
10927
836acd6d
UW
109282008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10929
10930 * linux-low.c (handle_extended_wait): Do not use "status"
10931 variable uninitialized.
10932
aeba519e
PA
109332008-07-07 Pedro Alves <pedro@codesourcery.com>
10934
10935 * server.c (handle_v_attach): Inhibit reporting dll changes.
10936
db42f210
PA
109372008-06-27 Pedro Alves <pedro@codesourcery.com>
10938
10939 * remote-utils.c (prepare_resume_reply): If requested, don't
10940 output "thread:TID" in the T stop reply.
10941
10942 * server.c (disable_packet_vCont, disable_packet_Tthread)
10943 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10944 (handle_query): If requested, disable support for qC, qfThreadInfo
10945 and qsThreadInfo.
10946 (handle_v_requests): If requested, disable support for vCont.
10947 (gdbserver_show_disableable): New.
10948 (main): Handle --disable-packet and --disable-packet=LIST.
10949
10950 * server.h (disable_packet_vCont, disable_packet_Tthread)
10951 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10952
8e4c5421
CD
109532008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10954
10955 * server.c (gdbserver_usage): Mention --version.
10956
6e23a804
DJ
109572008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * Makefile.in (gdbreplay.o): New rule.
10960
90aa6a40
JM
109612008-06-06 Joseph Myers <joseph@codesourcery.com>
10962
10963 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10964 message, not gdbserver.
10965
c16158bc 109662008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10967 Nathan Sidwell <nathan@codesourcery.com>
10968 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10969
10970 * acinclude.m4: Include ../../config/acx.m4.
10971 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10972 * configure, config.in: Regenerate.
10973 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10974 * server.c (gdbserver_version): Print PKGVERSION.
10975 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10976 (main): Adjust gdbserver_usage calls.
10977 * gdbreplay.c (version, host_name): Add declarations.
10978 (gdbreplay_version, gdbreplay_usage): New.
10979 (main): Accept --version and --help options.
10980
aeb75bf5
DJ
109812008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10982
10983 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10984 (arm_breakpoint_at): Handle Thumb.
10985 (the_low_target): Add comment.
10986
76b233dd
UW
109872008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10988
10989 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10990
08388c79
DE
109912008-05-09 Doug Evans <dje@google.com>
10992
a3c83fae
DE
10993 * server.h (decode_search_memory_packet): Declare.
10994 * remote-utils.c (decode_search_memory_packet): New fn.
10995 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10996 (handle_search_memory): New fn.
10997 (handle_query): Process qSearch:memory packets.
10998
bb9c3d36
UW
109992008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11000
11001 * regcache.c (registers_length): Remove.
11002 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11003 full register packet.
11004 * regcache.h (registers_length): Remove prototype.
11005 * server.h (PBUFSIZ): Define to 16384.
11006
7284e1be
UW
110072008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11008
11009 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11010 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11011 powerpc-64l.o, and powerpc-altivec64l.o.
11012 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11013 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11014 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11015 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11016 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11017 to srv_xmlfiles.
11018
11019 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11020 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11021 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11022 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11023 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11024 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11025 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11026 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11027 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11028 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11029 (clean): Update.
11030
11031 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11032 (init_registers_powerpc_32l): ... this new prototype.
11033 (init_registers_powerpc_32): Remove, replace by ...
11034 (init_registers_powerpc_altivec32l): ... this new prototype.
11035 (init_registers_powerpc_e500): Remove, replace by ...
11036 (init_registers_powerpc_e500l): ... this new prototype.
11037 (init_registers_ppc64): Remove, replace by ...
11038 (init_registers_powerpc_64l): ... this new prototype.
11039 (init_registers_powerpc_64): Remove, replace by ...
11040 (init_registers_powerpc_altivec64l): ... this new prototype.
11041 (ppc_num_regs): Set to 73.
11042 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11043 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11044 (ppc_cannot_store_register): Handle orig_r3 and trap.
11045 (ppc_arch_setup): Update init_registers_... calls.
11046 (ppc_fill_gregset): Handle orig_r3 and trap.
11047
11048 * inferiors.c (clear_inferiors): Reset current_inferior.
11049
fdc59709
PB
110502008-04-23 Paolo Bonzini <bonzini@gnu.org>
11051
889bf7c5
PA
11052 * acinclude.m4: Add override.m4.
11053 * configure: Regenerate.
fdc59709 11054
c9b2f845
UW
110552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11056
11057 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11058 initial call to init_register_ppc64.
11059
550512b8
UW
110602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11061
43aaf8b6
PA
11062 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11063 single powerpc*-*-linux* case.
550512b8
UW
11064 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11065
b6430ec3
UW
110662008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11067
11068 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11069 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11070 from reg_xmlfiles.
11071 * linux-ppc-low.c: Include <elf.h>.
11072 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11073 (ppc_hwcap): New global variable.
11074 (ppc_regmap): Remove __SPE__ #ifdef sections.
11075 (ppc_regmap_e500): New global variable.
11076 (ppc_cannot_store_register): Update __SPE__ special case.
11077 (ppc_get_hwcap): New function.
11078 (ppc_arch_setup): Use it to determine whether inferior supports
11079 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11080 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11081 Do not access registers if target does not support AltiVec.
11082 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11083 Do not access registers if target does not support SPE.
11084 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11085
52fa2412
UW
110862008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11087
11088 * linux-low.c (disabled_regsets, num_regsets): New.
11089 (use_regsets_p): Delete.
11090 (linux_wait_for_process): Clear disabled_regsets.
11091 (regsets_fetch_inferior_registers): Check and set it.
11092 (regsets_store_inferior_registers): Likewise.
11093 (linux_fetch_registers, linux_store_registers): Do not use
11094 use_regsets_p.
11095 (initialize_low): Allocate disabled_regsets.
11096
e28b3332
DJ
110972008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11098
11099 * Makefile.in (LIBOBJS): New.
11100 (OBS): Use LIBOBJS.
11101 (memmem.o): New rule.
11102 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11103 * configure: Regenerated.
11104
4536995d
UW
111052008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11106
11107 * server.c (handle_query): Never return "unsupported" for
11108 qXfer:features:read queries.
11109
221c031f
UW
111102008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11111
11112 * server.c (get_features_xml): Fix inverted condition.
11113 (handle_query): Always support qXfer:feature:read.
11114
ccd213ac
DJ
111152008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11116
11117 * server.c (wrapper_argv): New.
11118 (start_inferior): Handle wrapper_argv. If set, expect an extra
11119 trap.
11120 (gdbserver_usage): Document --wrapper.
11121 (main): Parse --wrapper.
11122
6fe305f7
UW
111232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11124
11125 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11126 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11127 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11128 (ppc_set_pc): Likewise.
11129 (ppc_arch_setup): New function.
11130 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11131 of collect_register.
889bf7c5 11132 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11133
5b0a002e
UW
111342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11135
11136 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11137 instead of linux-ppc64-low.o.
11138 * linux-ppc64-low.c: Remove file.
11139 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11140 (linux-ppc64-low.o): Remove rule.
11141
11142 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11143 (init_registers_powerpc_64): Likewise.
11144 (ppc_regmap): Conditionally define depending on __powerpc64__.
11145 (ppc_cannot_store_register): Do not special-case "fpscr" when
11146 compiled on __powerpc64__.
11147 (ppc_collect_ptrace_register): New function.
11148 (ppc_supply_ptrace_register): New function.
11149 (ppc_breakpoint): Change type to "unsigned int".
11150 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11151 (the_low_target): Conditionally provide initializers for the
889bf7c5 11152 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11153 collect_ptrace_register and supply_ptrace_register members.
11154
9b4b61c8
UW
111552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11156
11157 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11158 * server.c (gdbserver_xmltarget): Define.
11159 (get_features_xml): Use it to replace "target.xml" and arch_string.
11160
11161 * configure.srv: Remove srv_xmltarget. Add XML files that were
11162 mentioned there to srv_xmlfiles instead. Remove conditional tests
11163 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11164 srv_xmlfiles and srv_regobj to include all possible choices.
11165 * configure.ac (srv_xmltarget): Remove.
11166 (srv_xmlfiles): Do not add "target.xml".
11167 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11168 checks for supplementary target information.
11169 * configure: Regenerate.
11170 * Makefile.in (XML_TARGET): Remove.
11171 (target.xml): Remove rule.
11172 (clean): Do not clean up target.xml.
11173 (.PRECIOUS): Do not mention target.xml.
11174
11175 * target.h (struct target_ops): Remove arch_string member.
11176 * linux-low.c (linux_arch_string): Remove.
11177 (linux_target_ops): Remove arch_string initializer.
11178 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11179 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11180 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11181 * spu-low.c (spu_arch_string): Remove.
11182 (spu_target_ops): Remove arch_string initializer.
11183 * win32-low.c (win32_arch_string): Remove.
11184 (win32_target_ops): Remove arch_string initializer.
11185 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11186 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11187 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11188
ee1a7ae4
UW
111892008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11190
11191 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11192 by collect_ptrace_register and supply_ptrace_register hooks.
11193 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11194 instead of checking for the_low_target.left_pad_xfer.
11195 (usr_store_inferior_registers): Use collect_ptrace_register callback
11196 instead of checking for the_low_target.left_pad_xfer.
11197
11198 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11199 (s390_supply_ptrace_register): Likewise.
11200 (s390_fill_gregset): Call s390_collect_ptrace_register.
11201 (the_low_target): Update.
11202
11203 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11204 (ppc_supply_ptrace_register): Likewise.
11205 (the_low_target): Update.
11206
11207 * linux-i386-low.c (the_low_target): Update.
11208 * linux-x86-64-low.c (the_low_target): Update.
11209
d61ddec4
UW
112102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11211
11212 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11213 reg-s390.o and reg-s390x.o.
11214
11215 * linux-low.c (new_inferior): New global variable.
11216 (linux_create_inferior, linux_attach): Set it.
11217 (linux_wait_for_process): Call the_low_target.arch_setup after the
11218 target has stopped for the first time.
11219 (initialize_low): Do not call the_low_target.arch_setup.
11220
11221 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11222 (s390_set_pc): Likewise.
11223 (s390_arch_setup): New function.
11224 (the_low_target): Use s390_arch_setup as arch_setup routine.
11225
11226 * regcache.c (realloc_register_cache): New function.
11227 (set_register_cache): Call it for each existing regcache.
11228
d05b4ac3
UW
112292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11230
11231 * server.h (init_registers): Remove prototype.
11232
11233 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11234 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11235 instead of init_registers ().
11236 * linux-arm-low.c (init_registers_arm): Add prototype.
11237 (init_registers_arm_with_iwmmxt): Likewise.
11238 (the_low_target): Add initializer for arch_setup field.
11239 * linux-cris-low.c (init_registers_cris): Add prototype.
11240 (the_low_target): Add initializer for arch_setup field.
11241 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11242 (the_low_target): Add initializer for arch_setup field.
11243 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11244 (the_low_target): Add initializer for arch_setup field.
11245 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11246 (the_low_target): Add initializer for arch_setup field.
11247 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11248 (the_low_target): Add initializer for arch_setup field.
11249 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11250 (the_low_target): Add initializer for arch_setup field.
11251 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11252 (init_registers_mips64_linux): Likewise.
11253 (the_low_target): Add initializer for arch_setup field.
11254 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11255 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11256 (the_low_target): Add initializer for arch_setup field.
11257 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11258 (init_registers_powerpc_64): Likewise.
11259 (the_low_target): Add initializer for arch_setup field.
11260 * linux-s390-low.c (init_registers_s390): Add prototype.
11261 (init_registers_s390x): Likewise.
11262 (the_low_target): Add initializer for arch_setup field.
11263 * linux-sh-low.c (init_registers_sh): Add prototype.
11264 (the_low_target): Add initializer for arch_setup field.
11265 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11266 (the_low_target): Add initializer for arch_setup field.
11267 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11268 (the_low_target): Add initializer for arch_setup field.
11269
11270 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11271 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11272 instead of init_registers ().
11273 * win32-arm-low.c (init_registers_arm): Add prototype.
11274 (the_low_target): Add initializer for arch_setup field.
11275 * win32-i386-low.c (init_registers_i386): Add prototype.
11276 (the_low_target): Add initializer for arch_setup field.
11277
11278 * spu-low.c (init_registers_spu): Add prototype.
11279 (initialize_low): Call initialie_registers_spu () instead of
11280 initialize_registers ().
11281
fd96d250
PA
112822008-02-19 Pedro Alves <pedro@codesourcery.com>
11283
11284 * server.c (handle_v_requests): When handling the vRun and vAttach
11285 packets, if already debugging a process, don't kill it. Return an
11286 error instead.
11287
d41b6bb4
DJ
112882008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11289
11290 * server.c (handle_query): Correct length check.
11291
5ac588cf
PA
112922008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11293
11294 * win32-low.c (do_initial_child_stuff): Add process handle
11295 parameter. Set current_process_handle and current_process_id from the
11296 parameters. Clear globals.
11297 (win32_create_inferior): Don't set current_process_handle and
11298 current_process_id here. Instead pass them on the call to
11299 do_initial_child_stuff.
11300 (win32_attach): Likewise.
11301 (win32_clear_inferiors): New.
11302 (win32_kill): Don't close the current process handle or the
11303 current thread handle here. Instead call win32_clear_inferiors.
11304 (win32_detach): Don't open a new handle to the process. Call
11305 win32_clear_inferiors.
11306 (win32_join): Don't rely on current_process_handle; open a new
11307 handle using the process id.
11308 (win32_wait): Call win32_clear_inferiors when the inferior process
11309 has exited.
11310
ecd7ecbc
DJ
113112008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11312
11313 * server.c (monitor_show_help): Add "exit".
11314
1525d545
MG
113152008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11316
ecd7ecbc 11317 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11318 (clean): Add reg-xtensa.c.
11319 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11320 * configure.srv (xtensa*-*-linux*) New target.
11321 * linux-xtensa-low.c: New.
11322 * xtensa-xtregs.c: New.
1525d545 11323
59a016f0
PA
113242008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11325
11326 * hostio.c: Don't include errno.h.
11327 (errno_to_fileio_errno): Move to hostio-errno.
11328 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11329 error number outputting to the target->hostio_last_error callback.
11330 (hostio_packet_error): Use FILEIO_EINVAL directly.
11331 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11332 calls to hostio_error.
11333 * hostio-errno.c: New.
11334 * server.h (hostio_last_error_from_errno): Declare.
11335 * target.h (target_ops): Add hostio_last_error member.
11336 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11337 as hostio_last_error handler.
889bf7c5 11338 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11339 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11340 (wince_hostio_last_error): New functions.
11341 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11342 as hostio_last_error handler.
11343 (win32_target_ops) [!_WIN32_WCE]: Register
11344 hostio_last_error_from_errno as hostio_last_error handler.
11345 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11346 (hostio-errno.o): New rule.
11347 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11348 * configure.srv (srv_hostio_err_objs): New variable. Default to
11349 hostio-errno.o.
11350 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11351 * configure: Regenerate.
11352
2d717e4f
DJ
113532008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11354
11355 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11356 (linux_kill, linux_detach): Clean up the process list.
11357 * remote-utils.c (remote_open): Improve port number parsing.
11358 (putpkt_binary, input_interrupt): Only send interrupts if the target
11359 is running.
11360 * server.c (extended_protocol): Make static.
11361 (attached): Define earlier.
11362 (exit_requested, response_needed, program_argv): New variables.
11363 (target_running): New.
11364 (start_inferior): Clear attached here.
11365 (attach_inferior): Set attached here.
11366 (require_running): Define.
11367 (handle_query): Use require_running and target_running. Implement
11368 "monitor exit".
11369 (handle_v_attach, handle_v_run): New.
11370 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11371 (gdbserver_usage): Update.
11372 (main): Redo argument parsing. Handle --debug and --multi. Handle
11373 --attach along with other options or after the port. Save
11374 program_argv. Support no initial program. Resynchronize
11375 communication with GDB after an error. Handle "monitor exit".
11376 Use require_running and target_running. Always allow the extended
11377 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11378 restart in extended mode.
11379 * README: Refer to the GDB manual. Update --attach usage.
11380
7407e2de
AS
113812007-12-20 Andreas Schwab <schwab@suse.de>
11382
11383 * linux-low.c (STACK_SIZE): Define.
11384 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11385 (linux_test_for_tracefork): Likewise.
11386
b65d95c5
DJ
113872007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11388
11389 * linux-low.c (linux_wait_for_event): Update messages. Do not
11390 reinsert auto-delete breakpoints.
11391 * mem-break.c (struct breakpoint): Change return type of handler to
11392 int.
11393 (set_breakpoint_at): Update handler type.
11394 (reinsert_breakpoint_handler): Return 1 instead of calling
11395 delete_breakpoint.
11396 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11397 setting a new one.
11398 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11399 * mem-break.h (set_breakpoint_at): Update handler type.
11400 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11401 * win32-low.c (auto_delete_breakpoint): New.
11402 (get_child_debug_event): Use it.
11403
4e799345
DJ
114042007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11405
11406 * configure.ac: Check for pread and pwrite.
11407 * hostio.c (handle_pread): Fall back to lseek and read.
11408 (handle_pwrite): Fall back to lseek and write.
11409 * config.in, configure: Regenerated.
11410
27524b67
DJ
114112007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11412
11413 * server.c (myresume): Add own_buf argument.
11414 (main): Update calls.
11415
a20d5e98
DJ
114162007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11419 * remote-utils.c (remote_open): Do not call disable_async_io.
11420 (block_async_io): Delete.
11421 (unblock_async_io): Make static.
11422 (initialize_async_io): New.
11423 * server.c (handle_v_cont): Handle async I/O here.
11424 (myresume): Likewise. Move other common resume tasks here...
11425 (main): ... from here. Call initialize_async_io. Disable async
11426 I/O before the main loop.
11427 * server.h (initialize_async_io): Declare.
11428 (block_async_io, unblock_async_io): Delete prototypes.
11429 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11430
b79d787e
DJ
114312007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11432
11433 * remote-utils.c (readchar): Allow binary data in received messages.
11434
d97903b2
PA
114352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11436
11437 * win32-low.c (attaching): New global.
11438 (win32_create_inferior): Clear the `attaching' global.
11439 (win32_attach): Set the `attaching' global.
11440 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11441 attaching. Only set a breakpoint at the entry point if not
11442 attaching.
11443
311de423
PA
114442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11445
11446 * server.c (main): Don't report dll events on the initial
11447 connection on attaches.
11448
6c2d16d2
PA
114492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11450
11451 * server.c (main): Relax numerical bases supported for the pid of
11452 the --attach command line argument.
11453
5ca906e6
PA
114542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11455
11456 * win32-low.c (win32_attach): Call OpenProcess before
11457 DebugActiveProcess, not after. Add last error output to error
11458 call.
11459
9c6c8194
PA
114602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11461
11462 * win32-low.c (win32_get_thread_context)
11463 (win32_set_thread_context): New functions.
11464 (thread_rec): Use win32_get_thread_context.
11465 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11466 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11467 field.
11468
4d5d1aaa
PA
114692007-12-03 Leo Zayas
11470 Pedro Alves <pedro_alves@portugalmail.pt>
11471
11472 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11473 global variables.
11474 (child_add_thread): Minor cleanup.
11475 (child_continue): Resume artificially suspended threads before
11476 calling ContinueDebugEvent.
11477 (suspend_one_thread): New.
11478 (fake_breakpoint_event): New.
11479 (get_child_debug_event): Change return type to int. Check here if
11480 gdb sent an interrupt request. If a soft interrupt was requested,
11481 fake a breakpoint event. Return 0 if there is no event to handle,
11482 and 1 otherwise.
11483 (win32_wait): Don't check here if gdb sent an interrupt request.
11484 Ensure there is a valid event to handle.
11485 (win32_request_interrupt): Add soft interruption method as last
11486 resort.
11487
c436e841
PA
114882007-12-03 Leo Zayas
11489 Pedro Alves <pedro_alves@portugalmail.pt>
11490
11491 * win32-low.h (win32_thread_info): Add descriptions to the
11492 structure members. Replace `suspend_count' counter by a
11493 `suspended' flag.
11494 * win32-low.c (thread_rec): Update condition of when to get the
11495 context from the inferior. Rely on ContextFlags being set if it
11496 has already been retrieved. Only suspend the inferior thread if
11497 we haven't already. Warn if that fails.
11498 (continue_one_thread): s/suspend_count/suspended/. Only call
11499 ResumeThread once. Warn if that fails.
11500
e7b5fa67
PA
115012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11502
11503 * win32-low.c (win32_wait): Don't read from the inferior when it
11504 has already exited.
11505
a385171d
PA
115062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11507
11508 * Makefile.in (win32_low_h): New variable.
11509 (win32-low.o): Add dependency on $(win32_low_h).
11510 (win32-arm-low.o, win32-i386-low.o): New rules.
11511
f80c84b3
DJ
115122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11513
11514 * hostio.c: Correct copyright year.
11515
a6b151f1
DJ
115162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * Makefile.in (OBS): Add hostio.o.
11519 (hostio.o): New rule.
11520 * server.h (handle_vFile): Declare.
11521 * hostio.c: New file.
11522 * server.c (handle_v_requests): Take packet_len and new_packet_len
11523 for binary packets. Call handle_vFile.
11524 (main): Update call to handle_v_requests.
11525
f9387fc3
DJ
115262007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11527
11528 * linux-low.c: Include <sched.h>.
11529
51c2684e
DJ
115302007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11531
11532 * linux-low.c (linux_tracefork_grandchild): New.
11533 (linux_tracefork_child): Use clone.
11534 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11535
75f83163
JB
115362007-10-31 Joel Brobecker <brobecker@adacore.com>
11537
11538 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11539
da5898ce
DJ
115402007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11541
11542 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11543
24a09b5f
DJ
115442007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * inferiors.c (change_inferior_id): Delete.
11547 (add_pid_to_list, pull_pid_from_list): New.
11548 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11549 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11550 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11551 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11552 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11553 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11554 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11555 (using_threads): Always set to 1.
11556 (handle_extended_wait): New.
11557 (add_process): Do not set TID.
11558 (linux_create_inferior): Set must_set_ptrace_flags.
11559 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11560 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11561 (linux_thread_alive): Rename TID argument to LWPID.
11562 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11563 (linux_wait_for_event): Do not use TID or check using_threads. Update
11564 call to dead_thread_notify. Call handle_extended_wait.
11565 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11566 (send_sigstop): Delete sigstop_sent.
11567 (wait_for_sigstop): Avoid TID.
11568 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11569 (linux_test_for_tracefork): New.
11570 (linux_lookup_signals): Use thread_db_active and
11571 linux_supports_tracefork_flag.
11572 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11573 * linux-low.h (get_process_thread): Avoid TID.
11574 (struct process_ifo): Move thread_known and tid to the end. Remove
11575 sigstop_sent.
11576 (linux_attach_lwp, thread_db_init): Update prototypes.
11577 * server.h (change_inferior_id): Delete prototype.
11578 (add_pid_to_list, pull_pid_from_list): New prototypes.
11579 * thread-db.c (thread_db_use_events): New.
11580 (find_first_thread): Rename to...
11581 (find_one_thread): ...this. Update callers and messages. Do not
11582 call fatal. Check thread_db_use_events. Do not call
11583 change_inferior_id or new_thread_notify.
11584 (maybe_attach_thread): Update. Do not call new_thread_notify.
11585 (thread_db_init): Set thread_db_use_events. Check use_events.
11586 * utils.c (fatal, warning): Correct message prefix.
11587
30ed0a8f
DJ
115882007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11589
11590 * Makefile.in (clean): Remove new files.
11591 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11592 (powerpc-64.o, powerpc-64.c): New rules.
11593 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11594 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11595 with SPE.
11596 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11597 SPE targets.
11598 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11599 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11600 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11601 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11602 (target_regsets): Add AltiVec and SPE register sets.
11603 * configure.ac: Check for AltiVec and SPE.
11604 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11605 (ppc_fill_vrregset, ppc_store_vrregset): New.
11606 (target_regsets): Add AltiVec register set.
11607 * configure: Regenerated.
11608
fd462a61
DJ
116092007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11610
11611 * linux-low.c (O_LARGEFILE): Define.
11612 (linux_read_memory): Use /proc/PID/mem.
11613 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11614 * configure, config.in: Regenerated.
11615
69f223ed
DJ
116162007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11617
11618 * linux-low.c (linux_wait_for_event): Do not pass signals while
11619 single-stepping.
11620
aec18585
PA
116212007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11622
11623 * win32-low.c (create_process): New.
11624 (win32_create_inferior): Use create_process instead of
11625 CreateProcess. If create_process failed retry appending an ".exe"
11626 suffix. Store the GetLastError result immediatelly after
11627 create_process calls and use it on the call to error.
11628
34d86ddd
PA
116292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11630
11631 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11632
5a0e3bd0
JB
116332007-08-23 Joel Brobecker <brobecker@adacore.com>
11634
11635 * configure.ac: Switch license to GPLv3.
11636
f88c79e6
MS
116372007-08-01 Michael Snyder <msnyder@access-company.com>
11638
11639 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11640
6b3d9b83
PA
116412007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11642
11643 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11644 typedef.
11645 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11646 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11647 CloseToolhelp32Snapshot.
11648 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11649 CloseToolhelp32Snapshot.
11650
c588c53c
MS
116512007-07-27 Michael Snyder <michael.snyder@access-company.com>
11652
11653 * server.c (main): Check for inferior exit before main loop.
11654
aa0403d9
PA
116552007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11656
11657 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11658 instead of on tmp_desc.
11659
255e7678
DJ
116602007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11661 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11664 (add_thread): Minor cleanups.
11665 (clear_inferiors): Move lower in the file. Clear the DLL
11666 list.
11667 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11668 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11669 (xml_escape_text): New.
11670 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11671 for qSupported.
11672 (handle_v_cont): Report errors.
11673 (gdbserver_version): Update.
11674 (main): Correct size of own_buf. Do not report initial DLL events.
11675 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11676 (unloaded_dll, xml_escape_text): New.
11677 * win32-low.c (enum target_waitkind): Update comments.
11678 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11679 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11680 (win32_EnumProcessModules, win32_GetModuleInformation)
11681 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11682 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11683 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11684 (win32_Module32First, win32_Module32Next, load_toolhelp)
11685 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11686 (get_child_debug_event): Handle DLL events.
11687 (win32_wait): Likewise.
11688
0d37add9
DJ
116892007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11692 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11693
45e2715e
PA
116942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11695
11696 * win32-low.c (handle_output_debug_string): Ignore event if not
11697 waiting.
11698
c5674cf1
PA
116992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11700
11701 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11702
2bbe3cc1
DJ
117032007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11704
11705 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11706
ae13219e
DJ
117072007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * inferiors.c (change_inferior_id): Add comment.
11710 * linux-low.c (check_removed_breakpoint): Add an early
11711 prototype. Improve debug output.
11712 (linux_attach): Doc update.
11713 (linux_detach_one_process, linux_detach): Clean up before releasing
11714 each process.
11715 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11716 * linux-low.h (struct process_info): Doc improvement.
11717 * mem-break.c (delete_all_breakpoints): New.
11718 * mem-break.h (delete_all_breakpoints): New prototype.
11719 * thread-db.c (find_first_thread): New.
11720 (thread_db_create_event): Call it instead of
11721 thread_db_find_new_threads. Clean up unused variables.
11722 (maybe_attach_thread): Remove first thread handling.
11723 (thread_db_find_new_threads): Use find_first_thread.
11724 (thread_db_get_tls_address): Likewise.
11725
4105de34
DJ
117262007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11727
11728 * thread-db.c (thread_db_find_new_threads): Add prototype.
11729 (thread_db_create_event): Check for the main thread before adding
11730 a new thread.
11731 (maybe_attach_thread): Only enable event reporting if TID == 0.
11732 (thread_db_get_tls_address): Check for new threads.
11733
2b876972
DJ
117342007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11735
11736 * linux-low.c (linux_create_inferior): Try execv before execvp.
11737 * spu-low.c (spu_create_inferior): Likewise.
11738
7a245884
DJ
117392007-06-13 Mike Frysinger <vapier@gentoo.org>
11740
11741 * linux-low.c (linux_create_inferior): Change execv to execvp.
11742 * spu-low.c (spu_create_inferior): Likewies.
11743
117ce543
DJ
117442007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11745
11746 * Makefile.in (clean): Clean new files instead of deleted ones.
11747 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11748 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11749 rules.
11750 * configure.srv: Specify XML files and new regformats for MIPS and
11751 MIPS64 GNU/Linux.
11752 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11753 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11754 an entry for the restart register.
11755 (mips_cannot_fetch_register, mips_cannot_store_register)
11756 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11757 register names to match the XML descriptions.
11758 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11759 restart register instead of $0.
11760
0e7f50da
UW
117612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11762 Markus Deuling <deuling@de.ibm.com>
11763
11764 * remote-utils.c (decode_xfer_write): New function.
11765 * server.h (decode_xfer_write): Add prototype.
11766 * server.c (handle_query): Add PACKET_LEN argument. Support
11767 qXfer:spu:read and qXfer:spu:write packets.
11768 (main): Pass packet_len to handle_query.
11769 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11770 * target.h (target_ops): Add qxfer_spu.
11771
374c1d38
UW
117722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11773
11774 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11775 accessing non-seekable spufs files.
11776
bb63802a
UW
117772007-05-16 Markus Deuling <deuling@de.ibm.com>
11778
889bf7c5 11779 * server.c (handle_query): Add reply for qC packet.
bb63802a 11780
7390519e
PA
117812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11782 Leo Zayas <lerele@champenstudios@com>
11783
11784 * server.h (check_remote_input_interrupt_request): New function.
11785 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11786 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11787 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11788 (check_remote_input_interrupt_request): New function.
11789 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11790 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11791 winapi_GenerateConsoleCtrlEvent): New typedefs.
11792 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11793 to 250 ms.
11794 (win32_wait): Check for remote interrupt request
11795 with check_remote_input_interrupt_request.
11796 (win32_request_interrupt): New function.
11797 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11798
34b34921
PA
117992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11800
11801 * win32-low.c (debug_registers_changed,
11802 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11803 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11804 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11805 (thread_rec): Get context using the low target.
11806 (child_add_thread): Call thread_added on the low target,
11807 which does the same thing.
11808 (regptr): Delete.
11809 (do_initial_child_stuff): Remove debug registers references.
11810 Set context using the low target. Resume threads after
11811 setting the contexts.
11812 (child_continue): Remove dead variable. Remove debug
11813 registers references.
11814 (child_fetch_inferior_registers): Go through the low target.
11815 (do_child_store_inferior_registers): Remove.
11816 (child_store_inferior_registers): Go through the low target.
11817 (win32_resume): Remove debug registers references.
11818 Set context using the low target.
11819 (handle_exception): Change return type to void. Don't record
11820 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11821 first chance exception.
889bf7c5 11822 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11823 goto loop. Always return after waiting for debug event.
11824 (win32_wait): Convert to switch statement. Handle spurious
11825 events.
11826
11827 * win32-i386-low.c (debug_registers_changed,
11828 debug_registers_used): New.
11829 (initial_stuff): Rename to ...
11830 (i386_initial_stuff): ... this. Clear debug registers
11831 state variables.
11832 (store_debug_registers): Delete.
11833 (i386_get_thread_context): New.
11834 (load_debug_registers): Delete.
11835 (i386_set_thread_context): New.
11836 (i386_thread_added): New.
11837 (single_step): Rename to ...
11838 (i386_single_step): ... this.
11839 (do_fetch_inferior_registers): Rename to ...
11840 (i386_fetch_inferior_register): ... this.
11841 (i386_store_inferior_register): New.
11842 (the_low_target): Adapt to new interface.
11843
11844 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11845 (arm_get_thread_context): New.
11846 (arm_set_thread_context): New.
11847 (regptr): New.
11848 (do_fetch_inferior_registers): Rename to ...
11849 (arm_fetch_inferior_register): ... this.
11850 (arm_store_inferior_register): New.
11851 (arm_wince_breakpoint): Reimplement as unsigned long.
11852 (arm_wince_breakpoint_len): Define.
11853 (the_low_target): Adapt to new interface.
11854
11855 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11856 load_debug_registers. Add get_thread_context, set_thread_context,
11857 thread_added and store_inferior_register. Rename
11858 fetch_inferior_registers to fetch_inferior_register.
11859 (regptr): Remove declaration.
11860
dd6953e1
PA
118612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11862
11863 * linux-low.c (linux_detach): Change return type to int. Return 0.
11864 * spu-low.c (spu_detach): Likewise.
11865
444d6139
PA
118662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11867
11868 * target.h (target_ops): Change return type of detach to int.
11869 Add join.
11870 (join_inferior): New.
11871 * server.c (main): Don't skip detach support on mingw32.
11872 If the inferior doesn't support detaching return error.
11873 Call join_inferior instead of using waitpid.
11874 * linux-low.c (linux_join): New.
11875 (linux_target_op): Add linux_join.
11876 * spu-low.c (spu_join): New.
11877 (spu_target_ops): Add spu_join.
11878 * win32-low.c (win32_detach): Adapt to new interface.
11879 Reopen current_process_handle before detaching. Issue a child
11880 resume before detaching.
11881 (win32_join): New.
11882 (win32_target_op): Add win32_join.
11883
1d5315fe
PA
118842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11885
11886 * win32-low.c (win32-attach): Fix return value.
11887 * target.h (target_ops): Describe ATTACH return values.
11888
bf914831
PA
118892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11890
11891 * win32-low.c (GETPROCADDRESS): Define.
11892 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11893 (winapi_DebugSetProcessKillOnExit): Likewise.
11894 (win32_create_inferior): Force usage of ansi CreateProcessA.
11895 (win32_attach): Use GETPROCADDRESS.
11896 (win32_detach): Likewise.
11897
f72f3e60
PA
118982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11899
11900 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11901
ed50f18f
PA
119022007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11903
11904 * win32-low.c: Commit leftover changes from 2007-03-29.
11905
0c2ead7e
DJ
119062007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11907
11908 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11909 fields short instead of int. Add explicit padding.
11910 (i387_cache_to_fsave): Remove unnecessary casts.
11911 (i387_fsave_to_cache): Doc fix.
11912 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11913
73725ff3
DJ
119142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11915
11916 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11917 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11918
d99f33d8
PA
119192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11920
11921 * configure.srv (arm*-*-mingw32ce*): Move near the other
11922 arm targets.
11923
68070c10
PA
119242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11925
2482afc6 11926 * configure.ac: Add errno checking.
68070c10
PA
11927 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11928 sys/file.h and malloc.h.
11929 (AC_CHECK_DECLS): Add perror.
11930 (srv_mingwce): Handle.
2482afc6 11931 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11932 win32-i386-low.o to srv_tgtobj.
11933 (i[34567]86-*-mingw*): Likewise.
11934 (arm*-*-mingw32ce*): Add case.
11935 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11936 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11937 [__MINGW32CE__] (strerror): New function.
11938 [__MINGW32CE__] (errno): Define to GetLastError.
11939 [__MINGW32CE__] (COUNTOF): New macro.
11940 (remote_open): Remove extra close call.
11941 * mem-break.c (delete_breakpoint_at): New function.
11942 * mem-break.h (delete_breakpoint_at): Declare.
11943 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11944 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11945 [USE_WIN32API] (read, write): Add char* casts.
11946 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11947 * server.h: Include wincecompat.h on Windows CE.
11948 [HAVE_ERRNO_H]: Check.
11949 (perror): Declare if not declared.
11950 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11951 (perror_with_name): Remove errno declaration.
11952 * wincecompat.h: New.
11953 * wincecompat.c: New.
11954 * win32-low.h: New.
11955 * win32-arm-low.c: New.
11956 * win32-i386-low.c: New.
11957 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11958 (OUTMSG2): Make it safe.
11959 (_T): New macro.
11960 (COUNTOF): New macro.
11961 (NUM_REGS): Get it from the low target.
11962 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11963 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11964 (thread_rec): Let low target handle debug registers.
11965 (child_add_thread): Likewise.
11966 (child_init_thread_list): Likewise.
11967 (continue_one_thread): Likewise.
11968 (regptr): New.
11969 (do_child_fetch_inferior_registers): Move to ...
11970 * win32-i386-low.c: ... here, and rename to ...
11971 (do_fetch_inferior_registers): ... this.
889bf7c5 11972 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11973 Go through the low target.
11974 (do_child_store_inferior_registers): Use regptr.
11975 (strwinerror): New function.
11976 (win32_create_inferior): Handle Windows CE.
11977 Use strwinerror instead of strerror on Windows error
11978 codes. Add program to the error output.
11979 Don't close the main thread handle on Windows CE.
11980 (win32_attach): Use coredll.dll on Windows CE.
11981 (win32_kill): Close current process and current
11982 thread handles.
11983 (win32_detach): Use coredll.dll on Windows CE.
11984 (win32_resume): Let low target handle debug registers, and
11985 step request.
11986 (handle_exception): Add/Remove initial breakpoint. Avoid
11987 non-existant WSTOPSIG on Windows CE.
11988 (win32_read_inferior_memory): Cast to remove warning.
11989 (win32_arch_string): Go through the low target.
11990 (initialize_low): Call set_breakpoint_data with the low
11991 target's breakpoint.
11992 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11993 FOP_REGNUM, mappings): Move to ...
11994 * win32-i386-low.c: ... here.
11995 * win32-low.c (win32_thread_info): Move to ...
11996 * win32-low.h: ... here.
11997 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11998 win32-arm-low.c and wincecompat.c.
11999 (all:): Add $EXEEXT.
12000 (install-only:): Likewise.
12001 (gdbserver:): Likewise.
12002 (gdbreplay:): Likewise.
12003 * config.in: Regenerate.
12004 * configure: Regenerate.
12005
41093d81
PA
120062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12007
12008 * win32-low.c: Rename typedef thread_info to
12009 win32_thread_info throughout.
12010
544afa54
PA
120112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12012
12013 * win32-i386-low.c: Rename to ...
12014 * win32-low.c: ... this.
12015 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12016 * Makefile.in: Likewise.
12017
bce7165d
PA
120182007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12019
12020 * remote-utils.c (monitor_output): Constify msg parameter.
12021 * server.h (monitor_output): Likewise.
12022 * win32-i386-low.c (handle_output_debug_string): New.
12023 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12024 handle_output_debug_string.
12025 (get_child_debug_event): Likewise.
12026
506c7aa0
DJ
120272007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12028
12029 * server.c (main): Correct strtoul check.
12030
42c81e2a
DJ
120312007-03-27 Jon Ringle <jon@ringle.org>
12032
12033 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12034
9453113a
DJ
120352007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12036
12037 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12038
64a69107
DJ
120392007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12040
12041 * terminal.h: Check HAVE_SGTTY_H.
12042
120432007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12044
12045 * remote-utils.c (remote_open): Print out the assigned port number.
12046
c74d0ad8
DJ
120472007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * remote-utils.c (monitor_output): New function.
12050 * server.c (debug_threads): Define here.
12051 (monitor_show_help): New function.
12052 (handle_query): Handle qRcmd.
12053 (main): Do not handle 'd' packet.
12054 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12055 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12056 of debug_threads.
12057
de7c3b4a
PA
120582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12059
12060 * Makefile.in (EXEEXT): New.
12061 (clean): Use $(EXEEXT).
12062
ef57601b
PA
120632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12064
12065 * target.h (target_ops): Rename send_signal to request_interrupt,
12066 and remove enum target_signal parameter.
12067 * linux-low.c (linux_request_interrupt): Rename from
12068 linux_send_signal, and always send SIGINT.
12069 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12070 and always send SIGINT.
12071 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12072 of send_signal.
12073 (input_interrupt): Likewise.
12074
820f2bda
PA
120752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12076
12077 * server.c (get_features_xml): Check if target implemented
12078 arch_string.
12079 * win32-i386-low.c (win32_arch_string): New.
12080 (win32_target_ops): Add win32_arch_string as arch_string member.
12081
ab39bf24
UW
120822007-02-22 Markus Deuling <deuling@de.ibm.com>
12083
12084 * spu-low.c (spu_arch_string): New.
12085 (spu_target_ops): Add spu_arch_string.
12086
61ff6e04
DJ
120872007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12088
12089 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12090 * configure.ac: Do not check for terminal.h.
12091 * configure, config.in: Regenerated.
12092
fb1e4ffc
DJ
120932007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12094
12095 * Makefile.in (OBS): Add $(XML_BUILTIN).
12096 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12097 (clean): Update.
12098 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12099 (arm-with-iwmmxt.c): New.
12100 * config.in, configure: Regenerate.
12101 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12102 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12103 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12104 (arm*-*-linux*): Add iWMMXt and regset support.
12105 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12106 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12107 (arm_store_wmmxregset, target_regsets): New.
12108 * server.c (get_features_xml): Take annex argument. Check builtin
12109 XML documents.
12110 (handle_query): Handle multiple annexes.
12111
0f48aa01
DJ
121122007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12113
12114 * remote-utils.c [USE_WIN32API] (read, write): Define.
12115 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12116 write.
12117
23181151
DJ
121182007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12119
12120 * linux-i386-low.c (the_low_target): Set arch_string.
12121 * linux-x86-64-low.c (the_low_target): Likewise.
12122 * linux-low.c (linux_arch_string): New.
12123 (linux_target_ops): Add it.
12124 * linux-low.h (struct linux_target_ops): Add arch_string.
12125 * server.c (write_qxfer_response): Use const void * for DATA.
12126 (get_features_xml): New.
12127 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12128 * target.h (struct target_ops): Add arch_string method.
12129
9d606399
DJ
121302007-01-03 Denis Pilat <denis.pilat@st.com>
12131 Daniel Jacobowitz <dan@codesourcery.com>
12132
12133 * linux-low.c (linux_kill): Handle being called with no threads.
12134 * win32-i386-low.c (win32_kill): Likewise.
12135 (get_child_debug_event): Clear current_process_handle.
12136
121372006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12138 Daniel Jacobowitz <dan@codesourcery.com>
12139
12140 * remote-utils.c (remote_open): Check the type of specified
12141 serial port devices before opening them.
12142 * server.c (main): Kill the inferior if an error occurs during
12143 the first remote_open.
12144
a5e13d24
DJ
121452006-12-05 Markus Deuling <deuling@de.ibm.com>
12146
12147 * README: Update supported targets.
12148
186947f7
DJ
121492006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12150
12151 * Makefile.in (clean): Remove reg-mips64.c.
12152 (reg-mips64.c, reg-mips64.o): New rules.
12153 * configure.srv: Handle mips64. Include regset support for mips.
12154 * linux-mips-low.c (union mips_register): New.
12155 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12156 (mips_breakpoint, mips_breakpoint_at): Use int.
12157 (mips_collect_register, mips_supply_register)
12158 (mips_collect_register_32bit, mips_supply_register_32bit)
12159 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12160 (mips_store_fpregset, target_regsets): New.
12161 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12162
a13e2c95
UW
121632006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12164
12165 * configure.srv: Add target "spu*-*-*".
12166 * Makefile.in (clean): Remove reg-spu.c.
12167 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12168 * spu-low.c: New file.
12169
cb7283db
DJ
121702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * configure.ac: Correct td_thr_tls_get_addr test.
12173 * configure: Regenerated.
12174
89be2091
DJ
121752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12176
12177 * linux-low.c (linux_wait_for_event): Reformat. Use the
12178 pass_signals array.
12179 * remote-utils.c (decode_address_to_semicolon): New.
12180 * server.c (pass_signals, handle_general_set): New.
12181 (handle_query): Mention QPassSignals for qSupported.
12182 (main): Call handle_general_set.
12183 * server.h (pass_signals, decode_address_to_semicolon): New.
12184
000ef4f0
DJ
121852006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12186
12187 * server.c (handle_query): Correct error handling for read_auxv.
12188
b7149293
UW
121892005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12190
12191 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12192 and srv_linux_thread_db to yes.
12193 * linux-s390-low.c (s390_fill_gregset): New function.
12194 (target_regsets): Define data structure.
12195
dae5f5cf
DJ
121962006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12197
12198 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12199 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12200 * config.in, configure: Regenerated.
12201 * inferiors.c (gdb_id_to_thread): New function.
12202 (gdb_id_to_thread_id): Use it.
12203 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12204 * linux-low.h (struct process_info): Add th member.
12205 (thread_db_get_tls_address): New prototype.
12206 * remote-utils.c (decode_address): Make non-static.
12207 * server.c (handle_query): Handle qGetTLSAddr.
12208 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12209 * target.h (struct target_ops): Add get_tls_address.
12210 * thread-db.c (maybe_attach_thread): Save the thread handle.
12211 (thread_db_get_tls_address): New.
12212
32ca6d61
DJ
122132006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12214
12215 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12216 (linux_resume_one_process): Take a siginfo_t *. Update all
12217 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12218 (struct pending_signals): Add a siginfo_t.
12219 (linux_wait_for_process): Always set last_status.
12220 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12221 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12222 * linux-low.h (struct process_info): Add last_status.
12223
5ffff7c1
DJ
122242006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * remote-utils.c (try_rle): New function.
12227 (putpkt_binary): Use it.
12228
8695c747
DJ
122292006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12230
12231 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12232 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12233 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12234 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12235 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12236 point registers.
12237
290fadea
RS
122382006-08-08 Richard Sandiford <richard@codesourcery.com>
12239
12240 * server.c (terminal_fd): New variable.
12241 (old_foreground_pgrp): Likewise.
12242 (restore_old_foreground_pgrp): New function.
12243 (start_inferior): Record the terminal file descriptor in terminal_fd
12244 and its original foreground group in old_foreground_pgrp. Register
12245 restore_old_foreground_pgrp with atexit().
12246
9f2e1e63
DJ
122472006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12248
12249 * server.c (handle_query): Correct qPart to qXfer.
12250
b80864fb
DJ
122512006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12252
12253 * configure.ac: Check for more headers which are missing on
12254 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12255 * configure.srv: Add Cygwin and mingw32.
12256 * remote-utils.c: Don't include headers unconditionally which
12257 are missing on mingw32. Include <winsock.h> for mingw32.
12258 (remote_open): Adjust for mingw32 support. Flush
12259 standard error after writing to it.
12260 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12261 (unblock_async_io, enable_async_io, disable_async_io)
12262 (readchar, getpkt): Update for Winsock support.
12263 (prepare_resume_reply): Expect a protocol signal number.
12264 * server.c: Disable <sys/wait.h> on mingw32.
12265 (start_inferior): Adjust for mingw32 support. Flush
12266 standard error after writing to it.
12267 (attach_inferior): Likewise. Use protocol signal
12268 numbers.
12269 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12270 and names.
12271 * win32-i386-low.c: New file.
12272 * Makefile.in (XM_CLIBS): Set.
12273 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12274 (win32-i386-low.o): New dependency rule.
12275 * linux-low.c (linux_wait): Use target signal numbers.
12276 * target.h (struct target_ops): Doc fix.
12277 * server.h (target_signal_to_name): New prototype.
12278 * gdbreplay.c: Don't include headers unconditionally which
12279 are missing on mingw32. Include <winsock.h> for mingw32.
12280 (remote_close, remote_open): Adjust for Winsock support.
12281 * configure, config.in: Regenerated.
12282
0876f84a
DJ
122832006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12284
12285 * server.c (decode_xfer_read, write_qxfer_response): New.
12286 (handle_query): Take a packet length argument. Handle
12287 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12288 the qSupported response.
12289 (main): Update call to handle_query.
12290
01f9e8fa
DJ
122912006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12292
12293 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12294 (putpkt_binary): Renamed from putpkt and adjusted for binary
12295 data.
12296 (putpkt): New wrapper for putpkt_binary.
12297 (readchar): Don't mask off the high bit.
12298 (decode_X_packet): New function.
12299 * server.c (main): Call putpkt_binary if a handler sets the packet
12300 length. Save the length of the incoming packet. Handle 'X'.
12301 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12302
be2a5f71
DJ
123032006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12304
12305 * server.c (handle_query): Handle qSupported.
12306
ea025f5f
DJ
123072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12308
12309 * remote-utils.c (all_symbols_looked_up): New variable.
12310 (look_up_one_symbol): Check it.
12311 * server.h (look_up_one_symbol): New declaration.
12312 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12313
9308fc88
DJ
123142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12315
12316 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12317 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12318 (PTRACE_GET_THREAD_AREA): Define.
12319 (ps_get_thread_area): New function.
12320
52fb6437
NS
123212006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12322
12323 * configure.srv (m68k*-*-uclinux*): New target.
12324 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12325 (linux_resume_one_process): Remove extraneous cast.
12326 (linux_read_offsets): New.
12327 (linux_target_op): Add linux_read_offsets on mmuless systems.
12328 * server.c (handle_query): Add qOffsets logic.
12329 * target.h (struct target_ops): Add read_offsets.
12330
21b0f40c
DJ
123312006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12332
12333 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12334 (PTRACE_GET_THREAD_AREA): Define.
12335 (ps_get_thread_area): New function.
12336 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12337 (linux-x86-64-low.o): Update.
12338
0050a760
DJ
123392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12340
12341 * configure.ac: Remove checks for prfpregset_t.
12342 * gdb_proc_service.h: New file.
12343 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12344 new "gdb_proc_service.h".
12345 * proc-service.c: Likewise.
12346 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12347 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12348 * Makefile.in (gdb_proc_service_h): Updated.
12349 * configure, config.in: Regenerated.
12350
b92a518e
DJ
123512006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12352
12353 * remote-utils.c (prepare_resume_reply): Move declaration
12354 of gdb_id_from_wait to the top of the block.
12355
545587ee
DJ
123562006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12357
12358 * linux-low.c (regsets_store_inferior_registers): Read the regset
12359 from the target before filling it.
12360
9db87ebd
DJ
123612006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12362
12363 * server.c (attach_inferior): Return SIGTRAP for a successful
12364 attach.
12365
dd24457d
DJ
123662006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12367
12368 * Makefile.in (OBS): Add version.o.
12369 (STAGESTUFF): Delete.
12370 (version.o): Add dependencies.
12371 (version.c): Replace rule.
12372 (clean): Remove version.c.
12373 * server.c (gdbserver_version): New.
12374 (gdbserver_usage): Use printf.
12375 (main): Handle --version and --help.
12376 * server.h (version, host_name): Add declarations.
12377
6f0f660e
EZ
123782005-12-23 Eli Zaretskii <eliz@gnu.org>
12379
889bf7c5
PA
12380 * linux-arm-low.c:
12381 * linux-arm-low.c:
12382 * inferiors.c:
12383 * i387-fp.h:
12384 * i387-fp.c:
12385 * gdbreplay.c:
12386 * regcache.c:
12387 * proc-service.c:
12388 * mem-break.h:
12389 * mem-break.c:
12390 * linux-x86-64-low.c:
12391 * linux-sh-low.c:
12392 * linux-s390-low.c:
12393 * linux-ppc64-low.c:
12394 * linux-ppc-low.c:
12395 * linux-mips-low.c:
12396 * linux-m68k-low.c:
12397 * linux-m32r-low.c:
12398 * linux-low.h:
12399 * linux-low.c:
12400 * linux-ia64-low.c:
12401 * linux-i386-low.c:
12402 * linux-crisv32-low.c:
12403 * thread-db.c:
12404 * terminal.h:
12405 * target.h:
12406 * target.c:
12407 * server.h:
12408 * server.c:
12409 * remote-utils.c:
12410 * regcache.h:
12411 * utils.c:
12412 * Makefile.in:
12413 * configure.ac:
6f0f660e
EZ
12414 * gdbserver.1: Add (C) after Copyright. Update the FSF
12415 address.
12416
9d1fb177
DJ
124172005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12418
12419 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12420 (arm_breakpoint_at): Recognize both breakpoints.
12421 (the_low_target): Use the correct breakpoint instruction.
12422
011a70c2
DJ
124232005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12424
12425 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12426 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12427 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12428 (the_low_target): Update.
12429
7fb85e41
AS
124302005-10-25 Andreas Schwab <schwab@suse.de>
12431
12432 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12433
12434 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12435 (ia64_num_regs): Reduce to 462.
12436
3db0444b
DJ
124372005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * acinclude.m4: Correct quoting.
12440 * aclocal.m4: Regenerated.
12441
12442 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12443 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12444 (thread_db_init): Call thread_db_err_str.
12445 * configure.ac: Check for TD_VERSION.
12446 * config.in, configure: Regenerated.
12447
bee0189a
DJ
124482005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12449
12450 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12451
e9d25b98
DJ
124522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12453
12454 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12455 is not available. Define HAVE_PTRACE_GETREGS if it is.
12456 * config.in, configure: Regenerated.
12457 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12458 * linux-i386-low.c, linux-m68k-low.c: Update to use
12459 HAVE_PTRACE_GETREGS.
12460 * linux-low.c (regsets_fetch_inferior_registers)
12461 (regsets_store_inferior_registers): Only return 0 if we processed
12462 GENERAL_REGS.
12463 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12464 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12465
a06660f7
DJ
124662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * inferiors.c (struct thread_info): Add gdb_id.
12469 (add_thread): Add gdb_id argument.
12470 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12471 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12472 calls to add_thread.
12473 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12474 * server.c (handle_query): Use thread_to_gdb_id.
12475 (handle_v_cont, main): Use gdb_id_to_thread_id.
12476 * server.h (add_thread): Update prototype.
12477 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12478 prototypes.
12479
5a1f5858
DJ
124802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12481
12482 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12483 left-padded registers.
12484 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12485 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12486
e122f1f5
SE
124872005-07-01 Steve Ellcey <sje@cup.hp.com>
12488
12489 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12490 * configure: Regenerate.
12491 * config.in: Regenerate.
12492 * server.h (NEED_DECLARATION_STRERROR):
12493 Replace with !HAVE_DECL_STRERROR.
12494
d592fa2f
DJ
124952005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12496
12497 * linux-low.c (linux_wait, linux_send_signal): Don't test
12498 an unsigned long variable for > 0 if it could be MAX_ULONG.
12499 * server.c (myresume): Likewise.
12500 * target.c (set_desired_inferior): Likewise.
12501
ccbd4912
MK
125022005-06-13 Mark Kettenis <kettenis@gnu.org>
12503
12504 * configure.ac: Simplify and improve check for socklen_t.
12505 * configure, config.in: Regenerate.
12506
f450004a
DJ
125072005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12508
12509 * acconfig.h: Remove.
12510 * configure.ac: Add a test for socklen_t. Use three-argument
12511 AC_DEFINE throughout.
12512 * config.in: Regenerated using autoheader 2.59.
12513 * configure: Regenerated.
12514
12515 * gdbreplay.c (socklen_t): Provide a default.
12516 (remote_open): Use socklen_t.
12517 * remote-utils.c (socklen_t): Provide a default.
12518 (remote_open): Use socklen_t.
12519 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12520 unsigned char.
12521
12522 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12523 char for buffers.
12524 * linux-low.c (linux_read_memory, linux_write_memory)
12525 (linux_read_auxv): Likewise.
12526 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12527 (check_mem_write): Likewise.
12528 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12529 Likewise.
12530 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12531 (registers_from_string, register_data): Likewise.
12532 * server.c (handle_query, main): Likewise.
12533 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12534 (decode_M_packet): Likewise.
12535 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12536 * target.h (struct target_ops): Update read_memory, write_memory,
12537 and read_auxv.
12538 (read_inferior_memory, write_inferior_memory): Update.
12539 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12540 to unsigned char *.
12541 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12542 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12543 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12544 linux-s390-low.c, linux-sh-low.c: Update for changes in
12545 read_inferior_memory and the_low_target->breakpoint.
12546
eee84df1
DJ
125472005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12548
12549 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12550 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12551 * configure.srv: Add powerpc64-*-linux*.
12552 * linux-ppc64-low.c: New file.
12553
45b134e5
OF
125542005-05-23 Orjan Friberg <orjanf@axis.com>
12555
12556 * linux-cris-low.c: New file with support for CRIS.
12557 * linux-crisv32-low.c: Ditto for CRISv32.
12558 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12559 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12560 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12561 reg-crisv32.o, and reg-crisv32.c to make rules.
12562 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12563 recognized targets.
12564
48d93c75
UW
125652005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12566
12567 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12568 of sizeof (PTRACE_XFER_TYPE).
12569 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12570
e013ee27
OF
125712005-05-12 Orjan Friberg <orjanf@axis.com>
12572
889bf7c5 12573 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12574 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12575 pointers for hardware watchpoint support.
12576 * linux-low.h (struct linux_target_ops): Ditto.
12577 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12578 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12579 to linux_target_ops.
12580 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12581 reply packet.
12582 * server.c (main): Recognize 'Z' and 'z' packets.
12583
b0ded00b
UW
125842005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12585
12586 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12587 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12588 (the_low_target): Add new members.
12589
8643e2ad
DJ
125902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12591
12592 * proc-service.c (ps_lgetregs): Search all_processes instead of
12593 all_threads.
12594
fc620387
DJ
125952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12596
12597 * server.c (start_inferior): Change return type to int.
12598 (attach_inferior): Change sigptr to int *.
12599 (handle_v_cont, handle_v_requests): Change signal to int *.
12600 (main): Change signal to int.
12601
126022005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12603
12604 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12605 * configure.srv: Add m32r*-*-linux*.
12606 * linux-m32r-low.c: New file.
12607
e0e76420
DJ
126082005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12609
12610 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12611
a1928bad
DJ
126122005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12613
12614 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12615 Take unsigned long arguments for PIDs.
12616 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12617 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12618 (wait_for_sigstop, linux_resume_one_process)
12619 (regsets_fetch_inferior_registers, linux_send_signal)
12620 (linux_read_auxv): Likewise. Update the types of variables holding
12621 PIDs. Update format string specifiers.
12622 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12623 * remote-utils.c (prepare_resume_reply): Likewise.
12624 * server.c (cont_thread, general_thread, step_thread)
12625 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12626 unsigned long.
12627 (handle_query): Update format specifiers.
12628 (handle_v_cont, main): Use strtoul for thread IDs.
12629 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12630 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12631 (general_thread, step_thread, thread_from_wait)
12632 (old_thread_from_wait): Update.
12633 * target.h (struct thread_resume): Use unsigned long for THREAD.
12634 (struct target_ops): Use unsigned long for arguments to attach and
12635 thread_alive.
12636
dcdb98d2
DJ
126372005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12638
12639 * acinclude.m4: Include bfd/bfd.m4 directly.
12640 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12641 <agriffis@toolchain.org>.
12642 * aclocal.m4, configure: Regenerated.
12643
bec39cab
AC
126442005-01-07 Andrew Cagney <cagney@gnu.org>
12645
12646 * configure.ac: Rename configure.in, require autoconf 2.59.
12647 * configure: Re-generate.
12648
434c4c77
DJ
126492004-12-08 Daniel Jacobowitz <dan@debian.org>
12650
12651 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12652 LIBS when finished.
12653 * aclocal.m4: Regenerated.
12654 * configure: Regenerated.
12655
db1d3e1b
AS
126562004-11-21 Andreas Schwab <schwab@suse.de>
12657
12658 * linux-m68k-low.c (m68k_num_gregs): Define.
12659 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12660 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12661 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12662 (m68k_breakpoint_at): New. Add to the_low_target.
12663
12664 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12665 srv_linux_thread_db to yes.
12666
43360365
JB
126672004-10-20 Joel Brobecker <brobecker@gnat.com>
12668
12669 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12670 (ARCH_SET_FS): Likewise.
12671 (ARCH_GET_FS): Likewise.
12672 (ARCH_GET_GS): Likewise.
12673
fd500816
DJ
126742004-10-16 Daniel Jacobowitz <dan@debian.org>
12675
12676 * linux-i386-low.c (ps_get_thread_area): New.
12677 * linux-x86-64-low.c (ps_get_thread_area): New.
12678 * linux-low.c: Include <sys/syscall.h>.
12679 (linux_kill_one_process): Don't kill the first thread here.
12680 (linux_kill): Kill the first thread here.
12681 (kill_lwp): New function.
12682 (send_sigstop, linux_send_signal): Use it.
12683 * proc-service.c: Clean up #ifdefs.
12684 (fpregset_info): Delete.
12685 (ps_lgetregs): Update and enable implementation.
12686 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12687 implementations.
12688 * remote-utils.c (struct sym_cache, symbol_cache): New.
12689 (input_interrupt): Print a clearer message.
12690 (async_io_enabled): New variable.
12691 (enable_async_io, disable_async_io): Use it. Update comments.
12692 (look_up_one_symbol): Use the symbol cache.
12693 * thread-db.c (thread_db_look_up_symbols): New function.
12694 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12695
f6de3c42
DJ
126962004-10-16 Daniel Jacobowitz <dan@debian.org>
12697
12698 * configure.in: Test for -rdynamic.
12699 * configure: Regenerated.
12700 * Makefile (INTERNAL_LDFLAGS): New.
12701 (gdbserver, gdbreplay): Use it.
12702
2c0fc042
AC
127032004-09-02 Andrew Cagney <cagney@gnu.org>
12704
12705 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12706
075b3282
DJ
127072004-03-23 Daniel Jacobowitz <drow@mvista.com>
12708
12709 * linux-low.c (linux_wait): Clear all_processes list also.
12710
fa6a77dc
DJ
127112004-03-12 Daniel Jacobowitz <drow@mvista.com>
12712
12713 * linux-low.c: Include <errno.h>. Remove extern declaration of
12714 errno.
12715
6d782a97
DJ
127162004-03-12 Daniel Jacobowitz <drow@mvista.com>
12717
12718 * gdbreplay.c, server.h, utils.c: Update copyright years.
12719
3a7fb99b
DJ
127202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12721
12722 * server.c (main): Print child status or termination signal from
12723 variable 'signal', not 'sig'.
12724
c3e735a6
DJ
127252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12726
12727 * linux-low.c (linux_read_memory): Change return type to
12728 int. Check for and return error from ptrace().
12729 * target.c (read_inferior_memory): Change return type to int. Pass
12730 back return status from the_target->read_memory().
12731 * target.h (struct target_ops): Adapt *read_memory() prototype.
12732 Update comment.
12733 (read_inferior_memory): Adapt prototype.
12734 * server.c (main): Return an error packet if
12735 read_inferior_memory() returns an error.
12736
a59d1c82
DJ
127372004-03-04 Daniel Jacobowitz <drow@mvista.com>
12738
12739 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12740 Unify with other clean targets.
12741
dc3f8883
DJ
127422004-02-29 Daniel Jacobowitz <drow@mvista.com>
12743
12744 * server.c (handle_v_cont): Call set_desired_inferior.
12745
89a208da
DJ
127462004-02-29 Daniel Jacobowitz <drow@mvista.com>
12747
12748 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12749
62ea82f5
DJ
127502004-02-29 Daniel Jacobowitz <drow@mvista.com>
12751
12752 * linux-low.c (linux_wait): Unblock async I/O.
12753 (linux_resume): Block and enable async I/O.
12754 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12755 * server.h (block_async_io, unblock_async_io): Add prototypes.
12756
6910d122
DJ
127572004-02-29 Daniel Jacobowitz <drow@mvista.com>
12758
12759 * remote-utils.c (remote_open): Print a status notice after
12760 opening a TCP port.
12761 * server.c (attach_inferior): Print a status notice after
12762 attaching.
12763
127642004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12765
12766 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12767
c89dc5d4
DJ
127682004-02-26 Daniel Jacobowitz <drow@mvista.com>
12769
12770 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12771 error packet.
12772 * server.c, target.h: Update copyright years.
12773
4b8dad4a
RM
127742004-02-25 Roland McGrath <roland@redhat.com>
12775
12776 * target.h (struct target_ops): New member `read_auxv'.
12777 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12778 * linux-low.c (linux_read_auxv): New function.
12779 (linux_target_ops): Initialize `read_auxv' member to that.
12780
d7446758
JB
127812004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12782
12783 Committed by Jim Blandy <jimb@redhat.com>.
12784
12785 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12786 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12787 instead of GPR_SIZE to distiguish s390 and s390x targets.
12788
5544ad89
DJ
127892004-01-31 Daniel Jacobowitz <drow@mvista.com>
12790
12791 * linux-low.c: Update copyright year.
12792 (check_removed_breakpoint): Clear pending_is_breakpoint.
12793 (linux_set_resume_request, linux_queue_one_thread)
12794 (resume_status_pending_p): New functions.
12795 (linux_continue_one_thread): Use process->resume.
12796 (linux_resume): Only resume threads if there are no pending events.
12797 * linux-low.h (struct process_info): Add resume request
12798 pointer.
12799
2a68b70e
DJ
128002004-01-30 Daniel Jacobowitz <drow@mvista.com>
12801
12802 * regcache.c (new_register_cache): Clear the allocated register
12803 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12804
64386c31
DJ
128052003-10-13 Daniel Jacobowitz <drow@mvista.com>
12806
12807 * linux-low.c (linux_resume): Take a struct thread_resume *
12808 argument.
12809 (linux_wait): Update call.
12810 (resume_ptr): New static variable.
12811 (linux_continue_one_thread): Renamed from
12812 linux_continue_one_process. Use resume_ptr.
12813 (linux_resume): Use linux_continue_one_thread.
12814 * server.c (handle_v_cont, handle_v_requests): New functions.
12815 (myresume): New function.
12816 (main): Handle 'v' case.
12817 * target.h (struct thread_resume): New type.
12818 (struct target_ops): Change argument of "resume" to struct
12819 thread_resume *.
12820 (myresume): Delete macro.
12821
c938e9b0
L
128222003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12823
12824 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12825 (uninstall): Support DESTDIR.
12826
7f313d07
BC
12827Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12828
12829 * configure.srv: Add xscale*linux copy of arm*linux entry.
12830
3b2fc2ea
DJ
128312003-07-24 Daniel Jacobowitz <drow@mvista.com>
12832
12833 * linux-arm-low.c (arm_reinsert_addr): New function.
12834 (the_low_target): Add arm_reinsert_addr.
12835
1c0a559e
MK
128362003-07-08 Mark Kettenis <kettenis@gnu.org>
12837
12838 * mem-break.c: Remove whitespace at end of file.
12839
43d5792c
DJ
128402003-06-28 Daniel Jacobowitz <drow@mvista.com>
12841
12842 * configure.in: Check whether we need to prototype strerror.
12843 * server.h: Optionally prototype strerror.
12844 * gdbreplay.c (perror_with_name): Use strerror.
12845 * linux-low.c (linux_attach_lwp): Use strerror.
12846 * utils.c (perror_with_name): Use strerror.
12847 * config.in, configure: Regenerated.
12848
c8a86edf
DJ
128492003-06-28 Daniel Jacobowitz <drow@mvista.com>
12850
12851 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12852 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12853
73d37363
DJ
128542003-06-20 Daniel Jacobowitz <drow@mvista.com>
12855
12856 * Makefile.in (SFILES): Update.
12857 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12858 low-sun3.c: Remove files.
12859
6ad8ae5c
DJ
128602003-06-17 Daniel Jacobowitz <drow@mvista.com>
12861
12862 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12863 (linux_detach_one_process, linux_detach): New functions.
12864 (linux_target_ops): Add linux_detach.
12865 * server.c (main): Handle 'D' packet.
12866 * target.h (struct target_ops): Add "detach" member.
12867 (detach_inferior): Define.
12868
1581182a
MK
128692003-06-13 Mark Kettenis <kettenis@gnu.org>
12870
12871 From Kelley Cook <kelleycook@wideopenwest.com>:
12872 * configure.srv: Accept i[34567]86 variants.
12873
e5379b03
DJ
128742003-06-05 Daniel Jacobowitz <drow@mvista.com>
12875
12876 * linux-low.c (linux_wait_for_event): Correct comment typos.
12877 (linux_resume_one_process): Call check_removed_breakpoint.
12878 (linux_send_signal): New function.
12879 (linux_target_ops): Add linux_send_signal.
12880 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12881 of kill.
12882 * target.h (struct target_ops): Add send_signal.
12883
2ff29de4
JB
128842003-05-29 Jim Blandy <jimb@redhat.com>
12885
12886 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12887 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12888 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12889 away part of the register's value.
12890
254787d4
DJ
128912003-03-26 Daniel Jacobowitz <drow@mvista.com>
12892
12893 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12894 (linux_wait_for_event, linux_init_signals): Likewise.
12895
94e10508
DJ
128962003-03-17 Daniel Jacobowitz <drow@mvista.com>
12897
12898 * configure.in: Check for stdlib.h.
12899 * configure: Regenerated.
12900 * config.in: Regenerated.
12901
4c0711e0
DJ
129022003-01-04 Andreas Schwab <schwab@suse.de>
12903
12904 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12905
ef66e766
AC
129062003-01-02 Andrew Cagney <ac131313@redhat.com>
12907
12908 * Makefile.in: Remove obsolete code.
12909
a1358604
DJ
129102002-11-20 Daniel Jacobowitz <drow@mvista.com>
12911
12912 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12913 defined(PT_FPR0_HI).
12914
23ce3b1c
DJ
129152002-11-17 Stuart Hughes <seh@zee2.com>
12916
12917 * linux-arm-low.c (arm_num_regs): Increase.
12918 (arm_regmap): Include status register.
12919
129202002-11-17 Daniel Jacobowitz <drow@mvista.com>
12921
12922 * linux-low.c (register_addr): Remove incorrect -1 check.
12923
a9fa9f7d
DJ
129242002-08-29 Daniel Jacobowitz <drow@mvista.com>
12925
12926 * linux-low.c (linux_create_inferior): Call setpgid. Return
12927 the new PID.
12928 (unstopped_p, linux_signal_pid): Remove.
12929 (linux_target_ops): Remove linux_signal_pid.
12930 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12931 global instead of target method.
12932 * target.h (struct target_ops): Remove signal_pid. Update comment
12933 for create_inferior.
12934 * server.c (signal_pid): New variable.
12935 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12936 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12937 (attach_inferior): Set signal_pid.
12938
17574093
DJ
129392002-08-23 Daniel Jacobowitz <drow@mvista.com>
12940
12941 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12942
129432002-08-20 Jim Blandy <jimb@redhat.com>
12944
12945 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12946 default for this.
12947
129482002-08-01 Andrew Cagney <cagney@redhat.com>
12949
12950 * Makefile.in: Make chill references obsolete.
12951
129522002-07-24 Kevin Buettner <kevinb@redhat.com>
12953
12954 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12955 * configure: Regenerate.
12956 * config.in: Regenerate.
12957
129582002-07-09 David O'Brien <obrien@FreeBSD.org>
12959
12960 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12961 (perror_with_name, remote_close, remote_open, expect, play): Static.
12962
129632002-07-04 Michal Ludvig <mludvig@suse.cz>
12964
4b8dad4a 12965 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12966 byte offsets instead of an array of indexes.
12967 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12968
129692002-06-13 Daniel Jacobowitz <drow@mvista.com>
12970
12971 * regcache.c: Add comment.
12972
129732002-06-11 Daniel Jacobowitz <drow@mvista.com>
12974
12975 * thread-db.c: New file.
12976 * proc-service.c: New file.
12977 * acinclude.m4: New file.
12978 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12979 proc-service.o, and thread-db.o.
12980 (linux-low.o): Add USE_THREAD_DB.
12981 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12982 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12983 * aclocal.m4: Regenerated.
12984 * config.in: Regenerated.
12985 * configure: Regenerated.
12986 * configure.in: Check for proc_service.h, sys/procfs.h,
12987 thread_db.h, and linux/elf.h headrs.
12988 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12989 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12990 Check for -lthread_db and thread support.
12991 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12992 PowerPC, and SuperH.
12993 * i387-fp.c: Constify arguments.
12994 * i387-fp.h: Likewise.
12995 * inferiors.c: (struct thread_info): Renamed from
12996 `struct inferior_info'. Remove PID member. Use generic inferior
12997 list header. All uses updated.
12998 (inferiors, signal_pid): Removed.
12999 (all_threads): New variable.
13000 (get_thread): Define.
13001 (add_inferior_to_list): New function.
13002 (for_each_inferior): New function.
13003 (change_inferior_id): New function.
13004 (add_inferior): Removed.
13005 (remove_inferior): New function.
13006 (add_thread): New function.
13007 (free_one_thread): New function.
13008 (remove_thread): New function.
13009 (clear_inferiors): Use for_each_inferior and free_one_thread.
13010 (find_inferior): New function.
13011 (find_inferior_id): New function.
13012 (inferior_target_data): Update argument type.
13013 (set_inferior_target_data): Likewise.
13014 (inferior_regcache_data): Likewise.
13015 (set_inferior_regcache_data): Likewise.
13016 * linux-low.c (linux_bp_reinsert): Remove.
13017 (all_processes, stopping_threads, using_thrads)
13018 (struct pending_signals, debug_threads, pid_of): New.
13019 (inferior_pid): Replace with macro.
13020 (struct inferior_linux_data): Remove.
13021 (get_stop_pc, add_process): New functions.
13022 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13023 Use add_process and add_thread.
13024 (linux_attach_lwp): New function, based on old linux_attach. Use
13025 add_process and add_thread. Set stop_expected for new threads.
13026 (linux_attach): New function.
13027 (linux_kill_one_process): New function.
13028 (linux_kill): Kill all LWPs.
13029 (linux_thread_alive): Use find_inferior_id.
13030 (check_removed_breakpoints, status_pending_p): New functions.
13031 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13032 Update. Use WNOHANG. Wait for cloned processes also. Update process
13033 struct for the found process.
13034 (linux_wait_for_event): New function.
13035 (linux_wait): Use it. Support LWPs.
13036 (send_sigstop, wait_for_sigstop, stop_all_processes)
13037 (linux_resume_one_process, linux_continue_one_process): New functions.
13038 (linux_resume): Support LWPs.
13039 (REGISTER_RAW_SIZE): Remove.
13040 (fetch_register): Use register_size instead. Call supply_register.
13041 (usr_store_inferior_registers): Likewise. Call collect_register.
13042 Fix recursive case.
13043 (regsets_fetch_inferior_registers): Improve error message.
13044 (regsets_store_inferior_registers): Add debugging.
13045 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13046 (unstopped_p, linux_signal_pid): New functions.
13047 (linux_target_ops): Add linux_signal_pid.
13048 (linux_init_signals): New function.
13049 (initialize_low): Call it. Initialize using_threads.
13050 * regcache.c (inferior_regcache_data): Add valid
13051 flag.
13052 (get_regcache): Fetch registers lazily. Add fetch argument
13053 and update all callers.
13054 (regcache_invalidate_one, regcache_invalidate): New
13055 functions.
13056 (new_register_cache): Renamed from create_register_cache.
13057 Return the new regcache.
13058 (free_register_cache): Change argument to a void *.
13059 (registers_to_string, registers_from_string): Call get_regcache
13060 with fetch flag set.
13061 (register_data): Make static. Pass fetch flag to get_regcache.
13062 (supply_register): Call get_regcache with fetch flag clear.
13063 (collect_register): Call get_regcache with fetch flag set.
13064 (collect_register_as_string): New function.
13065 * regcache.h: Update.
13066 * remote-utils.c (putpkt): Flush after debug output and use
13067 stderr.
13068 Handle input interrupts while waiting for an ACK.
13069 (input_interrupt): Use signal_pid method.
13070 (getpkt): Flush after debug output and use stderr.
13071 (outreg): Use collect_register_as_string.
13072 (new_thread_notify, dead_thread_notify): New functions.
13073 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13074 and general_thread.
13075 (look_up_one_symbol): Flush after debug output.
13076 * server.c (step_thread, server_waiting): New variables.
13077 (start_inferior): Don't use signal_pid. Update call to mywait.
13078 (attach_inferior): Update call to mywait.
13079 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13080 (main): Don't fetch/store registers explicitly. Use
13081 set_desired_inferior. Support proposed ``Hs'' packet. Update
13082 calls to mywait.
13083 * server.h: Update.
13084 (struct inferior_list, struct_inferior_list_entry): New.
13085 * target.c (set_desired_inferior): New.
13086 (write_inferior_memory): Constify.
13087 (mywait): New function.
13088 * target.h: Update.
13089 (struct target_ops): New signal_pid method.
13090 (mywait): Removed macro, added prototype.
13091
13092 * linux-low.h (regset_func): Removed.
13093 (regset_fill_func, regset_store_func): New.
13094 (enum regset_type): New.
13095 (struct regset_info): Add type field. Use new operation types.
13096 (struct linux_target_ops): stop_pc renamed to get_pc.
13097 Add decr_pc_after_break and breakpoint_at.
13098 (get_process, get_thread_proess, get_process_thread)
13099 (strut process_info, all_processes, linux_attach_lwp)
13100 (thread_db_init): New.
13101
13102 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13103 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13104 (the_low_target): Add new members.
13105 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13106 (i386_store_fpxregset): Constify.
13107 (target_regsets): Add new kind identifier.
13108 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13109 (i386_set_pc): Add debugging.
13110 (i386_breakpoint_at): New function.
13111 (the_low_target): Add new members.
13112 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13113 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13114 (mips_breakpoint_at): New.
13115 (the_low_target): Add new members.
13116 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13117 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13118 (the_low_target): Add new members.
13119 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13120 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13121 (the_low_target): Add new members.
13122 * linux-x86-64-low.c (target_regsets): Add new kind
13123 identifier.
13124
131252002-05-15 Daniel Jacobowitz <drow@mvista.com>
13126
13127 From Martin Pool <mbp@samba.org>:
13128 * server.c (gdbserver_usage): New function.
13129 (main): Call it.
13130
131312002-05-14 Daniel Jacobowitz <drow@mvista.com>
13132
13133 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13134 stop_at -> stop_pc.
13135
131362002-05-04 Andrew Cagney <ac131313@redhat.com>
13137
13138 * Makefile.in: Remove obsolete code.
13139
131402002-04-24 Michal Ludvig <mludvig@suse.cz>
13141
13142 * linux-low.c (regsets_fetch_inferior_registers),
13143 (regsets_store_inferior_registers): Removed cast to int from
13144 ptrace() calls.
13145 * regcache.h: Added declaration of struct inferior_info.
13146
131472002-04-20 Daniel Jacobowitz <drow@mvista.com>
13148
13149 * inferiors.c (struct inferior_info): Add regcache_data.
13150 (add_inferior): Call create_register_cache.
13151 (clear_inferiors): Call free_register_cache.
13152 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13153 * regcache.c (struct inferior_regcache_data): New.
13154 (registers): Remove.
13155 (get_regcache): New function.
13156 (create_register_cache, free_register_cache): New functions.
13157 (set_register_cache): Don't initialize the register cache here.
13158 (registers_to_string, registers_from_string, register_data): Call
13159 get_regcache.
13160 * regcache.h: Add prototypes.
13161 * server.h: Likewise.
13162
131632002-04-20 Daniel Jacobowitz <drow@mvista.com>
13164
13165 * mem-break.c: New file.
13166 * mem-break.h: New file.
13167 * Makefile.in: Add mem-break.o rule; update server.h
13168 dependencies.
13169 * inferiors.c (struct inferior_info): Add target_data
13170 member.
13171 (clear_inferiors): Free target_data member if set.
13172 (inferior_target_data, set_inferior_target_data): New functions.
13173 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13174 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13175 * linux-low.c (linux_bp_reinsert): New variable.
13176 (struct inferior_linux_data): New.
13177 (linux_create_inferior): Use set_inferior_target_data.
13178 (linux_attach): Likewise. Call add_inferior.
13179 (linux_wait_for_one_inferior): New function.
13180 (linux_wait): Call it.
13181 (linux_write_memory): Add const.
13182 (initialize_low): Call set_breakpoint_data.
13183 * linux-low.h (struct linux_target_ops): Add breakpoint
13184 handling members.
13185 * server.c (attach_inferior): Remove extra add_inferior
13186 call.
13187 * server.h: Include mem-break.h. Update inferior.c
13188 prototypes.
13189 * target.c (read_inferior_memory)
13190 (write_inferior_memory): New functions.
13191 * target.h (read_inferior_memory)
13192 (write_inferior_memory): Change macros to prototypes.
13193 (struct target_ops): Update comments. Add const to write_memory
13194 definition.
13195
131962002-04-11 Daniel Jacobowitz <drow@mvista.com>
13197
13198 * linux-low.c (usr_store_inferior_registers): Support
13199 registers which are allowed to fail to store.
13200 * linux-low.h (linux_target_ops): Likewise.
13201 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13202 (ppc_cannot_store_register): FPSCR may not be storable.
13203
132042002-04-09 Daniel Jacobowitz <drow@mvista.com>
13205
13206 * server.h: Include <string.h> if HAVE_STRING_H.
13207 * ChangeLog: Correct paths in last ChangeLog entry.
13208
132092002-04-09 Daniel Jacobowitz <drow@mvista.com>
13210
13211 * linux-low.h: Remove obsolete prototypes.
13212 (struct linux_target_ops): New.
13213 (extern the_low_target): New.
13214 * linux-low.c (num_regs, regmap): Remove declarations.
13215 (register_addr): Use the_low_target explicitly.
13216 (fetch_register): Likewise.
13217 (usr_fetch_inferior_registers): Likewise.
13218 (usr_store_inferior_registers): Likewise.
13219 * linux-arm-low.c (num_regs): Remove.
13220 (arm_num_regs): Define.
13221 (arm_regmap): Renamed from regmap, made static.
13222 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13223 made static.
13224 (arm_cannot_store_register): Renamed from cannot_store_register,
13225 made static.
13226 (the_low_target): New.
13227 * linux-i386-low.c (num_regs): Remove.
13228 (i386_num_regs): Define.
13229 (i386_regmap): Renamed from regmap, made static.
13230 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13231 made static.
13232 (i386_cannot_store_register): Renamed from cannot_store_register,
13233 made static.
13234 (the_low_target): New.
13235 * linux-ia64-low.c (num_regs): Remove.
13236 (ia64_num_regs): Define.
13237 (ia64_regmap): Renamed from regmap, made static.
13238 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13239 made static.
13240 (ia64_cannot_store_register): Renamed from cannot_store_register,
13241 made static.
13242 (the_low_target): New.
13243 * linux-m68k-low.c (num_regs): Remove.
13244 (m68k_num_regs): Define.
13245 (m68k_regmap): Renamed from regmap, made static.
13246 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13247 made static.
13248 (m68k_cannot_store_register): Renamed from cannot_store_register,
13249 made static.
13250 (the_low_target): New.
13251 * linux-mips-low.c (num_regs): Remove.
13252 (mips_num_regs): Define.
13253 (mips_regmap): Renamed from regmap, made static.
13254 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13255 made static.
13256 (mips_cannot_store_register): Renamed from cannot_store_register,
13257 made static.
13258 (the_low_target): New.
13259 * linux-ppc-low.c (num_regs): Remove.
13260 (ppc_num_regs): Define.
13261 (ppc_regmap): Renamed from regmap, made static.
13262 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13263 made static.
13264 (ppc_cannot_store_register): Renamed from cannot_store_register,
13265 made static.
13266 (the_low_target): New.
13267 * linux-s390-low.c (num_regs): Remove.
13268 (s390_num_regs): Define.
13269 (s390_regmap): Renamed from regmap, made static.
13270 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13271 made static.
13272 (s390_cannot_store_register): Renamed from cannot_store_register,
13273 made static.
13274 (the_low_target): New.
13275 * linux-sh-low.c (num_regs): Remove.
13276 (sh_num_regs): Define.
13277 (sh_regmap): Renamed from regmap, made static.
13278 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13279 made static.
13280 (sh_cannot_store_register): Renamed from cannot_store_register,
13281 made static.
13282 (the_low_target): New.
13283 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13284 (the_low_target): New.
13285
132862002-04-09 Daniel Jacobowitz <drow@mvista.com>
13287
13288 * Makefile.in: Add stamp-h target.
13289 * configure.in: Create stamp-h.
13290 * configure: Regenerated.
13291
132922002-04-09 Daniel Jacobowitz <drow@mvista.com>
13293
13294 * inferiors.c: New file.
13295 * target.c: New file.
13296 * target.h: New file.
13297 * Makefile.in: Add target.o and inferiors.o. Update
13298 dependencies.
13299 * linux-low.c (inferior_pid): New static variable,
13300 moved from server.c.
13301 (linux_create_inferior): Renamed from create_inferior.
13302 Call add_inferior. Return 0 on success instead of a PID.
13303 (linux_attach): Renamed from myattach.
13304 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13305 (linux_thread_alive): Renamed from mythread_alive.
13306 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13307 child dies.
13308 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13309 (regsets_store_inferior_registers): Correct error message.
13310 Add missing ``return 0''.
13311 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13312 (linux_store_registers): Renamed from store_inferior_registers.
13313 (linux_read_memory): Renamed from read_inferior_memory.
13314 (linux_write_memory): Renamed from write_inferior_memory.
13315 (linux_target_ops): New structure.
13316 (initialize_low): Call set_target_ops ().
13317 * remote-utils.c (unhexify): New function.
13318 (hexify): New function.
13319 (input_interrupt): Send signals to ``signal_pid''.
13320 * server.c (inferior_pid): Remove.
13321 (start_inferior): Update create_inferior call.
13322 (attach_inferior): Call add_inferior.
13323 (handle_query): New function.
13324 (main): Call handle_query for `q' packets.
13325 * server.h: Include "target.h". Remove obsolete prototypes.
13326 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13327
133282002-04-09 Daniel Jacobowitz <drow@mvista.com>
13329
13330 * Makefile.in: Add WARN_CFLAGS. Update configury
13331 dependencies.
13332 * configure.in: Check for <string.h>
13333 * configure: Regenerate.
13334 * config.in: Regenerate.
13335 * gdbreplay.c: Include needed system headers.
13336 (remote_open): Remove strchr prototype.
13337 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13338 * regcache.c (supply_register): Change buf argument to const void *.
13339 (supply_register_by_name): Likewise.
13340 (collect_register): Change buf argument to void *.
13341 (collect_register_by_name): Likewise.
13342 * regcache.h: Add missing prototypes.
13343 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13344 * server.c (handle_query): New function.
13345 (attached): New static variable, moved out of main.
13346 (main): Quiet longjmp clobber warnings.
13347 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13348 * utils.c (error): Remove NORETURN.
13349 (fatal): Likewise.
This page took 1.943978 seconds and 4 git commands to generate.