Fix function comments
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4d18591b
YQ
12016-01-26 Yao Qi <yao.qi@linaro.org>
2
3 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4 * linux-low.c (install_software_single_step_breakpoints): Don't
5 call regcache_read_pc.
6 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7 argument pc.
8
d8020970
YQ
92016-01-26 Yao Qi <yao.qi@linaro.org>
10
11 * linux-low.c (install_software_single_step_breakpoints): Call
12 regcache_read_pc instead of get_pc.
13
8b207339
YQ
142016-01-26 Yao Qi <yao.qi@linaro.org>
15
16 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
17 (unblock_async_io): Rename to ...
18 (block_unblock_async_io): ... it. New function.
19 (enable_async_io): Don't install SIGIO handler. Unblock it
20 instead.
21 (disable_async_io): Don't ignore SIGIO. Block it instead.
22 (initialize_async_io): Install SIGIO handler. Don't call
23 unblock_async_io.
24
18879fef
YQ
252016-01-26 Yao Qi <yao.qi@linaro.org>
26
27 * remote-utils.c (getpkt): If the buffer isn't empty, and the
28 first character is '\003', call *the_target->request_interrupt.
29
a0f8e08a
YQ
302016-01-25 Yao Qi <yao.qi@linaro.org>
31
32 * remote-utils.c (new_thread_notify): Remove.
33 (dead_thread_notify): Likewise.
34 * remote-utils.h (new_thread_notify): Remove declaration.
35 (dead_thread_notify): Likewise.
36
cc5fd9ab
MK
372016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
38
39 * gdb.trace/pending.exp: Fix expected message on continue.
40
99e8eb11
MK
412016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
42
43 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
44 it works properly on big-endian machines where sizeof (CORE_ADDR)
45 != sizeof (void *).
46
a994041d
PA
472016-01-21 Pedro Alves <palves@redhat.com>
48
49 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
50 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
51 * configure: Regenerate.
52
f7a6a40d
YQ
532016-01-21 Yao Qi <yao.qi@linaro.org>
54
55 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
56 is_thumb and set it according to CPSR saved on the stack.
57 (get_next_pcs_syscall_next_pc): Pass is_thumb to
58 arm_sigreturn_next_pc.
59
6f69e520
YQ
602016-01-18 Yao Qi <yao.qi@linaro.org>
61
62 * linux-low.c (linux_set_pc_64bit): New function.
63 (linux_get_pc_64bit): New function.
64 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
65 Declare.
66 * linux-sparc-low.c (debug_threads): Remove declaration.
67 (sparc_get_pc): Remove.
68 (the_low_target): Use linux_get_pc_64bit instead of
69 sparc_get_pc.
70 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
71 (the_low_target): Use linux_get_pc_64bit and
72 linux_set_pc_64bit.
73
276d4552
YQ
742016-01-18 Yao Qi <yao.qi@linaro.org>
75
76 * linux-arm-low.c (debug_threads): Remove declaration.
77 (arm_get_pc, arm_set_pc): Remove.
78 (the_low_target): Use linux_get_pc_32bit and
79 linux_set_pc_32bit.
80 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
81 (the_low_target): Use linux_get_pc_32bit and
82 linux_set_pc_32bit.
83 * linux-cris-low.c (debug_threads): Remove declaration.
84 (cris_get_pc, cris_set_pc,): Remove.
85 (the_low_target): Use linux_get_pc_32bit and
86 linux_set_pc_32bit.
87 * linux-crisv32-low.c (debug_threads): Remove declaration.
88 (cris_get_pc, cris_set_pc): Remove.
89 (the_low_target): Use linux_get_pc_32bit and
90 linux_set_pc_32bit.
91 * linux-low.c: Include inttypes.h.
92 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
93 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
94 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
95 (the_low_target): Use linux_get_pc_32bit and
96 linux_set_pc_32bit.
97 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
98 (the_low_target): Use linux_get_pc_32bit and
99 linux_set_pc_32bit.
100 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
101 (the_low_target): Use linux_get_pc_32bit and
102 linux_set_pc_32bit.
103 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
104 (the_low_target): Use linux_get_pc_32bit and
105 linux_set_pc_32bit.
106 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
107 (the_low_target): Use linux_get_pc_32bit and
108 linux_set_pc_32bit.
109
eb0edac8
GB
1102016-01-18 Gary Benson <gbenson@redhat.com>
111
112 * configure.ac (AC_FUNC_FORK): New check.
113 * config.in: Regenerate.
114 * configure: Likewise.
115
1b451dda
YQ
1162016-01-14 Yao Qi <yao.qi@linaro.org>
117
118 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
119 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
120 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
121 arm_get_next_pcs_ctor.
122
82075af2
JS
1232016-01-12 Josh Stone <jistone@redhat.com>
124 Philippe Waroquiers <philippe.waroquiers@skynet.be>
125
126 * inferiors.h: Include "gdb_vecs.h".
127 (struct process_info): Add syscalls_to_catch.
128 * inferiors.c (remove_process): Free syscalls_to_catch.
129 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
130 syscall_return stops.
131 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
132 * server.c (handle_general_set): Handle QCatchSyscalls.
133 (handle_query): Report support for QCatchSyscalls.
134 * target.h (struct target_ops): Add supports_catch_syscall.
135 (target_supports_catch_syscall): New macro.
136 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
137 (struct lwp_info): Add syscall_state.
138 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
139 Maintain syscall_state and syscalls_to_catch across exec.
140 (get_syscall_trapinfo): New function, proxy to the_low_target.
141 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
142 (linux_low_filter_event): Toggle syscall_state entry/return for
143 syscall traps, and set it ignored for all others.
144 (gdb_catching_syscalls_p): New function.
145 (gdb_catch_this_syscall_p): New function.
146 (linux_wait_1): Handle SYSCALL_SIGTRAP.
147 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
148 (linux_supports_catch_syscall): New function.
149 (linux_target_ops): Install it.
150 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
151 (the_low_target): Install it.
152
8f13a3ce
MF
1532016-01-12 Mike Frysinger <vapier@gentoo.org>
154
155 * acinclude.m4: Include new ../warning.m4 file.
156 * configure: Regenerated.
157 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
158
5b3da067
MF
1592016-01-12 Mike Frysinger <vapier@gentoo.org>
160
161 * ax.c (is_goto_target): Mark static.
162 * linux-low.c (register_addr): Likewise.
163 (linux_fetch_registers, linux_store_registers): Likewise.
164 * mem-break.c (any_persistent_commands): Fix old prototype.
165 (add_commands_to_breakpoint): Mark static.
166 * regcache.c (find_register_by_name): Delete unused func.
167 * remote-utils.c (hex_or_minus_one): Mark static.
168 * server.c (monitor_show_help): Mark static.
169 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
170 handle_v_requests): Likewise.
171
bc504a31
PA
1722016-01-12 Pedro Alves <palves@redhat.com>
173
174 Remove use of the registered trademark symbol throughout.
175
5a0dd67a
YQ
1762016-01-08 Yao Qi <yao.qi@linaro.org>
177
178 * remote-utils.c (getpkt): If c is '\003', call target hook
179 request_interrupt.
180
b2ca446f
YQ
1812016-01-06 Yao Qi <yao.qi@linaro.org>
182
183 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
184 linux-aarch32-low.c.
185 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
186 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
187 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
188 (thumb2_breakpoint): Declare.
189 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
190 linux-aarch32-low.h.
191 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
192 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
193 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
194
edd88788
JB
1952016-01-01 Joel Brobecker <brobecker@adacore.com>
196
197 * gdbreplay.c (gdbreplay_version): Change copyright year in
198 version message.
199 * server.c (gdbserver_version): Likewise.
200
65da7f14
PP
2012015-12-28 Patrick Palka <patrick@parcs.ath.cx>
202
203 * server.c (crc32_table): Delete.
204 (crc32): Use libiberty's xcrc32 function.
205
4abd5ed2
JB
2062015-12-22 Joel Brobecker <brobecker@adacore.com>
207
208 * lynx-low.c (lynx_delete_thread_callback): New function.
209 (lynx_mourn): Properly delete our process and all of its
210 threads. Remove call to clear_inferiors.
211
0e50fe5c
JB
2122015-12-22 Joel Brobecker <brobecker@adacore.com>
213
214 * target.c (thread_search_callback): Add check that
215 the thread_stopped target callback is not NULL before
216 calling it.
217
35adc03f
YQ
2182015-12-21 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
221 arm breakpoint.
222
bd2b2909
AT
2232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
224
225 * server.c (handle_query): Call target_supports_software_single_step.
226
7fe5e27e
AT
2272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
228
229 * linux-low.c (single_step): New function.
230 (linux_resume_one_lwp_throw): Call single_step.
231 (start_step_over): Likewise.
232
d9311bfa
AT
2332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * Makefile.in (SFILES): Append arch/arm-linux.c,
236 arch/arm-get-next-pcs.c.
237 (arm-linux.o): New rule.
238 (arm-get-next-pcs.o): New rule.
239 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
240 arm-linux.o.
241 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
242 to linux-aarch32-low.c.
243 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
244 (arm_breakpoint_len, thumb_breakpoint): Likewise.
245 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
246 (thumb2_breakpoint_len): Likewise.
247 (arm_is_thumb_mode): Make non-static.
248 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
249 from linux-aarch32-low.c.
250 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
251 (arm_breakpoint_len, thumb_breakpoint): Likewise.
252 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
253 (thumb2_breakpoint_len): Likewise.
254 (arm_is_thumb_mode): New declaration.
255 * linux-arm-low.c: Include arch/arm-linux.h
256 aarch/arm-get-next-pcs.h, sys/syscall.h.
257 (get_next_pcs_ops): New struct.
258 (get_next_pcs_addr_bits_remove): New function.
259 (get_next_pcs_is_thumb): New function.
260 (get_next_pcs_read_memory_unsigned_integer): Likewise.
261 (arm_sigreturn_next_pc): Likewise.
262 (get_next_pcs_syscall_next_pc): Likewise.
263 (arm_gdbserver_get_next_pcs): Likewise.
264 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
265 Initialize.
266 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
267 * server.h: Include gdb_vecs.h.
268
68ce2059
AT
2692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
270
271 * Makefile.in (SFILES): Append common/common-regcache.c.
272 (OBS): Append common-regcache.o.
273 (common-regcache.o): New rule.
274 * regcache.c (init_register_cache): Initialize cache to
275 REG_UNAVAILABLE.
276 (regcache_raw_read_unsigned): New function.
277 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
278 register_status enum.
279
fa5308bd
AT
2802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
281
282 * linux-aarch64-low.c (the_low_targets): Rename
283 breakpoint_reinsert_addr to get_next_pcs.
284 * linux-arm-low.c (the_low_targets): Likewise.
285 * linux-bfin-low.c (the_low_targets): Likewise.
286 * linux-cris-low.c (the_low_targets): Likewise.
287 * linux-crisv32-low.c (the_low_targets): Likewise.
288 * linux-low.c (can_software_single_step): Likewise.
289 (install_software_single_step_breakpoints): New function.
290 (start_step_over): Use install_software_single_step_breakpoints.
291 * linux-low.h: New CORE_ADDR vector.
292 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
293 get_next_pcs.
294 * linux-mips-low.c (the_low_targets): Likewise.
295 * linux-nios2-low.c (the_low_targets): Likewise.
296 * linux-sparc-low.c (the_low_targets): Likewise.
297
4a6ed09b
PA
2982015-12-17 Pedro Alves <palves@redhat.com>
299
300 * linux-low.c (linux_kill_one_lwp): Remove references to
301 LinuxThreads.
302 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
303 to 'kill'.
304 (linux_init_signals): Delete.
305 (initialize_low): Adjust.
306 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
307
7544db95
PA
3082015-12-16 Pedro Alves <palves@redhat.com>
309
310 * configure.ac (compiler warning flags): When testing a
311 -Wno-foo option, check whether -Wfoo works instead.
312 * configure: Regenerate.
313
8020350c
DB
3142015-12-11 Don Breazeal <donb@codesourcery.com>
315
316 * server.c (process_serial_event): Don't exit from gdbserver
317 in remote mode if there are still active inferiors.
318
db91f502
YQ
3192015-12-11 Yao Qi <yao.qi@linaro.org>
320
321 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
322 arm_breakpoint_at if the process is 32-bit.
323
b37a6290
YQ
3242015-12-11 Yao Qi <yao.qi@linaro.org>
325
326 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
327 arm breakpoint.
328
17b1509a
YQ
3292015-12-07 Yao Qi <yao.qi@linaro.org>
330
331 * configure.srv: Append arm.o to srv_tgtobj for
332 aarch64*-*-linux* target.
333 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
334 from linux-arm-low.c.
335 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
336 (arm_breakpoint_len, thumb_breakpoint): Likewise.
337 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
338 (thumb2_breakpoint_len): Likewise.
339 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
340 (arm_breakpoint_kinds): Likewise.
341 (arm_breakpoint_kind_from_pc): Likewise.
342 (arm_sw_breakpoint_from_kind): Likewise.
343 (arm_breakpoint_kind_from_current_state): Likewise.
344 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
345 (arm_sw_breakpoint_from_kind): Declare.
346 (arm_breakpoint_kind_from_current_state): Declare.
347 (arm_breakpoint_at): Declare.
348 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
349 arm_sw_breakpoint_from_kind if process is 32-bit.
350 (aarch64_breakpoint_kind_from_pc): New function.
351 (aarch64_breakpoint_kind_from_current_state): New function.
352 (the_low_target): Initialize fields breakpoint_kind_from_pc
353 and breakpoint_kind_from_current_state.
354 * linux-arm-low.c (arm_breakpoint_kinds): Move to
355 linux-aarch32-low.c.
356 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
357 (arm_breakpoint, arm_breakpoint_len): Likewise.
358 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
359 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
360 (arm_is_thumb_mode): Likewise.
361 (arm_breakpoint_at): Likewise.
362 (arm_breakpoint_kind_from_pc): Likewise.
363 (arm_sw_breakpoint_from_kind): Likewise.
364 (arm_breakpoint_kind_from_current_state): Likewise.
365
366 Revert:
367 2015-08-04 Yao Qi <yao.qi@linaro.org>
368
369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
370 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
371 * server.c (extended_protocol): Remove "static".
372 * server.h (extended_protocol): Declare it.
373
ece66d65
JS
3742015-12-04 Josh Stone <jistone@redhat.com>
375
376 * target.h (struct target_ops) <arch_setup>: Rename to ...
377 (struct target_ops) <post_create_inferior>: ... this.
378 (target_arch_setup): Rename to ...
379 (target_post_create_inferior): ... this, calling post_create_inferior.
380 * server.c (start_inferior): Update target_arch_setup calls to
381 target_post_create_inferior.
382 * linux-low.c (linux_low_ptrace_options): Forward declare.
383 (linux_arch_setup): Update its comment for general use.
384 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
385 (struct linux_target_ops): Use linux_post_create_inferior.
386 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
387 to post_create_inferior.
388 * nto-low.c (struct nto_target_ops): Likewise.
389 * spu-low.c (struct spu_target_ops): Likewise.
390 * win32-low.c (struct win32_target_ops): Likewise.
391
e58c48b4
AT
3922015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
393
394 * linux-arm-low.c: Remove duplicate arch/arm.h include.
395
fbec8956
AT
3962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
397
398 * linux-arm-low.c (arm_reinsert_addr): Remove function.
399 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
400 * linux-cris-low.c (cris_reinsert_addr> Remove function.
401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
402 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
404 * linux-mips-low.c (mips_reinsert_addr): Remove function.
405 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
406 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
408 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
410
9b4c5f87
AT
4112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
412
413 * linux-low.c (linux_look_up_symbols): Don't call
414 linux_supports_traceclone.
415 * linux-low.h (thread_db_init): Remove use_events argument.
416 * thread-db.c (thread_db_use_event): Remove global variable.
417 (struct thread_db) <td_thr_event_enable_p>: Remove field.
418 (struct thread_db) <td_create_bp>: Remove field.
419 (thread_db_create_event): Remove function.
420 (thread_db_enable_reporting): Likewise.
421 (find_one_thread): Don't check for thread_db_use_events.
422 (attach_thread): Likewise.
423 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
424 (try_thread_db_load_1): Don't check for thread_db_use_events.
425 (thread_db_init): Remove use_events argument and thread events
426 handling.
427 (remove_thread_event_breakpoints): Remove function.
428 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
429
7d00775e
AT
4302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
431
432 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
433 New function.
434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
435 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
437 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
438 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
439 Initialize.
440 * linux-crisv32-low.c (cris_supports_hardware_single_step):
441 New function.
442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
443 * linux-low.c (can_hardware_single_step): Use
444 supports_hardware_single_step.
445 (can_software_single_step): New function.
446 (start_step_over): Call can_software_single_step.
447 (linux_supports_hardware_single_step): New function.
448 (struct target_ops) <supports_software_single_step>: Initialize.
449 * linux-low.h (struct linux_target_ops)
450 <supports_hardware_single_step>: Initialize.
451 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
453 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
454 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
455 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
457 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
459 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
460 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
461 Initialize.
462 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
463 (struct linux_target_ops) <tile_supports_hardware_single_step>:
464 Initialize.
465 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
467 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
468 New function.
469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
470 * target.h (struct target_ops): <supports_software_single_step>:
471 New field.
472 (target_supports_software_single_step): New macro.
473
2d97cd35
AT
4742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
475
476 * linux-low.c (linux_wait_1): Fix pc advance condition.
477 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
478 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
479
769ef81f
AT
4802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
481
482 * linux-arm-low.c (arm_is_thumb_mode): New function.
483 (arm_breakpoint_at): Use arm_is_thumb_mode.
484 (arm_breakpoint_kind_from_current_state): New function.
485 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
486 Initialize.
487 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
488 (linux_breakpoint_kind_from_current_state): New function.
489 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
490 * linux-low.h (struct linux_target_ops)
491 <breakpoint_kind_from_current_state>: New field.
492 * target.h (struct target_ops): Likewise.
493 (target_breakpoint_kind_from_current_state): New macro.
494
1bebeeca
PA
4952015-11-30 Pedro Alves <palves@redhat.com>
496
497 * linux-low.c (linux_resume): Wake up the event loop before
498 returning.
499
a67a9fae
PA
5002015-11-30 Pedro Alves <palves@redhat.com>
501
502 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
503 check.
504 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
505 to -1.
506 * target.c (struct thread_search): New structure.
507 (thread_search_callback): New function.
508 (prev_general_thread): New global.
509 (prepare_to_access_memory, done_accessing_memory): New functions.
510 * target.h (prepare_to_access_memory, done_accessing_memory):
511 Replace macros with function declarations.
512
f2faf941
PA
5132015-11-30 Pedro Alves <palves@redhat.com>
514
515 PR 14618
516 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
517 report TARGET_WAITKIND_NO_RESUMED.
518 * remote-utils.c (prepare_resume_reply): Handle
519 TARGET_WAITKIND_NO_RESUMED.
520 * server.c (report_no_resumed): New global.
521 (handle_query) <qSupported>: Handle "no-resumed+". Report
522 "no-resumed+" support.
523 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
524 return error if the client doesn't support no-resumed events.
525 (push_stop_notification): New function.
526 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
527 events if the client supports them.
528
a681f9c9
PA
5292015-11-30 Pedro Alves <palves@redhat.com>
530
531 * linux-low.c (thread_still_has_status_pending_p): Don't check
532 vCont;t here.
533 (lwp_resumed): New function.
534 (status_pending_p_callback): Return early if the LWP is not
535 supposed to be resumed.
536
65706a29
PA
5372015-11-30 Pedro Alves <palves@redhat.com>
538
539 * linux-low.c (handle_extended_wait): Assert that the LWP's
540 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
541 thread create events, leave the new child's status pending.
542 (linux_low_filter_event): If GDB wants to hear about thread exit
543 events, leave the LWP marked dead and don't delete it.
544 (linux_wait_for_event_filtered): Don't check for thread exit.
545 (filter_exit_event): New function.
546 (linux_wait_1): Use it, when returning an exit event.
547 (linux_resume_one_lwp_throw): Assert that the LWP's
548 waitstatus is TARGET_WAITKIND_IGNORE.
549 * remote-utils.c (prepare_resume_reply): Handle
550 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
551 * server.c (report_thread_events): New global.
552 (handle_general_set): Handle QThreadEvents.
553 (handle_query) <qSupported>: Handle and report QThreadEvents+;
554 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
555 TARGET_WAITKIND_THREAD_EXITED.
556 * server.h (report_thread_events): Declare.
557
56cf4bed
PA
5582015-11-30 Pedro Alves <palves@redhat.com>
559
560 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
561 the thread's last_resume_kind was resume_stop.
562
500c1d85
PA
5632015-11-30 Pedro Alves <palves@redhat.com>
564
565 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
566 before returning.
567
de979965
PA
5682015-11-30 Pedro Alves <palves@redhat.com>
569
570 * server.c (handle_v_requests): Handle vCtrlC.
571
34c65914
PA
5722015-11-30 Pedro Alves <palves@redhat.com>
573
574 * gdbthread.h (find_any_thread_of_pid): Declare.
575 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
576 functions.
577 * server.c (handle_query): If current_thread is NULL, look for
578 another thread of the selected process.
579
79efa585 5802015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 581 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
582
583 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
584 * server.c (handle_qxfer_threads_worker): Refactor to include thread
585 name in reply.
586 * target.h (struct target_ops) <thread_name>: New field.
587 (target_thread_name): New macro.
588
80d82c19
JB
5892015-11-23 Joel Brobecker <brobecker@adacore.com>
590
591 * regcache.h (regcache_invalidate_pid): Add declaration.
592 * regcache.c (regcache_invalidate_pid): New function, extracted
593 from regcache_invalidate.
594 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
595 Add trivial documentation comment.
596 * lynx-low.c: Use regcache_invalidate_pid instead of
597 regcache_invalidate.
598
64da5dd5
JB
5992015-11-23 Joel Brobecker <brobecker@adacore.com>
600
601 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
602 and Elf64_auxv_t if the target is Android.
603
37ce4055
DE
6042015-11-22 Doug Evans <xdje42@gmail.com>
605
606 * target.h: #include <sys/types.h>.
607
06e03fff
PA
6082015-11-19 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (linux_process_qsupported): Change prototype.
611 Adjust.
612 * linux-low.h (struct linux_target_ops) <process_qsupported>:
613 Change prototype.
614 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
615 and adjust to loop over all features.
616 * server.c (handle_query) <qSupported>: Adjust to call
617 target_process_qsupported once, passing it a vector of unprocessed
618 features.
619 * target.h (struct target_ops) <process_qsupported>: Change
620 prototype.
621 (target_process_qsupported): Adjust.
622
9a084706
PA
6232015-11-19 Pedro Alves <palves@redhat.com>
624
625 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
626 mode.
627 * configure: Regenerate.
628
dad44a1f
PA
6292015-11-19 Pedro Alves <palves@redhat.com>
630
631 * configure: Regenerate.
632
231c0592
YQ
6332015-11-19 Yao Qi <yao.qi@linaro.org>
634
635 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
636 type to uint32_t.
637
6c1c9a8b
YQ
6382015-11-19 Yao Qi <yao.qi@linaro.org>
639
640 * linux-aarch64-low.c (enum aarch64_operand_type): New.
641 (struct aarch64_operand): Move enum out.
642
9caa3311
YQ
6432015-11-19 Yao Qi <yao.qi@linaro.org>
644
645 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
646 struct user_fpsimd_state *.
647 (aarch64_store_fpregset): Likewise.
648
6a69a054
YQ
6492015-11-19 Yao Qi <yao.qi@linaro.org>
650
651 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
652 struct user_pt_regs *.
653 (aarch64_store_gregset): Likewise.
654
1798301e
PA
6552015-11-18 Pedro Alves <palves@redhat.com>
656
657 * Makefile.in (all_object_files): Add $IPA_OBJS.
658
ce7715e2
PA
6592015-11-17 Pedro Alves <palves@redhat.com>
660
661 * win32-low.c (win32_resume): Use gdb_signal_from_host,
662 GDB_SIGNAL_0 and gdb_signal_to_string.
663
c0879059
PA
6642015-11-17 Pedro Alves <palves@redhat.com>
665
666 * win32-low.c (handle_output_debug_string): Remove parameter.
667 (win32_kill): Remove our_status local and adjust call to
668 handle_output_debug_string.
669 (get_child_debug_event): Adjust call to
670 handle_output_debug_string.
671
1996e237
SM
6722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * linux-mips-low.c (mips_fill_gregset): Add cast.
675 (mips_store_gregset): Likewise.
676 (mips_fill_fpregset): Likewise.
677 (mips_store_fpregset): Likewise.
678
cbec665b
SM
6792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * linux-mips-low.c (mips_add_watchpoint): Rename private to
682 priv.
683
eb3e3c67
SM
6842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * linux-mips-low.c (mips_linux_new_thread): Change type of
687 watch_type to enum target_hw_bp_type.
688
171de4b8
SM
6892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
692 Change return type to arm_hwbp_type.
693
04248ead
SM
6942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
697 (arm_store_gregset): Likewise.
698 * linux-arm-low.c (arm_get_hwcap): Likewise.
699 (arm_read_description): Likewise.
700
04b3479c
SM
7012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
702
703 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
704
2bc84e8a
SM
7052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
708 (ppc_fill_vsxregset): Likewise.
709 (ppc_store_vsxregset): Likewise.
710 (ppc_fill_vrregset): Likewise.
711 (ppc_store_vrregset): Likewise.
712 (ppc_fill_evrregset): Likewise.
713 (ppc_store_evrregset): Likewise.
714
e6c5bb05
SM
7152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * linux-ppc-low.c (ppc_usrregs_info): Remove
718 forward-declaration.
719 (ppc_arch_setup): Move lower in file.
720
7ea45d72
SM
7212015-10-30 Simon Marchi <simon.marchi@ericsson.com>
722
723 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
724 (ps_pdwrite): Likewise.
725
69291610
HW
7262015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
727
728 * linux-arm-low.c (arm_new_thread): Move pointer dereference
729 to after assert checks.
730
b42945fd
SM
7312015-10-29 Simon Marchi <simon.marchi@ericsson.com>
732
733 * proc-service.c (ps_pdread): Add/adjust casts.
734 (ps_pdwrite): Add/adjust casts.
735
d6f85c84
SM
7362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
737
738 * server.c (handle_search_memory_1): Cast return value of
739 memmem.
740
f98cd059
SM
7412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * server.c (write_qxfer_response): Change type of data to
744 gdb_byte *.
745
d2412fa5
PA
7462015-10-29 Pedro Alves <palves@redhat.com>
747
748 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
749
c17414a2
PA
7502015-10-29 Pedro Alves <palves@redhat.com>
751
752 * tracepoint.c (clear_installed_tracepoints): Add casts.
753
e053fbc4
PA
7542015-10-29 Pedro Alves <palves@redhat.com>
755
756 * server.c (handle_v_cont, process_serial_event): Add enum
757 gdb_signal casts to signal parsing code.
758
add67df8
PA
7592015-10-29 Pedro Alves <palves@redhat.com>
760
761 * linux-low.h (NULL_REGSET): Define.
762 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
763 * linux-arm-low.c (arm_regsets): Likewise.
764 * linux-crisv32-low.c (cris_regsets): Likewise.
765 * linux-m68k-low.c (m68k_regsets): Likewise.
766 * linux-mips-low.c (mips_regsets): Likewise.
767 * linux-nios2-low.c (nios2_regsets): Likewise.
768 * linux-ppc-low.c (ppc_regsets): Likewise.
769 * linux-s390-low.c (s390_regsets): Likewise.
770 * linux-sh-low.c (sh_regsets): Likewise.
771 * linux-sparc-low.c (sparc_regsets): Likewise.
772 * linux-tic6x-low.c (tic6x_regsets): Likewise.
773 * linux-tile-low.c (tile_regsets): Likewise.
774 * linux-x86-low.c (x86_regsets): Likewise.
775 * linux-xtensa-low.c (xtensa_regsets): Likewise.
776
50bc912a
PA
7772015-10-29 Pedro Alves <palves@redhat.com>
778
779 * linux-low.h (NULL_REGSET): Define.
780 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
781 * linux-arm-low.c (arm_regsets): Likewise.
782 * linux-crisv32-low.c (cris_regsets): Likewise.
783 * linux-m68k-low.c (m68k_regsets): Likewise.
784 * linux-mips-low.c (mips_regsets): Likewise.
785 * linux-nios2-low.c (nios2_regsets): Likewise.
786 * linux-ppc-low.c (ppc_regsets): Likewise.
787 * linux-s390-low.c (s390_regsets): Likewise.
788 * linux-sh-low.c (sh_regsets): Likewise.
789 * linux-sparc-low.c (sparc_regsets): Likewise.
790 * linux-tic6x-low.c (tic6x_regsets): Likewise.
791 * linux-tile-low.c (tile_regsets): Likewise.
792 * linux-x86-low.c (x86_regsets): Likewise.
793 * linux-xtensa-low.c (xtensa_regsets): Likewise.
794
682b2546
DE
7952015-10-26 Doug Evans <dje@google.com>
796
797 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
798
963843d4
DE
7992015-10-26 Doug Evans <dje@google.com>
800
801 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
802
d41401ac
DE
8032015-10-26 Doug Evans <dje@google.com>
804
805 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
806 for debug_printf.
807 (attach_thread, find_new_threads_callback): Ditto.
808
3db28855
AT
8092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
810
811 * mem-break.h (set_breakpoint_data): Remove.
812
fb78e89c
AT
8132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
816 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
817 (initialize_low): Remove set_breakpoint_data call.
818 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
819 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
820 (initialize_low): Remove set_breakpoint_data call.
821 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
823 (initialize_low): Remove set_breakpoint_data call.
824
2e6ee069
AT
8252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
826
827 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
828 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
829 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
830 * target.h (target_breakpoint_kind_from_pc): New macro.
831
1652a986
AT
8322015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
833
834 * linux-low.c (default_breakpoint_kind_from_pc): New function.
835 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
836 the default breakpoint kind.
837
abeead09
AT
8382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
839
840 * linux-arm-low.c (arm_supports_z_point_type): Add software
841 breakpoint support.
842
b0b4b501
AT
8432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
844
845 * linux-arm-low.c: Refactor breakpoint definitions.
846 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
847 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
848
8689682c
AT
8492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
850
851 * Makefile.in: Add arm.c/o.
852 * configure.srv: Likewise.
853 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
854 (arm_breakpoint_kind_from_pc): New function.
855 (arm_sw_breakpoint_from_kind): Return proper kind.
856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
857
27165294
AT
8582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
859
860 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
861 removal.
862 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
863 (struct raw_breakpoint) <size>: Remove.
864 (struct raw_breakpoint) <kind>: Add.
865 (bp_size): New function.
866 (bp_opcode): Likewise.
867 (find_raw_breakpoint_at): Adjust for kind.
868 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
869 (remove_memory_breakpoint): Adjust for kind call bp_size.
870 (set_raw_breakpoint_at): Adjust for kind.
871 (set_breakpoint): Likewise.
872 (set_breakpoint_at): Call breakpoint_kind_from_pc.
873 (delete_raw_breakpoint): Adjust for kind.
874 (delete_breakpoint): Likewise.
875 (find_gdb_breakpoint): Likewise.
876 (set_gdb_breakpoint_1): Likewise.
877 (set_gdb_breakpoint): Likewise.
878 (delete_gdb_breakpoint_1): Likewise.
879 (delete_gdb_breakpoint): Likewise.
880 (uninsert_raw_breakpoint): Likewise.
881 (reinsert_raw_breakpoint): Likewise.
882 (set_breakpoint_data): Remove.
883 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
884 (check_mem_read): Adjust for kind call bp_size.
885 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
886 (clone_one_breakpoint): Adjust for kind.
887 * mem-break.h (set_gdb_breakpoint): Likewise.
888 (delete_gdb_breakpoint): Likewise.
889 * server.c (process_serial_event): Likewise.
890
dd373349
AT
8912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
892
893 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
894 (struct linux_target_ops) <breakpoint>: Remove.
895 (struct linux_target_ops) <breakpoint_len>: Remove.
896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
898 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
899 (arm_sw_breakpoint_from_kind): New function.
900 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
916 and sw_breakpoint_from_kind to increment the pc.
917 (linux_breakpoint_kind_from_pc): New function.
918 (linux_sw_breakpoint_from_kind): New function.
919 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
920 (initialize_low): Call breakpoint_kind_from_pc and
921 sw_breakpoint_from_kind to replace breakpoint_data/len.
922 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
923 New field.
924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
925 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
931 (struct linux_target_ops) <breakpoint>: Remove.
932 (struct linux_target_ops) <breakpoint_len>: Remove.
933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
935 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
936 (struct linux_target_ops) <breakpoint>: Remove.
937 (struct linux_target_ops) <breakpoint_len>: Remove.
938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
940 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
941 (struct linux_target_ops) <breakpoint>: Remove.
942 (struct linux_target_ops) <breakpoint_len>: Remove.
943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
945 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
946 (struct linux_target_ops) <breakpoint>: Remove.
947 (struct linux_target_ops) <breakpoint_len>: Remove.
948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
950 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
951 (struct linux_target_ops) <breakpoint>: Remove.
952 (struct linux_target_ops) <breakpoint_len>: Remove.
953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
955 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
956 (struct linux_target_ops) <breakpoint>: Remove.
957 (struct linux_target_ops) <breakpoint_len>: Remove.
958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
960 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
961 (struct linux_target_ops) <breakpoint>: Remove.
962 (struct linux_target_ops) <breakpoint_len>: Remove.
963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
965 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
966 (struct linux_target_ops) <breakpoint>: Remove.
967 (struct linux_target_ops) <breakpoint_len>: Remove.
968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
970 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
971 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
972 (struct linux_target_ops) <breakpoint>: Remove.
973 (struct linux_target_ops) <breakpoint_len>: Remove.
974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
976 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
977 (struct linux_target_ops) <breakpoint>: Remove.
978 (struct linux_target_ops) <breakpoint_len>: Remove.
979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
981
4cd98a19
AT
9822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-cris-low.c (cris_get_pc): Remove void arg.
985
774ee6d2
AR
9862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
987
988 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
989 variable name.
990
833dcd29
AR
9912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
992
993 * inferiors.c (thread_pid_matches_callback): New function.
994 (find_thread_process): New function.
995 (remove_thread): Reset current_thread.
996 (remove_process): Assert threads have been removed first.
997
8d689ee5
YQ
9982015-10-15 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1001 if it is 3.
1002 (aarch64_remove_point): Likewise.
1003 * regcache.c (regcache_register_size): New function.
1004
1c2e1515
YQ
10052015-10-12 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-aarch64-low.c: Update all callers as emit_load_store
1008 is renamed to aarch64_emit_load_store.
1009
e1c587c3
YQ
10102015-10-12 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-aarch64-low.c: Update all callers of function renaming
1013 from emit_insn to aarch64_emit_insn.
1014
b6542f81
YQ
10152015-10-12 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1018 arch/aarch64-insn.h.
1019 (struct aarch64_memory_operand): Likewise.
1020 (ENCODE): Likewise.
1021 (emit_insn): Move to arch/aarch64-insn.c.
1022 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1023 (emit_load_store): Move to arch/aarch64-insn.c.
1024 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1025 (can_encode_int32): Remove.
1026
246994ce
YQ
10272015-10-12 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1030 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1031 (aarch64_relocate_instruction): Likewise.
1032 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1033 (struct aarch64_insn_visitor): Likewise.
1034
0badd99f
YQ
10352015-10-12 Yao Qi <yao.qi@linaro.org>
1036
1037 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1038 (struct aarch64_insn_visitor): New.
1039 (struct aarch64_insn_relocation_data): New.
1040 (aarch64_ftrace_insn_reloc_b): New function.
1041 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1042 (aarch64_ftrace_insn_reloc_cb): Likewise.
1043 (aarch64_ftrace_insn_reloc_tb): Likewise.
1044 (aarch64_ftrace_insn_reloc_adr): Likewise.
1045 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1046 (aarch64_ftrace_insn_reloc_others): Likewise.
1047 (visitor): New.
1048 (aarch64_relocate_instruction): Use visitor.
1049
dfaffe9d
YQ
10502015-10-12 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1053 int. Add argument buf.
1054 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1055 aarch64_relocate_instruction.
1056
70b439f0
YQ
10572015-10-12 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1060 argument insn. Remove local variable insn. Don't call
1061 target_read_uint32.
1062 (aarch64_install_fast_tracepoint_jump_pad): Call
1063 target_read_uint32.
1064
7781c06f
YQ
10652015-09-30 Yao Qi <yao.qi@linaro.org>
1066
1067 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1068 (emit_load_store_pair): Likewise.
1069
9a3c8263
SM
10702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * dll.c (match_dll): Add cast(s).
1073 (unloaded_dll): Likewise.
1074 * linux-low.c (second_thread_of_pid_p): Likewise.
1075 (delete_lwp_callback): Likewise.
1076 (count_events_callback): Likewise.
1077 (select_event_lwp_callback): Likewise.
1078 (linux_set_resume_request): Likewise.
1079 * server.c (accumulate_file_name_length): Likewise.
1080 (emit_dll_description): Likewise.
1081 (handle_qxfer_threads_worker): Likewise.
1082 (visit_actioned_threads): Likewise.
1083 * thread-db.c (any_thread_of): Likewise.
1084 * tracepoint.c (same_process_p): Likewise.
1085 (match_blocktype): Likewise.
1086 (build_traceframe_info_xml): Likewise.
1087
224c3ddb
SM
10882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1091 assignment.
1092 (gdb_unparse_agent_expr): Likewise.
1093 * hostio.c (require_data): Likewise.
1094 (handle_pread): Likewise.
1095 * linux-low.c (disable_regset): Likewise.
1096 (fetch_register): Likewise.
1097 (store_register): Likewise.
1098 (get_dynamic): Likewise.
1099 (linux_qxfer_libraries_svr4): Likewise.
1100 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1101 (set_fast_tracepoint_jump): Likewise.
1102 (uninsert_fast_tracepoint_jumps_at): Likewise.
1103 (reinsert_fast_tracepoint_jumps_at): Likewise.
1104 (validate_inserted_breakpoint): Likewise.
1105 (clone_agent_expr): Likewise.
1106 * regcache.c (init_register_cache): Likewise.
1107 * remote-utils.c (putpkt_binary_1): Likewise.
1108 (decode_M_packet): Likewise.
1109 (decode_X_packet): Likewise.
1110 (look_up_one_symbol): Likewise.
1111 (relocate_instruction): Likewise.
1112 (monitor_output): Likewise.
1113 * server.c (handle_search_memory): Likewise.
1114 (handle_qxfer_exec_file): Likewise.
1115 (handle_qxfer_libraries): Likewise.
1116 (handle_qxfer): Likewise.
1117 (handle_query): Likewise.
1118 (handle_v_cont): Likewise.
1119 (handle_v_run): Likewise.
1120 (captured_main): Likewise.
1121 * target.c (write_inferior_memory): Likewise.
1122 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1123 * tracepoint.c (init_trace_buffer): Likewise.
1124 (add_tracepoint_action): Likewise.
1125 (add_traceframe): Likewise.
1126 (add_traceframe_block): Likewise.
1127 (cmd_qtdpsrc): Likewise.
1128 (cmd_qtdv): Likewise.
1129 (cmd_qtstatus): Likewise.
1130 (response_source): Likewise.
1131 (response_tsv): Likewise.
1132 (cmd_qtnotes): Likewise.
1133 (gdb_collect): Likewise.
1134 (initialize_tracepoint): Likewise.
1135
afbe19f8
PL
11362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1137
1138 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1139 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1140 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1141 <NOP>: New.
1142 (enum aarch64_condition_codes): New enum.
1143 (w0): New static global.
1144 (fp): Likewise.
1145 (lr): Likewise.
1146 (struct aarch64_memory_operand) <type>: New
1147 MEMORY_OPERAND_POSTINDEX type.
1148 (postindex_memory_operand): New helper function.
1149 (emit_ret): New function.
1150 (emit_load_store_pair): New function, factored out of emit_stp
1151 with support for MEMORY_OPERAND_POSTINDEX.
1152 (emit_stp): Rewrite using emit_load_store_pair.
1153 (emit_ldp): New function.
1154 (emit_load_store): Likewise.
1155 (emit_ldr): Mention post-index instruction in comment.
1156 (emit_ldrh): New function.
1157 (emit_ldrb): New function.
1158 (emit_ldrsw): Mention post-index instruction in comment.
1159 (emit_str): Likewise.
1160 (emit_subs): New function.
1161 (emit_cmp): Likewise.
1162 (emit_and): Likewise.
1163 (emit_orr): Likewise.
1164 (emit_orn): Likewise.
1165 (emit_eor): Likewise.
1166 (emit_mvn): Likewise.
1167 (emit_lslv): Likewise.
1168 (emit_lsrv): Likewise.
1169 (emit_asrv): Likewise.
1170 (emit_mul): Likewise.
1171 (emit_sbfm): Likewise.
1172 (emit_sbfx): Likewise.
1173 (emit_ubfm): Likewise.
1174 (emit_ubfx): Likewise.
1175 (emit_csinc): Likewise.
1176 (emit_cset): Likewise.
1177 (emit_nop): Likewise.
1178 (emit_ops_insns): New helper function.
1179 (emit_pop): Likewise.
1180 (emit_push): Likewise.
1181 (aarch64_emit_prologue): New function.
1182 (aarch64_emit_epilogue): Likewise.
1183 (aarch64_emit_add): Likewise.
1184 (aarch64_emit_sub): Likewise.
1185 (aarch64_emit_mul): Likewise.
1186 (aarch64_emit_lsh): Likewise.
1187 (aarch64_emit_rsh_signed): Likewise.
1188 (aarch64_emit_rsh_unsigned): Likewise.
1189 (aarch64_emit_ext): Likewise.
1190 (aarch64_emit_log_not): Likewise.
1191 (aarch64_emit_bit_and): Likewise.
1192 (aarch64_emit_bit_or): Likewise.
1193 (aarch64_emit_bit_xor): Likewise.
1194 (aarch64_emit_bit_not): Likewise.
1195 (aarch64_emit_equal): Likewise.
1196 (aarch64_emit_less_signed): Likewise.
1197 (aarch64_emit_less_unsigned): Likewise.
1198 (aarch64_emit_ref): Likewise.
1199 (aarch64_emit_if_goto): Likewise.
1200 (aarch64_emit_goto): Likewise.
1201 (aarch64_write_goto_address): Likewise.
1202 (aarch64_emit_const): Likewise.
1203 (aarch64_emit_call): Likewise.
1204 (aarch64_emit_reg): Likewise.
1205 (aarch64_emit_pop): Likewise.
1206 (aarch64_emit_stack_flush): Likewise.
1207 (aarch64_emit_zero_ext): Likewise.
1208 (aarch64_emit_swap): Likewise.
1209 (aarch64_emit_stack_adjust): Likewise.
1210 (aarch64_emit_int_call_1): Likewise.
1211 (aarch64_emit_void_call_2): Likewise.
1212 (aarch64_emit_eq_goto): Likewise.
1213 (aarch64_emit_ne_goto): Likewise.
1214 (aarch64_emit_lt_goto): Likewise.
1215 (aarch64_emit_le_goto): Likewise.
1216 (aarch64_emit_gt_goto): Likewise.
1217 (aarch64_emit_ge_got): Likewise.
1218 (aarch64_emit_ops_impl): New static global variable.
1219 (aarch64_emit_ops): New target function, return
1220 &aarch64_emit_ops_impl.
1221 (struct linux_target_ops): Install it.
1222
bb903df0
PL
12232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1224
1225 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1226 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1227 aarch64-ipa.o.
1228 * linux-aarch64-ipa.c: New file.
1229 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1230 and endian.h.
1231 (aarch64_get_thread_area): New target method.
1232 (extract_signed_bitfield): New helper function.
1233 (aarch64_decode_ldr_literal): New function.
1234 (enum aarch64_opcodes): New enum.
1235 (struct aarch64_register): New struct.
1236 (struct aarch64_operand): New struct.
1237 (x0): New static global.
1238 (x1): Likewise.
1239 (x2): Likewise.
1240 (x3): Likewise.
1241 (x4): Likewise.
1242 (w2): Likewise.
1243 (ip0): Likewise.
1244 (sp): Likewise.
1245 (xzr): Likewise.
1246 (aarch64_register): New helper function.
1247 (register_operand): Likewise.
1248 (immediate_operand): Likewise.
1249 (struct aarch64_memory_operand): New struct.
1250 (offset_memory_operand): New helper function.
1251 (preindex_memory_operand): Likewise.
1252 (enum aarch64_system_control_registers): New enum.
1253 (ENCODE): New macro.
1254 (emit_insn): New helper function.
1255 (emit_b): New function.
1256 (emit_bcond): Likewise.
1257 (emit_cb): Likewise.
1258 (emit_tb): Likewise.
1259 (emit_blr): Likewise.
1260 (emit_stp): Likewise.
1261 (emit_ldp_q_offset): Likewise.
1262 (emit_stp_q_offset): Likewise.
1263 (emit_load_store): Likewise.
1264 (emit_ldr): Likewise.
1265 (emit_ldrsw): Likewise.
1266 (emit_str): Likewise.
1267 (emit_ldaxr): Likewise.
1268 (emit_stxr): Likewise.
1269 (emit_stlr): Likewise.
1270 (emit_data_processing_reg): Likewise.
1271 (emit_data_processing): Likewise.
1272 (emit_add): Likewise.
1273 (emit_sub): Likewise.
1274 (emit_mov): Likewise.
1275 (emit_movk): Likewise.
1276 (emit_mov_addr): Likewise.
1277 (emit_mrs): Likewise.
1278 (emit_msr): Likewise.
1279 (emit_sevl): Likewise.
1280 (emit_wfe): Likewise.
1281 (append_insns): Likewise.
1282 (can_encode_int32_in): New helper function.
1283 (aarch64_relocate_instruction): New function.
1284 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1285 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1286 (struct linux_target_ops): Install aarch64_get_thread_area,
1287 aarch64_install_fast_tracepoint_jump_pad and
1288 aarch64_get_min_fast_tracepoint_insn_len.
1289
787749ea
PL
12902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1291
1292 * Makefile.in (aarch64-insn.o): New rule.
1293 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1294
9812b2e6
YQ
12952015-09-21 Yao Qi <yao.qi@linaro.org>
1296
1297 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1298
18fe412b
YQ
12992015-09-21 Yao Qi <yao.qi@linaro.org>
1300
1301 * tracepoint.c (max_jump_pad_size): Remove.
1302
a0cc84cd
YQ
13032015-09-18 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-aarch64-low.c: Don't include sys/uio.h.
1306 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1307
d78908cf
WW
13082015-09-16 Wei-cheng Wang <cole945@gmail.com>
1309
1310 * tracepoint.c (eval_result_type): Change prototype.
1311 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1312
d57e0d50
PA
13132015-09-15 Pedro Alves <palves@redhat.com>
1314
1315 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1316 Check whether to report exec events instead of checking whether
1317 multiprocess is enabled.
1318
5a676acc
PA
13192015-09-15 Pedro Alves <palves@redhat.com>
1320
1321 PR remote/18965
1322 * remote-utils.c (prepare_resume_reply): Merge
1323 TARGET_WAITKIND_VFORK_DONE switch case with the
1324 TARGET_WAITKIND_FORKED case.
1325
7c5d0fad
YQ
13262015-09-15 Yao Qi <yao.qi@linaro.org>
1327
1328 * server.c (handle_query): Check string comparison using
1329 "else if" instead of "if".
1330
750ce8d1
YQ
13312015-09-15 Yao Qi <yao.qi@linaro.org>
1332
1333 * server.c (vCont_supported): New global variable.
1334 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1335 matches. Append ";vContSupported+" to own_buf.
1336 (handle_v_requests): Append ";s;S" to own_buf if target supports
1337 hardware single step or vCont_supported is false.
1338 (capture_main): Set vCont_supported to zero.
1339
70b90b91
YQ
13402015-09-15 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1343 it to ...
1344 (linux_supports_hardware_single_step): ... New function.
1345 (linux_target_ops): Update.
1346 * lynx-low.c (lynx_target_ops): Set field
1347 supports_hardware_single_step to target_can_do_hardware_single_step.
1348 * nto-low.c (nto_target_ops): Likewise.
1349 * spu-low.c (spu_target_ops): Likewise.
1350 * win32-low.c (win32_target_ops): Likewise.
1351 * target.c (target_can_do_hardware_single_step): New function.
1352 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1353 Remove. <supports_hardware_single_step>: New field.
1354 (target_supports_conditional_breakpoints): Remove.
1355 (target_supports_hardware_single_step): New macro.
1356 (target_can_do_hardware_single_step): Declare.
1357 * server.c (handle_query): Use target_supports_hardware_single_step
1358 instead of target_supports_conditional_breakpoints.
1359
ade90bde
YQ
13602015-09-15 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1363 function.
1364 (struct linux_target_ops the_low_target): Install
1365 aarch64_linux_siginfo_fixup.
1366
94585166
DB
13672015-09-11 Don Breazeal <donb@codesourcery.com>
1368 Luis Machado <lgustavo@codesourcery.com>
1369
1370 * linux-low.c (linux_mourn): Static declaration.
1371 (linux_arch_setup): Move in front of
1372 handle_extended_wait.
1373 (linux_arch_setup_thread): New function.
1374 (handle_extended_wait): Handle exec events. Call
1375 linux_arch_setup_thread. Make event_lwp argument a
1376 pointer-to-a-pointer.
1377 (check_zombie_leaders): Do not check stopped threads.
1378 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1379 (linux_low_filter_event): Add lwp and thread for exec'ing
1380 non-leader thread if leader thread has been deleted.
1381 Refactor code into linux_arch_setup_thread and call it.
1382 Pass child lwp pointer by reference to handle_extended_wait.
1383 (linux_wait_for_event_filtered): Update comment.
1384 (linux_wait_1): Prevent clobbering exec event status.
1385 (linux_supports_exec_events): New function.
1386 (linux_target_ops) <supports_exec_events>: Initialize new member.
1387 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1388 new member.
1389 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1390 * server.c (report_exec_events): New global variable.
1391 (handle_query): Handle qSupported query for exec-events feature.
1392 (captured_main): Initialize report_exec_events.
1393 * server.h (report_exec_events): Declare new global variable.
1394 * target.h (struct target_ops) <supports_exec_events>: New
1395 member.
1396 (target_supports_exec_events): New macro.
1397 * win32-low.c (win32_target_ops) <supports_exec_events>:
1398 Initialize new member.
1399
0568462b
MM
14002015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1401
1402 * linux-low.c (linux_low_enable_btrace): Remove.
1403 (linux_target_ops): Replace linux_low_enable_btrace with
1404 linux_enable_btrace.
1405
39edd165
YQ
14062015-09-03 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-aarch64-low.c (aarch64_insert_point): Call
1409 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1410 returns true.
1411
1db33b5a
UW
14122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1413
1414 * linux-low.c (check_stopped_by_breakpoint): Use
1415 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1416
ab290430
PA
14172015-08-27 Pedro Alves <palves@redhat.com>
1418
1419 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1420
8d749320
SM
14212015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1422
6711b7f8
SM
1423 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1424 the XNEW-family equivalent.
8d749320
SM
1425 (compile_bytecodes): Likewise.
1426 * dll.c (loaded_dll): Likewise.
1427 * event-loop.c (append_callback_event): Likewise.
1428 (create_file_handler): Likewise.
1429 (create_file_event): Likewise.
1430 * hostio.c (handle_open): Likewise.
1431 * inferiors.c (add_thread): Likewise.
1432 (add_process): Likewise.
1433 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1434 * linux-arm-low.c (arm_new_process): Likewise.
1435 (arm_new_thread): Likewise.
1436 * linux-low.c (add_to_pid_list): Likewise.
1437 (linux_add_process): Likewise.
1438 (handle_extended_wait): Likewise.
1439 (add_lwp): Likewise.
1440 (enqueue_one_deferred_signal): Likewise.
1441 (enqueue_pending_signal): Likewise.
1442 (linux_resume_one_lwp_throw): Likewise.
1443 (linux_resume_one_thread): Likewise.
1444 (linux_read_memory): Likewise.
1445 (linux_write_memory): Likewise.
1446 * linux-mips-low.c (mips_linux_new_process): Likewise.
1447 (mips_linux_new_thread): Likewise.
1448 (mips_add_watchpoint): Likewise.
1449 * linux-x86-low.c (initialize_low_arch): Likewise.
1450 * lynx-low.c (lynx_add_process): Likewise.
1451 * mem-break.c (set_raw_breakpoint_at): Likewise.
1452 (set_breakpoint): Likewise.
1453 (add_condition_to_breakpoint): Likewise.
1454 (add_commands_to_breakpoint): Likewise.
1455 (clone_agent_expr): Likewise.
1456 (clone_one_breakpoint): Likewise.
1457 * regcache.c (new_register_cache): Likewise.
1458 * remote-utils.c (look_up_one_symbol): Likewise.
1459 * server.c (queue_stop_reply): Likewise.
1460 (start_inferior): Likewise.
1461 (queue_stop_reply_callback): Likewise.
1462 (handle_target_event): Likewise.
1463 * spu-low.c (fetch_ppc_memory): Likewise.
1464 (store_ppc_memory): Likewise.
1465 * target.c (set_target_ops): Likewise.
1466 * thread-db.c (thread_db_load_search): Likewise.
1467 (try_thread_db_load_1): Likewise.
1468 * tracepoint.c (add_tracepoint): Likewise.
1469 (add_tracepoint_action): Likewise.
1470 (create_trace_state_variable): Likewise.
1471 (cmd_qtdpsrc): Likewise.
1472 (cmd_qtro): Likewise.
1473 (add_while_stepping_state): Likewise.
1474 * win32-low.c (child_add_thread): Likewise.
1475 (get_image_name): Likewise.
1476
ed8b7b42
YQ
14772015-08-25 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1480
db3cb7cb
YQ
14812015-08-25 Yao Qi <yao.qi@linaro.org>
1482
1483 * Makefile.in (aarch64-linux.o): New rule.
1484 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1485 srv_tgtobj.
1486 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1487 (aarch64_init_debug_reg_state): Make it extern.
1488 (aarch64_linux_prepare_to_resume): Remove.
1489
f6011a1c
YQ
14902015-08-25 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1493 lwp_arch_private_info and ptid_of_lwp.
1494
88e2cf7e
YQ
14952015-08-25 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1498 Find proc_info by find_process_pid. All callers updated.
1499
5e35436e
YQ
15002015-08-25 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1503 Remove.
1504 (debug_reg_change_callback): Remove.
1505 (aarch64_notify_debug_reg_change): Remove.
1506
4a8a7965
YQ
15072015-08-25 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1510 Call current_lwp_ptid.
1511
32a271ee
YQ
15122015-08-25 Yao Qi <yao.qi@linaro.org>
1513
1514 * linux-aarch64-low.c (debug_reg_change_callback): Use
1515 debug_printf.
1516
0d51c8d7
YQ
15172015-08-25 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1520
31a43dd5
YQ
15212015-08-25 Yao Qi <yao.qi@linaro.org>
1522
1523 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1524
8ee52567
YQ
15252015-08-25 Yao Qi <yao.qi@linaro.org>
1526
1527 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1528 the code.
1529
ff3f0f45
YQ
15302015-08-25 Yao Qi <yao.qi@linaro.org>
1531
1532 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1533 Remove.
1534 (debug_reg_change_callback): Remove argument entry and add argument
1535 lwp. Remove local variable thread. Don't print thread id in the
1536 debugging output. Don't check whether pid of thread equals to pid.
1537 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1538 iterate_over_lwps instead find_inferior.
1539
3d40fbb5
PA
15402015-08-24 Pedro Alves <palves@redhat.com>
1541
1542 * inferiors.c (get_first_process): New function.
1543 * inferiors.h (get_first_process): New declaration.
1544 * remote-utils.c (read_ptid): Default to the first process in the
1545 list, instead of to the current thread's process.
1546
438e1e42
PA
15472015-08-24 Pedro Alves <palves@redhat.com>
1548
1549 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1550 * event-loop.c: Likewise.
1551 * remote-utils.c: Likewise.
1552 * tracepoint.c: Likewise.
1553
a8c6d4fc
PA
15542015-08-24 Pedro Alves <palves@redhat.com>
1555
1556 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1557 ptid_get_lwp.
1558
99b0bb12
PA
15592015-08-21 Pedro Alves <palves@redhat.com>
1560
1561 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1562 instead of literal 1.
1563
f8904751
PA
15642015-08-21 Pedro Alves <palves@redhat.com>
1565
1566 * tdesc.c (default_description): Explicitly zero-initialize.
1567
465a859e
PA
15682015-08-21 Pedro Alves <palves@redhat.com>
1569
1570 PR gdb/18749
1571 * inferiors.c (remove_thread): Discard any pending stop reply for
1572 this thread.
1573 * server.c (remove_all_on_match_pid): Rename to ...
1574 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1575 instead of a pid.
1576 (discard_queued_stop_replies): Change parameter to a ptid. Now
1577 extern.
1578 (handle_v_kill, kill_inferior_callback, captured_main)
1579 (process_serial_event): Adjust.
1580 * server.h (discard_queued_stop_replies): Declare.
1581
f0db101d
PA
15822015-08-21 Pedro Alves <palves@redhat.com>
1583
1584 * linux-low.c (wait_for_sigstop): Always switch to no thread
1585 selected if the previously current thread dies.
1586 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1587 process instead of the current thread's.
1588 * remote-utils.c (input_interrupt): Don't check if there's no
1589 current thread.
1590 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1591 current thread to the general thread fails, error out.
1592 (handle_qxfer_auxv, handle_qxfer_libraries)
1593 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1594 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1595 (handle_query): Check if there's a thread selected instead of
1596 checking whether there's any thread in the thread list.
1597 (handle_qxfer_threads, handle_qxfer_btrace)
1598 (handle_qxfer_btrace_conf): Don't error out early if there's no
1599 thread in the thread list.
1600 (handle_v_cont, myresume): Don't set the current thread to the
1601 continue thread.
1602 (process_serial_event) <Hg handling>: Also set thread_id if the
1603 previous general thread is still alive.
1604 (process_serial_event) <g/G handling>: If setting the current
1605 thread to the general thread fails, error out.
1606 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1607 thread's lwp instead of the current thread's.
1608 * target.c (set_desired_thread): If the desired thread was not
1609 found, leave the current thread pointing to NULL. Return an int
1610 (boolean) indicating success.
1611 * target.h (set_desired_thread): Change return type to int.
1612
40045d91
MF
16132015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1614
1615 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1616 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1617 #includes.
1618 (ps_get_thread_area): New function.
1619
45face3b
GB
16202015-08-19 Gary Benson <gbenson@redhat.com>
1621
1622 * hostio.c (handle_pread): Do not attempt to read more data
1623 than hostio_reply_with_data can fit in a packet.
1624
16d5f642
JB
16252015-08-18 Joel Brobecker <brobecker@adacore.com>
1626
1627 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1628
a738da3a
MF
16292015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1630
1631 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1632
33ebda9d
PA
16332015-08-06 Pedro Alves <palves@redhat.com>
1634
1635 * tracepoint.c (expr_eval_result): Now an int.
1636
a44892be
PA
16372015-08-06 Pedro Alves <palves@redhat.com>
1638
1639 * gdbthread.h (struct regcache): Forward declare.
1640 (struct thread_info) <regcache_data>: Now a struct regcache
1641 pointer.
1642 * inferiors.c (inferior_regcache_data)
1643 (set_inferior_regcache_data): Now work with struct regcache
1644 pointers.
1645 * inferiors.h (struct regcache): Forward declare.
1646 (inferior_regcache_data, set_inferior_regcache_data): Now work
1647 with struct regcache pointers.
1648 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1649 (free_register_cache_thread): Remove struct regcache pointer
1650 casts.
1651
608a1e46
PA
16522015-08-06 Pedro Alves <palves@redhat.com>
1653
1654 * server.c (captured_main): On error, print the exception message
1655 to stderr, and if run_once is set, throw a quit.
1656
f0ce0d3a
PA
16572015-08-06 Pedro Alves <palves@redhat.com>
1658
1659 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1660 the current thread.
1661
bf47e248
PA
16622015-08-06 Pedro Alves <palves@redhat.com>
1663
1664 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1665 reading beyond the passed in buffer length.
1666
b6b9ffcc
PL
16672015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1668
1669 * tracepoint.c (symbol_list) <required>: Remove.
1670
863d01bd
PA
16712015-08-06 Pedro Alves <palves@redhat.com>
1672
1673 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1674 count if stopping and suspending threads.
1675 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1676 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1677 (linux_detach): Complete an ongoing step-over.
1678 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1679 throughout.
1680 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1681 (linux_wait_1): If passing a signal to the inferior after
1682 finishing a step-over, unsuspend and re-resume all lwps. If we
1683 see a single-step event but the thread should be continuing, don't
1684 pass the trap to gdb.
1685 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1686 internal_error instead of gdb_assert.
1687 (enqueue_pending_signal): New function.
1688 (check_ptrace_stopped_lwp_gone): Add debug output.
1689 (start_step_over): Use internal_error instead of gdb_assert.
1690 (complete_ongoing_step_over): New function.
1691 (linux_resume_one_thread): Don't resume a suspended thread.
1692 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1693 it stepping.
1694
00db26fa
PA
16952015-08-06 Pedro Alves <palves@redhat.com>
1696
1697 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1698 (linux_thread_alive): Use lwp_is_marked_dead.
1699 (extended_event_reported): Delete.
1700 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1701 instead of extended_event_reported.
1702 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1703 as well.
1704 (lwp_is_marked_dead): New function.
1705 (lwp_running): Use lwp_is_marked_dead.
1706 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1707 comment.
1708
ad071a30
PA
17092015-08-06 Pedro Alves <palves@redhat.com>
1710
1711 * linux-low.c (linux_wait_1): Move fork event output out of the
1712 !report_to_gdb check. Pass event_child->waitstatus to
1713 target_waitstatus_to_string instead of ourstatus.
1714
524b57e6
YQ
17152015-08-04 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1718 if current_thread is 32 bit.
1719
6085d6f6
YQ
17202015-08-04 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1723 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1724 * server.c (extended_protocol): Remove "static".
1725 * server.h (extended_protocol): Declare it.
1726
8a7e4587
YQ
17272015-08-04 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1730 both aarch64 and aarch32.
1731 (aarch64_set_pc): Likewise.
1732
3b53ae99
YQ
17332015-08-04 Yao Qi <yao.qi@linaro.org>
1734
1735 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1736 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1737 arm-with-neon.xml to srv_xmlfiles.
1738 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1739 (is_64bit_tdesc): New function.
1740 (aarch64_linux_read_description): New function.
1741 (aarch64_arch_setup): Call aarch64_linux_read_description.
1742 (regs_info): Rename to regs_info_aarch64.
1743 (aarch64_regs_info): Return right regs_info.
1744 (initialize_low_arch): Call initialize_low_arch_aarch32.
1745
bd9e6534
YQ
17462015-08-04 Yao Qi <yao.qi@linaro.org>
1747
1748 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1749 * linux-aarch32-low.c: New file.
1750 * linux-aarch32-low.h: New file.
1751 * linux-arm-low.c (arm_fill_gregset): Move it to
1752 linux-aarch32-low.c.
1753 (arm_store_gregset): Likewise.
1754 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1755 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1756 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1757 (regs_info): Rename to regs_info_arm.
1758 (arm_regs_info): Return regs_info_aarch32 if
1759 have_ptrace_getregset is 1 and target description is
1760 arm_with_neon or arm_with_vfpv3.
1761 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1762 Call initialize_low_arch_aarch32 instead.
1763
ded48a5e
YQ
17642015-08-04 Yao Qi <yao.qi@linaro.org>
1765
1766 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1767 * linux-low.c: ... here.
1768 * linux-low.h (have_ptrace_getregset): Declare it.
1769
96e9210f
PA
17702015-08-04 Pedro Alves <palves@redhat.com>
1771
1772 * thread-db.c (struct thread_db): Use new typedefs.
1773 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1774 CHK calls.
1775 (disable_thread_event_reporting): Cast result of dlsym to
1776 destination function pointer type.
1777 (thread_db_mourn): Use td_ta_delete_ftype.
1778
af60a1ef
SL
17792015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1780
1781 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1782 arch variant.
1783 (CDX_BREAKPOINT): Define for R2.
1784 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1785 (the_low_target): Add comments.
1786
e8b41681
YQ
17872015-07-30 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-arm-low.c (arm_hwcap): Remove it.
1790 (arm_read_description): New local variable arm_hwcap. Don't
1791 set arm_hwcap to zero.
1792
89abb039
YQ
17932015-07-30 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1796 Use regcache->tdesc instead.
1797 (arm_store_wmmxregset): Likewise.
1798 (arm_fill_vfpregset): Likewise.
1799 (arm_store_vfpregset): Likewise.
1800
deca266c
YQ
18012015-07-30 Yao Qi <yao.qi@linaro.org>
1802
1803 * linux-arm-low.c: Include arch/arm.h.
1804 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1805 (arm_store_gregset): Likewise.
1806
aa58a496
SM
18072015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1810 ptrace's 4th parameter.
1811
50904b25
YQ
18122015-07-27 Yao Qi <yao.qi@linaro.org>
1813
1814 * configure.srv (case aarch64*-*-linux*): Don't set
1815 srv_linux_usrregs.
1816
5826e159
PA
18172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1818
1819 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1820 sys/ptrace.h.
1821 * linux-arm-low.c: Likewise.
1822 * linux-cris-low.c: Likewise.
1823 * linux-crisv32-low.c: Likewise.
1824 * linux-low.c: Likewise.
1825 * linux-m68k-low.c: Likewise.
1826 * linux-mips-low.c: Likewise.
1827 * linux-nios2-low.c: Likewise.
1828 * linux-s390-low.c: Likewise.
1829 * linux-sparc-low.c: Likewise.
1830 * linux-tic6x-low.c: Likewise.
1831 * linux-tile-low.c: Likewise.
1832 * linux-x86-low.c: Likewise.
1833
54019719
PA
18342015-07-24 Pedro Alves <palves@redhat.com>
1835
1836 * config.in: Regenerate.
1837 * configure: Regenerate.
1838
eb7aa561
PA
18392015-07-24 Pedro Alves <palves@redhat.com>
1840
1841 * acinclude.m4: Include ../ptrace.m4.
1842 * configure.ac: Call GDB_AC_PTRACE.
1843 * config.in, configure: Regenerate.
1844
55d7b841
YQ
18452015-07-24 Yao Qi <yao.qi@linaro.org>
1846
1847 * linux-low.c (linux_create_inferior): Remove setting to
1848 proc->priv->new_inferior.
1849 (linux_attach): Likewise.
1850 (linux_low_filter_event): Likewise.
1851 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1852
c06cbd92
YQ
18532015-07-24 Yao Qi <yao.qi@linaro.org>
1854
1855 * linux-low.c (linux_arch_setup): New function.
1856 (linux_low_filter_event): If proc->tdesc is NULL and
1857 proc->attached is true, call the_low_target.arch_setup.
1858 Otherwise, keep status pending, and return.
1859 (linux_resume_one_lwp_throw): Don't call get_pc if
1860 thread->while_stepping isn't NULL. Don't call
1861 get_thread_regcache if proc->tdesc is NULL.
1862 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1863 (linux_target_ops): Install arch_setup.
1864 * server.c (start_inferior): Call the_target->arch_setup.
1865 * target.h (struct target_ops) <arch_setup>: New field.
1866 (target_arch_setup): New marco.
1867 * lynx-low.c (lynx_target_ops): Update.
1868 * nto-low.c (nto_target_ops): Update.
1869 * spu-low.c (spu_target_ops): Update.
1870 * win32-low.c (win32_target_ops): Update.
1871
5ae3ebba
YQ
18722015-07-24 Yao Qi <yao.qi@linaro.org>
1873
1874 * linux-low.c (linux_add_process): Don't set
1875 proc->priv->new_inferior.
1876 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1877 (linux_attach): Likewise.
1878
eb97750b
YQ
18792015-07-24 Yao Qi <yao.qi@linaro.org>
1880
1881 * server.c (start_inferior): Code refactor.
1882
51aee833
YQ
18832015-07-24 Yao Qi <yao.qi@linaro.org>
1884
1885 * server.c (process_serial_event): Set general_thread.
1886
af1b22f3
YQ
18872015-07-21 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1890 aarch64_linux_get_debug_reg_capacity.
1891
554717a3
YQ
18922015-07-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1895 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1896 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1897 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1898 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1899 (AARCH64_HWP_ALIGNMENT): Likewise.
1900 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1901 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1902 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1903 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1904 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1905 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1906 (struct aarch64_debug_reg_state): Likewise.
1907 (struct arch_lwp_info): Likewise.
1908 (aarch64_align_watchpoint): Likewise.
1909 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1910 (aarch64_watchpoint_length): Likewise.
1911 (aarch64_point_encode_ctrl_reg): Likewise
1912 (aarch64_point_is_aligned): Likewise.
1913 (aarch64_align_watchpoint): Likewise.
1914 (aarch64_linux_set_debug_regs):
1915 (aarch64_dr_state_insert_one_point): Likewise.
1916 (aarch64_dr_state_remove_one_point): Likewise.
1917 (aarch64_handle_breakpoint): Likewise.
1918 (aarch64_handle_aligned_watchpoint): Likewise.
1919 (aarch64_handle_unaligned_watchpoint): Likewise.
1920 (aarch64_handle_watchpoint): Likewise.
1921
c67ca4de
YQ
19222015-07-17 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1925 and don't aarch64_get_debug_reg_state. All callers update.
1926 (aarch64_handle_aligned_watchpoint): Likewise.
1927 (aarch64_handle_unaligned_watchpoint): Likewise.
1928 (aarch64_handle_watchpoint): Likewise.
1929 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1930 (aarch64_remove_point): Likewise.
1931
25abf979
YQ
19322015-07-17 Yao Qi <yao.qi@linaro.org>
1933
1934 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1935 debug_printf.
1936 (aarch64_handle_unaligned_watchpoint): Likewise.
1937
db1ff28b
JK
19382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1939
1940 Revert the previous 3 commits:
1941 Move gdb_regex* to common/
1942 Move linux_find_memory_regions_full & co.
1943 gdbserver build-id attribute generator
1944
700ca40f
JK
19452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1946 Jan Kratochvil <jan.kratochvil@redhat.com>
1947
1948 gdbserver build-id attribute generator.
1949 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1950 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1951 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1952 (find_phdr): New.
1953 (get_dynamic): Use find_pdhr to traverse program headers.
1954 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1955 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1956 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1957 (get_hex_build_id): New.
1958 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1959 to reply XML document.
1960
9904185c
JK
19612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1962 Jan Kratochvil <jan.kratochvil@redhat.com>
1963
1964 * target.c: Include target/target-utils.h and fcntl.h.
1965 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1966 (target_fileio_read_stralloc): New functions.
1967
6e5b4429
JK
19682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1969
1970 * Makefile.in (OBS): Add gdb_regex.o.
1971 (gdb_regex.o): New.
1972 * config.in: Rebuilt.
1973 * configure: Rebuilt.
1974
ddc98fbf
JK
19752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1976 Jan Kratochvil <jan.kratochvil@redhat.com>
1977
1978 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1979 * Makefile.in (OBS): Add target-utils.o.
1980 (linux-maps.o, target-utils.o): New.
1981 * configure.srv (srv_linux_obj): Add linux-maps.o.
1982
e57bb7a0
PL
19832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1984
1985 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1986 function, return 1.
1987 (the_low_target): Install it.
1988
586b02a9
PA
19892015-07-14 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1992 Instead, ignore ECHILD, and throw an error for other errnos.
1993
58c1b36c
PA
19942015-07-10 Pedro Alves <palves@redhat.com>
1995
1996 * event-loop.c (struct callback_event) <data>: Change type to
1997 gdb_client_data instance instead of gdb_client_data pointer.
1998 (append_callback_event): Adjust.
1999
421530db
PL
20002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2001
2002 * linux-aarch64-low.c: Add comments for each linux_target_ops
2003 method. Remove comments already covered in target_ops and
2004 linux_target_ops definitions.
2005 (the_low_target): Add comments for each unimplemented method.
2006
c2d65f38
YQ
20072015-07-09 Yao Qi <yao.qi@linaro.org>
2008
2009 * linux-aarch64-low.c (aarch64_regmap): Remove.
2010 (aarch64_usrregs_info): Remove.
2011 (regs_info): Set field usrregs to NULL.
2012
b20a6524
MM
20132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2014
2015 * linux-low.c: Include "rsp-low.h"
2016 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2017 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2018 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2019 (handle_btrace_enable_pt): New.
2020 (handle_btrace_general_set): Support "pt".
2021 (handle_btrace_conf_general_set): Support "pt:size".
2022
96c97461
PL
20232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2024
2025 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2026 Z_PACKET_SW_BP.
2027
37d66942
PL
20282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2029
2030 * linux-aarch64-low.c: Remove comment about endianness.
2031 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2032 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2033 memcmp.
2034
dc06243f
GB
20352015-06-24 Gary Benson <gbenson@redhat.com>
2036
2037 * linux-i386-ipa.c (stdint.h): Do not include.
2038 * lynx-i386-low.c (stdint.h): Likewise.
2039 * lynx-ppc-low.c (stdint.h): Likewise.
2040 * mem-break.c (stdint.h): Likewise.
2041 * thread-db.c (stdint.h): Likewise.
2042 * tracepoint.c (stdint.h): Likewise.
2043 * win32-low.c (stdint.h): Likewise.
2044
124e13d9
SM
20452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * server.c (write_qxfer_response): Update call to
2048 remote_escape_output.
2049
909c2cda
JK
20502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2051 Jan Kratochvil <jan.kratochvil@redhat.com>
2052
2053 Merge multiple hex conversions.
2054 * gdbreplay.c (tohex): Rename to 'fromhex'.
2055 (logchar): Use fromhex.
2056
24c05f46
JK
20572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2058
2059 * server.c (handle_qxfer_libraries): Set `version' attribute for
2060 <library-list>.
2061
14d2069a
GB
20622015-06-10 Gary Benson <gbenson@redhat.com>
2063
2064 * target.h (struct target_ops) <multifs_open>: New field.
2065 <multifs_unlink>: Likewise.
2066 <multifs_readlink>: Likewise.
2067 * linux-low.c (nat/linux-namespaces.h): New include.
2068 (linux_target_ops): Initialize the_target->multifs_open,
2069 the_target->multifs_unlink and the_target->multifs_readlink.
2070 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2071 * hostio.c (hostio_fs_pid): New static variable.
2072 (hostio_handle_new_gdb_connection): New function.
2073 (handle_setfs): Likewise.
2074 (handle_open): Use the_target->multifs_open as appropriate.
2075 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2076 (handle_readlink): Use the_target->multifs_readlink as
2077 appropriate.
2078 (handle_vFile): Handle vFile:setfs packets.
2079 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2080 after target_handle_new_gdb_connection.
2081
4b8b5e72
GB
20822015-06-10 Gary Benson <gbenson@redhat.com>
2083
2084 * configure.ac (AC_CHECK_FUNCS): Add setns.
2085 * config.in: Regenerate.
2086 * configure: Likewise.
2087 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2088 (linux-namespaces.o): New rule.
2089 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2090
3ac2e371
GB
20912015-06-09 Gary Benson <gbenson@redhat.com>
2092
2093 * hostio.c (handle_open): Process mode argument with
2094 fileio_to_host_mode.
2095
ca9b78ce
YQ
20962015-06-01 Yao Qi <yao.qi@linaro.org>
2097
2098 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2099 * linux-x86-low.c: Likewise.
2100
bfacd19d
DB
21012015-05-28 Don Breazeal <donb@codesourcery.com>
2102
2103 * linux-low.c (handle_extended_wait): Initialize
2104 thread_info.last_resume_kind for new fork children.
2105
452003ef
PA
21062015-05-15 Pedro Alves <palves@redhat.com>
2107
2108 * target.h (target_handle_new_gdb_connection): Rewrite using if
2109 wrapped in do/while.
2110
1041a03c
JB
21112015-05-14 Joel Brobecker <brobecker@adacore.com>
2112
2113 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2114 * configure, config.in: Regenerate.
2115 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2116 Declare typedef.
2117
c269dbdb
DB
21182015-05-12 Don Breazeal <donb@codesourcery.com>
2119
2120 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2121 PTRACE_EVENT_VFORK_DONE.
2122 (linux_low_ptrace_options, extended_event_reported): Add vfork
2123 events.
2124 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2125 and "vforkdone" for RSP 'T' Stop Reply Packet.
2126 * server.h (report_vfork_events): Declare
2127 global variable.
2128
3a8a0396
DB
21292015-05-12 Don Breazeal <donb@codesourcery.com>
2130
2131 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2132 (the_low_target) <new_fork>: Initialize new member.
2133 * linux-arm-low.c (arm_new_fork): New function.
2134 (the_low_target) <new_fork>: Initialize new member.
2135 * linux-low.c (handle_extended_wait): Call new target function
2136 new_fork.
2137 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2138 * linux-mips-low.c (mips_add_watchpoint): New function
2139 extracted from mips_insert_point.
2140 (the_low_target) <new_fork>: Initialize new member.
2141 (mips_linux_new_fork): New function.
2142 (mips_insert_point): Call mips_add_watchpoint.
2143 * linux-x86-low.c (x86_linux_new_fork): New function.
2144 (the_low_target) <new_fork>: Initialize new member.
2145
de0d863e
DB
21462015-05-12 Don Breazeal <donb@codesourcery.com>
2147
2148 * linux-low.c (handle_extended_wait): Implement return value,
2149 rename argument 'event_child' to 'event_lwp', handle
2150 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2151 (linux_low_ptrace_options): New function.
2152 (linux_low_filter_event): Call linux_low_ptrace_options,
2153 use different argument fo linux_enable_event_reporting,
2154 use return value from handle_extended_wait.
2155 (extended_event_reported): New function.
2156 (linux_wait_1): Call extended_event_reported and set
2157 status to report fork events.
2158 (linux_write_memory): Add pid to debug message.
2159 (reset_lwp_ptrace_options_callback): New function.
2160 (linux_handle_new_gdb_connection): New function.
2161 (linux_target_ops): Initialize new structure member.
2162 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2163 * lynx-low.c: Initialize new structure member.
2164 * remote-utils.c (prepare_resume_reply): Implement stop reason
2165 "fork" for "T" stop message.
2166 * server.c (handle_query): Call handle_new_gdb_connection.
2167 * server.h (report_fork_events): Declare global flag.
2168 * target.h (struct target_ops) <handle_new_gdb_connection>:
2169 New member.
2170 (target_handle_new_gdb_connection): New macro.
2171 * win32-low.c: Initialize new structure member.
2172
ddcbc397
DB
21732015-05-12 Don Breazeal <donb@codesourcery.com>
2174
2175 * mem-break.c (APPEND_TO_LIST): Define macro.
2176 (clone_agent_expr): New function.
2177 (clone_one_breakpoint): New function.
2178 (clone_all_breakpoints): New function.
2179 * mem-break.h: Declare new functions.
2180
89245bc0
DB
21812015-05-12 Don Breazeal <donb@codesourcery.com>
2182
2183 * linux-low.c (linux_supports_fork_events): New function.
2184 (linux_supports_vfork_events): New function.
2185 (linux_target_ops): Initialize new structure members.
2186 (initialize_low): Call linux_check_ptrace_features.
2187 * lynx-low.c (lynx_target_ops): Initialize new structure
2188 members.
2189 * server.c (report_fork_events, report_vfork_events):
2190 New global flags.
2191 (handle_query): Add new features to qSupported packet and
2192 response.
2193 (captured_main): Initialize new global variables.
2194 * target.h (struct target_ops) <supports_fork_events>:
2195 New member.
2196 <supports_vfork_events>: New member.
2197 (target_supports_fork_events): New macro.
2198 (target_supports_vfork_events): New macro.
2199 * win32-low.c (win32_target_ops): Initialize new structure
2200 members.
2201
835205d0
GB
22022015-05-12 Gary Benson <gbenson@redhat.com>
2203
2204 * server.c (handle_qxfer_exec_file): Use current process
2205 if annex is empty.
2206
21e94bd9
SL
22072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2208
2209 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2210 Remove HAVE_PTRACE_GETREGS conditionals.
2211 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2212 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2213
45614f15
YQ
22142015-05-08 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-low.c (linux_supports_conditional_breakpoints): New
2217 function.
2218 (linux_target_ops): Install new target method.
2219 * lynx-low.c (lynx_target_ops): Install NULL hook for
2220 supports_conditional_breakpoints.
2221 * nto-low.c (nto_target_ops): Likewise.
2222 * spu-low.c (spu_target_ops): Likewise.
2223 * win32-low.c (win32_target_ops): Likewise.
2224 * server.c (handle_query): Check
2225 target_supports_conditional_breakpoints.
2226 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2227 New field.
2228 (target_supports_conditional_breakpoints): New macro.
2229
80ad801e
PA
22302015-05-06 Pedro Alves <palves@redhat.com>
2231
2232 PR server/18081
2233 * server.c (start_inferior): If the process exits, mourn it.
2234
819843c7
GB
22352015-04-21 Gary Benson <gbenson@redhat.com>
2236
2237 * hostio.c (fileio_open_flags_to_host): Factored out to
2238 fileio_to_host_openflags in common/fileio.c. Single use
2239 updated.
2240
a2d5a9d7
MF
22412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2242
2243 * linux-xtensa-low.c (xtensa_fill_gregset)
2244 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2245 XCHAL_HAVE_LOOP.
2246
deb44829
MF
22472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2248
2249 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2250 (regs_info): Replace usrregs pointer with NULL.
2251
e57f1de3
GB
22522015-04-17 Gary Benson <gbenson@redhat.com>
2253
2254 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2255 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2256 * server.c (handle_qxfer_exec_file): New function.
2257 (qxfer_packets): Add exec-file entry.
2258 (handle_query): Report qXfer:exec-file:read as supported packet.
2259
62828379
RN
22602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2261
2262 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2263
b88bb450
GB
22642015-04-09 Gary Benson <gbenson@redhat.com>
2265
2266 * hostio-errno.c (errno_to_fileio_error): Remove function.
2267 Update caller to use remote_fileio_to_fio_error.
2268
c8f4bfdd
YQ
22692015-04-09 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (linux_insert_point): Call
2272 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2273 (linux_remove_point): Call remove_memory_breakpoint if type is
2274 raw_bkpt_type_sw.
2275 * linux-x86-low.c (x86_insert_point): Don't call
2276 insert_memory_breakpoint.
2277 (x86_remove_point): Don't call remove_memory_breakpoint.
2278
41f98f02
PA
22792015-04-01 Pedro Alves <palves@redhat.com>
2280 Cleber Rosa <crosa@redhat.com>
2281
2282 * server.c (gdbserver_usage): Reorganize and extend the usage
2283 message.
2284
2bf6fb9d
PA
22852015-03-24 Pedro Alves <palves@redhat.com>
2286
2287 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2288 output. Also dump TRAP_TRACE.
2289 (linux_low_filter_event): In debug output, distinguish a
2290 resume_stop SIGSTOP from a delayed SIGSTOP.
2291
369f6daa
GB
22922015-03-24 Gary Benson <gbenson@redhat.com>
2293
2294 * linux-x86-low.c (x86_linux_new_thread): Moved to
2295 nat/x86-linux.c.
2296 (x86_linux_prepare_to_resume): Likewise.
2297
8e5d4070
GB
22982015-03-24 Gary Benson <gbenson@redhat.com>
2299
2300 * Makefile.in (x86-linux-dregs.o): New rule.
2301 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2302 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2303 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2304 (x86_linux_dr_get): Likewise.
2305 (x86_linux_dr_set): Likewise.
2306 (update_debug_registers_callback): Likewise.
2307 (x86_linux_dr_set_addr): Likewise.
2308 (x86_linux_dr_get_addr): Likewise.
2309 (x86_linux_dr_set_control): Likewise.
2310 (x86_linux_dr_get_control): Likewise.
2311 (x86_linux_dr_get_status): Likewise.
2312 (x86_linux_update_debug_registers): Likewise.
2313
2b95d440
GB
23142015-03-24 Gary Benson <gbenson@redhat.com>
2315
2316 * linux-x86-low.c (x86_linux_update_debug_registers):
2317 New function, factored out from...
2318 (x86_linux_prepare_to_resume): ...this.
2319
14b0bc68
GB
23202015-03-24 Gary Benson <gbenson@redhat.com>
2321
2322 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2323 (x86_linux_dr_set): Likewise.
2324 (update_debug_registers_callback): Likewise.
2325 (x86_linux_dr_set_addr): Likewise.
2326 (x86_linux_dr_get_addr): Likewise.
2327 (x86_linux_dr_set_control): Likewise.
2328 (x86_linux_dr_get_control): Likewise.
2329 (x86_linux_dr_get_status): Likewise.
2330 (x86_linux_prepare_to_resume): Likewise.
2331
5dfe6ca8
GB
23322015-03-24 Gary Benson <gbenson@redhat.com>
2333
2334 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2335 Use perror_with_name. Pass string through gettext.
2336 (x86_linux_dr_set): Likewise.
2337
d33472ad
GB
23382015-03-24 Gary Benson <gbenson@redhat.com>
2339
2340 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2341 (x86_linux_dr_set_addr): ...this.
2342 (x86_dr_low_get_addr): Rename to...
2343 (x86_linux_dr_get_addr): ...this.
2344 (x86_dr_low_set_control): Rename to...
2345 (x86_linux_dr_set_control): ...this.
2346 (x86_dr_low_get_control): Rename to...
2347 (x86_linux_dr_get_control): ...this.
2348 (x86_dr_low_get_status): Rename to...
2349 (x86_linux_dr_get_status): ...this.
2350 (x86_dr_low): Update with new function names.
2351
4b134ca1
GB
23522015-03-24 Gary Benson <gbenson@redhat.com>
2353
2354 * Makefile.in (x86-linux.o): New rule.
2355 * configure.srv: Add x86-linux.o to relevant targets.
2356 * linux-low.c (lwp_set_arch_private_info): New function.
2357 (lwp_arch_private_info): Likewise.
2358 * linux-x86-low.c: Include nat/x86-linux.h.
2359 (arch_lwp_info): Removed structure.
2360 (update_debug_registers_callback):
2361 Use lwp_set_debug_registers_changed.
2362 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2363 and lwp_set_debug_registers_changed.
2364 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2365
34c703da
GB
23662015-03-24 Gary Benson <gbenson@redhat.com>
2367
2368 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2369 * linux-arm-low.c (arm_new_thread): Likewise.
2370 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2371 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2372 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2373 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2374
cff068da
GB
23752015-03-24 Gary Benson <gbenson@redhat.com>
2376
2377 * linux-low.c (ptid_of_lwp): New function.
2378 (lwp_is_stopped): Likewise.
2379 (lwp_stop_reason): Likewise.
2380 * linux-x86-low.c (update_debug_registers_callback):
2381 Use lwp_is_stopped.
2382 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2383 lwp_stop_reason.
2384
b2f7c7e8
GB
23852015-03-24 Gary Benson <gbenson@redhat.com>
2386
2387 * linux-low.h (linux_stop_lwp): Remove declaration.
2388
6d4ee8c6
GB
23892015-03-24 Gary Benson <gbenson@redhat.com>
2390
2391 * linux-low.h: Include nat/linux-nat.h.
2392 * linux-low.c (iterate_over_lwps_args): New structure.
2393 (iterate_over_lwps_filter): New function.
2394 (iterate_over_lwps): Likewise.
2395 * linux-x86-low.c (update_debug_registers_callback):
2396 Update signature to what iterate_over_lwps expects.
2397 Remove PID check that iterate_over_lwps now performs.
2398 (x86_dr_low_set_addr): Use iterate_over_lwps.
2399 (x86_dr_low_set_control): Likewise.
2400
70a0bb6b
GB
24012015-03-24 Gary Benson <gbenson@redhat.com>
2402
2403 * linux-x86-low.c (x86_debug_reg_state): New function.
2404 (x86_linux_prepare_to_resume): Use the above.
2405
7b669087
GB
24062015-03-24 Gary Benson <gbenson@redhat.com>
2407
2408 * linux-low.c (current_lwp_ptid): New function.
2409 * linux-x86-low.c: Include nat/linux-nat.h.
2410 (x86_dr_low_get_addr): Use current_lwp_ptid.
2411 (x86_dr_low_get_control): Likewise.
2412 (x86_dr_low_get_status): Likewise.
2413
eef49a3d
PA
24142015-03-20 Pedro Alves <palves@redhat.com>
2415
2416 * tracepoint.c (cmd_qtstatus): Make "str" const.
2417
b2333d22
PA
24182015-03-20 Pedro Alves <palves@redhat.com>
2419
2420 * server.c (handle_general_set): Make "req_str" const.
2421
23f238d3
PA
24222015-03-19 Pedro Alves <palves@redhat.com>
2423
2424 * linux-low.c (linux_resume_one_lwp): Rename to ...
2425 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2426 instead call perror_with_name.
2427 (check_ptrace_stopped_lwp_gone): New function.
2428 (linux_resume_one_lwp): Reimplement as wrapper around
2429 linux_resume_one_lwp_throw that swallows errors if the LWP is
2430 gone.
2431
91baf43f
PA
24322015-03-19 Pedro Alves <palves@redhat.com>
2433
2434 * linux-low.c (count_events_callback, select_event_lwp_callback):
2435 No longer check whether the thread has resume_stop as last resume
2436 kind.
2437
8bf3b159
PA
24382015-03-19 Pedro Alves <palves@redhat.com>
2439
2440 * linux-low.c (count_events_callback, select_event_lwp_callback):
2441 Use the lwp's status_pending_p field, not the thread's.
2442
b90fc188
PA
24432015-03-19 Pedro Alves <palves@redhat.com>
2444
2445 * linux-low.c (select_event_lwp_callback): Update comments to
2446 no longer mention SIGTRAP.
2447
464b0089
GB
24482015-03-18 Gary Benson <gbenson@redhat.com>
2449
2450 * server.c (handle_query): Do not report vFile:fstat as supported.
2451
aa9e327f
GB
24522015-03-11 Gary Benson <gbenson@redhat.com>
2453
2454 * hostio.c (sys/types.h): New include.
2455 (sys/stat.h): Likewise.
2456 (common-remote-fileio.h): Likewise.
2457 (handle_fstat): New function.
2458 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2459
791c0056
GB
24602015-03-11 Gary Benson <gbenson@redhat.com>
2461
2462 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2463 struct stat.st_blocks and struct stat.st_blksize.
2464 * configure: Regenerate.
2465 * config.in: Likewise.
2466 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2467 (OBS): Add common-remote-fileio.o.
2468 (common-remote-fileio.o): New rule.
2469
9a9df970
PA
24702015-03-09 Pedro Alves <palves@redhat.com>
2471
2472 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2473 'struct sockaddr' pointer in 'accept' call.
2474
9eb1356e
PA
24752015-03-09 Pedro Alves <palves@redhat.com>
2476
2477 Revert:
2478 2015-03-07 Pedro Alves <palves@redhat.com>
2479 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2480 or <winsock2.h> here. Instead include "gdb_socket.h".
2481 (remote_open): Use union gdb_sockaddr_u.
2482 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2483 or <winsock2.h> here. Instead include "gdb_socket.h".
2484 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2485 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2486 or <sys/un.h>.
2487 (init_named_socket, gdb_agent_helper_thread): Use union
2488 gdb_sockaddr_u.
2489
aac331e4
PA
24902015-03-07 Pedro Alves <palves@redhat.com>
2491
2492 * configure.ac (build_warnings): Move
2493 -Wdeclaration-after-statement to the C-specific set.
2494 * configure: Regenerate.
2495
366c75fc
PA
24962015-03-07 Pedro Alves <palves@redhat.com>
2497
2498 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2499 or <winsock2.h> here. Instead include "gdb_socket.h".
2500 (remote_open): Use union gdb_sockaddr_u.
2501 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2502 or <winsock2.h> here. Instead include "gdb_socket.h".
2503 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2504 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2505 or <sys/un.h>.
2506 (init_named_socket, gdb_agent_helper_thread): Use union
2507 gdb_sockaddr_u.
2508
492d29ea
PA
25092015-03-07 Pedro Alves <palves@redhat.com>
2510
2511 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2512 instead.
2513
60a191ed
YQ
25142015-03-06 Yao Qi <yao.qi@linaro.org>
2515
2516 * linux-aarch64-low.c (aarch64_insert_point): Use
2517 show_debug_regs as a boolean.
2518 (aarch64_remove_point): Likewise.
2519
f5771b1d
PA
25202015-03-05 Pedro Alves <palves@redhat.com>
2521
2522 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2523 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2524 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2525 * nto-low.c (nto_target_ops): Likewise.
2526 * spu-low.c (spu_target_ops): Likewise.
2527 * win32-low.c (win32_target_ops): Likewise.
2528
3e572f71
PA
25292015-03-04 Pedro Alves <palves@redhat.com>
2530
72f4393d 2531 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2532 Decide whether a breakpoint triggered based on the SIGTRAP's
2533 siginfo.si_code.
72f4393d
L
2534 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2535 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2536 (linux_low_filter_event): Check for breakpoints before checking
2537 watchpoints.
2538 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2539 siginfo.si_code.
72f4393d
L
2540 (linux_stopped_by_sw_breakpoint)
2541 (linux_supports_stopped_by_sw_breakpoint)
2542 (linux_stopped_by_hw_breakpoint)
2543 (linux_supports_stopped_by_hw_breakpoint): New functions.
2544 (linux_target_ops): Install new target methods.
3e572f71 2545
1ec68e26
PA
25462015-03-04 Pedro Alves <palves@redhat.com>
2547
2548 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2549 * server.c (swbreak_feature, hwbreak_feature): New globals.
2550 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2551 (captured_main): Clear swbreak_feature and hwbreak_feature.
2552 * server.h (swbreak_feature, hwbreak_feature): Declare.
2553 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2554 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2555 supports_stopped_by_hw_breakpoint>: New fields.
2556 (target_supports_stopped_by_sw_breakpoint)
2557 (target_stopped_by_sw_breakpoint)
2558 (target_supports_stopped_by_hw_breakpoint)
2559 (target_stopped_by_hw_breakpoint): Declare.
2560
15c66dd6
PA
25612015-03-04 Pedro Alves <palves@redhat.com>
2562
2563 enum lwp_stop_reason -> enum target_stop_reason
2564 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2565 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2566 (linux_wait_1, stuck_in_jump_pad_callback)
2567 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2568 (linux_stopped_by_watchpoint):
2569 * linux-low.h (enum lwp_stop_reason): Delete.
2570 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2571 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2572
98fc70d6
YQ
25732015-03-04 Yao Qi <yao.qi@linaro.org>
2574
2575 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2576
dd2ac174
GB
25772015-03-03 Gary Benson <gbenson@redhat.com>
2578
2579 * hostio.c (handle_vFile): Fix prefix lengths.
2580
d68e53f4
MM
25812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2582
2583 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2584 ptr_bits.
2585
bf2d68ab
AA
25862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2587
2588 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2589 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2590 (clean): Add "rm -f" for above C files.
2591 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2592 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2593 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2594 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2595 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2596 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2597 (init_registers_s390x_vx_linux64)
2598 (init_registers_s390x_tevx_linux64)
2599 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2600 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2601 declarations.
2602 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2603 (s390_store_vxrs_high): New functions.
2604 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2605 NT_S390_VXRS_HIGH.
2606 (s390_arch_setup): Add logic for selecting one of the new target
2607 descriptions. Activate the new vector regsets if applicable.
2608 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2609 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2610 and init_registers_s390x_tevx_linux64.
2611
c966a859
PA
26122015-03-01 Pedro Alves <palves@redhat.com>
2613
2614 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2615 parameter.
2616
4180215b
PA
26172015-02-27 Pedro Alves <palves@redhat.com>
2618
2619 * linux-x86-low.c (u_debugreg_offset): New function.
2620 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2621
749bab01
PA
26222015-02-27 Pedro Alves <palves@redhat.com>
2623
2624 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2625 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2626 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2627 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2628 (ps_lsetfpregs, ps_getpid)
2629 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2630 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2631 (ps_lsetxregs, ps_plog): Declare.
2632
3c14e5a3
PA
26332015-02-27 Pedro Alves <palves@redhat.com>
2634
2635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2636 IP_AGENT_EXPORT_FUNC.
2637 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2638 IP_AGENT_EXPORT_FUNC.
2639 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2640 (IP_AGENT_EXPORT): Delete.
2641 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2642 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2643 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2644 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2645 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2646 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2647 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2648 (traceframe_read_count, traceframe_write_count)
2649 (traceframes_created, trace_state_variables, get_raw_reg)
2650 (get_trace_state_variable_value, set_trace_state_variable_value)
2651 (ust_loaded, helper_thread_id, cmd_buf): Use
2652 IPA_SYM_EXPORTED_NAME.
2653 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2654 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2655 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2656 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2657 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2658 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2659 EXTERN_C_PUSH/EXTERN_C_POP.
2660 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2661 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2662 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2663 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2664 (traceframe_write_count, traceframe_read_count)
2665 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2666 (about_to_request_buffer_space, get_trace_state_variable_value)
2667 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2668 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2669 EXTERN_C_PUSH/EXTERN_C_POP.
2670 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2671 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2672 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2673 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2674 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2675 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2676 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2677 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2678 Define.
2679 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2680 (IP_AGENT_EXPORT_VAR_DECL): Define.
2681 (tracing): Declare.
2682 (gdb_agent_get_raw_reg): Declare.
2683
fe978cb0
PA
26842015-02-27 Tom Tromey <tromey@redhat.com>
2685 Pedro Alves <palves@redhat.com>
2686
2687 Rename symbols whose names are reserved C++ keywords throughout.
2688
3bc3d82a
PA
26892015-02-27 Pedro Alves <palves@redhat.com>
2690
2691 * Makefile.in (COMPILER): New, get it from autoconf.
2692 (CXX): Get from autoconf instead.
2693 (COMPILE.pre): Use COMPILER.
2694 (CC-LD): Rename to ...
2695 (CC_LD): ... this. Use COMPILER.
2696 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2697 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2698 * acinclude.m4: Include build-with-cxx.m4.
2699 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2700 Disable -Werror by default if building in C++ mode.
2701 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2702 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2703 the C++ compiler. Save/restore CXXFLAGS too.
2704 * configure: Regenerate.
2705
07697489
PA
27062015-02-27 Pedro Alves <palves@redhat.com>
2707
2708 * acinclude.m4: Include libiberty.m4.
2709 * configure.ac: Call libiberty_INIT.
2710 * config.in, configure: Regenerate.
2711
9beb7c4e
PA
27122015-02-26 Pedro Alves <palves@redhat.com>
2713
2714 * linux-low.c (linux_wait_1): When incrementing the PC past a
2715 program breakpoint always use the_low_target.breakpoint_len as
2716 increment, rather than the maximum between that and
2717 the_low_target.decr_pc_after_break.
2718
8090aef2
PA
27192015-02-23 Pedro Alves <palves@redhat.com>
2720
2721 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2722 thread was doing a step-over; always adjust the PC if
2723 we stepped over a permanent breakpoint.
2724 (linux_wait_1): If we stepped over breakpoint that was on top of a
2725 permanent breakpoint, manually advance the PC past it.
2726
bc9540e8
PA
27272015-02-23 Pedro Alves <palves@redhat.com>
2728
2729 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2730 modes.
2731 (x86_fill_gregset, x86_store_gregset): Use it when handling
2732 $orig_eax.
2733
2db9a427
PA
27342015-02-20 Pedro Alves <palves@redhat.com>
2735
2736 * thread-db.c: Include "nat/linux-procfs.h".
2737 (thread_db_init): Skip listing new threads if the kernel supports
2738 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2739
afa8d396
PA
27402015-02-20 Pedro Alves <palves@redhat.com>
2741
2742 * linux-low.c (status_pending_p_callback): Use ptid_match.
2743
c9587f88
AT
27442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2745
2746 PR breakpoints/16812
2747 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2748 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2749 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2750
b05ec7a5
AT
27512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2752
2753 PR breakpoints/15956
2754 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2755
d33501a5
MM
27562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2757
2758 * linux-low.c (linux_low_btrace_conf): Print size.
2759 * server.c (handle_btrace_conf_general_set): New.
2760 (hanle_general_set): Call handle_btrace_conf_general_set.
2761 (handle_query): Report Qbtrace-conf:bts:size as supported.
2762
f4abbc16
MM
27632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2764
2765 * linux-low.c (linux_low_enable_btrace): Update parameters.
2766 (linux_low_btrace_conf): New.
2767 (linux_target_ops)<to_btrace_conf>: Initialize.
2768 * server.c (current_btrace_conf): New.
2769 (handle_btrace_enable): Rename to ...
2770 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2771 to target_enable_btrace. Update comment. Update users.
2772 (handle_qxfer_btrace_conf): New.
2773 (qxfer_packets): Add btrace-conf entry.
2774 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2775 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2776 (target_ops)<read_btrace_conf>: New.
2777 (target_enable_btrace): Update parameters.
2778 (target_read_btrace_conf): New.
2779
043c3577
MM
27802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2781
2782 * server.c (handle_btrace_general_set): Remove call to
2783 target_supports_btrace.
2784 (supported_btrace_packets): New.
2785 (handle_query): Call supported_btrace_packets.
2786 * target.h: include btrace-common.h.
2787 (btrace_target_info): Removed.
2788 (supports_btrace, target_supports_btrace): Update parameters.
2789
734b0e4b
MM
27902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2791
2792 * Makefile.in (SFILES): Add common/btrace-common.c.
2793 (OBS): Add common/btrace-common.o.
2794 (btrace-common.o): Add build rules.
2795 * linux-low: Include btrace-common.h.
2796 (linux_low_read_btrace): Use struct btrace_data. Call
2797 btrace_data_init and btrace_data_fini.
2798
d6c146e9
PA
27992015-02-06 Pedro Alves <palves@redhat.com>
2800
2801 * thread-db.c (find_new_threads_callback): Add debug output.
2802
20ba1ce6
PA
28032015-02-04 Pedro Alves <palves@redhat.com>
2804
2805 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2806 (resume_stopped_resumed_lwps): New function.
2807 (linux_wait_for_event_filtered): Use it.
2808
8cc73a39
SDJ
28092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2810
2811 * Makefile.in (SFILES): Add linux-personality.c.
2812 (linux-personality.o): New rule.
2813 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2814 list of objects to be built.
2815 * linux-low.c: Include nat/linux-personality.h.
2816 (linux_create_inferior): Remove code to disable address space
2817 randomization (moved to ../nat/linux-personality.c). Create
2818 cleanup to disable address space randomization.
2819
fb23d554
SDJ
28202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * Makefile.in (posix-strerror.o): New rule.
2823 (mingw-strerror.o): Likewise.
2824 * configure: Regenerated.
2825 * configure.ac: Source file ../common/common.host. Initialize new
2826 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2827
cdf43629
YQ
28282015-01-14 Yao Qi <yao@codesourcery.com>
2829
2830 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2831 (ppc-linux.o): New rule.
2832 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2833 * configure.ac: AC_CHECK_FUNCS(getauxval).
2834 * config.in: Re-generated.
2835 * configure: Re-generated.
2836 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2837 ppc64_64bit_inferior_p
2838
514c5338
YQ
28392015-01-14 Yao Qi <yao@codesourcery.com>
2840
2841 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2842 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2843 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2844 (PT_ORIG_R3, PT_TRAP): Likewise.
2845 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2846 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2847 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2848
3368c1e5
JB
28492015-01-10 Joel Brobecker <brobecker@adacore.com>
2850
2851 * i387-fp.c (i387_cache_to_xsave): In look over
2852 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2853 zmmh_low_space field by use of zmmh_high_space.
2854
582511be
PA
28552015-01-09 Pedro Alves <palves@redhat.com>
2856
2857 * linux-low.c (step_over_bkpt): Move higher up in the file.
2858 (handle_extended_wait): Don't store the stop_pc here.
2859 (get_stop_pc): Adjust comments and rename to ...
2860 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2861 stopped for a software breakpoint or hardware breakpoint.
2862 (thread_still_has_status_pending_p): New function.
2863 (status_pending_p_callback): Use
2864 thread_still_has_status_pending_p. If the event is no longer
2865 interesting, resume the LWP.
2866 (handle_tracepoints): Add assert.
2867 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2868 (wstatus_maybe_breakpoint): New function.
2869 (cancel_breakpoint): Delete function.
2870 (check_stopped_by_watchpoint): New function, factored out from
2871 linux_low_filter_event.
2872 (lp_status_maybe_breakpoint): Delete function.
2873 (linux_low_filter_event): Remove filter_ptid argument.
2874 Leave thread group exits pending here. Store the LWP's stop PC.
2875 Always leave events pending.
2876 (linux_wait_for_event_filtered): Pull all events out of the
2877 kernel, and leave them all pending.
2878 (count_events_callback, select_event_lwp_callback): Consider all
2879 events.
2880 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2881 (select_event_lwp): Only give preference to the stepping LWP in
2882 all-stop mode. Adjust comments.
2883 (ignore_event): New function.
2884 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2885 references to cancel_breakpoints. Adjust to renames. Also give
2886 equal priority to all LWPs that have had events in non-stop mode.
2887 If reporting a software breakpoint event, unadjust the LWP's PC.
2888 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2889 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2890 Adjust.
2891 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2892 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2893 (linux_stopped_by_watchpoint): Adjust.
2894 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2895 * linux-low.h (enum lwp_stop_reason): New.
2896 (struct lwp_info) <stop_pc>: Adjust comment.
2897 <stopped_by_watchpoint>: Delete field.
2898 <stop_reason>: New field.
2899 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2900 * mem-break.c (software_breakpoint_inserted_here)
2901 (hardware_breakpoint_inserted_here): New function.
2902 * mem-break.h (software_breakpoint_inserted_here)
2903 (hardware_breakpoint_inserted_here): Declare.
2904 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2905 (cancel_breakpoints): Delete.
2906 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2907 (upload_fast_traceframes): Remove references to
2908 cancel_breakpoints.
2909
a33e3959
PA
29102015-01-09 Pedro Alves <palves@redhat.com>
2911
2912 * thread-db.c (find_new_threads_callback): Ignore thread if the
2913 kernel thread ID is -1.
2914
8784d563
PA
29152015-01-09 Pedro Alves <palves@redhat.com>
2916
2917 * linux-low.c (linux_attach_fail_reason_string): Move to
2918 nat/linux-ptrace.c, and rename.
2919 (linux_attach_lwp): Update comment.
2920 (attach_proc_task_lwp_callback): New function.
2921 (linux_attach): Adjust to rename and use
2922 linux_proc_attach_tgid_threads.
2923 (linux_attach_fail_reason_string): Delete declaration.
2924
76f2b779
JB
29252015-01-01 Joel Brobecker <brobecker@adacore.com>
2926
2927 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2928 * server.c (gdbserver_version): Likewise.
2929
fafcc06a
SDJ
29302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2931
2932 * remote-utils.c: Include ctype.h.
2933 (input_interrupt): Explicitly handle the case when the char
2934 received is the NUL byte. Improve the printing of non-ASCII
2935 characters.
2936
beed38b8
JB
29372014-12-16 Joel Brobecker <brobecker@adacore.com>
2938
2939 * linux-low.c (linux_low_filter_event): Update call to
2940 linux_enable_event_reporting following the addition of
2941 a new parameter to that function.
2942
bf330350
CU
29432014-12-16 Catalin Udma <catalin.udma@freescale.com>
2944
2945 PR server/17457
2946 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2947 (AARCH64_FPCR_REGNO): Likewise.
2948 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2949 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2950 (aarch64_store_fpregset): Likewise.
2951
5227d625
JB
29522014-12-15 Joel Brobecker <brobecker@adacore.com>
2953
2954 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2955 Remove FIXME comment about assumption about N.
2956
f93b65a0
JB
29572014-12-13 Joel Brobecker <brobecker@adacore.com>
2958
2959 * configure.ac: If large-file support is disabled in GDBserver,
2960 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2961 * configure: Regenerate.
2962
e5a9158d
AA
29632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2964
2965 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2966 warning upon ENODATA from ptrace.
2967 * linux-s390-low.c (s390_store_tdb): New.
2968 (s390_regsets): Add regset for NT_S390_TDB.
2969
feea5f36
AA
29702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2971
2972 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2973 without a fill_function.
2974 * linux-s390-low.c (s390_fill_last_break): Remove.
2975 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2976 (s390_arch_setup): Use regset's size instead of fill_function for
2977 loop end condition.
2978
098dbe61
AA
29792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2980
2981 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2982 the regset's store function when ptrace returned an error.
2983 * regcache.c (get_thread_regcache): Invalidate register cache
2984 before fetching inferior's registers.
2985
28eef672
AA
29862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2987
2988 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2989 while-loop as for-loop.
2990 (regsets_store_inferior_registers): Likewise.
2991
bdca27a2
YQ
29922014-11-28 Yao Qi <yao@codesourcery.com>
2993
2994 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2995 * config.in, configure: Re-generate.
2996 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2997 is defined.
2998
9c232dda
YQ
29992014-11-21 Yao Qi <yao@codesourcery.com>
3000
3001 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3002 (AC_CHECK_HEADERS): Remove malloc.h.
3003 * configure: Re-generated.
3004 * config.in: Re-generated.
3005 * server.h: Don't include alloca.h and malloc.h.
3006 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3007 Don't include malloc.h.
3008
43968415
JB
30092014-11-17 Joel Brobecker <brobecker@adacore.com>
3010
3011 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3012 corresponding ERRNO check in same block.
3013
40e91bc7
PA
30142014-11-12 Pedro Alves <palves@redhat.com>
3015
3016 * server.c (cont_thread): Update comment.
3017 (start_inferior, attach_inferior): No longer clear cont_thread.
3018 (handle_v_cont): No longer set cont_thread.
3019 (captured_main): Clear cont_thread each time a GDB connects.
3020
c2c118cf
PA
30212014-11-12 Pedro Alves <palves@redhat.com>
3022
3023 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3024 thread, and don't resume all threads if the Hc thread has exited.
3025
78708b7c
PA
30262014-11-12 Pedro Alves <palves@redhat.com>
3027
3028 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3029 the process group instead of to a specific LWP.
3030
a2abc7de
PA
30312014-10-15 Pedro Alves <palves@redhat.com>
3032
3033 PR server/17487
3034 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3035 parameter.
3036 (arm_set_thread_context): Delete.
3037 (the_low_target): Adjust.
3038 * win32-i386-low.c (debug_registers_changed)
3039 (debug_registers_used): Delete.
3040 (update_debug_registers_callback): New function.
3041 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3042 needing to update their debug registers.
3043 (win32_get_current_dr): New function.
3044 (x86_dr_low_get_addr, x86_dr_low_get_control)
3045 (x86_dr_low_get_status): Fetch the debug register from the thread
3046 record's context.
3047 (i386_initial_stuff): Adjust.
3048 (i386_get_thread_context): Remove current_event parameter. Don't
3049 clear debug_registers_changed nor copy DR values to
3050 debug_reg_state.
3051 (i386_set_thread_context): Delete.
3052 (i386_prepare_to_resume): New function.
3053 (i386_thread_added): Mark the thread as needing to update irs
3054 debug registers.
3055 (the_low_target): Remove i386_set_thread_context and install
3056 i386_prepare_to_resume.
3057 * win32-low.c (win32_get_thread_context): Adjust.
3058 (win32_set_thread_context): Use SetThreadContext
3059 directly.
3060 (win32_prepare_to_resume): New function.
3061 (win32_require_context): New function, factored out from ...
3062 (thread_rec): ... this.
3063 (continue_one_thread): Call win32_prepare_to_resume on each thread
3064 we're about to continue.
3065 (win32_resume): Call win32_prepare_to_resume on the event thread.
3066 * win32-low.h (struct win32_thread_info)
3067 <debug_registers_changed>: New field.
3068 (struct win32_target_ops): Change prototype of set_thread_context,
3069 delete set_thread_context and add prepare_to_resume.
3070 (win32_require_context): New declaration.
3071
a442d071
GB
30722014-10-08 Gary Benson <gbenson@redhat.com>
3073
3074 * server.h: Do not include common-exceptions.h.
3075
6f1947e8
GB
30762014-10-08 Gary Benson <gbenson@redhat.com>
3077
3078 * server.h: Do not include cleanups.h.
3079
63b434a4
JH
30802014-09-30 James Hogan <james.hogan@imgtec.com>
3081
3082 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3083 mips64-dsp-linux.c.
3084
c4d9ceb6
YQ
30852014-09-23 Yao Qi <yao@codesourcery.com>
3086
3087 * linux-low.c (lp_status_maybe_breakpoint): New function.
3088 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3089 (count_events_callback): Likewise.
3090 (select_event_lwp_callback): Likewise.
3091 (cancel_breakpoints_callback): Likewise.
3092
89a5711c
DB
30932014-09-19 Don Breazeal <donb@codesourcery.com>
3094
3095 * linux-low.c (handle_extended_wait): Call
3096 linux_ptrace_get_extended_event.
3097 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3098 linux_is_extended_waitstatus.
3099
bffc0964
JB
31002014-09-16 Joel Brobecker <brobecker@adacore.com>
3101
3102 * Makefile.in (CPPFLAGS): Define.
3103 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3104 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3105
0bfdf32f
GB
31062014-09-16 Gary Benson <gbenson@redhat.com>
3107
3108 * inferiors.h (current_inferior): Renamed as...
3109 (current_thread): New variable. All uses updated.
3110 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3111 (maybe_move_out_of_jump_pad): Likewise.
3112 (cancel_breakpoint): Likewise.
3113 (linux_low_filter_event): Likewise.
3114 (wait_for_sigstop): Likewise.
3115 (linux_resume_one_lwp): Likewise.
3116 (need_step_over_p): Likewise.
3117 (start_step_over): Likewise.
3118 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3119 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3120 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3121 and save_inferior as saved_thread.
3122 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3123 saved_thread.
3124 (regcache_invalidate_thread): Likewise.
3125 * remote-utils.c (prepare_resume_reply): Likewise.
3126 * thread-db.c (thread_db_get_tls_address): Likewise.
3127 (disable_thread_event_reporting): Likewise.
3128 (remove_thread_event_breakpoints): Likewise.
3129 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3130 as saved_thread.
3131 * target.h (set_desired_inferior): Renamed as...
3132 (set_desired_thread): New declaration. All uses updated.
3133 * server.c (myresume): Updated comment to reference thread instead
3134 of inferior.
3135 (handle_serial_event): Likewise.
3136 (handle_target_event): Likewise.
3137
361c8ade
GB
31382014-09-12 Tom Tromey <tromey@redhat.com>
3139 Gary Benson <gbenson@redhat.com>
3140
3141 * regcache.h: Include common-regcache.h.
3142 (regcache_read_pc): Don't declare.
3143 * regcache.c (get_thread_regcache_for_ptid): New function.
3144
bd9269f7
GB
31452014-09-11 Tom Tromey <tromey@redhat.com>
3146 Gary Benson <gbenson@redhat.com>
3147
3148 * symbol.c: New file.
3149 * Makefile.in (SFILES): Add symbol.c.
3150 (OBS): Add symbol.o.
3151
f8c1d06b
GB
31522014-09-11 Gary Benson <gbenson@redhat.com>
3153
3154 * target.c (target_stop_ptid, target_continue_ptid): New
3155 functions.
3156
721ec300
GB
31572014-09-11 Tom Tromey <tromey@redhat.com>
3158 Gary Benson <gbenson@redhat.com>
3159
3160 * target.h: Include target/target.h.
3161 * target.c (target_read_memory, target_read_uint32)
3162 (target_write_memory): New functions.
3163
c5e92cca
GB
31642014-09-11 Gary Benson <gbenson@redhat.com>
3165
3166 * server.h (debug_hw_points): Don't declare.
3167 * server.c (debug_hw_points): Don't define. Replace all uses
3168 with show_debug_regs.
3169 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3170 all uses with show_debug_regs.
3171
2e4bb98a
EBM
31722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3173
3174 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3175 endianness into account.
3176 (ppc_supply_ptrace_register): Likewise.
3177
ac740bc7
JH
31782014-09-03 James Hogan <james.hogan@imgtec.com>
3179
3180 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3181 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3182
97ea6506
GB
31832014-09-03 Gary Benson <gbenson@redhat.com>
3184
3185 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3186 ALL_DEBUG_ADDRESS_REGISTERS.
3187
df7e5265
GB
31882014-09-02 Gary Benson <gbenson@redhat.com>
3189
3190 * i386-low.h: Renamed as...
3191 * x86-low.h: New file. All type, function and variable name
3192 prefixes changed from "i386_" to "x86_". All references updated.
3193 * i386-low.c: Renamed as...
3194 * x86-low.c: New file. All type, function and variable name
3195 prefixes changed from "i386_" to "x86_". All references updated.
3196
ed859da7
GB
31972014-09-02 Gary Benson <gbenson@redhat.com>
3198
3199 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3200 (x86_linux_new_thread): Likewise.
3201
860789c7
GB
32022014-08-29 Gary Benson <gbenson@redhat.com>
3203
3204 * server.h (setjmp.h): Do not include.
3205 (toplevel): Do not declare.
3206 (common-exceptions.h): Include.
3207 (cleanups.h): Likewise.
3208 * server.c (toplevel): Do not define.
3209 (exit_code): New static global.
3210 (detach_or_kill_for_exit_cleanup): New function.
3211 (main): New function. Original main renamed to...
3212 (captured_main): New function.
3213 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3214
ff55e1b5
GB
32152014-08-29 Gary Benson <gbenson@redhat.com>
3216
3217 * Makefile.in (SFILES): Add common/common-exceptions.c.
3218 (OBS): Add common-exceptions.o.
3219 (common-exceptions.o): New rule.
3220 * utils.c (prepare_to_throw_exception): New function.
3221
e9bcb658
GB
32222014-08-29 Gary Benson <gbenson@redhat.com>
3223
3224 * config.in: Regenerate.
3225 * configure: Likewise.
3226
e3180625
GB
32272014-08-29 Gary Benson <gbenson@redhat.com>
3228
3229 * Makefile.in (SFILES): Add common/cleanups.c.
3230 (OBS): cleanups.o.
3231 (cleanups.o): New rule.
3232
e3d6ba5d
GB
32332014-08-29 Gary Benson <gbenson@redhat.com>
3234
3235 * utils.c (internal_vwarning): New function.
3236
7096e886
GB
32372014-08-28 Gary Benson <gbenson@redhat.com>
3238
3239 * utils.h (fatal): Remove declaration.
3240 * utils.c (fatal): Remove function.
3241
14ce3192
GB
32422014-08-28 Gary Benson <gbenson@redhat.com>
3243
3244 * tracepoint.c (gdb_agent_init): Replace fatal with
3245 perror_with_name.
3246 (initialize_tracepoint): Likewise.
3247
50278d59
GB
32482014-08-28 Gary Benson <gbenson@redhat.com>
3249
3250 * remote-utils.c (remote_prepare): Replace fatal with error.
3251
aa96c426
GB
32522014-08-28 Gary Benson <gbenson@redhat.com>
3253
3254 * linux-low.c (linux_async): Replace fatal with warning.
3255 Tidy up and return.
3256 (linux_start_non_stop): Return -1 if linux_async failed.
3257
f7160e97
GB
32582014-08-28 Gary Benson <gbenson@redhat.com>
3259
3260 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3261 gdb_assert.
3262 (i386_dr_low_get_addr): Remove vague comment.
3263 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3264 gdb_assert.
3265
38e08fca
GB
32662014-08-28 Gary Benson <gbenson@redhat.com>
3267
3268 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3269 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3270 internal_error.
3271 (linux_resume_one_lwp): Likewise.
3272 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3273 gdb_assert.
3274 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3275 with internal_error.
3276 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3277 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3278 (find_register_by_name): Replace fatal with internal_error.
3279 (find_regno): Likewise.
3280 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3281 * thread-db.c (thread_db_create_event): Likewise.
3282 (thread_db_load_search): Likewise.
3283 (try_thread_db_load_1): Likewise.
3284 * tracepoint.c (get_jump_space_head): Replace fatal with
3285 internal_error.
3286 (claim_trampoline_space): Likewise.
3287 (have_fast_tracepoint_trampoline_buffer): Likewise.
3288 (cmd_qtstart): Likewise.
3289 (stop_tracing): Likewise.
3290 (fast_tracepoint_collecting): Likewise.
3291 (target_malloc): Likewise.
3292 (download_tracepoint): Likewise.
3293 (download_trace_state_variables): Replace check with gdb_assert.
3294 (upload_fast_traceframes): Replace fatal with internal_error.
3295
34abf635
GB
32962014-08-19 Tom Tromey <tromey@redhat.com>
3297 Gary Benson <gbenson@redhat.com>
3298
3299 * Makefile.in (SFILES): Add common/common-debug.c.
3300 (OBS): Add common-debug.o.
3301 (common-debug.o): New rule.
3302 * debug.h (debug_printf): Don't declare.
3303 * debug.c (debug_printf): Renamed and rewritten as...
3304 (debug_vprintf): New function.
3305
f6e94d78
GB
33062014-08-19 Gary Benson <gbenson@redhat.com>
3307
3308 * utils.h: Do not include print-utils.h.
3309
9239eeab
GB
33102014-08-19 Tom Tromey <tromey@redhat.com>
3311 Gary Benson <gbenson@redhat.com>
3312
3313 * server.h: Add static assertion.
3314 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3315
ef87c8bb
GB
33162014-08-19 Tom Tromey <tromey@redhat.com>
3317 Gary Benson <gbenson@redhat.com>
3318
3319 * Makefile.in (SFILES): Add common/errors.c.
3320 (OBS): Add errors.o.
3321 (IPA_OBS): Add errors-ipa.o.
3322 (errors.o): New rule.
3323 (errors-ipa.o): Likewise.
3324 * utils.h (perror_with_name, error, warning): Don't declare.
3325 * utils.c (warning): Renamed and rewritten as...
3326 (vwarning): New function.
3327 (error): Renamed and rewritten as...
3328 (verror): New function.
3329 (internal_error): Renamed and rewritten as...
3330 (internal_verror): New function.
3331
bb974a24
GB
33322014-08-07 Gary Benson <gbenson@redhat.com>
3333
3334 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3335 * configure: Regenerate.
3336 * config.in: Likewise.
3337 * server.h: Do not include errno.h.
3338 * event-loop.c: Likewise.
3339 * hostio-errno.c: Likewise.
3340 * linux-low.c: Likewise.
3341 * remote-utils.c: Likewise.
3342 * spu-low.c: Likewise.
3343 * utils.c: Likewise.
3344 * gdbreplay.c: Unconditionally include errno.h.
3345
6d3d12eb
GB
33462014-08-07 Gary Benson <gbenson@redhat.com>
3347
3348 * server.h: Do not include string.h.
3349 * event-loop.c: Likewise.
3350 * linux-low.c: Likewise.
3351 * regcache.c: Likewise.
3352 * remote-utils.c: Likewise.
3353 * spu-low.c: Likewise.
3354 * utils.c: Likewise.
3355
dccbb609
GB
33562014-08-07 Gary Benson <gbenson@redhat.com>
3357
3358 * server.h: Do not include gdb_assert.h.
3359
e76df0d0
GB
33602014-08-07 Gary Benson <gbenson@redhat.com>
3361
3362 * server.h: Do not include common-utils.h.
3363
4cb9c816
GB
33642014-08-07 Gary Benson <gbenson@redhat.com>
3365
3366 * server.h: Do not include ptid.h.
3367 * notif.h: Likewise.
3368
3995eeee
GB
33692014-08-07 Gary Benson <gbenson@redhat.com>
3370
3371 * server.h: Do not include gdb_locale.h.
3372
cb9f1a9b
GB
33732014-08-07 Gary Benson <gbenson@redhat.com>
3374
3375 * server.h: Do not include gdb/signals.h.
3376 * win32-low.c: Likewise.
3377
a5fceff8
GB
33782014-08-07 Gary Benson <gbenson@redhat.com>
3379
3380 * server.h: Do not include pathmax.h.
3381
b9391142
GB
33822014-08-07 Gary Benson <gbenson@redhat.com>
3383
3384 * server.h: Do not include libiberty.h.
3385 * linux-bfin-low.c: Likewise.
3386
0e443c87
GB
33872014-08-07 Gary Benson <gbenson@redhat.com>
3388
3389 * server.h: Do not include ansidecl.h.
3390
8ebb3f56
GB
33912014-08-07 Gary Benson <gbenson@redhat.com>
3392
3393 * linux-x86-low.c: Do not include stddef.h.
3394 * lynx-ppc-low.c: Likewise.
3395 * tracepoint.c: Likewise.
3396
8980bdf6
GB
33972014-08-07 Gary Benson <gbenson@redhat.com>
3398
3399 * server.h: Do not include stdarg.h.
3400 * nto-low.c: Likewise.
3401
d7096f71
GB
34022014-08-07 Gary Benson <gbenson@redhat.com>
3403
3404 * server.h: Do not include stdlib.h.
3405 * inferiors.c: Likewise.
3406 * linux-low.c: Likewise.
3407 * regcache.c: Likewise.
3408 * spu-low.c: Likewise.
3409 * tracepoint.c: Likewise.
3410 * utils.c: Likewise.
3411
d02f550d
GB
34122014-08-07 Gary Benson <gbenson@redhat.com>
3413
3414 * server.h: Do not include stdio.h.
3415 * linux-low.c: Likewise.
3416 * remote-utils.c: Likewise.
3417 * spu-low.c: Likewise.
3418 * utils.c: Likewise.
3419 * wincecompat.c: Likewise.
3420
87f6c4e3
GB
34212014-08-06 Gary Benson <gbenson@redhat.com>
3422
3423 * regcache.c (init_register_cache): Move conditionals inside if.
3424
7089dca4
GB
34252014-08-06 Gary Benson <gbenson@redhat.com>
3426
3427 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3428
462f517e
GB
34292014-07-31 Gary Benson <gbenson@redhat.com>
3430
3431 * ax.h: Do not include server.h.
3432 * gdbthread.h: Likewise.
3433 * lynx-low.h: Likewise.
3434 * notif.h: Likewise.
3435
976411d6
GB
34362014-07-30 Gary Benson <gbenson@redhat.com>
3437
3438 * server.h: Include common-defs.h.
3439 Do not include config.h or build-gnulib-gdbserver/config.h.
3440
d41f6d8e
GB
34412014-07-30 Gary Benson <gbenson@redhat.com>
3442
3443 * hostio-errno.c: Move server.h to top of includes list.
3444 * inferiors.c: Likewise.
3445 * linux-x86-low.c: Likewise.
3446 * notif.c: Include server.h.
3447
314c6a35
TT
34482014-07-24 Tom Tromey <tromey@redhat.com>
3449 Gary Benson <gbenson@redhat.com>
3450
3451 * server.h (CORE_ADDR): Now unsigned.
3452
69ff6be5
PA
34532014-07-16 Pedro Alves <palves@redhat.com>
3454
3455 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3456
ce9e3fe7
PA
34572014-07-15 Pedro Alves <palves@redhat.com>
3458
3459 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3460 copy.
3461
e76126e8
PA
34622014-07-11 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (kill_wait_lwp): New function, based on
3465 kill_one_lwp_callback, but use my_waitpid directly.
3466 (kill_one_lwp_callback, linux_kill): Use it.
3467
8e9db26e
PA
34682014-06-23 Pedro Alves <palves@redhat.com>
3469
3470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3471 before setting DR0..DR3.
3472
698b3e08
GB
34732014-06-20 Gary Benson <gbenson@redhat.com>
3474
3475 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3476 * configure: Regenerated.
3477 * config.in: Likewise.
3478
125f8a3d
GB
34792014-06-20 Gary Benson <gbenson@redhat.com>
3480
3481 * Makefile.in (SFILES): Update locations for files moved
3482 from common to nat.
3483 (object file files): Reordered.
3484
42995dbd
GB
34852014-06-20 Gary Benson <gbenson@redhat.com>
3486
3487 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3488 (i386_dr_low_set_addr): Likewise.
3489 (i386_dr_low_get_addr): Likewise.
3490 (i386_dr_low_can_set_control): Likewise.
3491 (i386_dr_low_set_control): Likewise.
3492 (i386_dr_low_get_control): Likewise.
3493 (i386_dr_low_get_status): Likewise.
3494 (i386_get_debug_register_length): Likewise.
3495 * linux-x86-low.c (i386_dr_low_set_addr):
3496 Changed signature. Made static.
3497 (i386_dr_low_get_addr): Likewise.
3498 (i386_dr_low_set_control): Likewise.
3499 (i386_dr_low_get_control): Likewise.
3500 (i386_dr_low_get_status): Likewise.
3501 (i386_dr_low): New global variable.
3502 * win32-i386-low.c (i386_dr_low_set_addr):
3503 Changed signature. Made static.
3504 (i386_dr_low_get_addr): Likewise.
3505 (i386_dr_low_set_control): Likewise.
3506 (i386_dr_low_get_control): Likewise.
3507 (i386_dr_low_get_status): Likewise.
3508 (i386_dr_low): New global variable.
3509
e1d2394b
MS
35102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3511
3512 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3513 * Makefile.in (AR, AR_FLAGS): Define.
3514 * configure: Regenerate.
3515
3a8ee006
GB
35162014-06-19 Gary Benson <gbenson@redhat.com>
3517
3518 * Makefile.in (i386-dregs.o): New rule.
3519 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3520 * i386-low.c (target.h): Remove include.
3521 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3522 (DR_CONTROL_SHIFT): Likewise.
3523 (DR_CONTROL_SIZE): Likewise.
3524 (DR_RW_EXECUTE): Likewise.
3525 (DR_RW_WRITE): Likewise.
3526 (DR_RW_READ): Likewise.
3527 (DR_RW_IORW): Likewise.
3528 (DR_LEN_1): Likewise.
3529 (DR_LEN_2): Likewise.
3530 (DR_LEN_4): Likewise.
3531 (DR_LEN_8): Likewise.
3532 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3533 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3534 (DR_ENABLE_SIZE): Likewise.
3535 (DR_LOCAL_SLOWDOWN): Likewise.
3536 (DR_GLOBAL_SLOWDOWN): Likewise.
3537 (DR_CONTROL_RESERVED): Likewise.
3538 (I386_DR_CONTROL_MASK): Likewise.
3539 (I386_DR_VACANT): Likewise.
3540 (I386_DR_LOCAL_ENABLE): Likewise.
3541 (I386_DR_GLOBAL_ENABLE): Likewise.
3542 (I386_DR_DISABLE): Likewise.
3543 (I386_DR_SET_RW_LEN): Likewise.
3544 (I386_DR_GET_RW_LEN): Likewise.
3545 (I386_DR_WATCH_HIT): Likewise.
3546 (i386_wp_op_t): Likewise.
3547 (i386_show_dr): Likewise.
3548 (i386_length_and_rw_bits): Likewise.
3549 (i386_insert_aligned_watchpoint): Likewise.
3550 (i386_remove_aligned_watchpoint): Likewise.
3551 (i386_handle_nonaligned_watchpoint): Likewise.
3552 i386_update_inferior_debug_regs(): Likewise.
3553 (i386_dr_insert_watchpoint): Likewise.
3554 (i386_dr_remove_watchpoint): Likewise.
3555 (i386_dr_region_ok_for_watchpoint): Likewise.
3556 (i386_dr_stopped_data_address): Likewise.
3557 (i386_dr_stopped_by_watchpoint): Likewise.
3558
8f26655c
GB
35592014-06-19 Gary Benson <gbenson@redhat.com>
3560
3561 * i386-low.c (i386_dr_show): Renamed to
3562 i386_show_dr and made static. All uses updated.
3563 (i386_dr_length_and_rw_bits): Renamed to
3564 i386_length_and_rw_bits and made static.
3565 All uses updated.
3566 (i386_dr_insert_aligned_watchpoint): Renamed to
3567 i386_insert_aligned_watchpoint and made static.
3568 All uses updated.
3569 (i386_dr_remove_aligned_watchpoint): Renamed to
3570 i386_remove_aligned_watchpoint and made static.
3571 All uses updated.
3572 (i386_dr_update_inferior_debug_regs): Renamed to
3573 i386_update_inferior_debug_regs and made static.
3574 All uses updated.
3575
b9228891
GB
35762014-06-18 Gary Benson <gbenson@redhat.com>
3577
5171def3
GB
3578 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3579 (i386_dr_low_can_set_control): Likewise.
3580 (i386_get_debug_register_length): Likewise.
3581 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3582 (i386_dr_low_can_set_control): Likewise.
3583 (i386_get_debug_register_length): Likewise.
3584
35852014-06-17 Gary Benson <gbenson@redhat.com>
3586
b9228891
GB
3587 * i386-low.h (i386-dregs.h): New include.
3588 (DR_FIRSTADDR): Now in i386-dregs.h.
3589 (DR_LASTADDR): Likewise.
3590 (DR_NADDR): Likewise.
3591 (DR_STATUS): Likewise.
3592 (DR_CONTROL): Likewise.
3593 (i386_debug_reg_state): Likewise.
3594 (i386_dr_insert_watchpoint): Likewise.
3595 (i386_dr_remove_watchpoint): Likewise.
3596 (i386_dr_region_ok_for_watchpoint): Likewise.
3597 (i386_dr_stopped_data_address): Likewise.
3598 (i386_dr_stopped_by_watchpoint): Likewise.
3599 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3600
4be83cc2
GB
36012014-06-18 Gary Benson <gbenson@redhat.com>
3602
3603 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3604 i386_dr_insert_watchpoint.
3605 (i386_low_remove_watchpoint): Renamed to
3606 i386_dr_remove_watchpoint.
3607 (i386_low_region_ok_for_watchpoint): Renamed to
3608 i386_dr_region_ok_for_watchpoint.
3609 (i386_low_stopped_data_address): Renamed to
3610 i386_dr_stopped_data_address.
3611 (i386_low_stopped_by_watchpoint): Renamed to
3612 i386_dr_stopped_by_watchpoint.
3613 * i386-low.c (i386_show_dr): Renamed to
3614 i386_dr_show and made nonstatic. All uses updated.
3615 (i386_length_and_rw_bits): Renamed to
3616 i386_dr_length_and_rw_bits and made nonstatic.
3617 All uses updated.
3618 (i386_insert_aligned_watchpoint): Renamed to
3619 i386_dr_insert_aligned_watchpoint and made nonstatic.
3620 All uses updated.
3621 (i386_remove_aligned_watchpoint): Renamed to
3622 i386_dr_remove_aligned_watchpoint and made nonstatic.
3623 All uses updated.
3624 (i386_update_inferior_debug_regs): Renamed to
3625 i386_dr_update_inferior_debug_regs and made nonstatic.
3626 All uses updated.
3627 (i386_low_insert_watchpoint): Renamed to
3628 i386_dr_insert_watchpoint. All uses updated.
3629 (i386_low_remove_watchpoint): Renamed to
3630 i386_dr_remove_watchpoint. All uses updated.
3631 (i386_low_region_ok_for_watchpoint): Renamed to
3632 i386_dr_region_ok_for_watchpoint. All uses updated.
3633 (i386_low_stopped_data_address): Renamed to
3634 i386_dr_stopped_data_address. All uses updated.
3635 (i386_low_stopped_by_watchpoint): Renamed to
3636 i386_dr_stopped_by_watchpoint. All uses updated.
3637
131aa0d4
GB
36382014-06-18 Gary Benson <gbenson@redhat.com>
3639
3640 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3641 (i386_dr_low_can_set_control): Likewise.
3642 (i386_insert_aligned_watchpoint): New check.
3643
d9305f7f
GB
36442014-06-18 Gary Benson <gbenson@redhat.com>
3645
3646 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3647 Renamed to state.
3648
e927c9fc
GB
36492014-06-18 Gary Benson <gbenson@redhat.com>
3650
3651 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3652 instead of fatal and error.
3653 (i386_handle_nonaligned_watchpoint): Likewise.
3654
1b6d4134
GB
36552014-06-18 Gary Benson <gbenson@redhat.com>
3656
3657 * i386-low.c (i386_get_debug_register_length): New macro.
3658 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3659 (i386_show_dr): Use debug_printf instead of fprintf. Use
3660 phex to format values.
3661
6e62758f
GB
36622014-06-18 Gary Benson <gbenson@redhat.com>
3663
3664 * i386-low.h: Comment changes.
3665 * i386-low.c: Likewise.
3666
fc6e2f03
GB
36672014-06-18 Gary Benson <gbenson@redhat.com>
3668
3669 * i386-low.c: Whitespace changes.
3670
f9d1eeed
TT
36712014-06-12 Tom Tromey <tromey@redhat.com>
3672
3673 * utils.c (freeargv): Remove.
3674
0b04e523
TT
36752014-06-12 Tom Tromey <tromey@redhat.com>
3676
3677 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3678 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3679 (parse_debug_format_options): Likewise.
3680 (gdbserver_usage): Likewise.
3681 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3682 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3683 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3684 against libiberty.
3685 ($(LIBGNU)): Depend on libiberty.
3686 (all-lib): Recurse into all subdirs.
3687 (install-only): Invoke "install" target in subdirs.
3688 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3689 targets.
3690 * configure: Rebuild.
3691 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3692 for vasprintf, vsnprintf, or gettimeofday.
3693 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3694 srv_tgtobj.
3695
270c9937
JB
36962014-06-05 Joel Brobecker <brobecker@adacore.com>
3697
3698 * development.sh: Delete.
3699 * Makefile.in (config.status): Adjust dependency on development.sh.
3700 * configure.ac: Adjust development.sh source call.
3701 * configure: Regenerate.
3702
0a261ed8
PA
37032014-06-02 Pedro Alves <palves@redhat.com>
3704
3705 * ax.c (gdb_free_agent_expr): New function.
3706 * ax.h (gdb_free_agent_expr): New declaration.
3707 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3708 list.
3709 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3710 static.
3711 (clear_breakpoint_conditions_and_commands): New function.
3712 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3713 (clear_breakpoint_conditions_and_commands): New declaration.
3714
e9dae05e
RR
37152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3716
3717 * linux-aarch64-low.c (asm/ptrace.h): Include.
3718
5876f503
JK
37192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3720
3721 Fix TLS access for -static -pthread.
3722 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3723 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3724 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3725
802e8e6d
PA
37262014-05-20 Pedro Alves <palves@redhat.com>
3727
3728 * linux-aarch64-low.c (aarch64_insert_point)
3729 (aarch64_remove_point): No longer check whether the type is
3730 supported here. Adjust to new interface.
3731 (the_low_target): Install aarch64_supports_z_point_type as
3732 supports_z_point_type method.
3733 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3734 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3735 instead of a Z packet char. Adjust.
3736 (arm_supports_z_point_type): New function.
3737 (arm_insert_point, arm_remove_point): Adjust to new interface.
3738 (the_low_target): Install arm_supports_z_point_type.
3739 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3740 (cris_insert_point, cris_remove_point): Adjust to new interface.
3741 Don't check whether the type is supported here.
3742 (the_low_target): Install cris_supports_z_point_type.
3743 * linux-low.c (linux_supports_z_point_type): New function.
3744 (linux_insert_point, linux_remove_point): Adjust to new interface.
3745 * linux-low.h (struct linux_target_ops) <insert_point,
3746 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3747 raw_breakpoint pointer parameter.
3748 <supports_z_point_type>: New method.
3749 * linux-mips-low.c (mips_supports_z_point_type): New function.
3750 (mips_insert_point, mips_remove_point): Adjust to new interface.
3751 Use mips_supports_z_point_type.
3752 (the_low_target): Install mips_supports_z_point_type.
3753 * linux-ppc-low.c (the_low_target): Install NULL as
3754 supports_z_point_type method.
3755 * linux-s390-low.c (the_low_target): Install NULL as
3756 supports_z_point_type method.
3757 * linux-sparc-low.c (the_low_target): Install NULL as
3758 supports_z_point_type method.
3759 * linux-x86-low.c (x86_supports_z_point_type): New function.
3760 (x86_insert_point): Adjust to new insert_point interface. Use
3761 insert_memory_breakpoint. Adjust to new
3762 i386_low_insert_watchpoint interface.
3763 (x86_remove_point): Adjust to remove_point interface. Use
3764 remove_memory_breakpoint. Adjust to new
3765 i386_low_remove_watchpoint interface.
3766 (the_low_target): Install x86_supports_z_point_type.
3767 * lynx-low.c (lynx_target_ops): Install NULL as
3768 supports_z_point_type callback.
3769 * nto-low.c (nto_supports_z_point_type): New.
3770 (nto_insert_point, nto_remove_point): Adjust to new interface.
3771 (nto_target_ops): Install nto_supports_z_point_type.
3772 * mem-break.c: Adjust intro comment.
3773 (struct raw_breakpoint) <raw_type, size>: New fields.
3774 <inserted>: Update comment.
3775 <shlib_disabled>: Delete field.
3776 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3777 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3778 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3779 (raw_bkpt_type_to_target_hw_bp_type): New function.
3780 (find_enabled_raw_code_breakpoint_at): New function.
3781 (find_raw_breakpoint_at): New type and size parameters. Use them.
3782 (insert_memory_breakpoint): New function, based off
3783 set_raw_breakpoint_at.
3784 (remove_memory_breakpoint): New function.
3785 (set_raw_breakpoint_at): Reimplement.
3786 (set_breakpoint): New, based on set_breakpoint_at.
3787 (set_breakpoint_at): Reimplement.
3788 (delete_raw_breakpoint): Go through the_target->remove_point
3789 instead of assuming memory breakpoints.
3790 (find_gdb_breakpoint_at): Delete.
3791 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3792 (find_gdb_breakpoint): New function.
3793 (set_gdb_breakpoint_at): Delete.
3794 (z_type_supported): New function.
3795 (set_gdb_breakpoint_1): New function, loosely based off
3796 set_gdb_breakpoint_at.
3797 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3798 (delete_gdb_breakpoint_at): Delete.
3799 (delete_gdb_breakpoint_1): New function, loosely based off
3800 delete_gdb_breakpoint_at.
3801 (delete_gdb_breakpoint): New function.
3802 (clear_gdb_breakpoint_conditions): Rename to ...
3803 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3804 breakpoint.
3805 (add_condition_to_breakpoint): Make static.
3806 (add_breakpoint_condition): Take a struct breakpoint pointer
3807 instead of an address. Adjust.
3808 (gdb_condition_true_at_breakpoint): Rename to ...
3809 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3810 z_type parameter.
3811 (gdb_condition_true_at_breakpoint): Reimplement.
3812 (add_breakpoint_commands): Take a struct breakpoint pointer
3813 instead of an address. Adjust.
3814 (gdb_no_commands_at_breakpoint): Rename to ...
3815 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3816 parameter. Return true if no breakpoint was found. Change debug
3817 output.
3818 (gdb_no_commands_at_breakpoint): Reimplement.
3819 (run_breakpoint_commands): Rename to ...
3820 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3821 and change return type to boolean.
3822 (run_breakpoint_commands): New function.
3823 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3824 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3825 breakpoint. Go through the_target->remove_point instead of
3826 assuming memory breakpoint.
3827 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3828 software and hardware breakpoints.
3829 (reinsert_raw_breakpoint): Go through the_target->insert_point
3830 instead of assuming memory breakpoint.
3831 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3832 software and hardware breakpoints.
3833 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3834 Check both software and hardware breakpoints.
3835 (validate_inserted_breakpoint): Assert the breakpoint is a
3836 software breakpoint. Set the inserted flag to -1 instead of
3837 setting shlib_disabled.
3838 (delete_disabled_breakpoints): Adjust.
3839 (validate_breakpoints): Only validate software breakpoints.
3840 Adjust to inserted flag change.
3841 (check_mem_read, check_mem_write): Skip breakpoint types other
3842 than software breakpoints. Adjust to inserted flag change.
3843 * mem-break.h (enum raw_bkpt_type): New enum.
3844 (raw_breakpoint, struct process_info): Forward declare.
3845 (Z_packet_to_target_hw_bp_type): Delete declaration.
3846 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3847 (set_gdb_breakpoint, delete_gdb_breakpoint)
3848 (clear_breakpoint_conditions): New declarations.
3849 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3850 (breakpoint_inserted_here): Update comment.
3851 (add_breakpoint_condition, add_breakpoint_commands): Replace
3852 address parameter with a breakpoint pointer parameter.
3853 (gdb_breakpoint_here): Update comment.
3854 (delete_gdb_breakpoint_at): Delete.
3855 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3856 * server.c (process_point_options): Take a struct breakpoint
3857 pointer instead of an address. Adjust.
3858 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3859 delete_gdb_breakpoint.
3860 * spu-low.c (spu_target_ops): Install NULL as
3861 supports_z_point_type method.
3862 * target.h: Include mem-break.h.
3863 (struct target_ops) <prepare_to_access_memory>: Update comment.
3864 <supports_z_point_type>: New field.
3865 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3866 instead of a char. Also take a raw breakpoint pointer.
3867 * win32-arm-low.c (the_low_target): Install NULL as
3868 supports_z_point_type.
3869 * win32-i386-low.c (i386_supports_z_point_type): New function.
3870 (i386_insert_point, i386_remove_point): Adjust to new interface.
3871 (the_low_target): Install i386_supports_z_point_type.
3872 * win32-low.c (win32_supports_z_point_type): New function.
3873 (win32_insert_point, win32_remove_point): Adjust to new interface.
3874 (win32_target_ops): Install win32_supports_z_point_type.
3875 * win32-low.h (struct win32_target_ops):
3876 <supports_z_point_type>: New method.
3877 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3878 instead of a char. Also take a raw breakpoint pointer.
3879
932539e3
PA
38802014-05-20 Pedro Alves <palves@redhat.com>
3881
3882 * mem-break.h: Include break-common.h.
3883 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3884 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3885 (Z_packet_to_target_hw_bp_type): New declaration.
3886 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3887 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3888 (Z_PACKET_ACCESS_WP): Delete macros.
3889 (Z_packet_to_hw_type): Delete function.
3890 * i386-low.h: Don't include break-common.h here.
3891 (Z_packet_to_hw_type): Delete declaration.
3892 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3893 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3894 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3895 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3896 * linux-aarch64-low.c: Don't include break-common.h here.
3897 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3898 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3899 (Z_packet_to_target_hw_bp_type): Delete function.
3900 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3901 function.
3902 (mips_insert_point, mips_remove_point): Use
3903 Z_packet_to_target_hw_bp_type.
3904
4ff0d3d8
PA
39052014-05-20 Pedro Alves <palves@redhat.com>
3906
3907 * linux-aarch64-low.c: Include break-common.h.
3908 (enum target_point_type): Delete.
3909 (Z_packet_to_point_type): Rename to ...
3910 (Z_packet_to_target_hw_bp_type): ... this, and return a
3911 target_hw_bp_type instead.
3912 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3913 instead of an enum target_point_type.
3914 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3915 breakpoint type.
3916 (aarch64_dr_state_insert_one_point)
3917 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3918 (aarch64_handle_aligned_watchpoint)
3919 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3920 Take an enum target_hw_bp_type instead of an enum
3921 target_point_type.
3922 (aarch64_supports_z_point_type): New function.
3923 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3924 use Z_packet_to_target_hw_bp_type.
3925
786dc519
JB
39262014-05-20 Joel Brobecker <brobecker@adacore.com>
3927
3928 * configure.ac: Only use -Werror by default when DEVELOPMENT
3929 is true.
3930 * configure: Regenerate.
3931
9e0aa64f
JK
39322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3933
3934 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3935 * linux-x86-low.c (X86_64_USER_REGS): New.
3936 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3937
2b577b92
YQ
39382014-04-28 Yao Qi <yao@codesourcery.com>
3939
3940 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3941 name.
3942
94611da2
PA
39432014-04-25 Pedro Alves <palves@redhat.com>
3944
3945 PR server/16255
3946 * linux-low.c (linux_attach_fail_reason_string): New function.
3947 (linux_attach_lwp): Delete.
3948 (linux_attach_lwp_1): Rename to ...
3949 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3950 argument. Remove "initial" parameter. Return int instead of
3951 void. Don't error or warn here.
3952 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3953 failure to attach to the tgid. Call warning when failing to
3954 attach to an lwp.
3955 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3956 argument. Remove "initial" parameter. Return int instead of
3957 void. Don't error or warn here.
3958 (linux_attach_fail_reason_string): New declaration.
3959 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3960 interface change. Use linux_attach_fail_reason_string.
3961
01f9f808
MS
39622014-04-24 Michael Sturm <michael.sturm@mintel.com>
3963 Walfred Tedeschi <walfred.tedeschi@intel.com>
3964
3965 * Makefile.in: Added rules to handle new files
3966 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3967 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3968 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3969 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3970 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3971 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3972 x32-avx512-linux.o.
3973 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3974 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3975 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3976 i386/x32-avx512.xml.
3977 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3978 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3979 i386/x32-avx512-linux.xml.
3980 * i387-fp.c (num_avx512_k_registers): New constant for number
3981 of K registers.
3982 (num_avx512_zmmh_low_registers): New constant for number of
3983 lower ZMM registers (0-15).
3984 (num_avx512_zmmh_high_registers): New constant for number of
3985 higher ZMM registers (16-31).
3986 (num_avx512_ymmh_registers): New contant for number of higher
3987 YMM registers (ymm16-31 added by avx521 on x86_64).
3988 (num_avx512_xmm_registers): New constant for number of higher
3989 XMM registers (xmm16-31 added by AVX512 on x86_64).
3990 (struct i387_xsave): Add space for AVX512 registers.
3991 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3992 Add code to handle AVX512 registers.
3993 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3994 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3995 prototypei from generated file.
3996 (tdesc_amd64_avx512_linux): Likewise.
3997 (init_registers_x32_avx512_linux): Likewise.
3998 (tdesc_x32_avx512_linux): Likewise.
3999 (init_registers_i386_avx512_linux): Likewise.
4000 (tdesc_i386_avx512_linux): Likewise.
4001 (x86_64_regmap): Add AVX512 registers.
4002 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4003 mask.
4004 (initialize_low_arch): Add code to initialize AVX512 registers.
4005
51aa91f9
PA
40062014-04-23 Pedro Alves <palves@redhat.com>
4007
4008 * mem-break.c (find_gdb_breakpoint_at): Make static.
4009 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4010
a4165e94
PA
40112014-04-23 Pedro Alves <palves@redhat.com>
4012
4013 * i386-low.c: Don't include break-common.h here.
4014 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4015 prototype to take target_hw_bp_type as argument instead of a Z
4016 packet char.
4017 * i386-low.h: Include break-common.h here.
4018 (Z_packet_to_hw_type): Declare.
4019 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4020 prototypes.
4021 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4022 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4023 (x86_remove_point): Convert the packet number to a
4024 target_hw_bp_type before calling i386_low_remove_watchpoint.
4025 * win32-i386-low.c (i386_insert_point): Convert the packet number
4026 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4027 (i386_remove_point): Convert the packet number to a
4028 target_hw_bp_type before calling i386_low_remove_watchpoint.
4029
b8acf843
PA
40302014-04-23 Pedro Alves <palves@redhat.com>
4031
4032 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4033
d708bcd1
PA
40342014-04-10 Pedro Alves <palves@redhat.com>
4035
4036 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4037 Check if the condition or command is NULL before checking if the
4038 breakpoint is known. On success, return true.
4039 * mem-break.h (add_breakpoint_condition): Document return.
4040 (add_breakpoint_commands): Add describing comment.
4041 * server.c (skip_to_semicolon): New function.
4042 (process_point_options): Use it.
4043
2eec7d5b
PA
40442014-04-09 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4047 to lwpid_of.
4048
fa96cb38
PA
40492014-02-27 Pedro Alves <palves@redhat.com>
4050
4051 PR 12702
4052 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4053 macros.
4054 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4055 output.
4056 (last_thread_of_process_p): Take a PID argument instead of a
4057 thread pointer.
4058 (linux_wait_for_lwp): Delete.
4059 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4060 functions.
4061 (linux_low_filter_event): New function, party factored out from
4062 linux_wait_for_event.
4063 (linux_wait_for_event): Rename to ...
4064 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4065 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4066 sigsuspend. Check for zombie leaders.
4067 (linux_wait_for_event): Reimplement as wrapper around
4068 linux_wait_for_event_filtered.
4069 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4070 a normal or signal exit is seen, it's the whole process exiting.
4071 (wait_for_sigstop): No longer a for_each_inferior callback.
4072 Rewrite on top of linux_wait_for_event_filtered.
4073 (stop_all_lwps): Call wait_for_sigstop directly.
4074 * server.c (resume, handle_target_event): Handle
4075 TARGET_WAITKIND_NO_RESUMED.
4076
d763de10
JB
40772014-02-26 Joel Brobecker <brobecker@adacore.com>
4078
4079 * win32-low.c (psapi_get_dll_name,
4080 * win32_CreateToolhelp32Snapshot): Delete.
4081 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4082 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4083 Delete.
4084 (handle_load_dll): Add function description.
4085 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4086
850a0f76
JB
40872014-02-26 Joel Brobecker <brobecker@adacore.com>
4088
4089 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4090 Add comment.
4091 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4092 base address when calling win32_add_one_solib.
4093 (handle_load_dll): Delete local variable load_addr.
4094 Remove 0x1000 offset applied to DLL base address when calling
4095 win32_add_one_solib.
4096 (handle_unload_dll): Add comment.
4097
f25b3fc3
JB
40982014-02-26 Joel Brobecker <brobecker@adacore.com>
4099
4100 * win32-low.c (win32_add_all_dlls): Renames
4101 win32_ensure_ntdll_loaded. Rewrite function documentation.
4102 Adjust implementation to always load all DLLs.
4103 Add 0x1000 offset to DLL base address when calling
4104 win32_add_one_solib.
4105 (child_initialization_done): New static global.
4106 (do_initial_child_stuff): Set child_initialization_done to
4107 zero during child initialization, and 1 after. Replace call
4108 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4109 Add comment.
4110 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4111 (handle_unload_dll): Add function documentation.
4112 (get_child_debug_event): Ignore load and unload DLL events
4113 during child initialization.
4114
d86d4aaf
DE
41152014-02-20 Doug Evans <dje@google.com>
4116
3bc32da3 4117 Remove global all_lwps.
d86d4aaf
DE
4118 * inferiors.h (ptid_of): Move here from linux-low.h.
4119 (pid_of, lwpid_of): Ditto.
4120 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4121 parameter is a struct thread_info * now.
4122 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4123 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4124 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4125 directly.
4126 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4127 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4128 * linux-arm-low.c (update_registers_callback): Update, "entry"
4129 parameter is a struct thread_info * now.
4130 Fetch lwpid from current_inferior directly.
4131 (arm_insert_point): Pass &all_threads to find_inferior instead of
4132 &all_lwps.
4133 (arm_remove_point): Ditto.
4134 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4135 (arm_prepare_to_resume): Fetch pid from thread.
4136 (arm_read_description): Fetch lwpid from current_inferior directly.
4137 * linux-low.c (all_lwps): Delete.
4138 (delete_lwp): Delete call to remove_inferior.
4139 (handle_extended_wait): Fetch lwpid from thread.
4140 (add_lwp): Don't set lwp->entry.id. Remove call to
4141 add_inferior_to_list.
4142 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4143 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4144 (kill_one_lwp_callback): Ditto.
4145 (linux_kill): Don't dereference NULL pointer.
4146 Fetch ptid,lwpid from thread.
4147 (get_detach_signal): Fetch ptid from thread.
4148 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4149 Simplify call to regcache_invalidate_thread.
4150 (delete_lwp_callback): Update, "entry" parameter is a
4151 struct thread_info * now. Fetch pid from thread.
4152 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4153 (status_pending_p_callback): Update, "entry" parameter is a
4154 struct thread_info * now. Fetch ptid from thread.
4155 (find_lwp_pid): Update, "entry" parameter is a
4156 struct thread_info * now.
4157 (linux_wait_for_lwp): Fetch pid from thread.
4158 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4159 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4160 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4161 (dequeue_one_deferred_signal): Ditto.
4162 (cancel_breakpoint): Fetch ptid from current_inferior.
4163 (linux_wait_for_event): Pass &all_threads to find_inferior,
4164 not &all_lwps. Fetch ptid, lwpid from thread.
4165 (count_events_callback): Update, "entry" parameter is a
4166 struct thread_info * now.
4167 (select_singlestep_lwp_callback): Ditto.
4168 (select_event_lwp_callback): Ditto.
4169 (cancel_breakpoints_callback): Ditto.
4170 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4171 not &all_lwps.
4172 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4173 (unsuspend_one_lwp): Update, "entry" parameter is a
4174 struct thread_info * now.
4175 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4176 not &all_lwps.
4177 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4178 Fetch lwpid from thread, not lwp.
4179 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4180 Pass &all_threads to find_inferior, not &all_lwps.
4181 (send_sigstop): Fetch lwpid from thread, not lwp.
4182 (send_sigstop_callback): Update, "entry" parameter is a
4183 struct thread_info * now.
4184 (suspend_and_send_sigstop_callback): Ditto.
4185 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4186 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4187 struct thread_info * now.
4188 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4189 from thread, lwp.
4190 (lwp_running): Update, "entry" parameter is a
4191 struct thread_info * now.
4192 (stop_all_lwps): Fetch ptid from thread.
4193 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4194 (linux_resume_one_lwp): Fetch lwpid from thread.
4195 (linux_set_resume_request): Update, "entry" parameter is a
4196 struct thread_info * now. Fetch pid, lwpid from thread.
4197 (resume_status_pending_p): Update, "entry" parameter is a
4198 struct thread_info * now.
4199 (need_step_over_p): Ditto. Fetch lwpid from thread.
4200 (start_step_over): Fetch lwpid from thread.
4201 (linux_resume_one_thread): Update, "entry" parameter is a
4202 struct thread_info * now. Fetch lwpid from thread.
4203 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4204 (proceed_one_lwp): Update, "entry" parameter is a
4205 struct thread_info * now. Fetch lwpid from thread.
4206 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4207 struct thread_info * now.
4208 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4209 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4210 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4211 directly.
4212 (regsets_store_inferior_registers): Ditto.
4213 (fetch_register, store_register): Ditto.
4214 (linux_read_memory, linux_write_memory): Ditto.
4215 (linux_request_interrupt): Ditto.
4216 (linux_read_auxv): Ditto.
4217 (linux_xfer_siginfo): Ditto.
4218 (linux_qxfer_spu): Ditto.
4219 (linux_qxfer_libraries_svr4): Ditto.
4220 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4221 moved to inferiors.h.
4222 (get_lwp): Delete.
4223 (get_thread_lwp): Update.
4224 (struct lwp_info): Delete member "entry". Simplify comment for
4225 member "thread".
4226 (all_lwps): Delete.
4227 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4228 current_inferior directly.
4229 (update_watch_registers_callback): Update, "entry" parameter is a
4230 struct thread_info * now. Fetch pid from thread.
4231 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4232 (mips_insert_point): Fetch lwpid from current_inferior.
4233 Pass &all_threads to find_inferior, not &all_lwps.
4234 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4235 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4236 directly.
4237 (mips_stopped_data_address): Ditto.
4238 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4239 directly.
4240 * linux-tile-low.c (tile_arch_setup): Ditto.
4241 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4242 (update_debug_registers_callback): Update, "entry" parameter is a
4243 struct thread_info * now. Fetch pid from thread.
4244 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4245 Pass &all_threads to find_inferior, not &all_lwps.
4246 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4247 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4248 Pass &all_threads to find_inferior, not &all_lwps.
4249 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4250 (i386_dr_low_get_status): Ditto.
4251 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4252 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4253 (x86_linux_read_description): Ditto.
4254 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4255
3b8361aa
DE
42562014-02-20 Doug Evans <dje@google.com>
4257
4258 * inferiors.c (get_first_inferior): Fix buglet.
4259
f7667f0d
DE
42602014-02-19 Doug Evans <dje@google.com>
4261
4262 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4263 * inferiors.c (add_thread): Change result type to struct thread_info *.
4264 All callers updated.
4265 (add_lwp): Call add_thread here instead of in callers.
4266 All callers updated.
4267 * linux-low.h (get_lwp_thread): Rewrite.
4268 (struct lwp_info): New member "thread".
4269
b3312d80
DE
42702014-02-19 Doug Evans <dje@google.com>
4271
4272 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4273 All callers updated.
4274
ecc6f45c
DE
42752014-02-19 Doug Evans <dje@google.com>
4276
4277 * inferiors.c (add_thread): Fix whitespace.
4278
649ebbca
DE
42792014-02-19 Doug Evans <dje@google.com>
4280
4281 * dll.c (clear_dlls): Replace accessing list implemention details
4282 with API function.
4283 * gdbthread.h (get_first_thread): Declare.
4284 * inferiors.c (for_each_inferior_with_data): New function.
4285 (get_first_thread): New function.
4286 (find_thread_ptid): Simplify.
4287 (get_first_inferior): New function.
4288 (clear_list): Delete.
4289 (one_inferior_p): New function.
4290 (clear_inferior_list): New function.
4291 (clear_inferiors): Update.
4292 * inferiors.h (for_each_inferior_with_data): Declare.
4293 (clear_inferior_list): Declare.
4294 (one_inferior_p): Declare.
4295 (get_first_inferior): Declare.
4296 * linux-low.c (linux_wait_for_event): Replace accessing list
4297 implemention details with API function.
4298 * server.c (target_running): Ditto.
4299 (accumulate_file_name_length): New function.
4300 (emit_dll_description): New function.
4301 (handle_qxfer_libraries): Replace accessing list implemention
4302 details with API function.
4303 (handle_qxfer_threads_worker): New function.
4304 (handle_qxfer_threads_proper): Replace accessing list implemention
4305 details with API function.
4306 (handle_query): Ditto.
4307 (visit_actioned_threads_callback_ftype): New typedef.
4308 (visit_actioned_threads_data): New struct.
4309 (visit_actioned_threads): Rewrite to be find_inferior callback.
4310 (resume): Call find_inferior.
4311 (handle_status): Replace accessing list implemention
4312 details with API function.
4313 (process_serial_event): Replace accessing list implemention details
4314 with API function.
4315 * target.c (set_desired_inferior): Replace accessing list implemention
4316 details with API function.
4317 * tracepoint.c (same_process_p): New function.
4318 (gdb_agent_about_to_close): Replace accessing list implemention
4319 details with API function.
4320 * win32-low.c (child_delete_thread): Replace accessing list
4321 implemention details with API function.
4322 (match_dll_by_basename): New function.
4323 (dll_is_loaded_by_basename): New function.
4324 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4325 details call to dll_is_loaded_by_basename.
4326
80894984
DE
43272014-02-19 Doug Evans <dje@google.com>
4328
4329 * dll.h (struct dll_info): Add comment.
4330 * gdbthread.h (struct thread_info): Add comment.
4331 (current_ptid): Simplify.
4332 * inferiors.c (add_process): Update.
4333 (remove_process): Update.
4334 * inferiors.h (struct process_info): Rename member "head" to "entry".
4335 * linux-low.c (delete_lwp): Update.
4336 (add_lwp): Update.
4337 (last_thread_of_process_p): Update.
4338 (kill_one_lwp_callback, linux_kill): Update.
4339 (status_pending_p_callback): Update.
4340 (wait_for_sigstop): Update. Simplify read of ptid.
4341 (start_step_over): Update.
4342 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4343 (get_lwp_thread): Update.
4344 (struct lwp_info): Rename member "head" to "entry".
4345 * regcache.h (inferior_list_entry): Delete.
4346 * server.c (kill_inferior_callback): Update.
4347 (detach_or_kill_inferior_callback): Update.
4348 (print_started_pid): Update.
4349 (print_attached_pid): Update.
4350 (process_serial_event): Simplify read of ptid.
4351 * thread-db.c (thread_db_create_event): Update.
4352 (thread_db_get_tls_address): Update.
4353 * win32-low.c (current_inferior_ptid): Simplify.
4354
46917d26
TT
43552014-02-19 Tom Tromey <tromey@redhat.com>
4356
4357 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4358 argument.
4359 (target_supports_btrace): Update.
4360
0759a81e
YQ
43612014-02-14 Yao Qi <yao@codesourcery.com>
4362
4363 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4364 (rsp-low-ipa.o): New target.
4365
a7191e8b
TT
43662014-02-12 Tom Tromey <tromey@redhat.com>
4367
4368 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4369 convert_ascii_to_int.
4370 * regcache.c (registers_to_string): Likewise.
4371 * remote-utils.c (decode_M_packet): Likewise.
4372 * server.c (process_serial_event): Likewise.
4373
ff0e980e
TT
43742014-02-12 Tom Tromey <tromey@redhat.com>
4375
4376 * server.c (handle_query, handle_v_run): Use hex2bin, not
4377 unhexify.
4378 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4379
e9371aff
TT
43802014-02-12 Tom Tromey <tromey@redhat.com>
4381
4382 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4383 convert_int_to_ascii.
4384 * regcache.c (registers_to_string, collect_register_as_string):
4385 Likewise.
4386 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4387 Likewise.
4388 * server.c (process_serial_event): Likewise.
4389 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4390 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4391
971dc0b8
TT
43922014-02-12 Tom Tromey <tromey@redhat.com>
4393
4394 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4395 bin2hex, not hexify.
4396 * tracepoint.c (cmd_qtstatus): Likewise.
4397
0a822afb
TT
43982014-02-12 Tom Tromey <tromey@redhat.com>
4399
4400 * remote-utils.c (monitor_output): Pass explicit length to
4401 hexify.
4402
9c3d6531
TT
44032014-02-12 Tom Tromey <tromey@redhat.com>
4404
4405 * tracepoint.c: Include rsp-low.h.
4406 * server.c: Include rsp-low.h.
4407 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4408 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4409 declare.
4410 * remote-utils.c: Include rsp-low.h.
4411 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4412 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4413 (convert_int_to_ascii, convert_ascii_to_int): Move to
4414 common/rsp-low.c.
4415 * regcache.c: Include rsp-low.h.
4416 * ax.c: Include rsp-low.h.
4417 * Makefile.in (SFILES): Add common/rsp-low.c.
4418 (OBS): Add rsp-low.o.
4419 (rsp-low.o): New target.
4420
01fd3ea5
TT
44212014-02-12 Tom Tromey <tromey@redhat.com>
4422
4423 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4424 Include print-utils.h.
4425 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4426 (plongest, thirty_two, phex_nz): Remove.
4427 * Makefile.in (SFILES): Add common/print-utils.c.
4428 (OBS): Add print-utils.o.
4429 (print-utils-ipa.o): New target.
4430 (print-utils.o): New target.
4431 (IPA_OBJS): Add print-utils-ipa.o.
4432
e99dc820
TT
44332014-02-06 Tom Tromey <tromey@redhat.com>
4434
4435 * Makefile.in (SFILES): Fix indentation.
4436
ee1e2d4f
DE
44372014-02-05 Doug Evans <dje@google.com>
4438
4439 * linux-low.c (linux_wait_for_event): Improve comment.
4440 (linux_wait_1): Keep current_inferior in sync with event_child.
4441
f5a02773
DE
44422014-01-22 Doug Evans <dje@google.com>
4443
4444 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4445
87ce2a04
DE
44462014-01-22 Doug Evans <dje@google.com>
4447
4448 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4449 * configure: Regenerate.
4450 * config.in: Regenerate.
4451 * Makefile.in (SFILES): Add debug.c.
4452 (OBS): Add debug.o.
4453 * debug.c: New file.
4454 * debug.h: New file.
4455 * linux-aarch64-low.c (*): Update all debugging printfs to use
4456 debug_printf instead of fprintf.
4457 * linux-arm-low.c (*): Ditto.
4458 * linux-cris-low.c (*): Ditto.
4459 * linux-crisv32-low.c (*): Ditto.
4460 * linux-m32r-low.c (*): Ditto.
4461 * linux-sparc-low.c (*): Ditto.
4462 * linux-x86.c (*): Ditto.
4463 * linux-low.c (*): Ditto.
4464 (linux_wait_1): Add calls to debug_enter, debug_exit.
4465 (linux_wait): Remove redundant debugging printf.
4466 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4467 (linux_resume, unstop_all_lwps): Ditto.
4468 * mem-break.c (*): Update all debugging printfs to use
4469 debug_printf instead of fprintf.
4470 * remote-utils.c (*): Ditto.
4471 * thread-db.c (*): Ditto.
4472 * server.c #include <ctype.h>, "gdb_vecs.h".
4473 (debug_threads): Moved to debug.c.
4474 (*): Update all debugging printfs to use debug_printf instead of
4475 fprintf.
4476 (start_inferior): Replace call to fflush with call to debug_flush.
4477 (monitor_show_help): Mention set debug-format.
4478 (parse_debug_format_options): New function.
4479 (handle_monitor_command): Handle "monitor set debug-format".
4480 (gdbserver_usage): Mention --debug-format.
4481 (main): Parse --debug-format.
4482 * server.h (debug_threads): Declaration moved to debug.h.
4483 #include "debug.h".
4484 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4485 trace_debug_1 that uses debug_printf.
4486 (tracepoint_look_up_symbols): Update all debugging printfs to use
4487 debug_printf instead of fprintf.
4488
e671835b
BS
44892014-01-20 Baruch Siach <baruch@tkos.co.il>
4490
4491 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4492 sys/ptrace.h.
4493
b5737fa9
PA
44942014-01-17 Pedro Alves <palves@redhat.com>
4495
ea38d2a9 4496 PR build/16445
c7faa97a
PA
4497 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4498 defined after including gdb_proc_service.h.
b5737fa9 4499
40ed484e
DE
45002014-01-16 Doug Evans <dje@google.com>
4501
4502 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4503 (match_dll): Use it.
4504
969c39fb
MM
45052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4506
4507 * target.h (target_ops) <read_btrace>: Change parameters and
4508 return type to allow error reporting.
4509 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4510 trace reading errors on.
4511 * linux-low.c (linux_low_read_btrace): Pass trace reading
4512 errors on.
4513 (linux_low_disable_btrace): New.
4514
ab7f45ba
DE
45152014-01-15 Doug Evans <dje@google.com>
4516
4517 * inferiors.c (thread_id_to_gdb_id): Delete.
4518 * inferiors.h (thread_id_to_gdb_id): Delete.
4519
66af0f44
EZ
45202014-01-13 Eli Zaretskii <eliz@gnu.org>
4521
4522 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4523 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4524 versions.
4525
9939e131
PA
45262014-01-08 Pedro Alves <palves@redhat.com>
4527
4528 * server.c (handle_status): Don't discard previous queued stop
4529 replies or thread's pending status here.
4530 (main) <disconnection>: Do it here instead.
4531
b7ea362b
PA
45322014-01-08 Pedro Alves <palves@redhat.com>
4533
4534 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4535 * server.c (visit_actioned_threads, handle_pending_status): New
4536 function.
4537 (handle_v_cont): Factor out parts to ...
4538 (resume): ... this new function. If in all-stop, and a thread
4539 being resumed has a pending status, report it without actually
4540 resuming.
4541 (myresume): Adjust to use the new 'resume' function.
4542 (clear_pending_status_callback, set_pending_status_callback)
4543 (find_status_pending_thread_callback): New functions.
4544 (handle_status): Handle the case of multiple threads having
4545 interesting statuses to report. Report threads' real last signal
4546 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4547 with an interesting thread to report the status for, instead of
4548 always reporting the status of the first thread.
4549
28498c42
JB
45502014-01-01 Joel Brobecker <brobecker@adacore.com>
4551
4552 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4553 * gdbreplay.c (gdbreplay_version): Likewise.
4554
f45c82da
YZ
45552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4556
4557 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4558 iov.iov_len with the real length in use.
4559
379a5e2d
JB
45602013-12-13 Joel Brobecker <brobecker@adacore.com>
4561
4562 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4563 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4564 for all targets that use win32-low.c.
4565 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4566 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4567
4210d83e
PA
45682013-12-13 Pedro Alves <palves@redhat.com>
4569
4570 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4571 if equal to TARGET_WAITKIND_LOADED.
4572 * win32-low.c (cached_status): New static global.
4573 (win32_wait): Add declaration.
4574 (do_initial_child_stuff): Flush all initial pending debug events
4575 up to the initial breakpoint.
4576 (win32_wait): If CACHED_STATUS was set, return that instead
4577 of doing a real wait. Remove the code resuming the execution
4578 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4579 during the initial phase. Also remove the code changing
4580 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4581 TARGET_WAITKIND_STOPPED.
4582
e7f0d979
YQ
45832013-12-11 Yao Qi <yao@codesourcery.com>
4584
4585 * notif.c (handle_notif_ack): Return 0 if no notification
4586 matches.
4587
ebcf782c
DE
45882013-11-20 Doug Evans <dje@google.com>
4589
4590 * linux-low.c (linux_set_resume_request): Fix comment.
4591
20ad9378
DE
45922013-11-20 Doug Evans <dje@google.com>
4593
4594 * linux-low.c (resume_status_pending_p): Tweak comment.
4595
a196ebeb
WT
45962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4597
4598 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4599 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4600 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4601 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4602 (srv_amd64_regobj): Add amd64-mpx.o.
4603 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4604 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4605 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4606 * i387-fp.c (num_pl_bnd_register) Added constant.
4607 (num_pl_bnd_cfg_registers) Added constant.
4608 (struct i387_xsave) Added reserved area and MPX fields.
4609 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4610 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4611 function.
4612 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4613 (init_registers_amd64_mpx_linux): Declare new function.
4614 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4615 (x86_64_regmap): Add MPX registers.
4616 (x86_linux_read_description): Add MPX case.
4617 (initialize_low_arch): Initialize MPX targets.
4618
0080a2f6
TT
46192013-11-18 Tom Tromey <tromey@redhat.com>
4620
4621 * configure: Rebuild.
4622 * configure.ac: Don't check for stdlib.h.
4623 * gdbreplay.c: Unconditionally include stdlib.h.
4624
2978b111
TT
46252013-11-18 Tom Tromey <tromey@redhat.com>
4626
4627 * config.in: Rebuild.
4628 * configure: Rebuild.
4629 * configure.ac: Don't use AC_HEADER_DIRENT.
4630
a3d08894
TT
46312013-11-18 Tom Tromey <tromey@redhat.com>
4632
4633 * server.h: Don't check HAVE_STRING_H.
4634 * gdbreplay.c: Don't check HAVE_STRING_H.
4635 * configure: Rebuild.
4636
0a5dd17d
TT
46372013-11-18 Tom Tromey <tromey@redhat.com>
4638
4639 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4640 LIBGNU.
4641
1bd2f0ba
TT
46422013-11-08 Tom Tromey <tromey@redhat.com>
4643
4644 * configure, config.in: Rebuild.
4645 * configure.ac: Remove unused configury.
4646
3266f10b
TT
46472013-11-08 Tom Tromey <tromey@redhat.com>
4648
4649 * acinclude.m4: Include common.m4, codeset.m4.
4650 * configure, config.in: Rebuild.
4651 * configure.ac: Use GDB_AC_COMMON.
4652
6682d959
AA
46532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4654
4655 * linux-s390-low.c (HWCAP_S390_TE): New define.
4656 (s390_arch_setup): Consider the TE field in the HWCAP for
4657 determining 'have_regset_tdb'.
4658
fd0a4d76
SDJ
46592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4660
4661 PR gdb/16014
4662 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4663 call to sizeof.
4664
1a3d890b
PA
46652013-10-02 Pedro Alves <palves@redhat.com>
4666
4667 * server.c (process_serial_event): Don't output "GDBserver
4668 exiting" if GDB is connected through stdio.
4669 * target.c (mywait): Likewise, be silent if GDB is connected
4670 through stdio.
4671
97ad4581
JB
46722013-10-01 Joel Brobecker <brobecker@adacore.com>
4673
4674 * lynx-low.c (lynx_add_threads_after_attach): New function.
4675 (lynx_attach): Remove call to add_thread. Add call to
4676 lynx_add_threads_after_attach instead.
4677
5b4e221c
MF
46782013-09-28 Mike Frysinger <vapier@gentoo.org>
4679
4680 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4681 * config.in, configure: Regenerated.
4682
ee47b2f8
YQ
46832013-09-18 Yao Qi <yao@codesourcery.com>
4684
4685 PR server/15959
4686 * server.c (start_inferior): Clear 'resume_info'.
4687
d6707650 46882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4689
d6707650
JW
4690 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4691 for each register.
4692
9243dd0e 46932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4694
9243dd0e
JW
4695 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4696 linux-tile-low.o to srv_tgtobj.
4697
c623a6ef
WN
46982013-09-16 Will Newton <will.newton@linaro.org>
4699
4700 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4701 out regs.
4702
fb71d39e
PA
47032013-09-06 Pedro Alves <palves@redhat.com>
4704
4705 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4706 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4707 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4708 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4709 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4710 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4711
8e7e9910
PA
47122013-09-06 Pedro Alves <palves@redhat.com>
4713
4714 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4715 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4716
7c3a12ca
PA
47172013-09-06 Pedro Alves <palves@redhat.com>
4718
4719 * linux-amd64-ipa.c: Include tracepoint.h.
4720 * linux-i386-ipa.c: Include tracepoint.h.
4721
8eb3d7b6
RW
47222013-09-06 Ricard Wanderlof <ricardw@axis.com>
4723
4724 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4725 (ps_get_thread_area): New function.
4726
eddddb9d
RW
47272013-09-06 Ricard Wanderlof <ricardw@axis.com>
4728
4729 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4730 (initialize_low_arch): Call init_registers_crisv32 rather than
4731 init_register_crisv32.
4732
533b0600
PA
47332013-09-05 Pedro Alves <palves@redhat.com>
4734
4735 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4736 to ...
4737 * hostio.h: ... this new file.
4738 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4739 win32-low.c: Include hostio.h.
4740
0ce3d3b5
PA
47412013-09-05 Pedro Alves <palves@redhat.com>
4742
4743 * server.h (gdb_client_data, handler_func, callback_handler_func)
4744 (delete_file_handler, add_file_handler, append_callback_event)
4745 (delete_callback_event, start_event_loop, initialize_event_loop):
4746 Move to event-loop.h and include it.
4747 * event-loop.h: New file.
4748
799cdc37
PA
47492013-09-05 Pedro Alves <palves@redhat.com>
4750
4751 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4752 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4753 (loaded_dll, unloaded_dll): Move to ...
4754 * dll.h: ... this new file.
4755 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4756
6a6bbd9d
PA
47572013-09-05 Pedro Alves <palves@redhat.com>
4758
4759 * server.h (current_process, get_thread_process, all_processes)
4760 (add_inferior_to_list, for_each_inferior, current_inferior)
4761 (remove_inferior, add_process, remove_process, find_process_pid)
4762 (have_started_inferiors_p, have_attached_inferiors_p)
4763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4764 (clear_inferiors, find_inferior, find_inferior_id)
4765 (inferior_target_data, set_inferior_target_data)
4766 (inferior_regcache_data, set_inferior_regcache_data): Move to
4767 inferiors.h, and include it.
4768 * inferiors.h: New file.
4769
f699aaba
PA
47702013-09-05 Pedro Alves <palves@redhat.com>
4771
4772 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4773 Move ...
72f4393d 4774 * ax.h: ... here.
f699aaba 4775
c144c7a0
PA
47762013-09-05 Pedro Alves <palves@redhat.com>
4777
4778 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4779 tracepoint.h.
4780 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4781 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4782 (handle_tracepoint_general_set, handle_tracepoint_query)
4783 (tracepoint_finished_step, tracepoint_was_hit)
4784 (release_while_stepping_state_list, current_traceframe)
4785 (in_readonly_region, traceframe_read_mem)
4786 (fetch_traceframe_registers, traceframe_read_sdata)
4787 (traceframe_read_info, struct fast_tpoint_collect_status)
4788 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4789 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4790 (supply_fast_tracepoint_registers)
4791 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4792 (ipa_tdesc, claim_trampoline_space)
4793 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4794 (agent_mem_read, agent_get_trace_state_variable_value)
4795 (agent_set_trace_state_variable_value, agent_tsv_read)
4796 (agent_mem_read_string, get_raw_reg_func_addr)
4797 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4798 * tracepoint.h: ... this new file.
4799
ff42e6ab
PA
48002013-09-05 Pedro Alves <palves@redhat.com>
4801
4802 * server.h (perror_with_name, error, fatal, warning, paddress)
4803 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4804 include it.
4805 * utils.h: New file.
4806
541af0f4
PA
48072013-09-05 Pedro Alves <palves@redhat.com>
4808
4809 * server.h (remote_debug, noack_mode, transport_is_reliable)
4810 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4811 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4812 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4813 (write_enn, initialize_async_io, enable_async_io)
4814 (disable_async_io, check_remote_input_interrupt_request)
4815 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4816 (dead_thread_notify, prepare_resume_reply)
4817 (decode_address_to_semicolon, decode_address, decode_m_packet)
4818 (decode_M_packet, decode_X_packet, decode_xfer_write)
4819 (decode_search_memory_packet, unhexify, hexify)
4820 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4821 (look_up_one_symbol, relocate_instruction)
4822 (monitor_output): Move to remote-utils.h, and include it.
4823 * remote-utils.h: New file.
4824
eebdf26b
PA
48252013-09-05 Pedro Alves <palves@redhat.com>
4826
4827 * server.h (_): Delete.
4828
3aafd2ff
PA
48292013-09-02 Pedro Alves <palves@redhat.com>
4830
4831 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4832 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4833 allocated.
4834 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4835
cee83bcb
PM
48362013-09-02 Pierre Muller <muller@sourceware.org>
4837
4838 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4839 or WriteProcessMemory complete successfully and handle
4840 ERROR_PARTIAL_COPY error.
4841
9a13b2fa
PA
48422013-09-02 Pedro Alves <palves@redhat.com>
4843
4844 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4845 error instead of EIO.
4846
602e3198
JK
48472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4848
4849 PR server/15604
4850 * linux-low.c: Include filestuff.h.
4851 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4852 * lynx-low.c: Include filestuff.h.
4853 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4854 * server.c: Include filestuff.h.
4855 (main): Call notice_open_fds.
4856 * spu-low.c: Include filestuff.h.
4857 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4858
96d7229d
LM
48592013-08-22 Luis Machado <lgustavo@codesourcery.com>
4860
4861 * Makefile.in: Explain why ../target and ../nat are not
4862 listed as include file search paths.
4863 (linux-waitpid.o): New object file rule.
4864 * configure.srv (srv_native_linux_obj): New variable.
4865 Replace all occurrences of linux native object files with
4866 $srv_native_linux_obj.
4867 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4868 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4869 (linux_enable_event_reporting): Remove declaration.
4870 (my_waitpid): Moved to common/linux-waitpid.c.
4871 (linux_wait_for_event): Pass ptid when calling
4872 linux_enable_event_reporting.
4873 (linux_supports_tracefork_flag): Remove.
4874 (linux_enable_event_reporting): Likewise.
4875 (linux_tracefork_grandchild): Remove.
4876 (STACK_SIZE): Moved to common/linux-ptrace.c.
4877 (linux_tracefork_child): Remove.
4878 (linux_test_for_tracefork): Remove.
4879 (linux_look_up_symbols): Call linux_supports_traceclone.
4880 (initialize_low): Remove call to linux_test_for_tracefork.
4881 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4882 common/linux-ptrace.h.
4883 (PTRACE_TYPE_ARG4): Likewise.
4884 Include linux-ptrace.h.
4885
32940073
PA
48862013-08-21 Pedro Alves <palves@redhat.com>
4887
4888 * config.in: Renegerate.
4889
33b60d58 48902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4891
33b60d58
LM
4892 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4893 (SFILES): Remove $(srcdir)/common/target-common.c and
4894 add $(srcdir)/target/waitstatus.c.
4895 (OBS): Remove target-common.o and add waitstatus.o.
4896 (server_h): Remove $(srcdir)/../common/target-common.h and
4897 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4898 and $(srcdir)/../target/waitstatus.h.
4899 (target-common.o): Remove.
4900 (waitstatus.o): New target object file.
4901 * target.h: Do not include target-common.h and
4902 include target/resume.h, target/wait.h and
4903 target/waitstatus.h.
4904
b8e1b30e
LM
49052013-08-13 Luis Machado <lgustavo@codesourcery.com>
4906
4907 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4908 to PTRACE_TYPE_ARG3.
4909 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4910 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4911 PTRACE_TYPE_ARG4.
4912 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4913 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4914
7a60ad40
YQ
49152013-07-27 Jie Zhang <jie@codesourcery.com>
4916 Daniel Jacobowitz <dan@codesourcery.com>
4917 Yao Qi <yao@codesourcery.com>
4918
4919 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4920 (mips-linux-watch.o): New rule.
4921 (mips_linux_watch_h): New variable.
4922 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4923 srv_tgtobj.
4924 * linux-mips-low.c: Include mips-linux-watch.h.
4925 (struct arch_process_info, struct arch_lwp_info): New.
4926 (update_watch_registers_callback): New function.
4927 (mips_linux_new_process, mips_linux_new_thread) New functions.
4928 (mips_linux_prepare_to_resume, mips_insert_point): New
4929 functions.
4930 (mips_remove_point, mips_stopped_by_watchpoint): New
4931 functions.
4932 (rsp_bp_type_to_target_hw_bp_type): New function.
4933 (mips_stopped_data_address): New function.
4934 (the_low_target): Add watchpoint support functions.
4935
de6f69ad
YQ
49362013-07-27 Yao Qi <yao@codesourcery.com>
4937
4938 * i386-low.c: Include break-common.h.
4939 (enum target_hw_bp_type): Remove.
4940
3360c0bf
LM
49412013-07-24 Luis Machado <lgustavo@codesourcery.com>
4942
4943 * Makefile.in (SFILES): /common/target-common.c.
4944 (OBS): Add target-common.o.
4945 (server_h): Add $(srcdir)/../common/target-common.h.
4946 (target-common.o): New target.
4947 * server.c (queue_stop_reply_callback): Free
4948 status string after use.
4949 * target.c (target_waitstatus_to_string): Remove.
4950 * target.h: Include target-common.h.
4951 (resume_kind): Likewise.
4952 (target_waitkind): Likewise.
4953 (target_waitstatus): Likewise.
4954 (TARGET_WNOHANG): Likewise.
4955
bd885420
YQ
49562013-07-04 Yao Qi <yao@codesourcery.com>
4957
4958 * Makefile.in (host_alias): Use @host_noncanonical@.
4959 (target_alias): Use @target_noncanonical@.
4960 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4961 ACX_NONCANONICAL_HOST.
4962 * configure: Regenerated.
4963
4964 Revert:
4965 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4966
4967 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4968 * configure: Rebuild.
4969 * Makefile.in (version_host, version_target): Get from configure.
4970 (version.c): Use $(version_host) and $(version_target).
4971
17ef446e
PA
49722013-07-03 Pedro Alves <palves@redhat.com>
4973
4974 * Makefile.in (config.status): Depend on development.sh.
4975 * acinclude.m4: Include libmcheck.m4.
4976 * configure: Regenerate.
4977
7a9a7487
MG
49782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4979
4980 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4981 attribute inside the parentheses.
4982 (winapi_DebugSetProcessKillOnExit): Ditto.
4983 (winapi_DebugBreakProcess): Ditto.
4984 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4985
49b64de6
MG
49862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4987
4988 * notif.h (notif_event): Add a dummy member to avoid compiler
4989 errors.
4990
d5749ee7
PA
49912013-07-01 Pedro Alves <palves@redhat.com>
4992
4993 * hostio.c (HOSTIO_PATH_MAX): Define.
4994 (require_filename, handle_open, handle_unlink, handle_readlink):
4995 Use it.
4996
d8d2a3ee
PA
49972013-07-01 Pedro Alves <palves@redhat.com>
4998
4999 * server.h: Include "pathmax.h".
5000 * linux-low.c: Don't include sys/param.h.
5001 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5002 MAXPATHLEN.
5003 * win32-low.c: Don't include sys/param.h.
5004 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5005
bc7dea8d
PA
50062013-07-01 Pedro Alves <palves@redhat.com>
5007
5008 * event-loop.c: Don't check HAVE_UNISTD_H before including
5009 <unistd.h>.
5010 * gdbreplay.c: Likewise.
5011 * remote-utils.c: Likewise.
5012 * server.c: Likewise.
5013 * configure.ac: Don't check for unistd.h.
5014 * configure: Regenerate.
5015
d6c2da54
TT
50162013-06-28 Tom Tromey <tromey@redhat.com>
5017
5018 * Makefile.in (version.c): Use version.in, not
5019 common/version.in.
5020
257b6bec
MG
50212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5022
5023 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5024 * configure: Rebuild.
5025 * Makefile.in (version_host, version_target): Get from configure.
5026 (version.c): Use $(version_host) and $(version_target).
5027
86ebe149
DK
50282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5029
5030 Fix trace-status to output user name without trailing colon.
5031 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5032
f30aa5af
DK
50332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5034
5035 Fix trace-status to output proper start-time and stop-time.
5036 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5037 output start time and stop time in hex as gdb expects.
5038
28a93511
YQ
50392013-06-26 Pedro Alves <pedro@codesourcery.com>
5040
5041 * tracepoint.c (build_traceframe_info_xml): Output trace state
5042 variables present in the trace buffer.
5043
01208463
TT
50442013-06-24 Tom Tromey <tromey@redhat.com>
5045
5046 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5047 create-version.sh.
5048 (version.o): Remove.
5049 * gdbreplay.c: Include version.h.
5050 (version, host_name): Don't declare.
5051 * server.h: Include version.h.
5052 (version, host_name): Don't declare.
5053
760256f9
PA
50542013-06-12 Pedro Alves <palves@redhat.com>
5055
5056 * linux-x86-low.c (linux_is_elf64): Delete global.
5057 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5058 with local linux_pid_exe_is_elf_64_file use.
5059
030031ee
PA
50602013-06-11 Pedro Alves <palves@redhat.com>
5061
5062 * linux-low.c (regset_disabled, disable_regset): New functions.
5063 (regsets_fetch_inferior_registers)
5064 (regsets_store_inferior_registers): Use them.
5065 (initialize_regsets_info); Don't allocate the disabled_regsets
5066 array here.
5067 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5068 comment.
5069
5da6eb0a
PA
50702013-06-11 Pedro Alves <palves@redhat.com>
5071
5072 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5073 xmalloc.
5074
7e5aaa09
PA
50752013-06-11 Pedro Alves <palves@redhat.com>
5076
5077 * linux-x86-low.c (initialize_low_arch): Call
5078 init_registers_x32_avx_linux.
5079
d878444c
JK
50802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5081
5082 Fix compatibility with Android Bionic.
5083 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5084 it is not empty.
5085
3aee8918
PA
50862013-06-07 Pedro Alves <palves@redhat.com>
5087
5f2b57b5 5088 PR server/14823
3aee8918
PA
5089 * Makefile.in (OBS): Add tdesc.o.
5090 (IPA_OBJS): Add tdesc-ipa.o.
5091 (tdesc-ipa.o): New rule.
5092 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5093 interface.
5094 * linux-low.c (new_inferior): Delete.
5095 (disabled_regsets, num_regsets): Delete.
5096 (linux_add_process): Adjust to set the new per-process
5097 new_inferior flag.
5098 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5099 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5100 was a stop. When calling arch_setup, switch the current inferior
5101 to the thread that got an event.
5102 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5103 (regsets_fetch_inferior_registers)
5104 (regsets_store_inferior_registers): New regsets_info parameter.
5105 Adjust to use it.
5106 (linux_register_in_regsets): New regs_info parameter. Adjust to
5107 use it.
5108 (register_addr, fetch_register, store_register): New usrregs_info
5109 parameter. Adjust to use it.
5110 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5111 parameter regs_info. Adjust to use it.
5112 (linux_fetch_registers): Get the current inferior's regs_info, and
5113 adjust to use it.
5114 (linux_store_registers): Ditto.
5115 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5116 (initialize_low): Don't initialize the target_regsets here. Call
5117 initialize_low_arch.
5118 * linux-low.h (target_regsets): Delete declaration.
5119 (struct regsets_info): New.
5120 (struct usrregs_info): New.
5121 (struct regs_info): New.
5122 (struct process_info_private) <new_inferior>: New field.
5123 (struct linux_target_ops): Delete the num_regs, regmap, and
5124 regset_bitmap fields. New field regs_info.
5125 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5126 * i387-fp.c (num_xmm_registers): Delete.
5127 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5128 calls to new interface.
5129 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5130 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5131 Infer the number of xmm registers from the regcache's target
5132 description.
5133 * i387-fp.h (num_xmm_registers): Delete.
5134 * inferiors.c (add_thread): Don't install the thread's regcache
5135 here.
5136 * proc-service.c (gregset_info): Fetch the current inferior's
5137 regs_info. Adjust to use it.
5138 * regcache.c: Include tdesc.h.
5139 (register_bytes, reg_defs, num_registers)
5140 (gdbserver_expedite_regs): Delete.
5141 (get_thread_regcache): If the thread doesn't have a regcache yet,
5142 create one, instead of aborting gdbserver.
5143 (regcache_invalidate_one): Rename to ...
5144 (regcache_invalidate_thread): ... this.
5145 (regcache_invalidate_one): New.
5146 (regcache_invalidate): Only invalidate registers of the current
5147 process.
5148 (init_register_cache): Add target_desc parameter, and use it.
5149 (new_register_cache): Ditto. Assert the target description has a
5150 non zero registers_size.
5151 (regcache_cpy): Add assertions. Adjust.
5152 (realloc_register_cache, set_register_cache): Delete.
5153 (registers_to_string, registers_from_string): Adjust.
5154 (find_register_by_name, find_regno, find_register_by_number)
5155 (register_cache_size): Add target_desc parameter, and use it.
5156 (free_register_cache_thread, free_register_cache_thread_one)
5157 (regcache_release, register_cache_size): New.
5158 (register_size): Add target_desc parameter, and use it.
5159 (register_data, supply_register, supply_register_zeroed)
5160 (supply_regblock, supply_register_by_name, collect_register)
5161 (collect_register_as_string, collect_register_by_name): Adjust.
5162 * regcache.h (struct target_desc): Forward declare.
5163 (struct regcache) <tdesc>: New field.
5164 (init_register_cache, new_register_cache): Add target_desc
5165 parameter.
5166 (regcache_invalidate_thread): Declare.
5167 (regcache_invalidate_one): Delete declaration.
5168 (regcache_release): Declare.
5169 (find_register_by_number, register_cache_size, register_size)
5170 (find_regno): Add target_desc parameter.
5171 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5172 declarations.
5173 * remote-utils.c: Include tdesc.h.
5174 (outreg, prepare_resume_reply): Adjust.
5175 * server.c: Include tdesc.h.
5176 (gdbserver_xmltarget): Delete declaration.
5177 (get_features_xml, process_serial_event): Adjust.
5178 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5179 declare.
5180 (struct process_info) <tdesc>: New field.
5181 (ipa_tdesc): Declare.
5182 * tdesc.c: New file.
5183 * tdesc.h: New file.
5184 * tracepoint.c: Include tdesc.h.
5185 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5186 (get_context_regcache): Adjust to pass ipa_tdesc down.
5187 (do_action_at_tracepoint): Adjust to get the register cache size
5188 from the context regcache's description.
5189 (traceframe_walk_blocks): Adjust to get the register cache size
5190 from the current trace frame's description.
5191 (traceframe_get_pc): Adjust to get current trace frame's
5192 description and pass it down.
5193 (gdb_collect): Adjust to get the register cache size from the
5194 IPA's description.
5195 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5196 (gdbserver_xmltarget): Delete.
5197 (initialize_low_tracepoint): Set the ipa's target description.
5198 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5199 (initialize_low_tracepoint): Set the ipa's target description.
5200 * linux-x86-low.c: Include tdesc.h.
5201 [__x86_64__] (is_64bit_tdesc): New.
5202 (ps_get_thread_area, x86_get_thread_area): Use it.
5203 (i386_cannot_store_register): Rename to ...
5204 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5205 (i386_cannot_fetch_register): Rename to ...
5206 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5207 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5208 to new interface.
5209 (target_regsets): Rename to ...
5210 (x86_regsets): ... this.
5211 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5212 interface.
5213 (x86_siginfo_fixup): Use is_64bit_tdesc.
5214 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5215 (tdesc_x32_avx_linux, tdesc_x32_linux)
5216 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5217 Declare.
5218 (x86_linux_update_xmltarget): Delete.
5219 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5220 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5221 (AMD64_LINUX_USER64_CS): New.
5222 (x86_linux_read_description): New, based on
5223 x86_linux_update_xmltarget.
5224 (same_process_callback): New.
5225 (x86_arch_setup_process_callback): New.
5226 (x86_linux_update_xmltarget): New.
5227 (x86_regsets_info): New.
5228 (amd64_linux_regs_info): New.
5229 (i386_linux_usrregs_info): New.
5230 (i386_linux_regs_info): New.
5231 (x86_linux_regs_info): New.
5232 (x86_arch_setup): Reimplement.
5233 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5234 (x86_emit_ops): Ditto.
5235 (the_low_target): Adjust. Install x86_linux_regs_info,
5236 x86_cannot_fetch_register, and x86_cannot_store_register.
5237 (initialize_low_arch): New.
5238 * linux-ia64-low.c (tdesc_ia64): Declare.
5239 (ia64_fetch_register): Adjust.
5240 (ia64_usrregs_info, regs_info): New globals.
5241 (ia64_regs_info): New function.
5242 (the_low_target): Adjust.
5243 (initialize_low_arch): New function.
5244 * linux-sparc-low.c (tdesc_sparc64): Declare.
5245 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5246 Adjust.
5247 (sparc_arch_setup): New function.
5248 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5249 (the_low_target): Adjust.
5250 (initialize_low_arch): New function.
5251 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5252 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5253 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5254 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5255 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5256 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5257 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5258 (tdesc_powerpc_isa205_vsx64l): Declare.
5259 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5260 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5261 (ppc_set_pc, ppc_get_hwcap): Adjust.
5262 (ppc_usrregs_info): Forward declare.
5263 (!__powerpc64__) ppc_regmap_adjusted: New global.
5264 (ppc_arch_setup): Adjust to the current process'es target
5265 description.
5266 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5267 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5268 (ppc_store_evrregset): Adjust.
5269 (target_regsets): Rename to ...
5270 (ppc_regsets): ... this, and make static.
5271 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5272 (ppc_regs_info): New function.
5273 (the_low_target): Adjust.
5274 (initialize_low_arch): New function.
5275 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5276 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5277 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5278 (tdesc_s390x_linux64v2): Declare.
5279 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5280 (s390_fill_gregset, s390_store_last_break): Adjust.
5281 (target_regsets): Rename to ...
5282 (s390_regsets): ... this, and make static.
5283 (s390_get_pc, s390_set_pc): Adjust.
5284 (s390_get_hwcap): New target_desc parameter, and use it.
5285 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5286 (s390_arch_setup): Adjust to set the current process'es target
5287 description. Don't adjust the regmap.
5288 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5289 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5290 (regs_info_3264): New globals.
5291 (s390_regs_info): New function.
5292 (the_low_target): Adjust.
5293 (initialize_low_arch): New function.
5294 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5295 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5296 [__mips64] (init_registers_mips_linux)
5297 (init_registers_mips_dsp_linux): Delete defines.
5298 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5299 (have_dsp): New global.
5300 (mips_read_description): New, based on mips_arch_setup.
5301 (mips_arch_setup): Reimplement.
5302 (get_usrregs_info): New function.
5303 (mips_cannot_fetch_register, mips_cannot_store_register)
5304 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5305 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5306 (target_regsets): Rename to ...
5307 (mips_regsets): ... this, and make static.
5308 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5309 (dsp_regs_info, regs_info): New globals.
5310 (mips_regs_info): New function.
5311 (the_low_target): Adjust.
5312 (initialize_low_arch): New function.
5313 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5314 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5315 Declare.
5316 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5317 (arm_read_description): New, with bits factored from
5318 arm_arch_setup.
5319 (arm_arch_setup): Reimplement.
5320 (target_regsets): Rename to ...
5321 (arm_regsets): ... this, and make static.
5322 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5323 (arm_regs_info): New function.
5324 (the_low_target): Adjust.
5325 (initialize_low_arch): New function.
5326 * linux-m68k-low.c (tdesc_m68k): Declare.
5327 (target_regsets): Rename to ...
5328 (m68k_regsets): ... this, and make static.
5329 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5330 (m68k_regs_info): New function.
5331 (m68k_arch_setup): New function.
5332 (the_low_target): Adjust.
5333 (initialize_low_arch): New function.
5334 * linux-sh-low.c (tdesc_sharch): Declare.
5335 (target_regsets): Rename to ...
5336 (sh_regsets): ... this, and make static.
5337 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5338 (sh_regs_info, sh_arch_setup): New functions.
5339 (the_low_target): Adjust.
5340 (initialize_low_arch): New function.
5341 * linux-bfin-low.c (tdesc_bfin): Declare.
5342 (bfin_arch_setup): New function.
5343 (bfin_usrregs_info, regs_info): New globals.
5344 (bfin_regs_info): New function.
5345 (the_low_target): Adjust.
5346 (initialize_low_arch): New function.
5347 * linux-cris-low.c (tdesc_cris): Declare.
5348 (cris_arch_setup): New function.
5349 (cris_usrregs_info, regs_info): New globals.
5350 (cris_regs_info): New function.
5351 (the_low_target): Adjust.
5352 (initialize_low_arch): New function.
5353 * linux-cris-low.c (tdesc_crisv32): Declare.
5354 (cris_arch_setup): New function.
5355 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5356 (cris_regs_info): New function.
5357 (the_low_target): Adjust.
5358 (initialize_low_arch): New function.
5359 * linux-m32r-low.c (tdesc_m32r): Declare.
5360 (m32r_arch_setup): New function.
5361 (m32r_usrregs_info, regs_info): New globals.
5362 (m32r_regs_info): Adjust.
5363 (initialize_low_arch): New function.
5364 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5365 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5366 (tic6x_usrregs_info): Forward declare.
5367 (tic6x_read_description): New function, based on ...
5368 (tic6x_arch_setup): ... this. Reimplement.
5369 (target_regsets): Rename to ...
5370 (tic6x_regsets): ... this, and make static.
5371 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5372 (tic6x_regs_info): New function.
5373 (the_low_target): Adjust.
5374 (initialize_low_arch): New function.
5375 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5376 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5377 (target_regsets): Rename to ...
5378 (xtensa_regsets): ... this, and make static.
5379 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5380 globals.
5381 (xtensa_arch_setup, xtensa_regs_info): New functions.
5382 (the_low_target): Adjust.
5383 (initialize_low_arch): New function.
5384 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5385 (nios2_arch_setup): Set the current process'es tdesc.
5386 (target_regsets): Rename to ...
5387 (nios2_regsets): ... this.
5388 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5389 (nios2_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
a261b8f5
PA
5392 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5393 (aarch64_arch_setup): Set the current process'es tdesc.
5394 (target_regsets): Rename to ...
5395 (aarch64_regsets): ... this.
5396 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5397 (aarch64_regs_info): New function.
5398 (the_low_target): Adjust.
5399 (initialize_low_arch): New function.
3aee8918
PA
5400 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5401 globals.
5402 (target_regsets): Rename to ...
5403 (tile_regsets): ... this.
5404 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5405 (tile_regs_info): New function.
5406 (tile_arch_setup): Set the current process'es tdesc.
5407 (the_low_target): Adjust.
5408 (initialize_low_arch): New function.
5409 * spu-low.c (tdesc_spu): Declare.
5410 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5411 * win32-arm-low.c (tdesc_arm): Declare.
5412 (arm_arch_setup): New function.
5413 (the_low_target): Install arm_arch_setup instead of
5414 init_registers_arm.
5415 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5416 (init_windows_x86): Rename to ...
5417 (i386_arch_setup): ... this. Set `win32_tdesc'.
5418 (the_low_target): Adjust.
5419 * win32-low.c (win32_tdesc): New global.
5420 (child_add_thread): Don't create the thread cache here.
5421 (do_initial_child_stuff): Set the new process'es tdesc.
5422 * win32-low.h (struct target_desc): Forward declare.
5423 (win32_tdesc): Declare.
5424 * lynx-i386-low.c (tdesc_i386): Declare global.
5425 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5426 * lynx-low.c (lynx_tdesc): New global.
5427 (lynx_add_process): Set the new process'es tdesc.
5428 * lynx-low.h (struct target_desc): Forward declare.
5429 (lynx_tdesc): Declare global.
5430 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5431 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5432 * nto-low.c (nto_tdesc): New global.
5433 (do_attach): Set the new process'es tdesc.
5434 * nto-low.h (struct target_desc): Forward declare.
5435 (nto_tdesc): Declare.
5436 * nto-x86-low.c (tdesc_i386): Declare.
5437 (nto_x86_arch_setup): Set `nto_tdesc'.
5438
b1fbec62
GB
54392013-06-04 Gary Benson <gbenson@redhat.com>
5440
5441 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5442 to qSupported response when appropriate.
5443 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5444 with nonzero-length annex.
5445 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5446 arguments supplied in annex.
5447
d1ec4ce7
DE
54482013-05-31 Doug Evans <dje@google.com>
5449
ac44adcb 5450 PR server/15594
d1ec4ce7
DE
5451 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5452 64 bits in 64-cross-32 environment.
5453
9b25f2d3
PA
54542013-05-28 Pedro Alves <palves@redhat.com>
5455
5456 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5457 (aarch64-without-fpu.c): Delete rule.
5458 * configure.srv (aarch64*-*-linux*): Remove references to
5459 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5460 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5461 declaration.
5462
6740dc9c
PA
54632013-05-24 Pedro Alves <palves@redhat.com>
5464
5465 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5466 instead of strchr/decode_address. Error if the range isn't split
5467 with a ','. Don't assume there's be a ':' in the action.
5468
c2d6af84
PA
54692013-05-23 Yao Qi <yao@codesourcery.com>
5470 Pedro Alves <palves@redhat.com>
5471
5472 * linux-low.c (lwp_in_step_range): New function.
5473 (linux_wait_1): If the thread was range stepping and stopped
5474 outside the stepping range, report the stop to GDB. Otherwise,
5475 continue stepping. Add range stepping debug output.
5476 (linux_set_resume_request): Copy the step range from the resume
5477 request to the lwp.
5478 (linux_supports_range_stepping): New.
5479 (linux_target_ops) <supports_range_stepping>: Set to
5480 linux_supports_range_stepping.
5481 * linux-low.h (struct linux_target_ops)
5482 <supports_range_stepping>: New field.
5483 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5484 * linux-x86-low.c (x86_supports_range_stepping): New.
5485 (the_low_target) <supports_range_stepping>: Set to
5486 x86_supports_range_stepping.
5487 * server.c (handle_v_cont): Handle 'r' action.
5488 (handle_v_requests): Append ";r" if the target supports range
5489 stepping.
5490 * target.h (struct thread_resume) <step_range_start,
5491 step_range_end>: New fields.
5492 (struct target_ops) <supports_range_stepping>:
5493 New field.
5494 (target_supports_range_stepping): New macro.
5495
58794e1a
JB
54962013-05-17 Joel Brobecker <brobecker@adacore.com>
5497
5498 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5499 confusion in comment.
5500
d631c5a7
JB
55012013-05-17 Joel Brobecker <brobecker@adacore.com>
5502
5503 * lynx-low.c (struct process_info_private): New type.
5504 (lynx_add_process): New function.
5505 (lynx_create_inferior, lynx_attach): Replace calls to
5506 add_process by calls to lynx_add_process.
5507 (lynx_resume): If PTID is null, then try using
5508 current_process()->private->last_wait_event_ptid.
5509 Add comments.
5510 (lynx_clear_inferiors): Delete. The contents of that function
5511 has been inlined in lynx_mourn;
5512 (lynx_wait_1): Save the ptid in the process's private data.
5513 (lynx_mourn): Free the process' private data. Replace call
5514 to lynx_clear_inferiors by call to clear_inferiors.
5515
96f7a20f
YQ
55162013-05-17 Yao Qi <yao@codesourcery.com>
5517
5518 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5519 the right place.
5520
db0dfaa0
LM
55212013-05-16 Luis Machado <lgustavo@codesourcery.com>
5522
5523 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5524 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5525 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5526 PT_TEXT_END_ADDR guards. Update comments.
5527 (linux_target_op) <read_offsets>: Conditionally define to
5528 linux_read_offsets if the target is UCLIBC and if it defines
5529 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5530
68f5f838
SL
55312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5532 Andrew Jenner <andrew@codesourcery.com>
5533
5534 * Makefile.in (SFILES): Add linux-nios2-low.c.
5535 (clean): Add action to delete nios2-linux.c.
5536 (nios2-linux.c): New rule.
5537 * configure.srv: Add nios2*-*-linux*.
5538 * linux-nios2-low.c: New.
5539
1ebff1fd
HAQ
55402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5541
5542 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5543
f6150862
HZ
55442013-04-25 Hui Zhu <hui@codesourcery.com>
5545
5546 PR gdb/15186
f6150862
HZ
5547 * ax.c (ax_printf): Add fflush.
5548
614c279d
TT
55492013-04-22 Tom Tromey <tromey@redhat.com>
5550
5551 * Makefile.in (SFILES): Add filestuff.c.
5552 (OBS): Add filestuff.o.
5553 (filestuff.o): New target.
5554 * config.in, configure: Rebuild.
5555 * configure.ac: Check for fdwalk, pipe2.
5556
7d4e5717
PA
55572013-04-17 Pedro Alves <palves@redhat.com>
5558
5559 * configure.ac (USE_THREAD_DB): Delete variable.
5560 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5561 Don't AC_SUBST USE_THREAD_DB.
5562 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5563 * config.in, configure: Regenerate.
5564
d5c93e41
PA
55652013-04-16 Pedro Alves <palves@redhat.com>
5566
5567 * linux-low.h (struct lwp_info) <thread_known>: Move under
5568 the USE_THREAD_DB #ifdef.
5569
04f5fe89
PA
55702013-04-16 Pedro Alves <palves@redhat.com>
5571
5572 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5573 (linux-low.o): Delete rule.
5574 * linux-low.h: Always include "gdb_thread_db.h" instead of
5575 conditionally including thread_db.h.
5576 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5577 HAVE_THREAD_DB_H.
5578
480b27bf
JK
55792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5580
5581 * Makefile.in (install-only): Fix make install regression.
5582
43662968
JK
55832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5584
5585 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5586 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5587 installation.
5588 * gdbserver.1: Remove.
5589
3e74e146
PA
55902013-03-22 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (handle_extended_wait): Don't call
5593 linux_enable_event_reporting.
5594
a8347a2a
TT
55952013-03-15 Tony Theodore <tonyt@logyst.com>
5596
5597 PR build/9098:
5598 * Makefile.in (SHELL): Use @SHELL@.
5599
eeb56fa7
SDJ
56002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5601
5602 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5603 compiler warning.
5604
4fa7e2ff
JB
56052013-03-13 Joel Brobecker <brobecker@adacore.com>
5606
5607 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5608 Remove extraneous NULL element.
5609
8ddb1965
YQ
56102013-03-13 Yao Qi <yao@codesourcery.com>
5611
5612 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5613 'V' block in trace frame.
5614
9accd112
MM
56152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5616
5617 * target.h (struct target_ops): Add btrace ops.
5618 (target_supports_btrace): New macro.
5619 (target_enable_btrace): New macro.
5620 (target_disable_btrace): New macro.
5621 (target_read_btrace): New macro.
5622 * gdbthread.h (struct thread_info): Add btrace field.
5623 * server.c: Include btrace-common.h.
5624 (handle_btrace_general_set): New function.
5625 (handle_btrace_enable): New function.
5626 (handle_btrace_disable): New function.
5627 (handle_general_set): Call handle_btrace_general_set.
5628 (handle_qxfer_btrace): New function.
5629 (struct qxfer qxfer_packets[]): Add btrace entry.
5630 * inferiors.c (remove_thread): Disable btrace.
5631 * linux-low: Include linux-btrace.h.
5632 (linux_low_enable_btrace): New function.
5633 (linux_low_read_btrace): New function.
5634 (linux_target_ops): Add btrace ops.
5635 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5636 Add srv_linux_btrace=yes.
5637 (x86_64-*-linux*): Add linux-btrace.o.
5638 Add srv_linux_btrace=yes.
5639 * configure.ac: Define HAVE_LINUX_BTRACE.
5640 * config.in: Regenerated.
5641 * configure: Regenerated.
5642
5cc22e4c
MM
56432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5644
5645 * server.c (handle_qxfer): Preserve error message if -3 is
5646 returned.
5647 (qxfer): Document the -3 return value.
5648
7c97f91e
MM
56492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5650
5651 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5652 (linux_btrace_h): New variable.
5653 (linux-btrace.o): New rule.
5654
be9a119c 56552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5656 Hafiz Abid Qadeer <abidh@codesourcery.com>
5657
5658 * tracepoint.c (trace_buffer_size): New global.
5659 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5660 (init_trace_buffer): Change to one-argument function. Allocate
5661 trace buffer memory.
5662 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5663 handle QTBuffer:size packet.
5664 (cmd_bigqtbuffer_size): New function.
5665 (initialize_tracepoint): Call init_trace_buffer with
5666 DEFAULT_TRACE_BUFFER_SIZE.
5667 * server.c (handle_query): Add QTBuffer:size in the
5668 supported packets.
5669
e64f7499
YQ
56702013-03-07 Yao Qi <yao@codesourcery.com>
5671
5672 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5673 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5674 of -1.
5675 (cmd_qtsp): Adjust condition. Do post increment.
5676 Set cur_action and cur_step_action back to 0.
5677
f0ae6fc3
PA
56782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5679
5680 PR server/15236
5681 * linux-low.c (linux_write_memory): Return early success if LEN is
5682 zero.
5683
b5b0b0af
CV
56842013-03-05 Corinna Vinschen <vinschen@redhat.de>
5685
334ad4a8 5686 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5687
589bc927
TT
56882013-02-28 Tom Tromey <tromey@redhat.com>
5689
5690 * configure.ac: Invoke AC_SYS_LARGEFILE.
5691 * configure, config.in: Rebuild.
5692
dfe07582
CV
56932013-02-28 Corinna Vinschen <vinschen@redhat.com>
5694
5695 * win32-low.c: Throughout, fix format strings and casts of
5696 printf-like functions to avoid type related warnings on all
5697 platforms.
5698 (get_child_debug_event): Print dwDebugEventCode as hex since
5699 that's how it's usually documented.
5700
736cd585
YQ
57012013-02-28 Yao Qi <yao@codesourcery.com>
5702
5703 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5704 pulongest.
5705
e1f58301
JW
57062013-02-27 Jiong Wang <jiwang@tilera.com>
5707
5708 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5709 (reg-tilegx32.c): New rule.
5710 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5711 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5712 different register info initializer according to elf class.
5713 (init_registers_tilgx32): New function. The tilegx32 register info
5714 initializer.
5715 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5716 (tile_store_gregset): Likewise.
5717
d171ca78
YQ
57182013-02-27 Yao Qi <yao@codesourcery.com>
5719
5720 * server.c (process_point_options): Print debug message when
5721 debug_threads is true.
5722
282bbdf3
YQ
57232013-02-26 Yao Qi <yao@codesourcery.com>
5724
5725 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5726
aca22551
PA
57272013-02-19 Pedro Alves <palves@redhat.com>
5728 Kai Tietz <ktietz@redhat.com>
5729
5730 PR gdb/15161
5731
5732 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5733 instead of strtoul to extract address from packet.
5734 (process_serial_event) <'z'>: Likewise.
5735
4f3cee1c
YQ
57362013-02-18 Yao Qi <yao@codesourcery.com>
5737
5738 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5739
8e1d55a3
PA
57402013-02-14 Pedro Alves <palves@redhat.com>
5741
5742 Plug memory leak.
5743
5744 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5745 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5746
458820da
PA
57472013-02-14 Pedro Alves <palves@redhat.com>
5748
5749 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5750
baea0dae
PA
57512013-02-14 Pedro Alves <palves@redhat.com>
5752
5753 * tracepoint.c (save_string): Delete.
5754 (add_tracepoint_action): Use savestring instead of save_string.
5755
0b1afbb3
PA
57562013-02-12 Pedro Alves <palves@redhat.com>
5757
5758 * linux-xtensa-low.c: Ditto.
5759 * xtensa-xtregs.c: Ditto.
5760
8a4ac37e
PA
57612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5762
5763 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5764 thread_db.
5765
148de6bb
MS
57662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5767
5768 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5769 aarch64_num_wp_regs and aarch64_num_bp_regs to
5770 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5771
55fac6e0
MS
57722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5773
5774 * linux-aarch64-low.c (ps_get_thread_area): Replace
5775 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5776
176eb98c
MS
57772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5778 Marcus Shawcroft <marcus.shawcroft@arm.com>
5779 Nigel Stephens <nigel.stephens@arm.com>
5780 Yufeng Zhang <yufeng.zhang@arm.com>
5781
5782 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5783 (aarch64.c, aarch64-without-fpu.c): New targets.
5784 * configure.srv (aarch64*-*-linux*): New.
5785 * linux-aarch64-low.c: New file.
5786
56f7af9c
MS
57872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5788
43aaf8b6 5789 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5790 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5791 (dequeue_one_deferred_signal, linux_resume_one_thread)
5792 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5793 (linux_tracefork_grandchild, linux_test_for_tracefork)
5794 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5795 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5796 where the argument is 0.
5797
60f662b0
YQ
57982013-01-25 Yao Qi <yao@codesourcery.com>
5799
5800 * event-loop.c: Include "queue.h".
5801 (gdb_event_p): New typedef.
5802 (struct gdb_event) <next_event>: Remove.
5803 (event_queue): Change to QUEUE(gdb_event_p).
5804 (async_queue_event): Remove.
5805 (gdb_event_xfree): New.
5806 (initialize_event_loop): New.
5807 (process_event): Use API from QUEUE.
5808 (wait_for_event): Likewise.
5809 * server.c (main): Call initialize_event_loop.
5810 * server.h (initialize_event_loop): Declare.
5811
5ae4861a
YQ
58122013-01-18 Yao Qi <yao@codesourcery.com>
5813
5814 * ax.h (struct eval_agent_expr_context): New.
5815 (gdb_eval_agent_expr): Update declaration.
5816 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5817 TFRAME. Add new argument CTX.
5818 * server.h (struct eval_agent_expr_context): Declare.
5819 (agent_mem_read, agent_tsv_read): Update declaration.
5820 (agent_mem_read_string): Likewise.
5821 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5822 (add_traceframe_block): Add new argument TPOINT.
5823 Increase TPOINT->traceframe_usage.
5824 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5825 eval_tracepoint_agent_expr.
5826 (condition_true_at_tracepoint): Likewise.
5827 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5828 (agent_mem_read_string, agent_tsv_read): Likewise.
5829
85e00e85
YQ
58302013-01-16 Yao Qi <yao@codesourcery.com>
5831
5832 * linux-low.c (linux_resume_one_lwp): Don't check
5833 'lwp->bp_reinsert != 0'.
5834
4039cf45
JB
58352013-01-07 Joel Brobecker <brobecker@adacore.com>
5836 Pedro Alves <palves@redhat.com>
5837
5838 * lynx-low.c (ptrace_request_to_str): Define a temporary
5839 macro and use it to simplify this function's implementation.
5840
9044dee2
JB
58412013-01-07 Joel Brobecker <brobecker@adacore.com>
5842
5843 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5844 sets errno.
5845
e6352c8f
JB
58462013-01-07 Joel Brobecker <brobecker@adacore.com>
5847
5848 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5849
50681a27
JB
58502013-01-07 Joel Brobecker <brobecker@adacore.com>
5851
5852 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5853
3f6e77ef
JB
58542013-01-07 Joel Brobecker <brobecker@adacore.com>
5855
5856 * lynx-low.c (lynx_resume): Use the resume_info parameter
5857 to determine the ptid for the lynx_ptrace call, unless
5858 it is equal to minus_one_ptid, in which case we use the
5859 ptid of the current_inferior.
5860 (lynx_wait_1): After having received a thread create/exit
5861 event, resume the inferior's execution using the signaling
5862 thread's ptid, rather than the old ptid.
5863
7fda33ae
JB
58642013-01-07 Joel Brobecker <brobecker@adacore.com>
5865
5866 * lynx-low.c (lynx_resume): Delete variable ret.
5867
b9786c74
JB
58682013-01-01 Joel Brobecker <brobecker@adacore.com>
5869
5870 * gdbreplay.c (gdbreplay_version): Update copyright year.
5871 * server.c (gdbserver_version): Likewise.
5872
8b93d60f
JB
58732012-12-17 Joel Brobecker <brobecker@adacore.com>
5874
5875 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5876 new thread.
5877
037335a7
JB
58782012-12-17 Joel Brobecker <brobecker@adacore.com>
5879
5880 * lynx-low.c (ptrace_request_to_str): Add handling for
5881 PTRACE_GETTRACESIG.
5882
52d4cbd8
JB
58832012-12-17 Joel Brobecker <brobecker@adacore.com>
5884
5885 * lynx-low.c (lynx_attach): Delete variable new_process.
5886
ab8f6ca9
JB
58872012-12-17 Joel Brobecker <brobecker@adacore.com>
5888
5889 * lynx-low.c (lynx_create_inferior): Delete variable
5890 new_process.
5891
78cbc024
JB
58922012-12-17 Joel Brobecker <brobecker@adacore.com>
5893
5894 * lynx-low.c (ptrace_request_to_str): Do not handle
5895 PTRACE_GETTHREADLIST if this macro does not exist.
5896
14a00470
YQ
58972012-12-15 Yao Qi <yao@codesourcery.com>
5898
5899 * Makefile.in (OBS): Add notif.o.
5900 * notif.c, notif.h: New.
5901 * server.c: Include "notif.h".
5902 (struct vstop_notif) <next>: Remove.
5903 <base>: New field.
5904 (queue_stop_reply): Update.
5905 (push_event, send_next_stop_reply): Remove.
5906 (discard_queued_stop_replies): Update.
5907 (notif_stop): New variable.
5908 (handle_v_stopped): Remove.
5909 (handle_v_requests): Don't call handle_v_stopped. Call
5910 handle_ack_notif instead.
5911 (queue_stop_reply_callback): Call notif_event_enque instead
5912 of queue_stop_reply.
5913 (handle_status): Don't call send_next_stop_reply, call
5914 notif_write_event instead.
5915 (kill_inferior_callback): Likewise.
5916 (detach_or_kill_inferior_callback): Likewise.
5917 (main): Call initialize_notif.
5918 (process_serial_event): Call QUEUE_is_empty.
5919 (handle_target_event): Call notif_push instead of push event.
5920 * server.h (push_event): Remove declaration.
5921
61c125b9
TT
59222012-12-10 Tom Tromey <tromey@redhat.com>
5923
5924 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5925 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5926 macros.
5927 (.c.o): Rewrite.
5928 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5929 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5930 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5931 (amd64-linux-ipa.o, ax.o): Rewrite.
5932 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5933 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5934 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5935 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5936 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5937 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5938 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5939 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5940 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5941 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5942 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5943 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5944 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5945 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5946 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5947 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5948 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5949 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5950 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5951 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5952 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5953 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5954 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5955 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5956 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5957 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5958 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5959 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5960 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5961 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5962 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5963 (reg-tilegx.o): Remove.
5964 (all_object_files): New macro.
5965 Include .deps files.
5966 * aclocal.m4, configure: Rebuild.
5967 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5968 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5969 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5970
e90e9ad9
TT
59712012-12-05 Tom Tromey <tromey@redhat.com>
5972
5973 PR gdb/14917:
5974 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5975
02d403bf 59762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5977
5978 * configure.ac: Check for linux/perf_event.h.
5979 * config.in: Regenerated.
5980 * configure: Regenerated.
5981
0270a750
PA
59822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5983
5984 * hostio.c (handle_readlink): Decrease buffer size
5985 parameter passed to readlink by one byte.
5986
8c29b58e
YQ
59872012-11-26 Yao Qi <yao@codesourcery.com>
5988
5989 * configure.ac (build_warnings): Append '-Wempty-body'.
5990 * configure: Regenerated.
5991 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5992 body.
5993
8bdce1ff
PM
59942012-11-15 Pierre Muller <muller@sourceware.org>
5995
5996 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5997 * config.in: Regenerate.
5998 * configure: Regenerate.
5999 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6000 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6001 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6002 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6003 header.
6004 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6005 instead of <sys/wait.h> header.
6006 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6007
02d403bf 60082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6009
6010 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6011 (various make rules): Remove -DGDBSERVER
6012
fbd5db48
YQ
60132012-11-09 Yao Qi <yao@codesourcery.com>
6014
6015 * spu-low.c (current_ptid): Move it to ..
6016 * gdbthread.h: ... here. New.
6017 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6018 * server.c (myresume, process_serial_event): Likewise.
6019 * thread-db.c (thread_db_find_new_threads): Likewise.
6020 * tracepoint.c (run_inferior_command): Likewise.
6021
b3dc46ff
AB
60222012-10-01 Andrew Burgess <aburgess@broadcom.com>
6023
6024 * server.c (handle_search_memory_1): Include access length in
6025 warning message.
6026
07c04788
HPN
60272012-09-05 Michael Brandt <michael.brandt@axis.com>
6028
6029 * linux-crisv32-low.c: Fix compile errors.
6030
918d227b
YQ
60312012-09-04 Yao Qi <yao@codesourcery.com>
6032
6033 * tracepoint.c (cmd_qtsv): Adjust debug message.
6034 Don't check CUR_TPOINT.
6035
18c1b81a
YQ
60362012-08-28 Yao Qi <yao@codesourcery.com>
6037
6038 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6039 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6040 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6041 Remove declarations of xmalloc, xreallloc, xstrdup and
6042 freeargv.
6043 * Makefile.in (libiberty_h): New.
6044 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6045 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6046
dc82f37b
YQ
60472012-08-23 Yao Qi <yao@codesourcery.com>
6048
6049 * server.h: Remove declaration of 'xsnprintf'.
6050
406b1477
KS
60512012-08-22 Keith Seitz <keiths@redhat.com>
6052
6053 * server.h: Include build-gnulib-gbserver/config.h.
6054 * gdbreplay.c: Likewise.
6055
e6712ff1
DE
60562012-08-08 Doug Evans <dje@google.com>
6057
6058 * Makefile.in (SFILES): Add gdb_vecs.c.
6059 (OBS): Add gdb_vecs.o.
6060 (gdb_vecs_h, host_defs_h): New variables.
6061 (thread-db.o): Add $(gdb_vecs_h) dependency.
6062 (gdb_vecs.o): New rule.
6063 * thread-db.c: #include "gdb_vecs.h".
6064 (thread_db_load_search): Use a vector to iterate over path elements.
6065 Handle text appearing after "$pdir".
6066
6067 * configure.ac: Add check for strstr.
6068 * config.in: Regenerate.
6069 * configure: Regenerate.
6070
7c3270ae
UW
60712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6072
6073 * hostio.c (handle_pread): If pread fails, fall back to attempting
6074 lseek/read.
6075 (handle_pwrite): Likewise for pwrite.
6076
b62e2b27
UW
60772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6078
6079 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6080 between unsupported TYPE and unimplementable ADDR/LEN combination.
6081 (arm_insert_point): Act on new return value.
6082
78a99e91
PA
60832012-07-31 Pedro Alves <palves@redhat.com>
6084
6085 * server.c (process_point_options): Only skip tokens if we find
6086 one that is unrecognized. Don't treat 'X' specially while
6087 skipping unrecognized tokens.
6088
fcf303ab
UW
60892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6090
6091 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6092 to 4-byte-align HW breakpoint addresses for Thumb.
6093
7255706c
YQ
60942012-07-27 Yao Qi <yao@codesourcery.com>
6095
6096 PR remote/14161.
6097
6098 * server.h: Declare gdb_agent_about_to_close.
6099 * target.c (kill_inferior): Include "agent.h".
6100 New. Send command 'kill'.
6101 * target.h (kill_inferior): Removed macro.
6102 * tracepoint.c (gdb_agent_about_to_close): New.
6103 (gdb_agent_helper_thread): Handle command 'close'.
6104 Wait endlessly until the inferior stops.
6105 Install gdb_agent_remove_socket to atexit hook.
6106 (agent_socket_name): New static variable.
6107 (gdb_agent_socket_init): Replace local variable 'name' with
6108 'agent_socket_name'.
6109 (gdb_agent_remove_socket): New.
6110
5a3f286f
YQ
61112012-07-27 Yao Qi <yao@codesourcery.com>
6112
6113 * server.c (process_point_options): Stop at 'X' when parsing.
6114
961bd387
ME
61152012-07-19 Michael Eager <eager@eagercon.com>
6116
a261b8f5 6117 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6118 to hw_execute.
6119 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6120 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6121 hardware breakpoint.
6122
aa7c7447
JK
61232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6124
6125 * gdbserver/linux-low.c (initialize_low): Call
6126 linux_ptrace_init_warnings.
6127
7f216e7c
DE
61282012-07-02 Doug Evans <dje@google.com>
6129
6130 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6131 pointer to int.
6132
d3ce09f5
SS
61332012-07-02 Stan Shebs <stan@codesourcery.com>
6134
6135 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6136 (ax.o): Add it to build rule.
6137 (ax-ipa.o): Ditto.
6138 (OBS): Add format.o.
6139 (IPA_OBS): Add format.o.
6140 * server.c (handle_query): Claim support for breakpoint commands.
6141 (process_point_options): Add command case.
6142 (process_serial_event): Leave running if there are printfs in
6143 effect.
6144 * mem-break.h (any_persistent_commands): Declare.
6145 (add_breakpoint_commands): Declare.
6146 (gdb_no_commands_at_breakpoint): Declare.
6147 (run_breakpoint_commands): Declare.
6148 * mem-break.c (struct point_command_list): New struct.
6149 (struct breakpoint): New field command_list.
6150 (any_persistent_commands): New function.
6151 (add_commands_to_breakpoint): New function.
6152 (add_breakpoint_commands): New function.
6153 (gdb_no_commands_at_breakpoint): New function.
6154 (run_breakpoint_commands): New function.
6155 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6156 locally.
6157 * ax.c: Include format.h.
6158 (ax_printf): New function.
6159 (gdb_eval_agent_expr): Add printf opcode.
6160
2f8f6aed
YQ
61612012-06-13 Yao Qi <yao@codesourcery.com>
6162
6163 * server.c (start_inferior): Remove duplicated writes to fields
6164 'last_resume_kind' and 'last_status' of 'current_inferior'.
6165
0c9070b3
YQ
61662012-06-12 Yao Qi <yao@codesourcery.com>
6167 Pedro Alves <palves@redhat.com>
6168
6169 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6170 comment.
6171 * server.c (handle_v_cont): Extend comment.
6172
c52daf70
YQ
61732012-06-11 Yao Qi <yao@codesourcery.com>
6174
6175 * linux-low.c (linux_attach): Add 'static'.
6176
d38bbb0a
YQ
61772012-06-06 Yao Qi <yao@codesourcery.com>
6178
6179 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6180
89dc0afd
JK
61812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 Fix gcc -flto compilation warning.
6184 * server.c (main): Make variable multi_mode and attach volatile.
6185
75f62ce7
TJB
61862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6187
6188 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6189 if the platform doesn't know about it.
6190
65f479b6
PA
61912012-05-30 Jeff Kenton <jkenton@tilera.com>
6192
6193 * Makefile.in (SFILES): Add linux-tile-low.c.
6194 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6195 * configure.srv: Handle tilegx-*-linux*.
6196 * linux-tile-low.c: New file.
6197
0c5bf5a9
JK
61982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6199
6200 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6201
a493e3e2
PA
62022012-05-24 Pedro Alves <palves@redhat.com>
6203
6204 PR gdb/7205
6205
43aaf8b6 6206 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6207
2ea28649
PA
62082012-05-24 Pedro Alves <palves@redhat.com>
6209
6210 PR gdb/7205
6211
6212 Replace target_signal with gdb_signal throughout.
6213
8d409d16
MR
62142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6215
6216 * linux-low.c (linux_store_registers): Avoid the copying sequence
6217 when no data has been retrieved by ptrace.
6218
23512c01
MGD
62192012-05-22 Will Deacon <will.deacon@arm.com>
6220
6221 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6222 Include asm/ptrace.h.
6223 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6224 already defined.
6225
4934b29e
MR
62262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6227
6228 * linux-low.c (linux_store_registers): Don't re-retrieve data
6229 with ptrace that has already been obtained from /proc. Always
6230 copy any data retrieved with ptrace to the buffer supplied.
6231
bde24c0a
PA
62322012-05-11 Yao Qi <yao@codesourcery.com>
6233 Pedro Alves <palves@redhat.com>
6234
6235 * linux-low.c (enum stopping_threads_kind): New.
6236 (stopping_threads): Change type to `enum stopping_threads_kind'.
6237 (handle_extended_wait): If stopping and suspending threads, leave
6238 the new_lwp suspended too.
6239 (linux_wait_for_event): Adjust.
6240 (stop_all_lwps): Set `stopping_threads' to
6241 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6242 whether we're suspending threads or just stopping them. Assert no
6243 recursion happens.
6244
623b6bdf
YQ
62452012-04-29 Yao Qi <yao@codesourcery.com>
6246
6247 * server.h: Move some code to ...
6248 * gdbthread.h: ... here. New.
6249 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6250 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6251 (nto-low.o, win32-low.o): Likewise.
6252 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6253 * regcache.c, remote-utils.c, server.c: Likewise.
6254 * target.c, tracepoint.c, win32-low.c: Likewise.
6255
f15f9948
TJB
62562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6257
6258 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6259 (PTRACE_ARG4_TYPE): Likewise.
6260 (PTRACE_XFER_TYPE): Likewise.
6261 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6262 ptrace to PTRACE_ARG3_TYPE.
6263 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6264 (PTRACE_ARG4_TYPE): Likewise.
6265 (PTRACE_XFER_TYPE): Likewise.
6266 (linux_detach_one_lwp): Cast fourth argument of
6267 ptrace to long then PTRACE_ARG4_TYPE.
6268 (regsets_fetch_inferior_registers): Cast third argument of
6269 ptrace to long then PTRACE_ARG3_TYPE.
6270 (regsets_store_inferior_registers): Likewise.
6271
38ea300a
PA
62722012-04-20 Pedro Alves <palves@redhat.com>
6273
6274 * configure: Regenerate.
6275
c971b7fa
PA
62762012-04-19 Pedro Alves <palves@redhat.com>
6277
43aaf8b6 6278 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6279 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6280 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6281 (all, install-only, uninstall, clean-info, all-lib, clean): No
6282 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6283 (maintainer-clean realclean distclean): Use subdir_do.
6284 (subdir_do): New.
6285 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6286 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6287 * acinclude.m4: Include acx_configure_dir.m4.
6288 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6289 calls. Call AC_PROG_RANLIB. Configure gnulib using
6290 ACX_CONFIGURE_DIR.
6291 (GNULIB): New.
6292 (GNULIB_STDINT_H): Adjust.
6293 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6294 * gdbreplay.c: Include build-gnulib/config.h.
6295 * server.h: Likewise.
6296 * aclocal.m4: Regenerate.
6297 * config.in: Regenerate.
6298 * configure: Regenerate.
c971b7fa 6299
809277f8
PA
63002012-04-19 Pedro Alves <palves@redhat.com>
6301
6302 * Makefile.in (LIBGNU, INCGNU): Adjust.
6303 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6304 (all, install-only, uninstall, clean-info, all-lib, clean)
6305 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6306 * configure.ac: Adjust AC_OUTPUT output.
6307 * aclocal.m4: Regenerate.
6308 * configure: Regenerate.
6309
fd9bb8b8
PA
63102012-04-19 Pedro Alves <palves@redhat.com>
6311
6312 * Makefile.in (generated_files): New.
6313 (server_h): Remove the explicit dependency on config.h, and depend
6314 on $generated_files.
6315
1c298c66
PA
63162012-04-19 Pedro Alves <palves@redhat.com>
6317
6318 * Makefile.in (INCGNU): Add -Ignulib.
6319
57c4b50b
PA
63202012-04-19 Pedro Alves <palves@redhat.com>
6321
6322 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6323 (INCGNU): ... this, and spell out -I here.
6324 (GNULIB_LIB): Rename to ...
6325 (LIBGNU): ... this.
6326 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6327
1030e047
PA
63282012-04-19 Pedro Alves <palves@redhat.com>
6329
6330 * config.in: Regenerate.
6331
447d4319
PA
63322012-04-19 Pedro Alves <palves@redhat.com>
6333
6334 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6335 * server.h (memmem): Remove declaration.
6336 * config.in: Regenerate.
6337 * configure: Regenerate.
6338
aad9eab9
YQ
63392012-04-19 Yao Qi <yao@codesourcery.com>
6340
6341 * Makefile.in (SFILES): Add common/vec.c.
6342 (OBS): Add vec.o.
6343 (vec.o): New rule.
6344
3e10640f
YQ
63452012-04-19 Yao Qi <yao@codesourcery.com>
6346
6347 * remote-utils.c (prepare_resume_reply): Replace with macro
6348 target_core_of_thread.
6349 * server.c (handle_qxfer_threads_proper): Likewise.
6350 * target.h (traget_core_of_thread): New macro.
6351
71622373
PA
63522012-04-18 Pedro Alves <palves@redhat.com>
6353
6354 * aclocal.m4: Regenerate.
6355 * configure: Regenerate.
6356
80d26939
YQ
63572012-04-16 Yao Qi <yao@codesourcery.com>
6358
6359 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6360 duplicated on address.
6361
42476b70
YQ
63622012-04-16 Yao Qi <yao@codesourcery.com>
6363
6364 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6365 (struct tracepoint_action_ops) <send>: New field.
6366 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6367 (agent_expr_send, x_tracepoint_action_send): New.
6368 (l_tracepoint_action_send): New.
6369 (cmd_qtdp): Download and install tracepoint
6370 according to `use_agent'.
6371 (run_inferior_command): Add one more parameter `len'.
6372 Update callers.
6373 (tracepoint_send_agent): New.
6374 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6375
7bc83639
YQ
63762012-04-16 Yao Qi <yao@codesourcery.com>
6377
6378 * tracepoint.c (download_tracepoints): Moved to ...
6379 (cmd_qtstart): ... here.
6380
5f18041e
YQ
63812012-04-14 Yao Qi <yao@codesourcery.com>
6382
6383 * tracepoint.c: Include inttypes.h.
6384 (struct collect_memory_action): Use sized types.
6385 (struct tracepoint): Likewise.
6386 (cmd_qtdp, stop_tracing): Update print specifiers.
6387 (cmd_qtp, response_tracepoint): Likewise.
6388 (collect_data_at_tracepoint): Likewise.
6389 (collect_data_at_step): Likewise.
6390
55a8c076
YQ
63912012-04-14 Yao Qi <yao@codesourcery.com>
6392
6393 Import gnulib module inttypes.
6394 * aclocal.m4, config.in, configure: Regenerated.
6395
dc750257
YQ
63962012-04-14 Yao Qi <yao@codesourcery.com>
6397
6398 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6399 Makefile and config.status at last.
6400
0ab5faf9
YQ
64012012-04-13 Yao Qi <yao@codesourcery.com>
6402
6403 * tracepoint.c: Include stdint.h unconditionally.
6404
18f5fd81
TJB
64052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6406
6407 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6408 on BFD_HAVE_SYS_PROCFS_TYPE.
6409 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6410 * configure: Regenerate.
6411 * config.in: Likewise.
6412
4d47af5c
L
64132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6414
6415 * Makefile.in (clean): Also remove x32.c x32-linux.c
6416 x32-avx.c x32-avx-linux.c.
6417 (x32.o): New target.
6418 (x32.c): Likewise.
6419 (x32-linux.o): Likewise.
6420 (x32-linux.c): Likewise.
6421 (x32-avx.o): Likewise.
6422 (x32-avx.c): Likewise.
6423 (x32-avx-linux.o): Likewise.
6424 (x32-avx-linux.c): Likewise.
6425
6426 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6427 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6428 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6429 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6430 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6431 i386/x32-avx-linux.xml.
6432
6433 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6434 (init_registers_x32_avx_linux): Likwise.
6435 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6436 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6437
ecedbe58
PA
64382012-04-13 Pedro Alves <palves@redhat.com>
6439
6440 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6441 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6442 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6443 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6444 the sub-make.
6445
c92b5177
L
64462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6447
6448 * linux-x86-low.c (compat_x32_clock_t): New.
6449 (compat_x32_siginfo_t): Likewise.
6450 (compat_x32_siginfo_from_siginfo): Likewise.
6451 (siginfo_from_compat_x32_siginfo): Likewise.
6452 (linux_is_elf64): Likewise.
6453 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6454 and siginfo_from_compat_x32_siginfo for x32.
6455 (x86_arch_setup): Set linux_is_elf64.
6456
214d508e
L
64572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6458
6459 PR gdb/13969
6460 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6461 e_machine field.
6462 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6463 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6464 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6465 compatible with process.
6466
c9a1864a
YQ
64672012-04-12 Yao Qi <yao@codesourcery.com>
6468
6469 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6470 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6471 (install-only, install-info, clean): Handle sub dir gnulib.
6472 (all-lib, am--refresh): New targets.
6473 (memmem.o): Remove target.
6474 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6475 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6476 (AC_REPLACE_FUNCS): Remove memmem.
6477 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6478 (AC_OUTPUT): Generate Makefile in gnulib/.
6479 * aclocal.m4, config.in, configure: Regenerated.
6480
367ba2c2
MR
64812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6482
6483 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6484
9d236627
PA
64852012-04-05 Pedro Alves <palves@redhat.com>
6486
6487 -Werror=strict-aliasing
6488
6489 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6490 pointer.
6491
111217b3
PA
64922012-04-04 Pedro Alves <palves@redhat.com>
6493
6494 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6495 (sparc_store_gregset_from_stack, sparc_store_gregset)
6496 (sparc_breakpoint_at): Fix formatting.
6497
8365dcf5
TJB
64982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6499
6500 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6501 are available.
6502 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6503 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6504 * config.in: Regenerate.
6505 * configure: Likewise.
6506
689cc2ae
PA
65072012-03-29 Pedro Alves <palves@redhat.com>
6508
6509 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6510 Correct ptrace arguments.
6511
c14dfd32
PA
65122012-03-28 Pedro Alves <palves@redhat.com>
6513
6514 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6515 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6516 (IA64_FR1_REGNUM): New defines.
6517 (ia64_fetch_register): New.
6518 (the_low_target): Install it.
6519 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6520 field.
6521 * linux-low.c (linux_fetch_registers): Try the
6522 the_low_target.fetch_register hook first.
6523
6524 * linux-arm-low.c (the_low_target): Adjust.
6525 * linux-bfin-low.c (the_low_target): Adjust.
6526 * linux-cris-low.c (the_low_target): Adjust.
6527 * linux-crisv32-low.c (the_low_target): Adjust.
6528 * linux-m32r-low.c (the_low_target): Adjust.
6529 * linux-m68k-low.c (the_low_target): Adjust.
6530 * linux-mips-low.c (the_low_target): Adjust.
6531 * linux-ppc-low.c (the_low_target): Adjust.
6532 * linux-s390-low.c (the_low_target): Adjust.
6533 * linux-sh-low.c (the_low_target): Adjust.
6534 * linux-sparc-low.c (the_low_target): Adjust.
6535 * linux-tic6x-low.c (the_low_target): Adjust.
6536 * linux-x86-low.c (the_low_target): Adjust.
6537 * linux-xtensa-low.c (the_low_target): Adjust.
6538
63c88e13
PA
65392012-03-26 Pedro Alves <palves@redhat.com>
6540
6541 * server.c (handle_qxfer_libraries): Don't bail early if
6542 the_target->qxfer_libraries_svr4 is not NULL.
6543
fb723180
PA
65442012-03-26 Pedro Alves <palves@redhat.com>
6545
6546 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6547
0afae3cf
PA
65482012-03-23 Pedro Alves <palves@redhat.com>
6549
6550 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6551 "library-list-svr4" element's start tag when the the DSO list is
6552 empty.
6553
485f1ee4
PA
65542012-03-23 Pedro Alves <palves@redhat.com>
6555
6556 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6557 a variable whose type size is the same as the inferior's pointer
6558 size.
6559
a5362b9a
TS
65602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6561
6562 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6563 struct siginfo.
6564 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6565 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6566 * linux-low.h: Include <signal.h>.
6567 (struct siginfo): Remove forward declaration.
6568 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6569 struct siginfo.
6570
d226c142
MF
65712012-03-21 Mike Frysinger <vapier@gentoo.org>
6572
6573 * .gitignore: Ignore more files.
6574
122f36ef
PA
65752012-03-19 Pedro Alves <palves@redhat.com>
6576 Jan Kratochvil <jan.kratochvil@redhat.com>
6577
6578 * server.c (cont_thread, general_thread): Add describing comments.
6579 (start_inferior): Clear `cont_thread'.
6580 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6581 of a process.
6582
fc3e5175
YQ
65832012-03-15 Yao Qi <yao@codesourcery.com>
6584
6585 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6586 handling to ...
6587 (cmd_qtdp): ... here.
6588
8d0d92cd
YQ
65892012-03-15 Yao Qi <yao@codesourcery.com>
6590
6591 * tracepoint.c (struct tracepoint_action_ops): New.
6592 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6593 (m_tracepoint_action_download): New.
6594 (r_tracepoint_action_download): New.
6595 (x_tracepoint_action_download): New.
6596 (l_tracepoint_action_download): New.
6597 (add_tracepoint_action): Install `action->ops' according type.
6598 (download_tracepoint_1): Move code `download' function pointer
6599 of various tracepoint_action_ops.
6600
87b0bb13
JK
66012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6602
6603 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6604 linux_ptrace_attach_warnings.
6605
5f572dec
JK
66062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6607
6608 * Makefile.in (linux-ptrace.o): New.
6609 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6610 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6611 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6612 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6613 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6614 of these targets.
6615 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6616
f4647387
YQ
66172012-03-08 Yao Qi <yao@codesourcery.com>
6618 Pedro Alves <palves@redhat.com>
6619
6620 Fix PR server/13392.
6621 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6622 offset of JMP insn.
6623 * tracepoint.c (remove_tracepoint): New.
6624 (cmd_qtdp): Call remove_tracepoint when failed to install.
6625
9b224c5e
PA
66262012-03-07 Pedro Alves <palves@redhat.com>
6627
6628 * linux-low.c (get_detach_signal): New.
6629 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6630 Pass on pending signals to PTRACE_DETACH. Check the result of the
6631 ptrace call.
6632 * server.c (program_signals, program_signals_p): New.
6633 (handle_general_set): Handle QProgramSignals.
6634 * server.h (program_signals, program_signals_p): Declare.
6635
e237a7e2
JK
66362012-03-05 Pedro Alves <palves@redhat.com>
6637 Jan Kratochvil <jan.kratochvil@redhat.com>
6638
6639 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6640 New comment why.
6641
5808517f
YQ
66422012-03-03 Yao Qi <yao@codesourcery.com>
6643
6644 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6645 agent_look_up_symbols.
6646
58b4daa5
YQ
66472012-03-03 Yao Qi <yao@codesourcery.com>
6648
6649 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6650 (linux-x86-low.o): Likewise.
6651 * server.h: Remove in_process_agent_loaded.
6652 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6653 common/agent.c.
6654 Update callers.
6655
8ffcbaaf
YQ
66562012-03-03 Yao Qi <yao@codesourcery.com>
6657
6658 * tracepoint.c (gdb_agent_capability): New global.
6659 (in_process_agent_loaded_ust): Renamed to
6660 `in_process_agent_supports_ust'.
6661 Update callers.
6662 (in_process_agent_supports_ust): Call agent_capability_check.
6663 (clear_installed_tracepoints): Assert that agent supports
6664 agent.
6665
d1feda86
YQ
66662012-03-03 Yao Qi <yao@codesourcery.com>
6667
6668 * linux-low.c (linux_supports_agent): New.
6669 (linux_target_ops): Initialize field `supports_agent' with
6670 linux_supports_agent.
6671 * target.h (struct target_ops) <supports_agent>: New.
6672 (target_supports_agent): New macro.
6673 * server.c (handle_general_set): Handle packet 'QAgent'.
6674 (handle_query): Send `QAgent+'.
6675 * Makefile.in (server.o): Depends on agent.h.
6676
2fa291ac
YQ
66772012-03-03 Yao Qi <yao@codesourcery.com>
6678
6679 * Makefile.in (OBS): Add agent.o.
6680 Add new rule for agent.o.
6681 Track dependence of tracepoint.c on agent.h.
6682 * tracepoint.c (run_inferior_command_1):
6683 (run_inferior_command): Call agent_run_command.
6684 (gdb_ust_connect_sync_socket): Deleted. Move it to
6685 common/agent.c.
6686 (resume_thread, stop_thread): Likewise.
6687 (gdb_ust_socket_init): Renamed to ...
6688 (gdb_agent_socket_init): ... New.
6689 (gdb_ust_thread): Renamed to ...
6690 (gdb_agent_helper_thread): ... New.
6691 (gdb_ust_init): Move some code to ...
6692 (gdb_agent_init): ... here. New.
6693 [HAVE_UST]: Call gdb_ust_init.
6694 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6695 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6696 * config.in, configure: Regenerated.
6697
05044653
PA
66982012-03-02 Pedro Alves <palves@redhat.com>
6699
6700 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6701 * linux-low.c (struct simple_pid_list): New.
6702 (stopped_pids): New a struct simple_pid_list pointer.
6703 (add_to_pid_list, pull_pid_from_list): New.
6704 (handle_extended_wait): Don't assume the first signal new children
6705 report is SIGSTOP. Adjust call to pull_pid_from_list.
6706 (linux_wait_for_lwp): Adjust.
6707
8d00225b
YQ
67082012-03-02 Yao Qi <yao@codesourcery.com>
6709
6710 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6711 debug log.
6712
19560ba5
YQ
67132012-03-02 Yao Qi <yao@codesourcery.com>
6714
6715 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6716 `stop_pc' and `tpoint'. Update caller.
6717
1faeff08
MR
67182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6719
6720 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6721 * linux-low.c (use_linux_regsets): New macro.
6722 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6723 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6724 (linux_register_in_regsets): New function.
6725 (usr_fetch_inferior_registers): Skip registers covered by
6726 regsets.
6727 (usr_store_inferior_registers): Likewise.
6728 (usr_fetch_inferior_registers): New macro.
6729 (usr_store_inferior_registers): Likewise.
6730 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6731 (linux_store_registers): Likewise.
6732 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6733 prototype.
6734 (init_registers_mips64_dsp_linux): Likewise.
6735 (init_registers_mips_linux): New macro.
6736 (init_registers_mips_dsp_linux): Likewise.
6737 (mips_dsp_num_regs): Likewise.
6738 (DSP_BASE, DSP_CONTROL): New fallback macros.
6739 (mips_base_regs): New macro.
6740 (mips_regmap): Use it. Fix the size.
6741 (mips_dsp_regmap): New variable.
6742 (mips_dsp_regset_bitmap): Likewise.
6743 (mips_arch_setup): New function.
6744 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6745 than mips_regmap.
6746 (mips_cannot_store_register): Likewise.
6747 (the_low_target): Update .arch_setup, .num_regs and .regmap
6748 initializers. Add .regset_bitmap initializer.
6749 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6750 initializer.
6751 * linux-bfin-low.c (the_low_target): Likewise.
6752 * linux-cris-low.c (the_low_target): Likewise.
6753 * linux-crisv32-low.c (the_low_target): Likewise.
6754 * linux-ia64-low.c (the_low_target): Likewise.
6755 * linux-m32r-low.c (the_low_target): Likewise.
6756 * linux-m68k-low.c (the_low_target): Likewise.
6757 * linux-ppc-low.c (the_low_target): Likewise.
6758 * linux-s390-low.c (the_low_target): Likewise.
6759 * linux-sh-low.c (the_low_target): Likewise.
6760 * linux-sparc-low.c (the_low_target): Likewise.
6761 * linux-tic6x-low.c (the_low_target): Likewise.
6762 * linux-x86-low.c (the_low_target): Likewise.
6763 * linux-xtensa-low.c (the_low_target): Likewise.
6764 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6765 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6766 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6767 srv_xmlfiles.
6768 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6769 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6770
c03e6ccc
YQ
67712012-02-29 Yao Qi <yao@codesourcery.com>
6772 Pedro Alves <palves@redhat.com>
6773
6774 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6775 `step_over_finished' is true.
6776
644cebc9
PA
67772012-02-27 Pedro Alves <palves@redhat.com>
6778
6779 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6780 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6781
c14d7ab2
PA
67822012-02-27 Pedro Alves <palves@redhat.com>
6783
6784 PR server/9684
6785 * linux-low.c (pid_is_stopped): New.
6786 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6787
412c89dd
LM
67882012-02-25 Luis Machado <lgustavo@codesourcery.com>
6789
6790 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6791 of conditions.
6792
b745defe
MR
67932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6794
6795 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6796
9f3a5c85
LM
67972012-02-24 Luis Machado <lgustavo@codesourcery>
6798
6799 * server.c (handle_query): Advertise support for target-side
6800 breakpoint condition evaluation.
6801 (process_point_options): New function.
6802 (process_serial_event): When inserting a breakpoint, check for
6803 a target-side condition that should be evaluated.
6804
6805 * mem-break.c: Include regcache.h and ax.h.
6806 (point_cond_list_t): New data structure.
6807 (breakpoint) <cond_list>: New field.
6808 (find_gdb_breakpoint_at): Make non-static.
6809 (delete_gdb_breakpoint_at): Clear any target-side
6810 conditions.
6811 (clear_gdb_breakpoint_conditions): New function.
6812 (add_condition_to_breakpoint): Likewise.
6813 (add_breakpoint_condition): Likewise.
6814 (gdb_condition_true_at_breakpoint): Likewise.
6815 (gdb_breakpoint_here): Return result directly instead
6816 of going through a local variable.
6817
6818 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6819 (clear_gdb_breakpoint_conditions): Likewise.
6820 (add_breakpoint_condition): Likewise.
6821 (gdb_condition_true_at_breakpoint): Likewise.
6822
6823 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6824 (need_step_over_p): Take target-side breakpoint condition into
6825 consideration.
6826
5e1dc496
LM
68272012-02-24 Luis Machado <lgustavo@codesourcery>
6828
6829 * server.h: Include tracepoint.h.
6830 (agent_mem_read, agent_get_trace_state_variable_value,
6831 agent_set_trace_state_variable_value,
6832 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6833 get_set_tsv_func_addr): New prototypes.
6834
6835 * ax.h: New include file.
6836 * ax.c: New source file.
6837
6838 * tracepoint.c: Include ax.h.
6839 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6840 agent_expr, eval_result_type): Move to ax.h.
6841 (parse_agent_expr): Rename to ...
6842 (gdb_parse_agent_expr): ... this, make it non-static and move
6843 to ax.h.
6844 (unparse_agent_expr) Rename to ...
6845 (gdb_unparse_agent_expr): ... this, make it non-static and move
6846 to ax.h.
6847 (eval_agent_expr): Rename to ...
6848 (eval_tracepoint_agent_expr): ... this.
6849 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6850 forward declarations.
6851 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6852 (agent_get_trace_state_variable_value): New function.
6853 (agent_set_trace_state_variable_value): New function.
6854 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6855 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6856 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6857 (condition_true_at_tracepoint): Likewise.
6858 (parse_agent_expr): Rename to ...
6859 (gdb_parse_agent_expr): ... this and move to ax.c.
6860 (unparse_agent_expr): Rename to ...
6861 (gdb_unparse_agent_expr): ... this and move to ax.c.
6862 (gdb_agent_op_name): Move to ax.c.
6863 (eval_agent_expr): Rename to ...
6864 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6865 and move to ax.c.
6866 (eval_tracepoint_agent_expr): New function.
6867 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6868 non-static.
5e1dc496
LM
6869 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6870 ax.c.
6871 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6872 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6873 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6874 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6875 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6876 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6877 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6878 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6879 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6880 (compile_bytecodes): Remove forward declaration.
6881 (is_goto_target): Move to ax.c.
6882 (compile_bytecodes): Move to ax.c and call
6883 agent_get_trace_state_variable_value (...) and
6884 agent_set_trace_state_variable_value (...).
6885
6886 * Makefile.in: Update ax.c and IPA dependencies.
6887
277e4e52
PA
68882012-02-24 Pedro Alves <palves@redhat.com>
6889
6890 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6891 (cmd_bigqtbuffer_circular): ... this. Only handle
6892 'QTBuffer:circular:'.
6893 (handle_tracepoint_general_set): Adjust.
6894
bf4c19f7
YQ
68952012-02-16 Yao Qi <yao@codesourcery.com>
6896
6897 * inferiors.c: Move code to ...
6898 * dll.c: .... here. New.
6899 * server.h: Declare clear_dlls.
6900 * Makefile.in (SFILES): Add dll.c.
6901 (OBS): Add dll.o
6902 (dll.o): New rule.
6903
d73f2619
YQ
69042012-02-11 Yao Qi <yao@codesourcery.com>
6905
6906 * server.c: (handle_monitor_command): Add a new parameter
6907 `own_buf'.
6908 (handle_query): Update caller.
6909
f8255c2a
JB
69102012-02-09 Joel Brobecker <brobecker@adacore.com>
6911
6912 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6913 * configure, config.in: Regenerate.
6914 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6915 is not defined.
6916
da84f473
PA
69172012-02-02 Pedro Alves <palves@redhat.com>
6918
6919 Try SIGKILL first, then PTRACE_KILL.
6920 * linux-low.c (linux_kill_one_lwp): New.
6921 (linux_kill_one_lwp): Rename to ...
6922 (kill_one_lwp_callback): ... this. Use the new
6923 linux_kill_one_lwp.
6924
e886a173
PA
69252012-02-02 Pedro Alves <palves@redhat.com>
6926
6927 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6928 inferior.
6929
be07f1a2
PA
69302012-01-27 Pedro Alves <palves@redhat.com>
6931
6932 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6933 (elf_64_file_p): Make static.
6934 (linux_pid_exe_is_elf_64_file): New.
6935 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6936 Delete declarations.
6937 (linux_pid_exe_is_elf_64_file): Declare.
6938 * linux-x86-low.c (x86_arch_setup): Use
6939 linux_pid_exe_is_elf_64_file.
6940
d8301ad1
JK
69412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6942
6943 * linux-low.c (linux_wait_for_event_1): Rename to ...
6944 (linux_wait_for_event): ... here and merge it with former
6945 linux_wait_for_event - new variable wait_ptid, use it.
6946 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6947
01b17894
PA
69482012-01-23 Pedro Alves <palves@redhat.com>
6949
6950 * server.c (main): Avoid yet another case of infinite loop while
6951 detaching/killing after a longjmp.
6952
e825046f
JK
69532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6954
6955 Code cleanup.
6956 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6957
b9e7b9c3
UW
69582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6959
6960 * hostio.c (handle_readlink): New function.
6961 (handle_vFile): Call it to handle "vFile:readlink" packets.
6962
901f9912
UW
69632012-01-20 Pedro Alves <palves@redhat.com>
6964 Ulrich Weigand <ulrich.weigand@linaro.org>
6965
6966 * server.c (handle_v_requests): Only support vAttach and vRun to
6967 start multiple processes when in extended protocol mode.
6968
fc1ab1a0
PA
69692012-01-17 Pedro Alves <palves@redhat.com>
6970
6971 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6972 memalign plus mprotect to allocate the scratch buffer.
6973
7d5d4e98
PA
69742012-01-13 Pedro Alves <palves@redhat.com>
6975
6976 * server.c (attach_inferior): Clear `cont_thread'.
6977
f128d5e9
PA
69782012-01-13 Pedro Alves <palves@redhat.com>
6979
6980 * server.c (main): Avoid infinite loop while detaching/killing
6981 after a longjmp.
6982
06db92f0
DE
69832012-01-09 Doug Evans <dje@google.com>
6984
6985 * server.c (start_inferior): Set last_ptid in --wrapper case.
6986
32d92999
YQ
69872012-01-06 Yao Qi <yao@codesourcery.com>
6988
6989 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6990 defined.
6991 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6992
5e0a92a9
YQ
69932012-01-04 Yao Qi <yao@codesourcery.com>
6994
6995 * tracepoint.c (cmd_qtdp): Print debug message
6996 for static tracepoint.
6997
ae639e8c
YQ
69982012-01-04 Yao Qi <yao@codesourcery.com>
6999
7000 * tracepoint.c (trace_vdebug): Differentiate debug message
7001 between gdbserver and IPA.
7002
f72429c5
YQ
70032012-01-03 Yao Qi <yao@codesourcery.com>
7004
7005 * tracepoint.c (tracepoint_was_hit): Don't collect for
7006 static tracepoint.
7007
12c3e59c
JB
70082012-01-02 Joel Brobecker <brobecker@adacore.com>
7009
7010 * terminal.h: Reformat copyright header.
7011
67827812
JB
70122012-01-02 Joel Brobecker <brobecker@adacore.com>
7013
7014 * server.c (gdbserver_version): Update copyright year.
7015 * gdbreplay.c (gdbreplay_version): Likewise.
7016
3e52c33d
JK
70172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7018
7019 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7020
7021 Revert:
7022 2011-12-18 Hui Zhu <teawater@gmail.com>
7023 * linux-low.c (linux_create_inferior): Save return value to ret.
7024
66f1260e
HZ
70252011-12-18 Hui Zhu <teawater@gmail.com>
7026
7027 * linux-low.c (linux_create_inferior): Save return value to ret.
7028
e77616d7
DE
70292011-12-16 Doug Evans <dje@google.com>
7030
e7b06c57
DE
7031 * linux-low.c (linux_create_inferior): If stdio connection,
7032 redirect stdin from /dev/null, stdout to stderr.
7033 * remote-utils.c (remote_is_stdio): New static global.
7034 (remote_connection_is_stdio): New function.
7035 (remote_prepare): Handle stdio connection.
7036 (remote_open): Ditto.
7037 (remote_close): Don't close stdin for stdio connections.
7038 (read_prim,write_prim): New functions. Replace all calls to
7039 read/write to these.
7040 * server.c (main): Watch for "-" argument. Move call to
7041 remote_prepare before start_inferior.
7042 * server.h (STDIO_CONNECTION_NAME): New macro.
7043 (remote_connection_is_stdio): Declare.
7044
e77616d7
DE
7045 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7046 in debugging output.
7047
82067193
YQ
70482011-12-15 Yao Qi <yao@codesourcery.com>
7049
7050 * tracepoint.c: Include sys/syscall.h.
7051 (gdb_ust_thread): Remove preprocessor conditional.
7052
82bfbe7e
PA
70532011-12-14 Pedro Alves <pedro@codesourcery.com>
7054
7055 * linux-low.c (linux_detach_one_lwp): Call
7056 the_low_target.prepare_to_resume before detaching.
7057
712c6575
YQ
70582011-12-14 Yao Qi <yao@codesourcery.com>
7059
7060 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7061 of write.
7062
d54d1edf
YQ
70632011-12-14 Yao Qi <yao@codesourcery.com>
7064
7065 * i386-low.c (i386_low_stopped_data_address): Initialize local
7066 variable `control'.
7067
6210a125
PA
70682011-12-13 Pedro Alves <pedro@codesourcery.com>
7069
7070 PR remote/13492
7071
7072 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7073 DR_CONTROL unless necessary. Extend comments.
7074 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7075 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7076
2ece8244
YQ
70772011-12-13 Yao Qi <yao@codesourcery.com>
7078
7079 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7080 macros.
7081 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7082
784867a5
JK
70832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7084
7085 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7086 Print new debug message for such case.
7087
6bf36717
JK
70882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7089
7090 Fix overlapping memcpy.
7091 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7092 the read_inferior_memory transfer.
7093 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7094 write_inferior_memory transfer.
7095 (set_fast_tracepoint_jump): New variable buf. Use it for the
7096 read_inferior_memory and write_inferior_memory transfers.
7097 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7098 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7099 Use it for the write_inferior_memory transfer.
7100 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7101 buffers.
7102
50275556
MR
71032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7104
7105 * linux-low.c (fetch_register, store_register): Make code
7106 consistent, fix formatting.
7107
7325beb4
MR
71082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7109
7110 * linux-low.c (usr_store_inferior_registers): Factor out code
7111 to handle individual registers into...
7112 (store_register): ... this new function.
7113
c642a434
UW
71142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7115
7116 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7117 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7118 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7119 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7120 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7121 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7122 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7123 (srv_xmlfiles): Add new XML files.
7124
7125 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7126 and <sys/uio.h>.
7127 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7128 (init_registers_s390_linux32v1): Add prototype.
7129 (init_registers_s390_linux32v2): Likewise.
7130 (init_registers_s390_linux64v1): Likewise.
7131 (init_registers_s390_linux64v2): Likewise.
7132 (init_registers_s390x_linux64v1): Likewise.
7133 (init_registers_s390x_linux64v2): Likewise.
7134 (s390_num_regs): Increment to 52.
7135 (s390_regmap): Add orig_r2 register.
7136 (s390_num_regs_3264): Increment to 68.
7137 (s390_regmap_3264): Add orig_r2 register.
7138 (s390_collect_ptrace_register): Handle orig_r2 register.
7139 (s390_supply_ptrace_register): Likewise.
7140 (s390_fill_last_break): New function.
7141 (s390_store_last_break): Likewise.
7142 (s390_fill_system_call): New function.
7143 (s390_store_system_call): Likewise.
7144 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7145 register sets.
7146 (s390_check_regset): New function.
7147 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7148 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7149 Update target_regsets for available register sets.
7150
2268b414
JK
71512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7152 Jan Kratochvil <jan.kratochvil@redhat.com>
7153
7154 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7155 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7156 New.
7157 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7158 * linux-low.h (struct process_info_private): New member r_debug.
7159 * server.c (handle_qxfer_libraries): Call
7160 the_target->qxfer_libraries_svr4.
7161 (handle_qxfer_libraries_svr4): New function.
7162 (qxfer_packets): New entry "libraries-svr4".
7163 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7164 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7165 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7166 PACKET_qXfer_libraries_svr4.
7167
d6db1fab
UW
71682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7169
7170 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7171 PSW address/mask between 8-byte and 16-byte formats.
7172 (s390_supply_ptrace_register): Likewise.
7173 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7174 basic addressing mode bit.
7175
242f5f1c
SS
71762011-11-24 Stan Shebs <stan@codesourcery.com>
7177
7178 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7179
f196051f
SS
71802011-11-17 Stan Shebs <stan@codesourcery.com>
7181
7182 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7183 (tracing_start_time): New global.
7184 (tracing_stop_time): New global.
7185 (tracing_user_name): New global.
7186 (tracing_notes): New global.
7187 (tracing_stop_note): New global.
7188 (cmd_qtstart): Set traceframe_usage, start_time.
7189 (stop_tracing): Set stop_time.
7190 (cmd_qtstatus): Report additional status.
7191 (cmd_qtp): New function.
7192 (handle_tracepoint_query): Call it.
7193 (cmd_qtnotes): New function.
7194 (handle_tracepoint_general_set): Call it.
7195 (get_timestamp): Rename from tsv_get_timestamp.
7196
405f8e94
SS
71972011-11-14 Stan Shebs <stan@codesourcery.com>
7198 Kwok Cheung Yeung <kcy@codesourcery.com>
7199
7200 * linux-x86-low.c (small_jump_insn): New.
7201 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7202 trampoline and error message, build a trampoline and issue a small
7203 jump instruction to it.
7204 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7205 trampoline and error message.
7206 (x86_get_min_fast_tracepoint_insn_len): New.
7207 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7208 * linux-low.h (struct linux_target_ops): Add arguments to
7209 install_fast_tracepoint_jump_pad operation, add new operation.
7210 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7211 arguments.
7212 (linux_get_min_fast_tracepoint_insn_len): New function.
7213 (linux_target_op): Add new operation.
7214 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7215 (gdb_trampoline_buffer_end): Ditto.
7216 (gdb_trampoline_buffer_error): Ditto.
7217 (struct ipa_sym_addresses): Add fields for new IPA variables.
7218 (symbol_list): Add entries for new IPA variables.
7219 (struct tracepoint): Add fields to hold the address range of the
7220 trampoline used by the tracepoint.
7221 (trampoline_buffer_head): New static variable.
7222 (trampoline_buffer_tail): Ditto.
7223 (claim_trampoline_space): New function.
7224 (have_fast_tracepoint_trampoline_buffer): New function.
7225 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7226 structure.
7227 (install_fast_tracepoint): Ditto, also add error buffer argument.
7228 (cmd_qtminftpilen): New function.
7229 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7230 (fast_tracepoint_from_trampoline_address): New function.
7231 (fast_tracepoint_collecting): Handle trampoline as part of jump
7232 pad space.
7233 (set_trampoline_buffer_space): New function.
7234 (initialize_tracepoint): Initialize new IPA variables.
7235 * target.h (struct target_ops): Add arguments to
7236 install_fast_tracepoint_jump_pad operation, add new
7237 get_min_fast_tracepoint_insn_len operation.
7238 (target_get_min_fast_tracepoint_insn_len): New.
7239 (install_fast_tracepoint_jump_pad): Add arguments.
7240 * server.h (IPA_BUFSIZ): Define.
7241 * linux-i386-ipa.c: Include extra header files.
7242 (initialize_fast_tracepoint_trampoline_buffer): New function.
7243 (initialize_low_tracepoint): Call it.
7244 * server.h (set_trampoline_buffer_space): Declare.
7245 (claim_trampoline_space): Ditto.
7246 (have_fast_tracepoint_trampoline_buffer): Ditto.
7247
1e4d1764
YQ
72482011-11-14 Yao Qi <yao@codesourcery.com>
7249
7250 * server.c (handle_query): Handle InstallInTrace for qSupported.
7251 * tracepoint.c (add_tracepoint): Sort list.
7252 (install_tracepoint, download_tracepoint): New.
7253 (cmd_qtdp): Call them to install and download tracepoints.
7254 (sort_tracepoints): Removed.
7255 (cmd_qtstart): Update.
7256
5c73ff4e
YQ
72572011-11-14 Yao Qi <yao@codesourcery.com>
7258
7259 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7260 * mem-break.h: Declare.
7261 * tracepoint.c (cmd_qtstart): Move some code to ...
7262 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7263 New.
7264 (download_tracepoints): Move some code to ...
7265 (download_tracepoint_1): ... here. New.
7266
86a30030
YQ
72672011-11-08 Yao Qi <yao@codesourcery.com>
7268
7269 * remote-utils.c (relocate_instruction): A comment fix.
7270
8d26e50c
JB
72712011-11-07 Joel Brobecker <brobecker@adacore.com>
7272
7273 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7274 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7275 dr_status_mirror and dr_control_mirror from debug_reg_state.
7276 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7277 (i386_initial_stuff): Remove use of deleted globals.
7278 (i386_get_thread_context, i386_set_thread_context,
7279 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7280 from debug_reg_state.
7281
a59306a3
YQ
72822011-11-05 Yao Qi <yao@codesourcery.com>
7283
7284 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7285 address as TPOINT's.
7286
3065dfb6
SS
72872011-11-02 Stan Shebs <stan@codesourcery.com>
7288
7289 * tracepoint.c (agent_mem_read_string): New function.
7290 (eval_agent_expr): Call it for tracenz.
7291 * server.c (handle_query): Report support for tracenz.
7292
fd0d8c7c
YQ
72932011-11-02 Yao Qi <yao@codesourcery.com>
7294
7295 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7296
609086b1
YQ
72972011-11-02 Yao Qi <yao@codesourcery.com>
7298
7299 * target.h: Fix a typo in comment.
7300
b9fd1791
PA
73012011-10-31 Pedro Alves <pedro@codesourcery.com>
7302
7303 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7304 clobber the breakpoints' shadows with fast tracepoint jumps.
7305 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7306 * target.c (write_inferior_memory): Also pass MYADDR down to
7307 check_mem_write.
7308
03583c20
UW
73092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7310
7311 * configure.ac: Check support for personality routine.
7312 * configure: Regenerate.
7313 * config.in: Likewise.
7314 * linux-low.c: Include <sys/personality.h>.
7315 Define ADDR_NO_RANDOMIZE if necessary.
7316 (linux_create_inferior): Disable address space randomization when
7317 forking inferior, if requested.
7318 (linux_supports_disable_randomization): New function.
7319 (linux_target_ops): Install it.
7320 * server.h (disable_randomization): Declare.
7321 * server.c (disable_randomization): New global variable.
7322 (handle_general_set): Handle QDisableRandomization.
7323 (handle_query): Likewise for qSupported.
7324 (main): Support --disable-randomization and --no-disable-randomization
7325 command line arguments.
7326 * target.h (struct target_ops): Add supports_disable_randomization.
7327 (target_supports_disable_randomization): New macro.
7328
723b724b
MF
73292011-09-29 Mike Frysinger <vapier@gentoo.org>
7330
7331 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7332 ifdef check.
7333 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7334 [!PT_GETDSBT] (target_loadmap): New definition.
7335 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7336 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7337 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7338 and PT_GETDSBT to LINUX_LOADMAP.
7339 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7340 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7341
55329a5c 73422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7343
7344 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7345 (arm_linux_hwbp_cap): New static variable.
7346 (arm_linux_get_hwbp_cap): Replace by ...
7347 (arm_linux_init_hwbp_cap): ... this new function.
7348 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7349 (arm_linux_get_hw_watchpoint_count): Likewise.
7350 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7351 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7352 (arm_prepare_to_resume): Use perror_with_name instead of error.
7353
55329a5c 73542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7355
7356 * linux-arm-low.c: Include <signal.h>.
7357 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7358 (struct arm_linux_hwbp_cap): New data type.
7359 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7360 (struct arm_linux_hw_breakpoint): New data type.
7361 (MAX_BPTS, MAX_WPTS): Define.
7362 (struct arch_process_info, struct arch_lwp_info): New data types.
7363 (arm_linux_get_hwbp_cap): New function.
7364 (arm_linux_get_hw_breakpoint_count): Likewise.
7365 (arm_linux_get_hw_watchpoint_count): Likewise.
7366 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7367 (arm_hwbp_control_initialize): Likewise.
7368 (arm_hwbp_control_is_enabled): Likewise.
7369 (arm_hwbp_control_is_initialized): Likewise.
7370 (arm_hwbp_control_disable): Likewise.
7371 (arm_linux_hw_breakpoint_equal): Likewise.
7372 (arm_linux_hw_point_initialize): Likewise.
7373 (struct update_registers_data): New data structure.
7374 (update_registers_callback: New function.
7375 (arm_insert_point): Likewise.
7376 (arm_remove_point): Likewise.
7377 (arm_stopped_by_watchpoint): Likewise.
7378 (arm_stopped_data_address): Likewise.
7379 (arm_new_process): Likewise.
7380 (arm_new_thread): Likewise.
7381 (arm_prepare_to_resume): Likewise.
7382 (the_low_target): Register arm_insert_point, arm_remove_point,
7383 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7384 arm_new_thread, and arm_prepare_to_resume.
7385
6b9801d4
SS
73862011-09-15 Stan Shebs <stan@codesourcery.com>
7387
7388 * server.h (struct emit_ops): Add compare-goto fields.
7389 * tracepoint.c (gdb_agent_op_sizes): New table.
7390 (emit_eq_goto): New function.
7391 (emit_ne_goto): New function.
7392 (emit_lt_goto): New function.
7393 (emit_le_goto): New function.
7394 (emit_gt_goto): New function.
7395 (emit_ge_goto): New function.
7396 (is_goto_target): New function.
7397 (compile_bytecodes): Recognize special cases of compare-goto
7398 combinations and call specialized emitters for them.
7399 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7400 (amd64_emit_ne_goto): New function.
7401 (amd64_emit_lt_goto): New function.
7402 (amd64_emit_le_goto): New function.
7403 (amd64_emit_gt_goto): New function.
7404 (amd64_emit_ge_goto): New function.
7405 (amd64_emit_ops): Add the new functions.
7406 (i386_emit_eq_goto): New function.
7407 (i386_emit_ne_goto): New function.
7408 (i386_emit_lt_goto): New function.
7409 (i386_emit_le_goto): New function.
7410 (i386_emit_gt_goto): New function.
7411 (i386_emit_ge_goto): New function.
7412 (i386_emit_ops): Add the new functions.
7413
bf15cbda
SS
74142011-09-08 Stan Shebs <stan@codesourcery.com>
7415
7416 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7417 (i386_emit_epilogue): Restore %ebx.
7418
943ca1dd
JZ
74192011-08-31 Jie Zhang <jzhang918@gmail.com>
7420
7421 * server.c (step_thread): Remove definition.
7422 (process_serial_event): Don't handle Hs.
7423 * server.h (step_thread): Remove declaration.
7424 * target.c (set_desired_inferior): Remove use of step_thread.
7425
e3deef73
LM
74262011-08-24 Luis Machado <lgustavo@codesourcery.com>
7427
7428 * linux-low.c: Include linux-procfs.h.
7429 (linux_attach_lwp_1): Update comments.
7430 (linux_attach): Scan for existing threads when attaching to a
7431 process that is the tgid.
7432 * Makefile.in: Update dependencies.
7433
13da1c97
LM
74342011-08-24 Luis Machado <lgustavo@codesourcery.com>
7435
7436 * configure.srv: Add linux-procfs.o dependencies.
7437
881127c9
YQ
74382011-08-14 Yao Qi <yao@codesourcery.com>
7439
7440 * target.h (struct target_ops): Fix indent.
7441 * win32-low.c (win32_target_ops): Fix comment.
7442
58dbd541
YQ
74432011-08-14 Andrew Jenner <andrew@codesourcery.com>
7444 Yao Qi <yao@codesourcery.com>
7445
7446 * Makefile.in (clean): Remove tic6x-*.c files.
7447 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7448 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7449 (tic6x-c64xp-linux.c): Likewise.
7450 * configure.srv: Add support for tic6x-*-uclinux.
7451 * linux-tic6x-low.c: New.
7452 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7453
78d85199
YQ
74542011-08-14 Andrew Stubbs <ams@codesourcery.com>
7455 Yao Qi <yao@codesourcery.com>
7456
7457 * target.h (struct target_ops): Add read_loadmap.
7458 * linux-low.c (struct target_loadseg): New type.
7459 (struct target_loadmap): New type.
7460 (linux_read_loadmap): New function.
7461 (linux_target_ops): Add linux_read_loadmap.
7462 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7463 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7464 to NULL.
78d85199 7465
a959a88d
EZ
74662011-08-05 Eli Zaretskii <eliz@gnu.org>
7467
7468 * win32-low.c: Include <stdint.h>.
7469
1ced966e
PA
74702011-07-22 Pedro Alves <pedro@codesourcery.com>
7471
7472 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7473 to the inferior here.
7474 (i386_remove_aligned_watchpoint): Ditto.
7475 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7476 fit part of the watchpoint in the debug registers.
7477 (i386_update_inferior_debug_regs): New.
7478 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7479 registers, and only update the inferior on success.
7480 (i386_low_remove_watchpoint): Ditto.
7481
d26e3629
KY
74822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7483
7484 * linux-low.c (compare_ints, unique, list_threads, show_process,
7485 linux_core_of_thread): Delete.
7486 (linux_target_ops): Change linux_core_of_thread to
7487 linux_common_core_of_thread.
7488 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7489 * utils.c (malloc_failure): Change type of argument.
7490 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7491 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7492 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7493 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7494 (IPA_OBJS): Add common-utils-ipa.o.
7495 (ptid_h, linux_osdata_h): New macros.
7496 (server_h): Add common/common-utils.h, common/xml-utils.h,
7497 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7498 common/ptid.h.
7499 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7500 ptid.o, buffer.o): New rules.
7501 (linux-low.o): Add common/linux-osdata.h as a dependency.
7502 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7503 * configure.ac: Add AC_HEADER_DIRENT check.
7504 * config.in: Regenerate.
7505 * configure: Regenerate.
7506 * remote-utils.c (xml_escape_text): Delete.
7507 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7508 buffer_xml_printf): Move to common/buffer.c.
7509 * server.c (main): Remove call to initialize_inferiors.
7510 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7511 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7512 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7513 internal_error, gdb_assert, gdb_assert_fail): Delete.
7514 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7515 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7516 common/buffer.h.
7517 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7518 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7519 initialize_inferiors): Delete.
7520
2275a1a7
PA
75212011-07-20 Pedro Alves <pedro@codesourcery.com>
7522
7523 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7524 symbol error.
7525
0a5b1e09
PA
75262011-05-31 Pedro Alves <pedro@codesourcery.com>
7527
7528 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7529 assertion.
7530 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7531
6938fd34
YQ
75322011-05-26 Yao Qi <yao@codesourcery.com>
7533
7534 * Makefile.in (thread-db.o): Track dependence to
7535 common/gdb_thread_db.h.
7536 * thread-db.c: include gdb_thread_db.h from right place.
7537
b481f9e0
TT
75382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7539
7540 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7541 __FILE__ and __LINE__ to internal_error.
7542
98a5dd13
DE
75432011-05-13 Doug Evans <dje@google.com>
7544
7545 * thread-db.c (try_thread_db_load_from_sdir): New function.
7546 (try_thread_db_load_from_dir): New function.
7547 (thread_db_load_search): Handle $sdir, ignore $pdir.
7548 Remove trying of system directories if search of
7549 libthread-db-search-path fails, that is now done via $sdir.
7550
d248b706
KY
75512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7552
7553 * server.c (handle_query): Add EnableDisableTracepoints to the list
7554 of supported features.
43aaf8b6 7555 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7556 tracepoints.
43aaf8b6
PA
7557 (cmd_qtenable_disable): New.
7558 (cmd_qtstart): Install tracepoints even if disabled.
7559 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7560 receiving a QTEnable or QTDisable packet.
7561 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7562 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7563 tracepoints.
7564 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7565
84e578fb
DE
75662011-05-10 Doug Evans <dje@google.com>
7567
7568 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7569
71f55dd8
DE
75702011-05-04 Doug Evans <dje@google.com>
7571
7572 * linux-low.c (linux_join): Skip process lookup.
7573 * spu-low.c (spu_join): Ditto.
7574 * server.c (join_inferiors_callback): Delete.
7575 (process_serial_event): For 'D' packet (detach) call join_inferior
7576 directly.
7577
4d393d60
JM
75782011-05-04 Joseph Myers <joseph@codesourcery.com>
7579
7580 * README: Don't mention xscale*-*-linux*.
7581 * configure.srv (xscale*-*-linux*): Don't handle target.
7582
b00ad6ff
NF
75832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7584
7585 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7586 casting pointers.
7587 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7588 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7589 (i386_emit_void_call_2): Likewise.
7590
af96c192
YQ
75912011-04-26 Yao Qi <yao@codesourcery.com>
7592
43aaf8b6
PA
7593 * linux-low.c: Move common macros to linux-ptrace.h.
7594 Include linux-ptrace.h.
af96c192
YQ
7595 * Makefile.in (linux_ptrace_h): New.
7596 (linux-low.o): Depends on linux-ptrace.h.
7597
03f2bd59
JK
75982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7599
7600 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7601 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7602 (remote_prepare): New function with most of the TCP code from ...
7603 (remote_open): ... here. Detect PORT here unconditionally. Move also
7604 setting transport_is_reliable.
7605 * server.c (run_once): New variable.
7606 (gdbserver_usage): Document it.
7607 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7608 the first run if RUN_ONCE.
7609 * server.h (run_once, remote_prepare): New declarations.
7610
7a9dd1b2
TT
76112011-04-19 Tom Tromey <tromey@redhat.com>
7612
7613 * win32-low.c (handle_load_dll): Remove duplicate "the".
7614
81239425
PM
76152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7616
7617 Remove support for old Cygwin 1.5 versions.
7618 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7619 function to avoid warning.
7620 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7621 warning.
7622
9e0627f1
PM
76232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7624
7625 * gdbserver/server.h (Macro _): Define it if not available.
7626
588eebee
MS
76272011-03-14 Michael Snyder <msnyder@vmware.com>
7628
348af9f7 7629 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7630
43f70d4c
JB
76312011-03-10 Joel Brobecker <brobecker@adacore.com>
7632
7633 * Makefile.in (maintainer-clean realclean distclean): Remove
7634 "make ... subdir_do" command.
7635
348af9f7
MS
76362011-03-10 Michael Snyder <msnyder@vmware.com>
7637
7638 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7639
7640 * server.c (handle_v_run): Free alloced buffer on early return.
7641
e637a4f5
YQ
76422011-03-09 Yao Qi <yao@codesourcery.com>
7643
7644 Revert:
7645 2011-03-04 Yao Qi <yao@codesourcery.com>
7646
7647 * Makefile.in: Remove GNU make feature --directory.
7648
7649 2011-03-05 Yao Qi <yao@codesourcery.com>
7650
7651 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7652 (subdir_do): New make target. Copied from gdb/Makefile.
7653 (maintainer-clean, realclean, distclean, clean): Call corresponding
7654 make targets in common/Makefile.
7655
7656 2011-02-11 Yao Qi <yao@codesourcery.com>
7657
7658 * configure.ac: Call AC_PROG_RANLIB.
7659 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7660 * configure: Regenerate.
7661
e6edda56
JK
76622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7663
7664 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7665
e5141119
JB
76662011-03-06 Yao Qi <yao@codesourcery.com>
7667
7668 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7669
64794aa4
JB
76702011-03-05 Yao Qi <yao@codesourcery.com>
7671
7672 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7673 (subdir_do): New make target. Copied from gdb/Makefile.
7674 (maintainer-clean, realclean, distclean, clean): Call corresponding
7675 make targets in common/Makefile.
7676
7a762829
YQ
76772011-03-04 Yao Qi <yao@codesourcery.com>
7678
7679 * Makefile.in: Remove GNU make feature --directory.
7680
348af9f7
MS
76812011-03-04 Michael Snyder <msnyder@vmware.com>
7682
7683 * server.c (queue_stop_reply): Call xmalloc not malloc.
7684
76852011-03-02 Michael Snyder <msnyder@vmware.com>
7686
7687 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7688
9f72fee2
MS
76892011-02-28 Michael Snyder <msnyder@vmware.com>
7690
588eebee
MS
7691 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7692 (cmd_qtframe): Ditto.
7693 (cmd_qtbuffer): Ditto.
7694 (cmd_bigqtbuffer): Ditto.
7695
9f72fee2
MS
7696 * utils.c (decimal2str): Initialize 'width' to nine, then
7697 don't mess with it.
7698
8040bd49
UW
76992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7700
7701 * hostio.c (require_data): Free *data, not data.
7702
7e52cbd0
JK
77032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7704
7705 * hostio.c (require_data): Use free, not xfree.
7706
9130f83e
MS
77072011-02-27 Michael Snyder <msnyder@vmware.com>
7708
4b812f4e
MS
7709 * server.c (handle_query): Discard unused value.
7710
9130f83e
MS
7711 * hostio.c (require_data): Free malloc memory before returning
7712 error.
7713
69d37113
MS
77142011-02-26 Michael Snyder <msnyder@vmware.com>
7715
7716 * linux-low.c (list_threads): Call closedir for dirent.
7717
35f5825a
MS
77182011-02-27 Michael Snyder <msnyder@vmware.com>
7719
2a589cef
MS
7720 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7721 a case statement falls through.
7722
0adea5f7
MS
7723 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7724
35f5825a
MS
7725 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7726 in comparison.
7727
238f1c74
MS
77282011-02-26 Michael Snyder <msnyder@vmware.com>
7729
7730 * utils.c (decimal2str): Eliminate dead code and dead param.
7731 (pulongest): Drop dead param from call to decimal2str.
7732 (plongest): Ditto.
7733
633ff500
JB
77342011-02-24 Joel Brobecker <brobecker@adacore.com>
7735
7736 Revert the following patch (not approved yet):
7737 2011-02-21 Hui Zhu <teawater@gmail.com>
7738 * tracepoint.c (tp_printf): New function.
7739 (eval_agent_expr): Handle gdb_agent_op_printf.
7740
f9c6ff72
HZ
77412011-02-21 Hui Zhu <teawater@gmail.com>
7742
7743 * tracepoint.c (tp_printf): New function.
7744 (eval_agent_expr): Handle gdb_agent_op_printf.
7745
94d5e490
TT
77462011-02-18 Tom Tromey <tromey@redhat.com>
7747
7748 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7749 (tracepoint.o): Likewise.
7750 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7751 (gdb_agent_op_names): Likewise.
7752
c7f96d2b
TT
77532011-02-18 Tom Tromey <tromey@redhat.com>
7754
7755 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7756 gdb_agent_op_rot>: New constants.
7757 (gdb_agent_op_names): Add pick and roll.
7758 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7759 cases.
7760
0feedb2c
JK
77612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7762
7763 * aclocal.m4: Regenerated with aclocal-1.11.1.
7764
b3b9301e
PA
77652011-02-14 Pedro Alves <pedro@codesourcery.com>
7766
7767 * server.c (handle_qxfer_traceframe_info): New.
7768 (qxfer_packets): Register "traceframe-info".
7769 (handle_query): Report support for qXfer:traceframe-info:read+.
7770 * tracepoint.c (match_blocktype): New.
7771 (traceframe_find_block_type): Rename to ...
7772 (traceframe_walk_blocks): ... this. Add callback filter argument,
7773 and use it.
7774 (traceframe_find_block_type): New, reimplemented on top of
7775 traceframe_walk_blocks.
7776 (build_traceframe_info_xml): New.
7777 (traceframe_read_info): New.
7778 * server.h (traceframe_read_info): Declare.
7779
4f3e6fb7
YQ
77802011-02-11 Yao Qi <yao@codesourcery.com>
7781
7782 * configure.ac: Call AC_PROG_RANLIB.
7783 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7784 * configure: Regenerate.
7785
764880b7
PA
77862011-02-07 Pedro Alves <pedro@codesourcery.com>
7787
7788 * server.c (gdb_read_memory): Change return semantics to allow
7789 partial transfers.
7790 (handle_search_memory_1): Adjust.
7791 (process_serial_event) <'m' packet>: Handle partial transfers.
7792 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7793
1c79eb8a
PA
77942011-01-28 Pedro Alves <pedro@codesourcery.com>
7795
7796 * regcache.c (init_register_cache): Initialize
7797 regcache->register_status.
7798 (free_register_cache): Release regcache->register_status.
7799 (regcache_cpy): Copy register_status.
7800 (registers_to_string): Print 'x's for unavailable registers.
7801 (supply_register): Mark the register's status valid or
7802 unavailable, depending on whether a buffer was passed in or not.
7803 (supply_register_zeroed): New.
7804 (supply_regblock): Mark the registers' status valid or
7805 unavailable, depending on whether a buffer was passed in or not.
7806 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7807 (struct regcache): New `register_status' field.
7808 (supply_register_zeroed): Declare.
7809 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7810 supply_register_zeroed, rather than passing a NULL buffer to
7811 supply_register.
7812 * tracepoint.c (fetch_traceframe_registers): Update comment.
7813
85724a0e
PA
78142011-01-28 Pedro Alves <pedro@codesourcery.com>
7815
7816 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7817 buffer explicit.
7818
d08aafef
PA
78192011-01-25 Pedro Alves <pedro@codesourcery.com>
7820
7821 * server.h (decode_xfer_write): Change prototype.
7822 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7823 and don't extract the annex here.
7824 * server.c (decode_xfer_read): Remove `annex' parameter,
7825 and don't extract the annex here.
7826 (decode_xfer): New.
7827 (struct qxfer): New.
7828 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7829 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7830 (handle_qxfer_statictrace): New functions, abstracted out from
7831 handle_query, and made to use the struct qxfer interface.
7832 (handle_threads_qxfer_proper): Rename to ...
7833 (handle_qxfer_threads_proper): ... this.
7834 (handle_threads_qxfer): Rename to ...
7835 (handle_qxfer_threads): ... this. Adjust.
7836 (qxfer_packets): New array.
7837 (handle_qxfer): New function.
7838 (handle_query): Use handle_qxfer.
7839
493e2a69
MS
78402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7841
7842 * gdbreplay.c: Shorten lines of >= 80 columns.
7843 * linux-low.c: Ditto.
7844 * linux-ppc-low.c: Ditto.
7845 * linux-s390-low.c: Ditto.
7846 * linux-sparc-low.c: Ditto.
7847 * linux-x86-low.c: Ditto.
7848 * linux-xtensa-low.c: Ditto.
7849 * mem-break.c: Ditto.
7850 * nto-low.c: Ditto.
7851 * regcache.h: Ditto.
7852 * remote-utils.c: Ditto.
7853 * server.c: Ditto.
7854 * server.h: Ditto.
7855 * thread-db.c: Ditto.
7856 * tracepoint.c: Ditto.
7857 * utils.c: Ditto.
7858 * win32-low.h: Ditto.
7859
44944448
JB
78602011-01-05 Joel Brobecker <brobecker@adacore.com>
7861
7862 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7863 update.
7864
71ce852c
JB
78652011-01-01 Joel Brobecker <brobecker@adacore.com>
7866
7867 * server.c (gdbserver_version): Update copyright year in version
7868 output.
7869 * gdbreplay.c (gdbreplay_version): Ditto.
7870
eb826dc6
MF
78712010-12-29 Jie Zhang <jie.zhang@analog.com>
7872
7873 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7874 * linux-bfin-low.c: New file.
7875 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7876 PT_DATA_ADDR for BFIN targets.
7877 * Makefile.in (SFILES): Add linux-bfin-low.c.
7878 (clean): Remove reg-bfin.c.
7879 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7880 * README: Mention supported Blackfin targets.
7881
39ab222a
MF
78822010-12-23 Mike Frysinger <vapier@gentoo.org>
7883
7884 * .gitignore: New file.
7885
a1f2ce7d
MF
78862010-11-16 Mike Frysinger <vapier@gentoo.org>
7887
7888 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7889
f474844c
JZ
78902010-10-22 Jie Zhang <jie@codesourcery.com>
7891
7892 * Makefile.in: Add FLAGS_TO_PASS variable.
7893 (install): Remove dependency of install-only and recursively
7894 invoke make for install-only.
7895
f1048712
DE
78962010-10-04 Doug Evans <dje@google.com>
7897
7898 * Makefile.in (uninstall): Use $(DESTDIR).
7899
b53a1623
PA
79002010-09-24 Pedro Alves <pedro@codesourcery.com>
7901
e6ee044d
PA
7902 PR gdb/11842
7903
b53a1623
PA
7904 * linux-x86-low.c (compat_siginfo_from_siginfo)
7905 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7906 si_code is < 0. Check for si_code == SI_TIMER before checking for
7907 si_code < 0.
7908
fa1bd1e4
JB
79092010-09-13 Joel Brobecker <brobecker@adacore.com>
7910
7911 * lynx-i386-low.c: New file.
7912 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7913
47fac8f8
JB
79142010-09-13 Joel Brobecker <brobecker@adacore.com>
7915
7916 * lynx-low.c (ptrace_request_to_str): Remove handling for
7917 request values that have been removed in LynxOS 5.x.
7918
1adfc54d
JB
79192010-09-13 Joel Brobecker <brobecker@adacore.com>
7920
7921 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7922 <ptrace.h>
7923
c2a66c29
NS
79242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7925
7926 * configure.ac: Add --enable-inprocess-agent option.
7927 * configure: Rebuilt.
7928
32fcada3
YQ
79292010-09-06 Yao Qi <yao@codesourcery.com>
7930
7931 * linux-low.c (linux_kill): Remove unused variable.
7932 (linux_stabilize_threads): Likewise.
7933 * server.c (start_inferior): Likewise.
7934 (queue_stop_reply_callback): Likewise.
7935 * tracepoint.c (do_action_at_tracepoint): Likewise.
7936
0cccb683
YQ
79372010-09-06 Yao Qi <yao@codesourcery.com>
7938
7939 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7940 on return.
7941
423ec54c
JK
79422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7943
7944 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7945
12ac6819
PA
79462010-09-06 Pedro Alves <pedro@codesourcery.com>
7947
7948 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7949 "$(IPA_DEPFILES)".
7950
8ed54b31
JB
79512010-09-01 Joel Brobecker <brobecker@adacore.com>
7952
7953 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7954 gdbserver/lynx-ppc-low.c: New files.
7955 * Makefile.in (lynx_low_h): New variable.
7956 (lynx-low.o, lynx-ppc-low.o): New rules.
7957 * configure.ac: On LynxOS, link with -lnetinet.
7958 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7959 * configure: regenerate.
7960
bb0116a4
JB
79612010-09-01 Joel Brobecker <brobecker@adacore.com>
7962
7963 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7964 * configure.ac: Add check for vasprintf and vsnprintf.
7965 * configure, config.in: Regenerate.
7966 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7967
a778ab81 79682010-09-01 Joel Brobecker <brobecker@adacore.com>
7969
7970 * gdbreplay.c: Move include of alloca.h up, next to include of
7971 malloc.h.
7972 * server.h: Add include of malloc.h.
7973 * mem-break.c: Remove include of malloc.h.
7974 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7975
8b034a19 79762010-09-01 Joel Brobecker <brobecker@adacore.com>
7977
7978 * Makefile.in (memmem.o): Build with -Wno-error.
7979
79802010-09-01 Joel Brobecker <brobecker@adacore.com>
7981
7982 * utils.c (xsnprintf): Make non-static.
7983 * server.h: Add xsnprintf declaration.
7984 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7985 replace calls to snprintf by calls to xsnprintf throughout.
7986
79872010-09-01 Joel Brobecker <brobecker@adacore.com>
7988
7989 * configure.ac: Add configure check for alloca.
7990 * configure, config.in: Regenerate.
7991 * server.h: Include alloca.h if it exists.
7992 * gdbreplay.c: Include alloca.h if it exists.
7993
1a981360
PA
79942010-08-28 Pedro Alves <pedro@codesourcery.com>
7995
7996 * linux-low.c (__SIGRTMIN): Define if not already defined.
7997 (linux_create_inferior): Check for __ANDROID__ rather than
7998 __SIGRTMIN.
7999 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8000 are already deferred.
8001 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8002 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8003 stopped and already has a pending signal to report.
8004 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8005 a pending signal to report or is moving out of a jump pad.
8006 (linux_init_signals): Check for __ANDROID__ rather than
8007 __SIGRTMIN.
8008
b4d51a55
PA
80092010-08-28 Pedro Alves <pedro@codesourcery.com>
8010
8011 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8012 debug_threads check. Avoid a linear search when not doing debug
8013 output.
8014
ec48365d
PA
80152010-08-27 Pedro Alves <pedro@codesourcery.com>
8016
8017 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8018 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8019 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8020 (process_event): Change local fd's type to gdb_fildes_t.
8021 (create_file_handler): Adjust prototype.
8022 (delete_file_handler): Adjust prototype.
8023 (handle_file_event): Adjust prototype. Use pfildes.
8024 (create_file_event): Adjsut prototype.
8025 * remote-utils.c (remote_desc, listen_desc): Change type to
8026 gdb_fildes_t.
8027 * server.h: New gdb_fildes_t typedef.
8028 [USE_WIN32API]: Include winsock2.h.
8029 (delete_file_handler, add_file_handler): Adjust prototypes.
8030 (pfildes): Declare.
8031 * utils.c (pfildes): New.
8032
854d88f0
PA
80332010-08-27 Pedro Alves <pedro@codesourcery.com>
8034
8035 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8036 * configure: Regenerate.
8037
0146f85b
PA
80382010-08-27 Pedro Alves <pedro@codesourcery.com>
8039
8040 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8041 (linux_done_accessing_memory): ... this.
8042 (linux_target_ops): Adjust.
8043 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8044 * nto-low.c (nto_target_ops): Adjust comment.
8045 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8046 * spu-low.c (spu_target_ops): Adjust comment.
8047 * target.h (target_ops): Rename unprepare_to_access_memory field
8048 to done_accessing_memory.
8049 (unprepare_to_access_memory): Rename to ...
8050 (done_accessing_memory): ... this.
8051
90d74c30
PA
80522010-08-26 Pedro Alves <pedro@codesourcery.com>
8053
8054 * linux-low.c (linux_prepare_to_access_memory): New.
8055 (linux_unprepare_to_access_memory): New.
8056 (linux_target_ops): Install them.
8057 * server.c (read_memory): Rename to ...
8058 (gdb_read_memory): ... this. Use
8059 prepare_to_access_memory/prepare_to_access_memory.
8060 (write_memory): Rename to ...
8061 (gdb_write_memory): ... this. Use
8062 prepare_to_access_memory/prepare_to_access_memory.
8063 (handle_search_memory_1): Adjust.
8064 (process_serial_event): Adjust.
8065 * target.h (struct target_ops): New fields
8066 prepare_to_access_memory and unprepare_to_access_memory.
8067 (prepare_to_access_memory, unprepare_to_access_memory): New.
8068 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8069 prepare_to_access_memory/prepare_to_access_memory.
8070 * nto-low.c (nto_target_ops): Adjust.
8071 * spu-low.c (spu_target_ops): Adjust.
8072 * win32-low.c (win32_target_ops): Adjust.
8073
fd467969
PA
80742010-08-26 Pedro Alves <pedro@codesourcery.com>
8075
8076 * Makefile.in (WARN_CFLAGS): Get it from configure.
8077 (WERROR_CFLAGS): New.
8078 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8079 * configure.ac: Introduce --enable-werror, which adds -Werror to
8080 the compiler command line. Enabled by default. Disable with
8081 --disable-werror. Add -Wdeclaration-after-statement
8082 Wpointer-arith and -Wformat-nonliteral to warning flags.
8083 * configure: Regenerate.
8084
331e2f5f
PA
80852010-08-26 Pedro Alves <pedro@codesourcery.com>
8086
8087 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8088
e581f2b4
PA
80892010-08-26 Pedro Alves <pedro@codesourcery.com>
8090
8091 * gdbreplay.c (remote_error): New.
8092 (gdbchar): New.
8093 (expect): Use gdbchar. Check for error reading from GDB.
8094 Clarify sync error output.
8095 (play): Check for errors writing to GDB.
8096 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8097 * remote-utils.c (getpkt): Check for errors writing to the remote
8098 descriptor.
8099
3c11dd79
PA
81002010-08-25 Pedro Alves <pedro@codesourcery.com>
8101
8102 * linux-low.c (linux_wait_1): Move non-debugging code out of
8103 `debug_threads' control.
8104
d20a8ad9
PA
81052010-08-25 Pedro Alves <pedro@codesourcery.com>
8106
8107 * linux-low.c (linux_wait_1): Don't set last_status here.
8108 * server.c (push_event, queue_stop_reply_callback): Assert we're
8109 not pushing a TARGET_WAITKIND_IGNORE event.
8110 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8111 (myresume, handle_target_event): Set the thread's last_resume_kind
8112 and last_status from the target returned status.
8113
964e4306
PA
81142010-08-25 Pedro Alves <pedro@codesourcery.com>
8115
8116 PR threads/10729
8117
8118 * linux-x86-low.c (update_debug_registers_callback): New.
8119 (i386_dr_low_set_addr): Use it.
8120 (i386_dr_low_get_addr): New.
8121 (i386_dr_low_set_control): Use update_debug_registers_callback.
8122 (i386_dr_low_get_control): New.
8123 (i386_dr_low_get_status): Adjust.
8124 * linux-low.c (linux_stop_lwp): New.
8125 * linux-low.h (linux_stop_lwp): Declare.
8126
8127 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8128 argument instead of a i386_debug_reg_state.
8129 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8130 a i386_debug_reg_state.
8131 (i386_insert_aligned_watchpoint): Adjust.
8132 (i386_remove_aligned_watchpoint): Adjust.
8133 (i386_low_stopped_data_address): Read the debug registers from the
8134 inferior instead of from the mirrors.
8135 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8136 (i386_dr_low_get_addr): Declare.
8137 (i386_dr_low_get_control): Declare.
8138 (i386_dr_low_get_status): Change prototype.
8139
8140 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8141 (i386_dr_low_get_addr): New.
8142 (i386_dr_low_get_control): New.
8143 (i386_dr_low_get_status): Adjust prototype. Return
8144 dr_status_mirror.
8145 (i386_initial_stuff): Clear dr_status_mirror and
8146 dr_control_mirror.
8147 (i386_get_thread_context): Adjust.
8148 (i386_set_thread_context): Adjust.
8149 (i386_thread_added): Adjust.
8150
5f21a75b
PA
81512010-08-24 Pedro Alves <pedro@codesourcery.com>
8152
8153 * linux-low.h (linux_thread_area): Delete declaration.
8154
3e4c1235
TS
81552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8156
8157 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8158 after its termination.
8159
1971b033
PA
81602010-08-09 Pedro Alves <pedro@codesourcery.com>
8161
8162 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8163 (gdb_wants_all_stopped): Delete.
8164 (linux_wait_1): Don't call them.
8165 * server.c (handle_v_cont): Tag all threads as want-stopped.
8166 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8167 stopped as "client-wants-stopped".
8168
310444ac
PA
81692010-07-31 Pedro Alves <pedro@codesourcery.com>
8170
8171 * Makefile.in (signals_h): New.
8172 (server_h): Depend on it.
8173 (server.o): Don't depend on $(signals_def).
8174 (signals.o): Depend on $(signals_def).
8175
a19cae16
JK
81762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8177
8178 * Makefile.in (signals_def): New.
8179 (server_h): Append include/gdb/signals.h and signals_def.
8180 (server.o): Append signals_def.
8181
30d50328
JK
81822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8183
8184 * server.c (handle_target_event): Use target_signal_to_host for
8185 resume_info.sig initialization.
8186 * target.h (struct thread_resume) <sig>: New comment.
8187
5c3216e2
OS
81882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8189
c6f46ca0
OS
8190 * server.c (handle_query): strcpy() the returned string from paddress()
8191 instead of sprintf().
5c3216e2
OS
8192 * utils.c (paddress): Return phex_nz().
8193
6bd31874
JB
81942010-07-07 Joel Brobecker <brobecker@adacore.com>
8195
8196 * server.c (handle_v_cont): Call mourn_inferior if process
8197 just exited.
8198 (myresume): Likewise.
8199
0fb4aa4b
PA
82002010-07-01 Pedro Alves <pedro@codesourcery.com>
8201
8202 Static tracepoints, and integration with UST.
8203
8204 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8205 * mem-break.c (uninsert_all_breakpoints)
8206 (reinsert_all_breakpoints): New.
8207 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8208 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8209 (gdb_agent_ust_loaded, helper_thread_id)
8210 (gdb_agent_helper_thread_id): New macros.
8211 (struct ipa_sym_addresses): Add addr_ust_loaded,
8212 addr_helper_thread_id, addr_cmd_buf.
8213 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8214 (in_process_agent_loaded_ust): New.
8215 (write_e_ust_not_loaded): New.
8216 (maybe_write_ipa_ust_not_loaded): New.
8217 (struct collect_static_trace_data_action): New.
8218 (enum tracepoint_type) <static_tracepoint>: New.
8219 (struct tracepoint) <handle>: Mention static tracepoints.
8220 (struct static_tracepoint_ctx): New.
8221 (CMD_BUF_SIZE): New.
8222 (add_tracepoint_action): Handle static tracepoint actions.
8223 (unprobe_marker_at): New.
8224 (clear_installed_tracepoints): Handle static tracepoints.
8225 (cmd_qtdp): Handle static tracepoints.
8226 (probe_marker_at): New.
8227 (cmd_qtstart): Handle static tracepoints.
8228 (response_tracepoint): Handle static tracepoints.
8229 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8230 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8231 (get_context_regcache): Handle static tracepoints.
8232 (do_action_at_tracepoint): Handle static tracepoint actions.
8233 (traceframe_find_block_type): Handle static trace data blocks.
8234 (traceframe_read_sdata): New.
8235 (download_tracepoints): Download static tracepoint actions.
8236 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8237 (GDB_PROBE_NAME): New.
8238 (ust_ops): New.
8239 (GET_UST_SYM): New.
8240 (USTF): New.
8241 (dlsym_ust): New.
8242 (ust_marker_to_static_tracepoint): New.
8243 (gdb_probe): New.
8244 (collect_ust_data_at_tracepoint): New.
8245 (gdb_ust_probe): New.
8246 (UNIX_PATH_MAX, SOCK_DIR): New.
8247 (gdb_ust_connect_sync_socket): New.
8248 (resume_thread, stop_thread): New.
8249 (run_inferior_command): New.
8250 (init_named_socket): New.
8251 (gdb_ust_socket_init): New.
8252 (cstr_to_hexstr): New.
8253 (next_st): New.
8254 (first_marker, next_marker): New.
8255 (response_ust_marker): New.
8256 (cmd_qtfstm, cmd_qtsstm): New.
8257 (unprobe_marker_at, probe_marker_at): New.
8258 (cmd_qtstmat, gdb_ust_thread): New.
8259 (gdb_ust_init): New.
8260 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8261 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8262 (ST_REGENTRY): New.
8263 (x86_64_st_collect_regmap): New.
8264 (X86_64_NUM_ST_COLLECT_GREGS): New.
8265 (AMD64_RIP_REGNUM): New.
8266 (supply_static_tracepoint_registers): New.
8267 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8268 (ST_REGENTRY): New.
8269 (i386_st_collect_regmap): New.
8270 (i386_NUM_ST_COLLECT_GREGS): New.
8271 (supply_static_tracepoint_registers): New.
8272 * server.c (handle_query): Handle qXfer:statictrace:read.
8273 <qSupported>: Report support for StaticTracepoints, and
8274 qXfer:statictrace:read features.
8275 * server.h (traceframe_read_sdata)
8276 (supply_static_tracepoint_registers): Declare.
8277 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8278 (unpack_varlen_hex): Include in IPA build.
8279 * Makefile.in (ustlibs, ustinc): New.
8280 (IPA_OBJS): Add remote-utils-ipa.o.
8281 ($(IPA_LIB)): Link -ldl and -lpthread.
8282 (UST_CFLAGS): New.
8283 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8284 * config.in, configure: Regenerate.
8285
9e4344e5
PA
82862010-06-20 Ian Lance Taylor <iant@google.com>
8287 Pedro Alves <pedro@codesourcery.com>
8288
8289 * linux-x86-low.c (always_true): Delete.
8290 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8291 trying to fool the compiler with always_true.
8292
c6beb2cb
PA
82932010-06-20 Pedro Alves <pedro@codesourcery.com>
8294
8295 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8296 conditions in gdbserver.
8297
d2ed6730
UW
82982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8299
8300 * spu-low.c (spu_read_memory): Wrap around local store limit.
8301 (spu_write_memory): Likewise.
8302
4e29fb54
PA
83032010-06-15 Pedro Alves <pedro@codesourcery.com>
8304
8305 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8306 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8307 LONGEST uses.
8308 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8309 uses.
8310 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8311 uses with LONGEST uses.
8312
6a271cae
PA
83132010-06-14 Stan Shebs <stan@codesourcery.com>
8314 Pedro Alves <pedro@codesourcery.com>
8315
8316 Bytecode compiler.
8317
8318 * linux-x86-low.c: Include limits.h.
8319 (add_insns): New.
8320 (always_true): New.
8321 (EMIT_ASM): New.
8322 (EMIT_ASM32): New.
8323 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8324 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8325 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8326 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8327 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8328 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8329 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8330 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8331 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8332 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8333 (amd64_emit_void_call_2): New.
8334 (amd64_emit_ops): New.
8335 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8336 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8337 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8338 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8339 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8340 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8341 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8342 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8343 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8344 (i386_emit_stack_adjust, i386_emit_int_call_1)
8345 (i386_emit_void_call_2): New.
8346 (i386_emit_ops): New.
8347 (x86_emit_ops): New.
8348 (the_low_target): Install x86_emit_ops.
8349 * server.h (struct emit_ops): New.
8350 (get_raw_reg_func_addr): Declare.
8351 (current_insn_ptr, emit_error): Declare.
8352 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8353 (set_trace_state_variable_value): New defines.
8354 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8355 addr_get_trace_state_variable_value and
8356 addr_set_trace_state_variable_value.
8357 (symbol_list): New fields for get_raw_reg,
8358 get_trace_state_variable_value and set_trace_state_variable_value.
8359 (condfn): New typedef.
8360 (struct tracepoint): New field `compiled_cond'.
8361 (do_action_at_tracepoint): Clear compiled_cond.
8362 (get_trace_state_variable_value, set_trace_state_variable_value):
8363 Export in the IPA.
8364 (condition_true_at_tracepoint): If there's a compiled condition,
8365 run that.
8366 (current_insn_ptr, emit_error): New globals.
8367 (struct bytecode_address): New.
8368 (get_raw_reg_func_addr): New.
8369 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8370 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8371 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8372 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8373 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8374 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8375 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8376 (compile_tracepoint_condition, compile_bytecodes): New.
8377 * target.h (emit_ops): Forward declare.
8378 (struct target_ops): New field emit_ops.
8379 (target_emit_ops): New.
8380 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8381 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8382 * linux-low.c (linux_emit_ops): New.
8383 (linux_target_ops): Install it.
8384 * linux-low.h (struct linux_target_ops): New field emit_ops.
8385
92b72907
UW
83862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8387
8388 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8389 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8390
fa593d66
PA
83912010-06-01 Pedro Alves <pedro@codesourcery.com>
8392 Stan Shebs <stan@codesourcery.com>
8393
8394 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8395 (all): Depend on $(extra_libraries).
8396 (install-only): Install the IPA.
8397 (IPA_OBJS, IPA_LIB): New.
8398 (clean): Remove the IPA lib.
8399 (IPAGENT_CFLAGS): New.
8400 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8401 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8402 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8403 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8404 * configure.ac: Check for atomic builtins support in the compiler.
8405 (IPA_DEPFILES, extra_libraries): Define.
8406 * configure.srv (ipa_obj): Add description.
8407 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8408 (i[34567]86-*-linux*): Set ipa_obj.
8409 (x86_64-*-linux*): Set ipa_obj.
8410 * linux-low.c (stabilizing_threads): New.
8411 (supports_fast_tracepoints): New.
8412 (linux_detach): Stabilize threads before detaching.
8413 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8414 the lwp is either not stabilizing, or is moving out of a jump pad.
8415 (linux_fast_tracepoint_collecting): New.
8416 (maybe_move_out_of_jump_pad): New.
8417 (enqueue_one_deferred_signal): New.
8418 (dequeue_one_deferred_signal): New.
8419 (linux_wait_for_event_1): If moving out of a jump pad, defer
8420 pending signals to later.
8421 (linux_stabilize_threads): New.
8422 (linux_wait_1): Check if threads need moving out of jump pads, and
8423 do it if so.
8424 (stuck_in_jump_pad_callback): New.
8425 (move_out_of_jump_pad_callback): New.
8426 (lwp_running): New.
8427 (linux_resume_one_lwp): Handle moving out of jump pads.
8428 (linux_set_resume_request): Dequeue deferred signals.
8429 (need_step_over_p): Also step over fast tracepoint jumps.
8430 (start_step_over): Also uninsert fast tracepoint jumps.
8431 (finish_step_over): Also reinsert fast tracepoint jumps.
8432 (linux_install_fast_tracepoint_jump): New.
8433 (linux_target_ops): Install linux_stabilize_threads and
8434 linux_install_fast_tracepoint_jump_pad.
8435 * linux-low.h (linux_target_ops) <get_thread_area,
8436 install_fast_tracepoint_jump_pad>: New fields.
8437 (struct lwp_info) <collecting_fast_tracepoint,
8438 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8439 (linux_get_thread_area): Declare.
8440 * linux-x86-low.c (jump_insn): New.
8441 (x86_get_thread_area): New.
8442 (append_insns): New.
8443 (push_opcode): New.
8444 (amd64_install_fast_tracepoint_jump_pad): New.
8445 (i386_install_fast_tracepoint_jump_pad): New.
8446 (x86_install_fast_tracepoint_jump_pad): New.
8447 (the_low_target): Install x86_get_thread_area and
8448 x86_install_fast_tracepoint_jump_pad.
8449 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8450 (struct fast_tracepoint_jump): New.
8451 (fast_tracepoint_jump_insn): New.
8452 (fast_tracepoint_jump_shadow): New.
8453 (find_fast_tracepoint_jump_at): New.
8454 (fast_tracepoint_jump_here): New.
8455 (delete_fast_tracepoint_jump): New.
8456 (set_fast_tracepoint_jump): New.
8457 (uninsert_fast_tracepoint_jumps_at): New.
8458 (reinsert_fast_tracepoint_jumps_at): New.
8459 (set_breakpoint_at): Use write_inferior_memory.
8460 (uninsert_raw_breakpoint): Use write_inferior_memory.
8461 (check_mem_read): Mask out fast tracepoint jumps.
8462 (check_mem_write): Mask out fast tracepoint jumps.
8463 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8464 (set_fast_tracepoint_jump): Declare.
8465 (delete_fast_tracepoint_jump)
8466 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8467 (reinsert_fast_tracepoint_jumps_at): Declare.
8468 * regcache.c: Don't compile many functions when building the
8469 in-process agent library.
8470 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8471 the register buffer in the heap.
8472 (free_register_cache): If the register buffer isn't owned by the
8473 regcache, don't free it.
8474 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8475 pre-existing register caches.
8476 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8477 type.
8478 (convert_ascii_to_int): : Constify `from' parameter type.
8479 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8480 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8481 the needed buffer in-place.
8482 (relocate_instruction): New.
8483 * server.c (handle_query) <qSymbols>: If the target supports
8484 tracepoints, give it a chance of looking up symbols. Report
8485 support for fast tracepoints.
8486 (handle_status): Stabilize threads.
8487 (process_serial_event): Adjust.
8488 * server.h (struct fast_tracepoint_jump): Forward declare.
8489 (struct process_info) <fast_tracepoint_jumps>: New field.
8490 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8491 (decode_X_packet, decode_M_packet): Adjust.
8492 (relocate_instruction): Declare.
8493 (in_process_agent_loaded): Declare.
8494 (tracepoint_look_up_symbols): Declare.
8495 (struct fast_tpoint_collect_status): Declare.
8496 (fast_tracepoint_collecting): Declare.
8497 (force_unlock_trace_buffer): Declare.
8498 (handle_tracepoint_bkpts): Declare.
8499 (initialize_low_tracepoint)
8500 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8501 * target.h (struct target_ops) <stabilize_threads,
8502 install_fast_tracepoint_jump_pad>: New fields.
8503 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8504 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8505 [HAVE_STDINT_H]: Include stdint.h.
8506 (trace_debug_1): Rename to ...
8507 (trace_vdebug): ... this.
8508 (trace_debug): Rename to ...
8509 (trace_debug_1): ... this. Add `level' parameter.
8510 (trace_debug): New.
8511 (ATTR_USED, ATTR_NOINLINE): New.
8512 (IP_AGENT_EXPORT): New.
8513 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8514 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8515 (about_to_request_buffer_space, trace_buffer_is_full)
8516 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8517 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8518 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8519 (traceframe_write_count, traceframes_created)
8520 (trace_state_variables)
8521 New renaming defines.
8522 (struct ipa_sym_addresses): New.
8523 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8524 (symbol_list): New.
8525 (ipa_sym_addrs): New.
8526 (all_tracepoint_symbols_looked_up): New.
8527 (in_process_agent_loaded): New.
8528 (write_e_ipa_not_loaded): New.
8529 (maybe_write_ipa_not_loaded): New.
8530 (tracepoint_look_up_symbols): New.
8531 (debug_threads) [IN_PROCESS_AGENT]: New.
8532 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8533 (UNKNOWN_SIDE_EFFECTS): New.
8534 (stop_tracing): New.
8535 (flush_trace_buffer): New.
8536 (stop_tracing_bkpt): New.
8537 (flush_trace_buffer_bkpt): New.
8538 (read_inferior_integer): New.
8539 (read_inferior_uinteger): New.
8540 (read_inferior_data_pointer): New.
8541 (write_inferior_data_pointer): New.
8542 (write_inferior_integer): New.
8543 (write_inferior_uinteger): New.
8544 (struct collect_static_trace_data_action): Delete.
8545 (enum tracepoint_type): New.
8546 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8547 <actions_str, step_actions, step_actions_str>: Only include in
8548 GDBserver.
fa593d66
PA
8549 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8550 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8551 (tracepoints): Use IP_AGENT_EXPORT.
8552 (last_tracepoint): Don't include in the IPA.
8553 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8554 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8555 (alloced_trace_state_variables): New.
8556 (trace_state_variables): Use IP_AGENT_EXPORT.
8557 (traceframe_t): Delete unused variable.
8558 (circular_trace_buffer): Don't include in the IPA.
8559 (trace_buffer_start): Delete.
8560 (struct trace_buffer_control): New.
8561 (trace_buffer_free): Delete.
8562 (struct ipa_trace_buffer_control): New.
8563 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8564 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8565 New.
8566 (trace_buffer_ctrl): New.
8567 (TRACE_BUFFER_CTRL_CURR): New.
8568 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8569 Reimplement as macros.
8570 (trace_buffer_wrap): Delete.
8571 (traceframe_write_count, traceframe_read_count)
8572 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8573 (struct tracepoint_hit_ctx) <type>: New field.
8574 (struct fast_tracepoint_ctx): New.
8575 (memory_barrier): New.
8576 (cmpxchg): New.
8577 (record_tracepoint_error): Update atomically in the IPA.
8578 (clear_inferior_trace_buffer): New.
8579 (about_to_request_buffer_space): New.
8580 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8581 updating the same buffer.
8582 (add_tracepoint): Default the tracepoint's type to trap
8583 tracepoint, and orig_size to -1.
8584 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8585 internal variables.
8586 (create_trace_state_variable): New parameter `gdb'. Handle it.
8587 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8588 (cmd_qtdp): Handle fast tracepoints.
8589 (cmd_qtdv): Adjust.
8590 (max_jump_pad_size): New.
8591 (gdb_jump_pad_head): New.
8592 (get_jump_space_head): New.
8593 (claim_jump_space): New.
8594 (sort_tracepoints): New.
8595 (MAX_JUMP_SIZE): New.
8596 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8597 IPA.
8598 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8599 support. Upload fast traceframes, and delete internal IPA
8600 breakpoints.
8601 (stop_tracing_handler): New.
8602 (flush_trace_buffer_handler): New.
8603 (cmd_qtstop): Upload fast tracepoints.
8604 (response_tracepoint): Handle fast tracepoints.
8605 (tracepoint_finished_step): Upload fast traceframes. Set the
8606 tracepoint hit context's tracepoint type.
8607 (handle_tracepoint_bkpts): New.
8608 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8609 type. Add comment about fast tracepoints.
8610 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8611 non-existing action_str field.
8612 (get_context_regcache): Handle fast tracepoints.
8613 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8614 to the regcache.
8615 (fast_tracepoint_from_jump_pad_address): New.
8616 (fast_tracepoint_from_ipa_tpoint_address): New.
8617 (collecting_t): New.
8618 (force_unlock_trace_buffer): New.
8619 (fast_tracepoint_collecting): New.
8620 (collecting): New.
8621 (gdb_collect): New.
8622 (write_inferior_data_ptr): New.
8623 (target_tp_heap): New.
8624 (target_malloc): New.
8625 (download_agent_expr): New.
8626 (UALIGN): New.
8627 (download_tracepoints): New.
8628 (download_trace_state_variables): New.
8629 (upload_fast_traceframes): New.
8630 (IPA_FIRST_TRACEFRAME): New.
8631 (IPA_NEXT_TRACEFRAME_1): New.
8632 (IPA_NEXT_TRACEFRAME): New.
8633 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8634 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8635 (gdb_jump_pad_buffer_end): New.
8636 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8637 (initialize_tracepoint): Adjust.
8638 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8639 buffer. Initialize the low module.
8640 * utils.c (PREFIX, TOOLNAME): New.
8641 (malloc_failure): Use PREFIX.
8642 (error): In the IPA, an error causes an exit.
8643 (fatal, warning): Use PREFIX.
8644 (internal_error): Use TOOLNAME.
8645 (NUMCELLS): Increase to 10.
8646 * configure, config.in: Regenerate.
8647
d149dd1d
PA
86482010-06-01 Pedro Alves <pedro@codesourcery.com>
8649
8650 * server.c (handle_query) <qSupported>: Do two passes over the
8651 qSupported string to avoid nesting strtok.
8652
f6528abd
JK
86532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8654
8655 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8656 (CDEPS): New.
8657 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8658 -Wl,--dynamic-list.
8659 * configure: Regenerate.
8660 * proc-service.list: New.
8661
ca2a87a0
JK
86622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8663
8664 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8665 New comment.
8666
363a6e9f
OS
86672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8668
8669 * gdbreplay.c (remote_open): Check error return from socket() call by
8670 its equality to -1 not by it being negative.
8671 * remote-utils.c (remote_open): Likewise.
8672
d23b6cb1
PA
86732010-05-23 Pedro Alves <pedro@codesourcery.com>
8674
8675 * config.h: Regenerate.
8676
28d3cf85
MK
86772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8678
8679 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8680 doesn't provide PTRACE_GET_THREAD_AREA.
8681
fea36a59
MK
86822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8683
8684 * linux-m68k-low.c: Include <asm/ptrace.h>
8685 (ps_get_thread_area): Implement.
8686
24b066ba
DE
86872010-05-03 Doug Evans <dje@google.com>
8688
8689 * event-loop.c (struct callback_event): New struct.
8690 (callback_list): New global.
8691 (append_callback_event, delete_callback_event): New functions.
8692 (process_callback): New function.
8693 (start_event_loop): Call it.
8694 * remote-utils.c (NOT_SCHEDULED): Define.
8695 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8696 moved out of readchar.
8697 (readchar): Rewrite. Call reschedule before returning.
8698 (reset_readchar): New function.
8699 (remote_close): Call it.
8700 (process_remaining, reschedule): New functions.
8701 * server.h (callback_handler_func): New typedef.
8702 (append_callback_event, delete_callback_event): Declare.
8703
9836d6ea
PA
87042010-05-03 Pedro Alves <pedro@codesourcery.com>
8705
8706 * proc-service.c (ps_pglobal_lookup): Use
8707 thread_db_look_up_one_symbol.
8708 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8709 parameter. Use it instead of all_symbols_looked_up.
8710 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8711 field.
8712 (all_symbols_looked_up): Don't declare.
8713 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8714 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8715 field.
8716 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8717 Set all_symbols_looked_up here.
8718 (thread_db_look_up_one_symbol): New.
8719 (thread_db_get_tls_address): Adjust.
8720 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8721 thread_db object on the heap, and tentatively set it in the
8722 process structure.
8723 (thread_db_init): Don't set all_symbols_looked_up here.
8724 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8725
7984d532
PA
87262010-05-03 Pedro Alves <pedro@codesourcery.com>
8727
8728 * linux-low.c (linux_kill, linux_detach): Adjust.
8729 (status_pending_p_callback): Remove redundant statement. Check
8730 for !TARGET_WAITIKIND_IGNORE, instead of
8731 TARGET_WAITKIND_STOPPED.
8732 (handle_tracepoints): Make sure LWP is locked. Adjust.
8733 (linux_wait_for_event_1): Adjust.
8734 (linux_cancel_breakpoints): New.
8735 (unsuspend_one_lwp): New.
8736 (unsuspend_all_lwps): New.
8737 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8738 (send_sigstop_callback): Change return type to int, add new
8739 `except' parameter and handle it.
8740 (suspend_and_send_sigstop_callback): New.
8741 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8742 pass them down. If SUSPEND, also increment the lwp's suspend
8743 count.
8744 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8745 (need_step_over_p): Don't consider suspended LWPs.
8746 (start_step_over): Adjust.
8747 (proceed_one_lwp): Change return type to int, add new `except'
8748 parameter and handle it.
8749 (unsuspend_and_proceed_one_lwp): New.
8750 (proceed_all_lwps): Use find_inferior instead of
8751 for_each_inferior.
8752 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8753 also decrement the suspend count of LWPs. Pass `except' down,
8754 instead of hacking its suspend count.
8755 (linux_pause_all): Add `freeze' parameter. Adjust.
8756 (linux_unpause_all): New.
8757 (linux_target_ops): Install linux_unpause_all.
8758 * server.c (handle_status): Adjust.
8759 * target.h (struct target_ops): New fields `unpause_all' and
8760 `cancel_breakpoints'. Add new parameter to `pause_all'.
8761 (pause_all): Add new `freeze' parameter.
8762 (unpause_all): New.
8763 (cancel_breakpoints): New.
8764 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8765 cancel breakpoints.
8766 (cmd_qtstart): Pause threads.
8767 (stop_tracing): Pause threads, and cancel breakpoints.
8768 * win32-low.c (win32_target_ops): Adjust.
8769
e471f25b
PA
87702010-05-03 Pedro Alves <pedro@codesourcery.com>
8771
8772 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8773 the inferior right away from here...
8774 (linux_wait_1): ... to here, and adjust to check the thread's
8775 last_resume_kind instead of the lwp's step or stop_expected flags.
8776
1915ef4f
PA
87772010-05-02 Pedro Alves <pedro@codesourcery.com>
8778
8779 * README: Use consistent `GDB' and `GDBserver' spellings.
8780
f9e39928
PA
87812010-05-02 Pedro Alves <pedro@codesourcery.com>
8782
8783 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8784 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8785 (linux_detach_one_lwp): Assume the lwp is stopped.
8786 (any_thread_of): Delete.
8787 (linux_detach): Stop all lwps here. Don't blindly delete all
8788 breakpoints.
8789 (delete_lwp_callback): New.
8790 (linux_mourn): Delete all lwps of the process that is gone.
8791 (linux_wait_1): Don't delete the last lwp of the process here.
8792 * mem-break.h (mark_breakpoints_out): Declare.
8793 * mem-break.c (mark_breakpoints_out): New.
8794 (free_all_breakpoints): Use it.
8795 * server.c (handle_target_event): If the process is gone, mark
8796 breakpoints out.
8797 * thread-db.c (struct thread_db) <create_bp>: New field.
8798 (thread_db_enable_reporting): Fix prototype. Store a thread event
8799 breakpoint reference in the thread_db struct.
8800 (thread_db_load_search): Clear the thread_db object.
8801 (try_thread_db_load_1): Ditto.
8802 (switch_to_process): New.
8803 (disable_thread_event_reporting): Use it.
8804 (remove_thread_event_breakpoints): New.
8805 (thread_db_detach, thread_db_mourn): Use it.
8806
1e7fc18c
PA
88072010-05-01 Pedro Alves <pedro@codesourcery.com>
8808
8809 * linux-low.c (linux_enable_event_reporting): New.
8810 (linux_wait_for_event_1, handle_extended_wait): Use it.
8811
02fc4de7
PA
88122010-04-30 Pedro Alves <pedro@codesourcery.com>
8813
8814 * linux-low.c (linux_kill_one_lwp, linux_kill)
8815 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8816 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8817 SIGSTOP even if the LWP is stopped.
8818 (send_sigstop_callback): New.
8819 (stop_all_lwps): Use send_sigstop_callback instead.
8820 (linux_resume_one_thread): Adjust.
8821 (proceed_one_lwp): Still proceed an LWP that the client has
8822 requested to stop, if we haven't reported it as stopped yet. Make
8823 sure that LWPs the client want stopped, have a pending SIGSTOP.
8824
bc3b5632
DE
88252010-04-26 Doug Evans <dje@google.com>
8826
ae1ada35
DE
8827 * server.c (handle_general_set): Make static.
8828
bc3b5632
DE
8829 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8830 Print received char after testing for error/eof instead of before.
8831 (input_interrupt): Tweak comment.
8832
65730243
DE
88332010-04-23 Doug Evans <dje@google.com>
8834
8835 * server.c (start_inferior): Print inferior argv if --debug.
8836
a8ae7dc0
AR
88372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8838
8839 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8840 * nto-x86-low.c: Include server.h
8841
1c07cc19
PM
88422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8843
8844 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8845 be consistent with other sources of this directory.
8846 (init_registers_amd64): Correct name of source file of this function
8847 in the comment.
8848
e0a61e09
PM
88492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8850
8851 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8852 64-bit executables.
8853
54709339
PM
88542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8855
8856 * win32-i386-low.c: Add 64-bit support.
8857 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8858 (init_registers_amd64): Declare.
8859 (mappings): Add 64-bit version of array.
8860 (init_windows_x86): New function.
8861 (the_low_target): Change init_arch field to init_windows_x86.
8862
e8f0053d
PM
88632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8864
8865 * win32-low.c: Adapt to support also 64-bit architecture.
8866 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8867 (get_image_name): Use SIZE_T type for local variable `done'.
8868 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8869 (toolhelp_get_dll_name): Idem.
8870 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8871 Use uintptr_t typecast to avoid warning.
8872 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8873 (handle_exception): Use phex_nz to avoid warning.
8874 (win32_wait): Remove unused local variable `process'.
8875
c481e77e
PM
88762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8877
8878 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8879 `amd64-avx.o'.
8880
12ea4b69
PM
88812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8882
8883 * configure.ac: Use `ws2_32' library for srv_mingw.
8884 * configure: Regenerate.
8885 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8886 * remote-utils.c: Likewise.
8887
f6d1620c
L
88882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8889
8890 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8891 if __x86_64__ is defined.
8892
8e642873
PM
88932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8894
8895 * configure: Regenerate.
8896
711e434b
PM
88972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8898
8899 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8900 * target.h (target_ops): New get_tib_address field.
8901 * win32-low.h (win32_thread_info): Add thread_local_base field.
8902 * win32-low.c (child_add_thread): Add tlb argument.
8903 Set thread_local_base field to TLB.
8904 (get_child_debug_event): Adapt to child_add_thread change.
8905 (win32_get_tib_address): New function.
8906 (win32_target_ops): Set get_tib_address field to
8907 win32_get_tib_address.
8908 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8909
505106cd
PA
89102010-04-12 Pedro Alves <pedro@codesourcery.com>
8911
505106cd
PA
8912 * linux-low.c (linux_mourn): Also remove the process.
8913 * server.c (handle_target_event): Don't remove the process here.
8914 * nto-low.c (nto_mourn): New.
8915 (nto_target_ops): Install it.
8916 * spu-low.c (spu_mourn): New.
8917 (spu_target_ops): Install it.
8918 * win32-low.c (win32_mourn): New.
8919 (win32_target_ops): Install it.
8920
e8470a06
PA
89212010-04-12 Pedro Alves <pedro@codesourcery.com>
8922
8923 * server.h (buffer_xml_printf): Remove redundant `;'.
8924
45ba0d02
PA
89252010-04-12 Pedro Alves <pedro@codesourcery.com>
8926
8927 * regcache.c (set_register_cache): Invalidate regcaches before
8928 changing the register cache layout.
8929 (regcache_invalidate_one): Allow a NULL regcache.
8930 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8931 regcaches before changing the register cache layout or the target
8932 regsets.
8933
59e04013
L
89342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8935
8936 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8937 variable warning on Linux/x86-64.
8938
8336d594
PA
89392010-04-11 Pedro Alves <pedro@codesourcery.com>
8940
8941 GDBserver disconnected tracing support.
8942
8943 * linux-low.c (linux_remove_process): Delete.
8944 (add_lwp): Don't set last_resume_kind here.
8945 (linux_kill): Use `mourn'.
8946 (linux_detach): Use `thread_db_detach', and `mourn'.
8947 (linux_mourn): New.
8948 (linux_attach_lwp_1): Adjust comment.
8949 (linux_attach): last_resume_kind moved the thread_info; adjust.
8950 (status_pending_p_callback): Adjust.
8951 (linux_wait_for_event_1): Adjust.
8952 (count_events_callback, select_singlestep_lwp_callback)
8953 (select_event_lwp_callback, cancel_breakpoints_callback)
8954 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8955 (proceed_one_lwp): Adjust.
8956 (linux_async): Add debug output.
8957 (linux_thread_stopped): New.
8958 (linux_pause_all): New.
8959 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8960 linux_pause_all.
8961 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8962 (thread_db_free): Delete declaration.
8963 (thread_db_detach, thread_db_mourn): Declare.
8964 * thread-db.c (thread_db_init): Use thread_db_mourn.
8965 (thread_db_free): Delete, split in two.
8966 (disable_thread_event_reporting): New.
8967 (thread_db_detach): New.
8968 (thread_db_mourn): New.
8969
8970 * server.h (struct thread_info) <last_resume_kind>: New field.
8971 <attached>: Add comment.
8972 <gdb_detached>: New field.
8973 (handler_func): Change return type to int.
8974 (handle_serial_event, handle_target_event): Ditto.
8975 (gdb_connected): Declare.
8976 (tracing): Delete.
8977 (disconnected_tracing): Declare.
8978 (stop_tracing): Declare.
8979
8980 * server.c (handle_query) <qSupported>: Report support for
8981 disconnected tracing.
8982 (queue_stop_reply_callback): Account for running threads.
8983 (gdb_wants_thread_stopped): New.
8984 (gdb_wants_all_threads_stopped): New.
8985 (gdb_reattached_process): New.
8986 (handle_status): Clear the `gdb_detached' flag of all processes.
8987 In all-stop, stop all threads.
8988 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8989 (process_serial_event): If the remote connection breaks, or if an
8990 exit was forced with "monitor exit", force an event loop exit.
8991 Handle disconnected tracing on detach.
8992 (handle_serial_event): Adjust.
8993 (handle_target_event): If GDB isn't connected, forward events back
8994 to the inferior, unless the last process exited, in which case,
8995 exit gdbserver. Adjust interface.
8996
8997 * remote-utils.c (remote_open): Don't block in accept. Instead
8998 register an event loop source on the listen socket file
8999 descriptor. Refactor bits into ...
9000 (listen_desc): ... this new global.
9001 (gdb_connected): ... this new function.
9002 (enable_async_notification): ... this new function.
9003 (handle_accept_event): ... this new function.
9004 (remote_close): Clear remote_desc.
9005
9006 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9007
9008 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9009 New fields.
9010 (mourn_inferior): Define.
9011 (target_process_qsupported): Avoid the dangling else problem.
9012 (thread_stopped): Define.
9013 (pause_all): Define.
9014 (target_waitstatus_to_string): Declare.
9015 * target.c (target_waitstatus_to_string): New.
9016
9017 * tracepoint.c (tracing): Make extern.
9018 (disconnected_tracing): New.
9019 (stop_tracing): Make extern. Handle tracing stops due to GDB
9020 disconnecting.
9021 (cmd_qtdisconnected): New.
9022 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9023 (handle_tracepoint_general_set): Handle QTDisconnected.
9024
9025 * event-loop.c (event_handler_func): Change return type to int.
9026 (process_event): Bail out if the event handler wants the event
9027 loop to stop.
9028 (handle_file_event): Ditto.
9029 (start_event_loop): Bail out if the event handler wants the event
9030 loop to stop.
9031
9032 * nto-low.c (nto_target_ops): Adjust.
9033 * spu-low.c (spu_wait): Don't remove the process here.
9034 (spu_target_ops): Adjust.
9035 * win32-low.c (win32_wait): Don't remove the process here.
9036 (win32_target_ops): Adjust.
9037
5d267c4c
PA
90382010-04-11 Pedro Alves <pedro@codesourcery.com>
9039
9040 * regcache.c (realloc_register_cache): Invalidate inferior's
9041 regcache before recreating it.
9042
623ccd72
PA
90432010-04-09 Pedro Alves <pedro@codesourcery.com>
9044
9045 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9046
219f2f23
PA
90472010-04-09 Stan Shebs <stan@codesourcery.com>
9048 Pedro Alves <pedro@codesourcery.com>
9049
9050 * server.h (LONGEST): New.
9051 (struct thread_info) <while_stepping>: New field.
9052 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9053 Declare.
9054 (initialize_tracepoint, handle_tracepoint_general_set)
9055 (handle_tracepoint_query, tracepoint_finished_step)
9056 (tracepoint_was_hit, release_while_stepping_state_list):
9057 (current_traceframe): Declare.
9058 * server.c (handle_general_set): Handle tracepoint packets.
9059 (read_memory): New.
9060 (write_memory): New.
9061 (handle_search_memory_1): Use read_memory.
9062 (handle_query): Report support for conditional tracepoints, trace
9063 state variables, and tracepoint sources. Handle tracepoint
9064 queries.
9065 (main): Initialize the tracepoints module.
9066 (process_serial_event): Handle traceframe reads/writes.
9067
9068 * linux-low.c (handle_tracepoints): New.
9069 (linux_wait_1): Call it.
9070 (linux_resume_one_lwp): Handle while-stepping.
9071 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9072 (linux_target_ops): Install them.
9073 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9074 New field.
9075 * linux-x86-low.c (x86_supports_tracepoints): New.
9076 (the_low_target). Install it.
9077
9078 * mem-break.h (delete_breakpoint): Declare.
9079 * mem-break.c (delete_breakpoint): Make external.
9080
9081 * target.h (struct target_ops): Add `supports_tracepoints',
9082 `read_pc', and `write_pc' fields.
9083 (target_supports_tracepoints): Define.
9084 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9085 (phex_nz): New.
9086
9087 * regcache.h (struct regcache) <registers_owned>: New field.
9088 (init_register_cache, regcache_cpy): Declare.
9089 (regcache_read_pc, regcache_write_pc): Declare.
9090 (register_cache_size): Declare.
9091 (supply_regblock): Declare.
9092 * regcache.c (init_register_cache): New.
9093 (new_register_cache): Use it.
9094 (regcache_cpy): New.
9095 (register_cache_size): New.
9096 (supply_regblock): New.
9097 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9098
219f2f23
PA
9099 * tracepoint.c: New.
9100
9101 * Makefile.in (OBS): Add tracepoint.o.
9102 (tracepoint.o): New rule.
9103
3a13a53b
L
91042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9105
9106 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9107 (i386-mmx.o): New.
9108 (i386-mmx.c): Likewise.
9109 (i386-mmx-linux.o): Likewise.
9110 (i386-mmx-linux.c): Likewise.
9111
9112 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9113 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9114 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9115 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9116
9117 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9118 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9119 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9120
1570b33e
L
91212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9122
9123 * Makefile.in (clean): Updated.
9124 (i386-avx.o): New.
9125 (i386-avx.c): Likewise.
9126 (i386-avx-linux.o): Likewise.
9127 (i386-avx-linux.c): Likewise.
9128 (amd64-avx.o): Likewise.
9129 (amd64-avx.c): Likewise.
9130 (amd64-avx-linux.o): Likewise.
9131 (amd64-avx-linux.c): Likewise.
9132
9133 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9134 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9135 (srv_amd64_regobj): Add amd64-avx.o.
9136 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9137 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9138 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9139 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9140 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9141 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9142 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9143
9144 * i387-fp.c: Include "i386-xstate.h".
9145 (i387_xsave): New.
9146 (i387_cache_to_xsave): Likewise.
9147 (i387_xsave_to_cache): Likewise.
9148 (x86_xcr0): Likewise.
9149
9150 * i387-fp.h (i387_cache_to_xsave): Likewise.
9151 (i387_xsave_to_cache): Likewise.
9152 (x86_xcr0): Likewise.
9153
9154 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9155 * linux-crisv32-low.c (target_regsets): Likewise.
9156 * linux-m68k-low.c (target_regsets): Likewise.
9157 * linux-mips-low.c (target_regsets): Likewise.
9158 * linux-ppc-low.c (target_regsets): Likewise.
9159 * linux-s390-low.c (target_regsets): Likewise.
9160 * linux-sh-low.c (target_regsets): Likewise.
9161 * linux-sparc-low.c (target_regsets): Likewise.
9162 * linux-xtensa-low.c (target_regsets): Likewise.
9163
9164 * linux-low.c: Include <sys/uio.h>.
9165 (regsets_fetch_inferior_registers): Support nt_type.
9166 (regsets_store_inferior_registers): Likewise.
9167 (linux_process_qsupported): New.
9168 (linux_target_ops): Add linux_process_qsupported.
9169
9170 * linux-low.h (regset_info): Add nt_type.
9171 (linux_target_ops): Add process_qsupported.
9172
9173 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9174 and <sys/uio.h>.
9175 (init_registers_i386_avx_linux): New.
9176 (init_registers_amd64_avx_linux): Likewise.
9177 (xmltarget_i386_linux_no_xml): Likewise.
9178 (xmltarget_amd64_linux_no_xml): Likewise.
9179 (PTRACE_GETREGSET): Likewise.
9180 (PTRACE_SETREGSET): Likewise.
9181 (x86_fill_xstateregset): Likewise.
9182 (x86_store_xstateregset): Likewise.
9183 (use_xml): Likewise.
9184 (x86_linux_update_xmltarget): Likewise.
9185 (x86_linux_process_qsupported): Likewise.
9186 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9187 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9188 init_registers_i386_linux here. Call
9189 x86_linux_update_xmltarget.
9190 (the_low_target): Add x86_linux_process_qsupported.
9191
9192 * server.c (handle_query): Call target_process_qsupported.
9193
9194 * target.h (target_ops): Add process_qsupported.
9195 (target_process_qsupported): New.
9196
fc7238bb
PA
91972010-04-03 Pedro Alves <pedro@codesourcery.com>
9198
9199 * inferiors.c (add_thread): Set last_status kind to
9200 TARGET_WAITKIND_IGNORE.
9201 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9202 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9203 (linux_wait_1): Move `thread' local definition to block that uses
9204 it. Don't NULL initialize `event_child'.
9205 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9206 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9207 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9208
bdabb078
PA
92092010-04-01 Pedro Alves <pedro@codesourcery.com>
9210
9211 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9212 an extended waitstatus, or by a watchpoint.
9213 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9214 thread was stepping or has been stopped by a watchpoint.
9215
d3bbe7a0
PA
92162010-04-01 Pedro Alves <pedro@codesourcery.com>
9217
9218 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9219 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9220 of another, then delete the previous, and validate all
9221 breakpoints.
9222 (validate_inserted_breakpoint): New.
9223 (delete_disabled_breakpoints): New.
9224 (validate_breakpoints): New.
9225 (check_mem_read): Validate breakpoints before trusting their
9226 shadow. Delete disabled breakpoints.
9227 (check_mem_write): Validate breakpoints before trusting they
9228 should be inserted. Delete disabled breakpoints.
9229 * mem-break.h (validate_breakpoints):
9230 * server.c (handle_query): Validate breakpoints when we see a
9231 qSymbol query.
9232
8b07ae33
PA
92332010-04-01 Pedro Alves <pedro@codesourcery.com>
9234
9235 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9236 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9237 if we could tell there's a GDB breakpoint at stop_pc.
9238 (need_step_over_p): Don't do a step over if we find a GDB
9239 breakpoint at the resume PC.
9240
9241 * mem-break.c (struct raw_breakpoint): New.
9242 (enum bkpt_type): New type `gdb_breakpoint'.
9243 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9244 fields. New field `raw'.
9245 (find_raw_breakpoint_at): New.
9246 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9247 breakpoint instead.
9248 (set_breakpoint_at): Adjust.
9249 (delete_raw_breakpoint): New.
9250 (release_breakpoint): New.
9251 (delete_breakpoint): Rename to...
9252 (delete_breakpoint_1): ... this. Add proc parameter. Use
9253 release_breakpoint. Return ENOENT.
9254 (delete_breakpoint): Reimplement.
9255 (find_breakpoint_at): Delete.
9256 (find_gdb_breakpoint_at): New.
9257 (delete_breakpoint_at): Delete.
9258 (set_gdb_breakpoint_at): New.
9259 (delete_gdb_breakpoint_at): New.
9260 (gdb_breakpoint_here): New.
9261 (set_reinsert_breakpoint): Use release_breakpoint.
9262 (uninsert_breakpoint): Rename to ...
9263 (uninsert_raw_breakpoint): ... this.
9264 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9265 (reinsert_raw_breakpoint): Change parameter type to
9266 raw_breakpoint.
9267 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9268 instead.
9269 (check_breakpoints): Adjust. Use release_breakpoint.
9270 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9271 (breakpoint_inserted_here): Ditto.
9272 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9273 Don't trust the breakpoint's shadow if it is not inserted.
9274 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9275 (delete_all_breakpoints): Adjust.
9276 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9277 use delete_breakpoint_1.
9278
9279 * mem-break.h (breakpoints_supported): Delete declaration.
9280 (set_gdb_breakpoint_at): Declare.
9281 (gdb_breakpoint_here): Declare.
9282 (delete_breakpoint_at): Delete.
9283 (delete_gdb_breakpoint_at): Declare.
9284
9285 * server.h (struct raw_breakpoint): Forward declare.
9286 (struct process_info): New field `raw_breakpoints'.
9287
9288 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9289 breakpoints.
9290
6bf5e0ba
PA
92912010-03-24 Pedro Alves <pedro@codesourcery.com>
9292
9293 * linux-low.c (status_pending_p_callback): Fix comment.
9294 (linux_wait_for_event_1): Move most of the internal breakpoint
9295 handling from here...
9296 (linux_wait_1): ... to here.
9297 (count_events_callback): New.
9298 (select_singlestep_lwp_callback): New.
9299 (select_event_lwp_callback): New.
9300 (cancel_breakpoints_callback): New.
9301 (select_event_lwp): New.
9302 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9303 priority to all LWPs that have had events that should be reported
9304 to the client. Cancel breakpoints when about to reporting the
9305 event to the client, not while stopping lwps. No longer cancel
9306 finished single-steps here.
9307 (cancel_finished_single_step): Delete.
9308 (cancel_finished_single_steps): Delete.
9309
414a389f
PA
93102010-03-24 Pedro Alves <pedro@codesourcery.com>
9311
9312 * mem-break.c (enum bkpt_type): New.
9313 (struct breakpoint): New field `type'.
9314 (set_breakpoint_at): Change return type to struct breakpoint
9315 pointer. Set type to `other_breakpoint' by default.
9316 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9317 in the breakpoint list.
9318 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9319 (reinsert_breakpoint): Rename to ...
9320 (reinsert_raw_breakpoint): ... this.
9321 (reinsert_breakpoints_at): Adjust.
9322 * mem-break.h (struct breakpoint): Declare.
9323 (set_breakpoint_at): Change return type to struct breakpoint
9324 pointer.
9325
2280c721
PA
93262010-03-24 Pedro Alves <pedro@codesourcery.com>
9327
9328 * server.c (handle_query): Assign, not compare.
9329
d50171e4
PA
93302010-03-24 Pedro Alves <pedro@codesourcery.com>
9331
9332 Teach linux gdbserver to step-over-breakpoints.
9333
9334 * linux-low.c (can_hardware_single_step): New.
9335 (supports_breakpoints): New.
9336 (handle_extended_wait): If stopping threads, read the stop pc of
9337 the new cloned LWP.
9338 (get_pc): New.
9339 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9340 low target doesn't support retrieving the PC.
9341 (add_lwp): Set last_resume_kind to resume_continue.
9342 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9343 (linux_attach): Don't clear stop_expected. Set the lwp's
9344 last_resume_kind to resume_stop.
9345 (linux_detach_one_lwp): Don't check for removed breakpoints.
9346 (check_removed_breakpoint): Delete.
9347 (status_pending_p): Rename to ...
9348 (status_pending_p_callback): ... this. Don't check for removed
9349 breakpoints. Don't consider threads that are stopped from GDB's
9350 perspective.
9351 (linux_wait_for_lwp): Always read the stop_pc here.
9352 (cancel_breakpoint): New.
9353 (step_over_bkpt): New global.
9354 (linux_wait_for_event_1): Implement stepping over breakpoints.
9355 (gdb_wants_lwp_stopped): New.
9356 (gdb_wants_all_stopped): New.
9357 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9358 single-step traps here. Store the thread's last reported target
9359 wait status.
9360 (send_sigstop): Don't clear stop_expected. Always set it,
9361 instead.
9362 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9363 (cancel_finished_single_step): New.
9364 (cancel_finished_single_steps): New.
9365 (wait_for_sigstop): Don't cancel finished single-step traps here.
9366 (linux_resume_one_lwp): Don't check for removed breakpoints.
9367 Don't set `step' on non-hardware step archs.
9368 (linux_set_resume_request): Ignore resume_stop requests if already
9369 stopping or stopped. Set the lwp's last_resume_kind.
9370 (resume_status_pending_p): Don't check for removed breakpoints.
9371 (need_step_over_p): New.
9372 (start_step_over): New.
9373 (finish_step_over): New.
9374 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9375 requests. Clear the thread's last reported target waitstatus.
9376 Don't use the `suspended' flag. Don't consider pending breakpoints.
9377 (linux_resume): Start a step-over if necessary.
9378 (proceed_one_lwp): New.
9379 (proceed_all_lwps): New.
9380 (unstop_all_lwps): New.
9381 * linux-low.h (struct lwp_info): Rewrite comment for the
9382 `suspended' flag. Add the `stop_pc' field. Delete the
9383 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9384 Add `'last_resume_kind' and `need_step_over' fields.
9385 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9386 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9387 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9388 (set_raw_breakpoint_at): New.
9389 (set_breakpoint_at): Rewrite to use it.
9390 (reinsert_breakpoint_handler): Delete.
9391 (set_reinsert_breakpoint): New.
9392 (reinsert_breakpoint_by_bp): Delete.
9393 (delete_reinsert_breakpoints): New.
9394 (uninsert_breakpoint): Rewrite.
9395 (uninsert_breakpoints_at): New.
9396 (reinsert_breakpoint): Rewrite.
9397 (reinsert_breakpoints_at): New.
9398 (check_breakpoints): Rewrite.
9399 (breakpoint_here): New.
9400 (breakpoint_inserted_here): New.
9401 (check_mem_read): Adjust.
9402 * mem-break.h (breakpoints_supported, breakpoint_here)
9403 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9404 (reinsert_breakpoint_by_bp): Delete declaration.
9405 (delete_reinsert_breakpoints): Declare.
9406 (reinsert_breakpoint): Delete declaration.
9407 (reinsert_breakpoints_at): Declare.
9408 (uninsert_breakpoint): Delete declaration.
9409 (uninsert_breakpoints_at): Declare.
9410 (check_breakpoints): Adjust prototype.
9411 * server.h: Adjust include order.
9412 (struct thread_info): Declare here. Add a `last_status' field.
9413
30ba68cb
MS
94142010-03-23 Michael Snyder <msnyder@vmware.com>
9415
9416 * server.c (crc32): New function.
9417 (handle_query): Add handling for 'qCRC:' request.
9418
b9a881c2
PA
94192010-03-23 Pedro Alves <pedro@codesourcery.com>
9420
9421 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9422 lwp had been stopped by a watchpoint.
9423
e92d13d5
PA
94242010-03-16 Pedro Alves <pedro@codesourcery.com>
9425
9426 * server.h (internal_error): Declare.
9427 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9428 * utils.c (internal_error): New function.
9429
64daa791
AS
94302010-03-15 Andreas Schwab <schwab@redhat.com>
9431
9432 * configure.srv: Fix typo setting srv_regobj.
9433
f52cd8cd
PA
94342010-03-15 Pedro Alves <pedro@codesourcery.com>
9435
9436 * linux-low.c (fetch_register): Avoid passing a non string literal
9437 format to `error'.
9438 (usr_store_inferior_registers): Ditto.
9439
93ae6fdc
PA
94402010-03-14 Pedro Alves <pedro@codesourcery.com>
9441
9442 * linux-low.c (linux_write_memory): Bail out early if peeking
9443 memory failed.
9444
c3adc08c
PA
94452010-03-14 Pedro Alves <pedro@codesourcery.com>
9446
9447 * linux-low.h (struct lwp_info): New fields
9448 `stopped_by_watchpoint' and `stopped_data_address'.
9449 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9450 here, and cache them in the lwp object.
9451 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9452 directly.
9453 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9454 field.
9455 (linux_stopped_by_watchpoint): Rewrite.
9456 (linux_stopped_data_address): Rewrite.
9457
bce522a2
PA
94582010-03-06 Simo Melenius <simo.melenius@iki.fi>
9459
9460 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9461 switching the current inferior, not before.
9462
90884b2b
L
94632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9464
9465 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9466 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9467 i386-linux.c and amd64-linux.c.
9468 (reg-i386.o): Removed.
9469 (reg-i386.c): Likewise.
9470 (reg-i386-linux.o): Likewise.
9471 (reg-i386-linux.c): Likewise.
9472 (reg-x86-64.o): Likewise.
9473 (reg-x86-64.c): Likewise.
9474 (reg-x86-64-linux.o): Likewise.
9475 (reg-x86-64-linux.c): Likewise.
9476 (i386.o): New.
9477 (i386.c): Likewise.
9478 (i386-linux.o): Likewise.
9479 (i386-linux.c): Likewise.
9480 (amd64.o): Likewise.
9481 (amd64.c): Likewise.
9482 (amd64-linux.o): Likewise.
9483 (amd64-linux.c): Likewise.
9484
9485 * configure.srv (srv_i386_regobj): New.
9486 (srv_i386_linux_regobj): Likewise.
9487 (srv_amd64_regobj): Likewise.
9488 (srv_amd64_linux_regobj): Likewise.
9489 (srv_i386_32bit_xmlfiles): Likewise.
9490 (srv_i386_64bit_xmlfiles): Likewise.
9491 (srv_i386_xmlfiles): Likewise.
9492 (srv_amd64_xmlfiles): Likewise.
9493 (srv_i386_linux_xmlfiles): Likewise.
9494 (srv_amd64_linux_xmlfiles): Likewise.
9495 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9496 srv_xmlfiles to $srv_i386_xmlfiles.
9497 (i[34567]86-*-mingw32ce*): Likewise.
9498 (i[34567]86-*-mingw*): Likewise.
9499 (i[34567]86-*-nto*): Likewise.
9500 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9501 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9502 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9503 (x86_64-*-linux*): Likewise.
9504
9505 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9506 (init_registers_amd64_linux): New.
9507 (x86_arch_setup): Replace init_registers_x86_64_linux with
9508 init_registers_amd64_linux.
9509
193f13e6
MK
95102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9511
9512 * configure.ac: Check for libdl. If it is not available link against
9513 static libthread_db.
9514 * configure: Regenerate.
9515
85d721b8
PA
95162010-02-22 Pedro Alves <pedro@codesourcery.com>
9517
9518 PR9605
9519
9520 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9521 handing a read watchpoint.
9522 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9523
6076632b
DE
95242010-02-12 Doug Evans <dje@google.com>
9525
9526 * linux-low.c (linux_supports_tracefork_flag): Document.
9527 (linux_look_up_symbols): Add comment.
9528
3327ccf7
L
95292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9530
9531 * regcache.c (supply_register): Clear regcache if buf is NULL.
9532
0718675c 95332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9534 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9535
9536 * inferiors.c (find_inferior): Add function documentation.
9537 (unloaded_dll): Handle the case where the unloaded dll has not
9538 been previously registered in the dll list.
9539
177321bd
DJ
95402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9541
9542 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9543 (thumb2_breakpoint): New.
9544 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9545
2b009048
DJ
95462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9549 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9550 breakpoints.
9551
3be029c7
PA
95522010-01-21 Pedro Alves <pedro@codesourcery.com>
9553
9554 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9555
18f5de3b
JK
95562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9557
9558 * linux-s390-low.c (s390_collect_ptrace_register)
9559 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9560
3743bb4f
DE
95612010-01-21 Doug Evans <dje@google.com>
9562
14ce3065
DE
9563 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9564 (PTRACE_ARG4_TYPE): New macro.
9565 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9566 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9567 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9568 (usr_store_inferior_registers): Ditto.
9569 (linux_read_memory, linux_write_memory): Ditto.
9570 (linux_test_for_tracefork): Ditto.
9571
3743bb4f
DE
9572 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9573 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9574
8b315be5
PA
95752010-01-21 Pedro Alves <pedro@codesourcery.com>
9576
9577 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9578 target.
9579
85492558
PA
95802010-01-21 Pedro Alves <pedro@codesourcery.com>
9581
9582 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9583 prototype to take a regcache. Adjust.
9584
442ea881
PA
95852010-01-20 Pedro Alves <pedro@codesourcery.com>
9586
9587 * regcache.h (struct thread_info): Forward declare.
9588 (struct regcache): New.
9589 (new_register_cache): Adjust prototype.
9590 (get_thread_regcache): Declare.
9591 (free_register_cache): Adjust prototype.
9592 (registers_to_string, registers_from_string): Ditto.
9593 (supply_register, supply_register_by_name, collect_register)
9594 (collect_register_as_string, collect_register_by_name): Ditto.
9595 * regcache.c (struct inferior_regcache_data): Delete.
9596 (get_regcache): Rename to ...
9597 (get_thread_regcache): ... this. Adjust. Switch inferior before
9598 fetching registers.
9599 (regcache_invalidate_one): Adjust.
9600 (regcache_invalidate): Fix prototype.
9601 (new_register_cache): Return the new register cache.
9602 (free_register_cache): Change prototype.
9603 (realloc_register_cache): Adjust.
9604 (registers_to_string): Change prototype to take a regcache. Adjust.
9605 (registers_from_string): Ditto.
9606 (register_data): Ditto.
9607 (supply_register): Ditto.
9608 (supply_register_by_name): Ditto.
9609 (collect_register): Ditto.
9610 (collect_register_as_string): Ditto.
9611 (collect_register_by_name): Ditto.
9612 * server.c (process_serial_event): Adjust.
9613 * linux-low.h (regset_fill_func, regset_store_func): Change
9614 prototype.
9615 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9616 Change prototype.
9617 * linux-low.c (get_stop_pc): Adjust.
9618 (check_removed_breakpoint): Adjust.
9619 (linux_wait_for_event): Adjust.
9620 (linux_resume_one_lwp): Adjust.
9621 (fetch_register): Add regcache parameter. Adjust.
9622 (usr_store_inferior_registers): Ditto.
9623 (regsets_fetch_inferior_registers): Ditto.
9624 (regsets_store_inferior_registers): Ditto.
9625 (linux_fetch_registers, linux_store_registers): Ditto.
9626 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9627 regcache. Adjust.
43aaf8b6
PA
9628 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9629 Ditto.
442ea881
PA
9630 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9631 prototype to take a regcache.
9632 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9633 * remote-utils.c (convert_ascii_to_int, outreg)
9634 (prepare_resume_reply): Change prototype to take a regcache.
9635 Adjust.
9636 * target.h (struct target_ops) <fetch_registers, store_registers>:
9637 Change prototype to take a regcache.
9638 (fetch_inferior_registers, store_inferior_registers): Change
9639 prototype to take a regcache. Adjust.
9640 * proc-service.c (ps_lgetregs): Adjust.
9641 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9642 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9643 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9644 take a regcache. Adjust.
9645 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9646 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9647 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9648 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9649 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9650 (cris_cannot_fetch_register):
9651 (cris_breakpoint_at): Change prototype to take a regcache.
9652 Adjust.
9653 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9654 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9655 to take a regcache. Adjust.
9656 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9657 Adjust.
9658 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9659 take a regcache. Adjust.
9660 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9661 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9662 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9663 * linux-mips-low.c (mips_get_pc):
9664 (mips_set_pc): Change prototype to take a regcache. Adjust.
9665 (mips_reinsert_addr): Adjust.
9666 (mips_collect_register): Change prototype to take a regcache.
9667 Adjust.
9668 (mips_supply_register):
9669 (mips_collect_register_32bit, mips_supply_register_32bit)
9670 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9671 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9672 * linux-ppc-low.c (ppc_supply_ptrace_register)
9673 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9674 (parse_spufs_run): Adjust.
9675 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9676 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9677 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9678 take a regcache. Adjust.
9679 * linux-s390-low.c (s390_collect_ptrace_register)
9680 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9681 (s390_set_pc): Change prototype to take a regcache. Adjust.
9682 (s390_arch_setup): Adjust.
9683 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9684 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9685 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9686 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9687 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9688 regcache. Adjust.
9689 (sparc_breakpoint_at): Adjust.
9690 * linux-xtensa-low.c (xtensa_fill_gregset):
9691 (xtensa_store_gregset):
9692 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9693 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9694 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9695 prototype to take a regcache. Adjust.
9696 * win32-arm-low.c (arm_fetch_inferior_register)
9697 (arm_store_inferior_register): Change prototype to take a
9698 regcache. Adjust.
9699 * win32-i386-low.c (i386_fetch_inferior_register)
9700 (i386_store_inferior_register): Change prototype to take a
9701 regcache. Adjust.
9702 * win32-low.c (child_fetch_inferior_registers)
9703 (child_store_inferior_registers): Change prototype to take a
9704 regcache. Adjust.
9705 (win32_wait): Adjust.
9706 (win32_fetch_inferior_registers): Change prototype to take a
9707 regcache. Adjust.
9708 (win32_store_inferior_registers): Adjust.
9709 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9710 store_inferior_register>: Change prototype to take a regcache.
9711
60c3d7b0
DE
97122010-01-20 Doug Evans <dje@google.com>
9713
9714 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9715 #ifdef.
9716 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9717 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9718
dc146f7c
VP
97192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9720
9721 * linux-low.c (linux_core_of_thread): New.
9722 (compare_ints, show_process, list_threads): New.
9723 (linux_qxfer_osdata): Report threads and cores.
9724 (linux_target_op): Register linux_core_of_thread.
9725 * remote-utils.c (prepare_resume_reply): Report the core.
9726 (buffer_xml_printf): Support %d specifier.
9727 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9728 New.
9729 (handle_query): Handle qXfer:threads. Announce availability
9730 thereof.
9731 * target.h (struct target_ops): New field core_of_thread.
9732
7803799a
UW
97332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9734
9735 * Makefile.in (clean): Remove new generated files.
9736 (reg-s390.o, reg-s390.c): Remove rules.
9737 (reg-s390x.o, reg-s390x.c): Likewise.
9738 (s390-linux32.o, s390-linux32.c): Add rules.
9739 (s390-linux64.o, s390-linux64.c): Likewise.
9740 (s390x-linux64.o, s390x-linux64.c): Likewise.
9741 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9742 * linux-s390-low.c: Include <elf.h>.
9743 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9744 (init_registers_s390): Remove prototype.
9745 (init_registers_s390x): Likewise.
9746 (init_registers_s390_linux32): Add prototype.
9747 (init_registers_s390_linux64): Likewise.
9748 (init_registers_s390x_linux64): Likewise.
9749 (s390_num_regs_3264): New define.
9750 (s390_regmap_3264): New global variable.
9751 (s390_cannot_fetch_register): Remove obsolete check.
9752 (s390_cannot_store_register): Likewise.
9753 (s390_collect_ptrace_register): Handle upper/lower register halves.
9754 (s390_supply_ptrace_register): Likewise.
9755 (s390_fill_gregset): Update to register number changes.
9756 (s390_get_hwcap): New routine.
9757 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9758 Install appropriate regmap and register set.
9759
6e7ffa39
JB
97602010-01-01 Joel Brobecker <brobecker@adacore.com>
9761
9762 * server.c (gdbserver_version): Update copyright year to 2010.
9763 * gdbreplay.c (gdbreplay_version): Likewise.
9764
957f3f49
DE
97652009-12-28 Doug Evans <dje@google.com>
9766
9767 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9768 elf/external.h. Include <elf.h> instead but only if necessary.
9769
ca5c370d
PA
97702009-12-28 Pedro Alves <pedro@codesourcery.com>
9771
9772 * linux-low.c (linux_remove_process): Remove `detaching'
9773 parameter. Don't release/detach from thread_db here.
9774 (linux_kill): Release/detach from thread_db here, ...
9775 (linux_detach): ... and here, before actually detaching.
9776 (linux_wait_1): ... and here, when a process exits.
9777 * thread-db.c (any_thread_of): New.
9778 (thread_db_free): Switch the current inferior to a thread of the
9779 passed in process.
9780
4ee62156
DE
97812009-12-21 Doug Evans <dje@google.com>
9782
d90e6a88
DE
9783 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9784
c5f62d5f
DE
9785 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9786 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9787 warning ifndef __NR_tkill. Move setting of errno there too.
9788 Delete unnecessary resetting of errno after syscall.
9789 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9790
10e86dd7
DE
9791 * configure.ac: Check for dladdr.
9792 * config.in: Regenerate.
9793 * configure: Regenerate.
9794 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9795 (try_thread_db_load): Update.
9796
4ee62156
DE
9797 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9798
00f515da
DE
97992009-12-18 Doug Evans <dje@google.com>
9800
e9464885
DE
9801 * event-loop.c: Include unistd.h if it exists.
9802
07d4f67e
DE
9803 * linux-low.c (my_waitpid): Move definition away from being in
9804 between linux_tracefork_child/linux_test_for_tracefork.
9805
00f515da
DE
9806 * gdb_proc_service.h (psaddr_t): Fix type.
9807 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9808 signature to match glibc.
9809
1de1badb
DE
98102009-12-16 Doug Evans <dje@google.com>
9811
9812 * linux-low.c (linux_read_memory): Fix argument to read.
9813
aeeb81d1
PA
98142009-11-26 Pedro Alves <pedro@codesourcery.com>
9815
9816 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9817 events, don't leave current_inferior pointing at null.
9818
10357975
PA
98192009-11-26 Pedro Alves <pedro@codesourcery.com>
9820
9821 * win32-low.c (LOG): Delete.
9822 (OUTMSG): Output to stderr.
9823 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9824 on compile time LOG macro.
9825 (win32_wait): Fix debug output.
9826
cf6e3471
PA
98272009-11-26 Pedro Alves <pedro@codesourcery.com>
9828
9829 * win32-low.c (win32_add_one_solib): If the dll name is
9830 "ntdll.dll", prepend the system directory to the dll path.
9831
0c85e18e
MK
98322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9835
9ac544ce 98362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9837 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9838
9839 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9840 * configure.ac: Check for __mcoldfire__ and set
9841 gdb_cv_m68k_is_coldfire.
9842 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9843 reg-cf.o and reg-m68k.o.
9844 * configure: Regenerated.
9845
fd7dd3e6
PA
98462009-11-16 Pedro Alves <pedro@codesourcery.com>
9847
9848 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9849 Pass it to thread_db_free.
9850 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9851 proper `detaching' argument to linux_remove_process.
9852 * linux-low.h (thread_db_free): Add `detaching' parameter.
9853 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9854 to thread_db_free.
9855 (thread_db_free): Add `detaching' parameter. Only
9856 call td_ta_clear_event if detaching from process.
9857
75aa492e
MK
98582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9859
9860 * thread-db.c (thread_db_free): Fix typo.
9861
21e1bee4
PP
98622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9863
9864 PR gdb/10838
9865 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9866
8838b45e
NS
98672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9868
9869 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9870 with an i686 compiler.
9871 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9872 needed.
9873 * configure: Rebuilt.
9874
8a35fb51
SL
98752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9876
9877 PR gdb/10783
9878
9879 * server.c (handle_search_memory_1): Correct read_addr initialization
9880 in loop for searching subsequent chunks.
9881
96f15937
PP
98822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9883
9884 * configure.ac: New --with-libthread-db option.
9885 * thread-db.c: Allow direct dependence on libthread_db.
9886 (thread_db_free): Adjust.
9887 * config.in: Regenerate.
9888 * configure: Likewise.
889bf7c5 9889
5f7d1694
PP
98902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9891
9892 PR gdb/10757
9893 * thread-db.c (attach_thread): New function.
9894 (maybe_attach_thread): Return success/failure.
9895 (find_new_threads_callback): Adjust.
889bf7c5
PA
9896 (thread_db_find_new_threads): Loop until no new threads.
9897
88e3b899
PA
98982009-10-13 Pedro Alves <pedro@codesourcery.com>
9899
9900 * proc-service.c (ps_lgetregs): Formatting.
9901
cdbfd419
PP
99022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9903
9904 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9905 * configure.ac: Adjust.
9906 * linux-low.h (struct process_info_private): Move members to struct
9907 thread_db.
9908 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9909 * linux-low.c (linux_remove_process): Adjust.
9910 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9911 * server.c (handle_query): Move code ...
9912 (handle_monitor_command): ... here. New function.
9913 * target.h (struct target_ops): New member.
9914 * thread-db.c (struct thread_db): New.
9915 (libthread_db_search_path): New variable.
9916 (thread_db_create_event, thread_db_enable_reporting)
9917 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9918 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9919 (try_thread_db_load_1, dladdr_to_soname): New functions.
9920 (try_thread_db_load, thread_db_load_search): New functions.
9921 (thread_db_init): Search for libthread_db.
9922 (thread_db_free): New function.
9923 (thread_db_handle_monitor_command): Likewise.
9924 * config.in: Regenerate.
9925 * configure: Regenerate.
889bf7c5 9926
4168d2d6
UW
99272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9928
9929 * spu-low.c (spu_kill): Wait for inferior to terminate.
9930 Call clear_inferiors.
9931 (spu_detach): Call clear_inferiors.
9932
81ecdfbb
RW
99332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9934
9935 * aclocal.m4: Regenerate.
9936 * config.in: Likewise.
9937 * configure: Likewise.
9938
0b9ff2c0
UW
99392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9940
9941 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9942 (parse_spufs_run): New function.
9943 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9944 (ppc_breakpoint_at): Handle SPU breakpoints.
9945
efcbbd14
UW
99462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9947
9948 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9949 (SPUFS_MAGIC): Define.
9950 (spu_enumerate_spu_ids): New function.
9951 (linux_qxfer_spu): New function.
9952 (linux_target_ops): Install linux_qxfer_spu.
9953
f4d9bade
UW
99542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9955
9956 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9957 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9958 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9959 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9960 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9961 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9962 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9963 (init_registers_powerpc_cell32l): Add prototype.
9964 (init_registers_powerpc_cell64l): Likewise.
9965 (ppc_arch_setup): Detect Cell/B.E. architecture.
9966
96e946ca
RW
99672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9968
9969 * Makefile.in (datarootdir): New variable.
9970
58d6951d
DJ
99712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * linux-low.c (linux_write_memory): Update debugging output.
9974 * Makefile.in (clean): Add new descriptions.
9975 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9976 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9977 * configure.srv: Add new files for arm*-*-linux*.
9978 * linux-arm-low.c: Add new declarations.
9979 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9980 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9981 (HWCAP_VFPv3D16): New.
9982 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9983 instead of __IWMMXT__.
9984 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9985 (arm_arch_setup): New.
9986 (target_regsets): Remove #ifdef. Add VFP regset.
9987 (the_low_target): Use arm_arch_setup.
9988
12b42a12
DJ
99892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9992 the main thread again.
9993
ac8c974e
AR
99942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9995
9996 Adding Neutrino gdbserver.
9997 * configure: Regenerated.
9998 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9999 * configure.srv (i[34567]86-*-nto*): New target.
10000 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10001 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10002 (nto_comctrl) [__QNX__]: New function.
10003 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10004
4424e0c3 100052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10006
10007 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10008 srv_tgtobj.
10009
912cf4ba
PA
100102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10011 Pedro Alves <pedro@codesourcery.com>
10012
10013 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10014 don't support CONTEXT_EXTENDED_REGISTERS.
10015 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10016 (the_low_target): Install them.
10017 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10018 failing with ERROR_PIPE_NOT_CONNECTED.
10019
aa5ca48f
DE
100202009-06-30 Doug Evans <dje@google.com>
10021 Pierre Muller <muller@ics.u-strasbg.fr>
10022
10023 Add h/w watchpoint support to x86-linux, win32-i386.
10024 * Makefile.in (SFILES): Add i386-low.c
10025 (i386_low_h): Define.
10026 (i386-low.o): Add dependencies.
10027 (linux-x86-low.o): Add i386-low.h dependency.
10028 (win32-i386-low.o): Ditto.
10029 * i386-low.c: New file.
10030 * i386-low.h: New file.
10031 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10032 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10033 * linux-low.c (linux_add_process): Initialize arch_private.
10034 (linux_remove_process): Free arch_private.
10035 (add_lwp): Initialize arch_private.
10036 (delete_lwp): Free arch_private.
10037 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10038 provided.
10039 * linux-low.h (process_info_private): New member arch_private.
10040 (lwp_info): New member arch_private.
10041 (linux_target_ops): New members new_process, new_thread,
10042 prepare_to_resume.
10043 (ptid_of): New macro.
10044 * linux-x86-low.c: Include stddef.h, i386-low.h.
10045 (arch_process_info): New struct.
10046 (arch_lwp_info): New struct.
10047 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10048 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10049 (i386_dr_low_get_status): New function.
10050 (x86_insert_point, x86_remove_point): New functions.
10051 (x86_stopped_by_watchpoint): New function.
10052 (x86_stopped_data_address): New function.
10053 (x86_linux_new_process, x86_linux_new_thread): New functions.
10054 (x86_linux_prepare_to_resume): New function.
10055 (the_low_target): Add entries for insert_point, remove_point,
10056 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10057 prepare_to_resume.
10058 * server.c (debug_hw_points): New global.
10059 (monitor_show_help): Document set debug-hw-points.
10060 (handle_query): Process "set debug-hw-points".
10061 * server.h (debug_hw_points): Declare.
10062 (paddress): Declare.
10063 * utils.c (NUMCELLS, CELLSIZE): New macros.
10064 (get_sell, xsnprintf, paddress): New functions.
10065 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10066 remove_point, stopped_by_watchpoint, stopped_data_address.
10067 * win32-i386-low.c: Include i386-low.h.
10068 (debug_reg_state): Replaces dr.
10069 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10070 (i386_dr_low_get_status): New function.
10071 (i386_insert_point, i386_remove_point): New functions.
10072 (i386_stopped_by_watchpoint): New function.
10073 (i386_stopped_data_address): New function.
10074 (i386_initial_stuff): Update.
10075 (get_thread_context,set_thread_context,i386_thread_added): Update.
10076 (the_low_target): Add entries for insert_point,
10077 remove_point, stopped_by_watchpoint, stopped_data_address.
10078 * win32-low.c (win32_insert_watchpoint): New function.
10079 (win32_remove_watchpoint): New function.
10080 (win32_stopped_by_watchpoint): New function.
10081 (win32_stopped_data_address): New function.
10082 (win32_target_ops): Add entries for insert_watchpoint,
10083 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10084 * win32-low.h (win32_target_ops): New members insert_point,
10085 remove_point, stopped_by_watchpoint, stopped_data_address.
10086
d993e290
PA
100872009-06-25 Pedro Alves <pedro@codesourcery.com>
10088
10089 * server.c (process_serial_event): Re-return unsupported, not
10090 error, if the type isn't recognized. Re-allow supporting only
10091 insert or remove packets. Also call require_running for
10092 breakpoints. Add missing break statement to default case. Tidy.
10093 * target.h (struct target_ops): Rename insert_watchpoint to
10094 insert_point, and remove_watchpoint to remove_point.
10095
10096 * linux-low.h (struct linux_target_ops): Likewise.
10097 * linux-low.c (linux_insert_watchpoint): Rename to ...
10098 (linux_insert_point): ... this. Adjust.
10099 (linux_remove_watchpoint): Rename to ...
10100 (linux_remove_point): ... this. Adjust.
10101 (linux_target_ops): Adjust.
10102 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10103 (cris_insert_point): ... this.
10104 (cris_remove_watchpoint): Rename to ...
10105 (cris_remove_point): ... this.
10106 (the_low_target): Adjust.
10107
0f54c268
PM
101082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10109
10110 * server.c (handle_v_kill): Pass signal_pid to
10111 kill_inferior if multi_process is zero.
10112
c6314022
AR
101132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10114
10115 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10116 * target.h (target_ops): Comment for *_watchpoint to make it clear
10117 the functions can get types '0' and '1'.
10118
4463ce24
AR
101192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10120
10121 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10122 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10123 * regcache.c (get_regcache): Likewise.
10124 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10125 * win32-low.c (child_fetch_inferior_registers): Remove check for
10126 regno 0.
10127
cf8fd78b
PA
101282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10129 Pedro Alves <pedro@codesourcery.com>
10130
10131 * target.h (struct target_ops) <supports_multi_process>: New
10132 callback.
10133 (target_supports_multi_process): New.
10134 * server.c (handle_query): Even if GDB reports support, only
10135 enable multi-process if the target also supports it. Report
10136 multi-process support only if the target backend supports it.
10137 * linux-low.c (linux_supports_multi_process): New function.
10138 (linux_target_ops): Install it as target_supports_multi_process
10139 callback.
10140
47c0c975
DE
101412009-05-24 Doug Evans <dje@google.com>
10142
e09875d4
DE
10143 Global renaming of find_thread_pid to find_thread_ptid.
10144 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10145 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10146 All callers updated.
10147
e27d73f6
DE
10148 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10149 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10150 directly.
10151
47c0c975
DE
10152 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10153 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10154 (linux_resume_one_lwp): Ditto.
10155
2acc282a
DE
101562009-05-23 Doug Evans <dje@google.com>
10157
10158 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10159 from struct inferior_list_entry * to struct lwp_info *.
10160 All callers updated.
10161
9f1036c1
DE
101622009-05-13 Doug Evans <dje@google.com>
10163
10164 * linux-x86-low.c: Don't include assert.h.
10165 (x86_siginfo_fixup): Use fatal, not assert.
10166 (x86_arch_setup): Fix comment.
10167
d0722149
DE
101682009-05-12 Doug Evans <dje@google.com>
10169
10170 Biarch support for i386/amd64 gdbserver.
10171 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10172 Add linux-x86-low.c.
10173 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10174 (linux-x86-low.o): Add.
10175 * linux-x86-64-low.c: Delete.
10176 * linux-i386-low.c: Delete.
10177 * linux-x86-low.c: New file.
10178 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10179 linux-x86-low.o.
10180 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10181 linux-x86-low.o.
10182 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10183 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10184 (linux_child_pid_to_exec_file): New function.
10185 (elf_64_header_p, elf_64_file_p): New functions.
10186 (siginfo_fixup): New function.
10187 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10188 give target a chance to convert layout.
10189 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10190 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10191
fdeb2a12
DE
101922009-05-07 Doug Evans <dje@google.com>
10193
10194 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10195 (regsets_store_inferior_registers): Ditto.
10196
a6dbe5df
PA
101972009-05-06 Pedro Alves <pedro@codesourcery.com>
10198
10199 PR server/10048
10200
10201 * linux-low.c (must_set_ptrace_flags): Delete.
10202 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10203 of the global.
10204 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10205 `lwp->must_set_ptrace_flags' instead.
ba42693b 10206 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10207 (linux_wait_1): ... not here.
10208
5091eb23
DE
102092009-04-30 Doug Evans <dje@google.com>
10210
9f767825
DE
10211 * inferiors.c (started_inferior_callback): New function.
10212 (attached_inferior_callback): New function.
10213 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10214 * server.c (print_started_pid, print_attached_pid): New functions.
10215 (detach_or_kill_for_exit): New function.
10216 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10217 * server.h (have_started_inferiors_p): Declare.
10218 (have_attached_inferiors_p): Declare.
10219
5091eb23
DE
10220 * inferiors.c (remove_process): Fix memory leak, free process.
10221 * linux-low.c (linux_remove_process): New function.
10222 (linux_kill): Call it instead of remove_process.
10223 (linux_detach, linux_wait_1): Ditto.
10224
155c8968
PA
102252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10226
10227 * configure.srv: Add x86 Windows CE target.
10228
7fe519cb
UW
102292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10230
10231 * inferiors.c (get_thread_process): Make global.
10232 * server.h (get_thread_process): Add prototype.
10233 * thread-db.c (find_one_thread): Use get_thread_process
10234 instead of current_process.
10235 (thread_db_get_tls_address): Do not crash if called when
10236 thread layer is not yet initialized.
10237
5472f405
UW
102382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10239
10240 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10241 * spu-low.c (current_tid): Rename to ...
10242 (current_ptid): ... this.
10243 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10244 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10245 ptid_get_lwp (current_ptid) instead of current_tid.
10246 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10247 instead of current_tid. Use find_process_pid to verify pid
10248 argument is valid. Pass proper argument to remove_process.
10249 (spu_thread_alive): Compare current_ptid instead of current_tid.
10250 (spu_resume): Likewise.
10251
55ac2b99
PA
102522009-04-02 Pedro Alves <pedro@codesourcery.com>
10253
10254 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10255 variable.
10256
95954743
PA
102572009-04-01 Pedro Alves <pedro@codesourcery.com>
10258
10259 Implement the multiprocess extensions, and add linux multiprocess
10260 support.
10261
10262 * server.h (ULONGEST): Declare.
10263 (struct ptid, ptid_t): New.
10264 (minus_one_ptid, null_ptid): Declare.
10265 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10266 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10267 (struct inferior_list_entry): Change `id' type from unsigned from
10268 to ptid_t.
10269 (struct sym_cache, struct breakpoint, struct
10270 process_info_private): Forward declare.
10271 (struct process_info): Declare.
10272 (current_process): Declare.
10273 (all_processes): Declare.
10274 (initialize_inferiors): Declare.
10275 (add_thread): Adjust to use ptid_t.
10276 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10277 (add_process, remove_process, find_thread_pid): Declare.
10278 (find_inferior_id): Adjust to use ptid_t.
10279 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10280 (multi_process): Declare.
10281 (push_event): Adjust to use ptid_t.
10282 (read_ptid, write_ptid): Declare.
10283 (prepare_resume_reply): Adjust to use ptid_t.
10284 (clear_symbol_cache): Declare.
10285 * inferiors.c (all_processes): New.
10286 (null_ptid, minus_one_ptid): New.
10287 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10288 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10289 (add_thread): Change unsigned long to ptid. Remove gdb_id
10290 parameter. Adjust.
10291 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10292 (gdb_id_to_thread): Rename to ...
10293 (find_thread_pid): ... this. Change unsigned long to ptid.
10294 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10295 (loaded_dll, pull_pid_from_list): Adjust.
10296 (add_process, remove_process, find_process_pid)
10297 (get_thread_process, current_process, initialize_inferiors): New.
10298 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10299 (struct target_waitstatus) <related_pid>: Ditto.
10300 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10301 return type to int.
10302 (struct target_ops) <join>: Add `pid' argument.
10303 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10304 (struct target_ops) <wait>: Add `ptid' field. Change return type
10305 to ptid.
10306 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10307 (mywait): Add `ptid' argument. Change return type to ptid_t.
10308 (target_pid_to_str): Declare.
10309 * target.c (set_desired_inferior): Adjust to use ptids.
10310 (mywait): Add new `ptid' argument. Adjust.
10311 (target_pid_to_str): New.
10312 * mem-break.h (free_all_breakpoints): Declare.
10313 * mem-break.c (breakpoints): Delelete.
10314 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10315 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10316 to use per-process breakpoint list.
10317 (free_all_breakpoints): New.
10318 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10319 (symbol_cache, all_symbols_looked_up): Delete.
10320 (hexchars): New.
10321 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10322 read_ptid): New.
10323 (prepare_resume_reply): Change ptid argument's type from unsigned
10324 long to ptid_t. Adjust. Implement W;process and X;process.
10325 (free_sym_cache, clear_symbol_cache): New.
10326 (look_up_one_symbol): Adjust to per-process symbol cache. *
10327 * server.c (cont_thread, general_thread, step_thread): Change type
10328 to ptid_t.
10329 (attached): Delete.
10330 (multi_process): New.
10331 (last_ptid): Change type to ptid_t.
10332 (struct vstop_notif) <ptid>: Change type to ptid_t.
10333 (queue_stop_reply, push_event): Change `ptid' argument's type to
10334 ptid_t.
10335 (discard_queued_stop_replies): Add `pid' argument.
10336 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10337 changes. Don't reference the `attached' global.
10338 (attach_inferior): Adjust to mywait interface changes.
10339 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10340 features. Handle and report "multiprocess+". Handle
10341 "qAttached:PID".
10342 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10343 changes.
10344 (handle_v_kill): New.
10345 (handle_v_stopped): Adjust to use target_pid_to_str.
10346 (handle_v_requests): Allow multiple attaches and runs when
10347 multiprocess extensions are in effect. Handle "vKill".
10348 (myresume): Adjust to use ptids.
10349 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10350 (handle_status): Adjust to discard_queued_stop_replies interface
10351 change.
10352 (first_thread_of, kill_inferior_callback)
10353 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10354 (main): Call initialize_inferiors. Adjust to use ptids, killing
10355 and detaching from all inferiors. Handle multiprocess packet
10356 variants.
10357 * linux-low.h: Include gdb_proc_service.h.
10358 (struct process_info_private): New.
10359 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10360 <lwpid_of>: Use ptid_get_lwp.
10361 (get_lwp_thread): Adjust.
10362 (struct lwp_info): Add `dead' member.
10363 (find_lwp_pid): Declare.
10364 * linux-low.c (thread_db_active): Delete.
10365 (new_inferior): Adjust comment.
10366 (inferior_pid): Delete.
10367 (linux_add_process): New.
10368 (handle_extended_wait): Adjust.
10369 (add_lwp): Change unsigned long to ptid.
10370 (linux_create_inferior): Add process to processes table. Adjust
10371 to use ptids. Don't set new_inferior here.
10372 (linux_attach_lwp): Rename to ...
10373 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10374 it. Adjust to use ptids.
10375 (linux_attach_lwp): New.
10376 (linux_attach): Add process to processes table. Don't set
10377 new_inferior here.
10378 (struct counter): New.
10379 (second_thread_of_pid_p, last_thread_of_process_p): New.
10380 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10381 multiple processes.
10382 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10383 processes. Remove process from process table.
10384 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10385 to multiple processes.
10386 (any_thread_of): New.
10387 (linux_detach): Add `pid' argument, and handle it. Remove process
10388 from processes table.
10389 (linux_join): Add `pid' argument. Handle it.
10390 (linux_thread_alive): Change unsighed long argument to ptid_t.
10391 Consider dead lwps as not being alive.
10392 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10393 threads we're not interested in.
10394 (same_lwp, find_lwp_pid): New.
10395 (linux_wait_for_lwp): Change `pid' argument's type from int to
10396 ptid_t. Adjust.
10397 (linux_wait_for_event): Rename to ...
10398 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10399 from int to ptid_t. Adjust.
10400 (linux_wait_for_event): New.
10401 (linux_wait_1): Add `ptid' argument. Change return type to
10402 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10403 that exit from the process table.
10404 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10405 Adjust.
10406 (mark_lwp_dead): New.
10407 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10408 stopping all threads, mark its main lwp as dead.
10409 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10410 ptids.
10411 (fetch_register, usr_store_inferior_registers)
10412 (regsets_fetch_inferior_registers)
10413 (regsets_store_inferior_registers, linux_read_memory)
10414 (linux_write_memory): Inline `inferior_pid'.
10415 (linux_look_up_symbols): Adjust to use per-process
10416 `thread_db_active'.
10417 (linux_request_interrupt): Adjust to use ptids.
10418 (linux_read_auxv): Inline `inferior_pid'.
10419 (initialize_low): Don't reference thread_db_active.
10420 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10421 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10422 (ps_getpid): Return the pid of the current inferior.
10423 * thread-db.c (proc_handle, thread_agent): Delete.
10424 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10425 per-process data.
10426 (find_one_thread): Change argument type to ptid_t. Adjust to
10427 per-process data.
10428 (maybe_attach_thread): Adjust to per-process data and ptids.
10429 (thread_db_find_new_threads): Ditto.
10430 (thread_db_init): Ditto.
10431 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10432 processes table. Adjust to use ptids.
10433 (spu_kill, spu_detach): Adjust interface. Remove process from
10434 processes table.
10435 (spu_join, spu_thread_alive): Adjust interface.
10436 (spu_wait): Adjust interface. Remove process from processes
10437 table. Adjust to use ptids.
10438 * win32-low.c (current_inferior_tid): Delete.
10439 (current_inferior_ptid): New.
10440 (debug_event_ptid): New.
10441 (thread_rec): Take a ptid. Adjust.
10442 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10443 (child_delete_thread): Ditto.
10444 (do_initial_child_stuff): Add `attached' argument. Add process to
10445 processes table.
10446 (child_fetch_inferior_registers, child_store_inferior_registers):
10447 Adjust.
10448 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10449 (win32_attach): Pass 1 to do_initial_child_stuff.
10450 (win32_kill): Adjust interface. Remove process from processes
10451 table.
10452 (win32_detach): Ditto.
10453 (win32_join): Adjust interface.
10454 (win32_thread_alive): Take a ptid.
10455 (win32_resume): Adjust to use ptids.
10456 (get_child_debug_event): Ditto.
10457 (win32_wait): Adjust interface. Remove exiting process from
10458 processes table.
10459
bd99dc85
PA
104602009-04-01 Pedro Alves <pedro@codesourcery.com>
10461
10462 Non-stop mode support.
10463
10464 * server.h (non_stop): Declare.
10465 (gdb_client_data, handler_func): Declare.
10466 (delete_file_handler, add_file_handler, start_event_loop):
10467 Declare.
10468 (handle_serial_event, handle_target_event, push_event)
10469 (putpkt_notif): Declare.
10470 * target.h (enum resume_kind): New.
10471 (struct thread_resume): Replace `step' field by `kind' field.
10472 (TARGET_WNOHANG): Define.
10473 (struct target_ops) <wait>: Add `options' argument.
10474 <supports_non_stop, async, start_non_stop>: New fields.
10475 (target_supports_non_stop, target_async): New.
10476 (start_non_stop): Declare.
10477 (mywait): Add `options' argument.
10478 * target.c (mywait): Add `options' argument. Print child exit
10479 notifications here.
10480 (start_non_stop): New.
10481 * server.c (non_stop, own_buf, mem_buf): New globals.
10482 (struct vstop_notif): New.
10483 (notif_queue): New global.
10484 (queue_stop_reply, push_event, discard_queued_stop_replies)
10485 (send_next_stop_reply): New.
10486 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10487 interface changes.
10488 (attach_inferior): In non-stop mode, don't wait for the target
10489 here.
10490 (handle_general_set): Handle QNonStop.
10491 (handle_query): When handling qC, return the current general
10492 thread, instead of the first thread of the list.
10493 (handle_query): If the backend supports non-stop mode, include
10494 QNonStop+ in the qSupported query response.
10495 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10496 and non-stop mode.
10497 (handle_v_attach, handle_v_run): Handle non-stop mode.
10498 (handle_v_stopped): New.
10499 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10500 (myresume): Adjust to use resume_kind. Handle non-stop.
10501 (queue_stop_reply_callback): New.
10502 (handle_status): Handle non-stop mode.
10503 (main): Clear non_stop flag on reconnection. Use the event-loop.
10504 Refactor serial protocol handling from here ...
10505 (process_serial_event): ... to this new function. When GDB
10506 selects any thread, select one here. In non-stop mode, wait until
10507 GDB acks all pending events before exiting.
10508 (handle_serial_event, handle_target_event): New.
10509 * remote-utils.c (remote_open): Install remote_desc in the event
10510 loop.
10511 (remote_close): Remove remote_desc from the event loop.
10512 (putpkt_binary): Rename to...
10513 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10514 (putpkt_binary): New as wrapper around putpkt_binary_1.
10515 (putpkt_notif): New.
10516 (prepare_resume_reply): In non-stop mode, don't change the
10517 general_thread.
10518 * event-loop.c: New.
10519 * Makefile.in (OBJ): Add event-loop.o.
10520 (event-loop.o): New rule.
10521
10522 * linux-low.h (pid_of): Moved here.
10523 (lwpid_of): New.
10524 (get_lwp_thread): Use lwpid_of.
10525 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10526 * linux-low.c (pid_of): Delete.
10527 (inferior_pid): Use lwpid_of.
10528 (linux_event_pipe): New.
10529 (target_is_async_p): New.
10530 (delete_lwp): New.
10531 (handle_extended_wait): Use lwpid_of.
10532 (add_lwp): Don't set lwpid field.
10533 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10534 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10535 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10536 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10537 first. Adjust to linux_wait_for_event interface changes. Use
10538 lwpid_of.
10539 (linux_detach): Don't delete the main lwp here.
10540 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10541 (status_pending_p): Don't consider explicitly suspended lwps.
10542 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10543 pointer. Add OPTIONS argument. Change return type to int. Use
10544 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10545 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10546 pointer. Add status pointer argument. Return a pid instead of a
10547 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10548 changes. In non-stop mode, don't switch to a random thread.
10549 (linux_wait): Rename to...
10550 (linux_wait_1): ... this. Add target_options argument, and handle
10551 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10552 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10553 clean exit and signal exit code. Don't stop all threads in
10554 non-stop mode. In all-stop mode, only stop all threads when
10555 reporting a stop to GDB. Handle explicit thread stop requests.
10556 (async_file_flush, async_file_mark): New.
10557 (linux_wait): New.
10558 (send_sigstop): Use lwpid_of.
10559 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10560 interface changes. In non-stop mode, don't switch to a random
10561 thread.
10562 (linux_resume_one_lwp): Use lwpid_of.
10563 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10564 (linux_resume_one_thread): ... this. Handle resume_stop. In
10565 non-stop mode, don't look for pending flag in all threads.
10566 (resume_status_pending_p): Don't consider explicitly suspended
10567 threads.
10568 (my_waitpid): Reimplement. Emulate __WALL.
10569 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10570 Use lwpid_of.
10571 (sigchld_handler, linux_supports_non_stop, linux_async)
10572 (linux_start_non_stop): New.
10573 (linux_target_ops): Register linux_supports_non_stop, linux_async
10574 and linux_start_non_stop.
10575 (initialize_low): Install SIGCHLD handler.
10576 * thread-db.c (thread_db_create_event, find_one_thread)
10577 (thread_db_get_tls_address): Use lwpid_of.
10578 * win32-low.c (win32_detach): Adjust to use resume_kind.
10579 (win32_wait): Add `options' argument.
10580 * spu-low.c (spu_resume): Adjust to use resume_kind.
10581 (spu_wait): Add `options' argument.
10582
5b1c542e
PA
105832009-04-01 Pedro Alves <pedro@codesourcery.com>
10584
10585 Decouple target code from remote protocol.
10586
10587 * target.h (enum target_waitkind): New.
10588 (struct target_waitstatus): New.
10589 (struct target_ops) <wait>: Return an unsigned long. Take a
10590 target_waitstatus pointer instead of a char pointer.
10591 (mywait): Likewise.
10592 * target.c (mywait): Change prototype to return an unsigned long.
10593 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10594 * server.h (thread_from_wait, old_thread_from_wait): Delete
10595 declarations.
10596 (prepare_resume_reply): Change prototype to take a
10597 target_waitstatus.
10598 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10599 (last_status, last_ptid): New.
10600 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10601 pid instead of a signal.
10602 (attach_inferior): Remove "status" and "signal" parameters.
10603 Adjust.
10604 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10605 not as an address.
10606 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10607 (handle_v_requests, myresume): Remove "status" and "signal"
10608 parameters. Adjust.
10609 (handle_status): New.
10610 (main): Delete local `status'. Adjust.
10611 * remote-utils.c: Include target.h.
10612 (prepare_resume_reply): Change prototype to take a
10613 target_waitstatus. Adjust.
10614
10615 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10616 interface.
10617 * spu-low.c (spu_wait): Adjust.
10618 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10619 Delete.
10620 (win32_wait): Adjust.
10621
2bd7c093
PA
106222009-04-01 Pedro Alves <pedro@codesourcery.com>
10623
10624 * target.h (struct thread_resume): Delete leave_stopped member.
10625 (struct target_ops): Add a `n' argument to the `resume' callback.
10626 * server.c (start_inferior): Adjust.
10627 (handle_v_cont, myresume): Adjust.
10628 * linux-low.c (check_removed_breakpoint): Adjust to resume
10629 interface change, and to removed leave_stopped field.
10630 (resume_ptr): Delete.
10631 (struct thread_resume_array): New.
10632 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10633 resume interface change.
10634 (linux_continue_one_thread, linux_queue_one_thread)
10635 (resume_status_pending_p): Check if the resume field is NULL
10636 instead of checking the leave_stopped member.
10637 (linux_resume): Adjust to the target resume interface change.
10638 * spu-low.c (spu_resume): Adjust to the target resume interface
10639 change.
10640 * win32-low.c (win32_detach, win32_resume): Ditto.
10641
c35fafde
PA
106422009-04-01 Pedro Alves <pedro@codesourcery.com>
10643
10644 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10645 flag.
10646 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10647 pending.
10648 (linux_continue_one_thread): Only preserve the stepping flag if
10649 there's a pending breakpoint.
10650
0a59d50b
PA
106512009-03-31 Pedro Alves <pedro@codesourcery.com>
10652
10653 * server.c (main): After the inferior having exited, call
10654 remote_close before exiting gdbserver.
10655
f04c6d38
TJB
106562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10657
10658 Fix size of FPSCR in Power 7 processors.
10659 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10660 (PPC_FEATURE_HAS_DFP): New #define.
10661 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10662 size of the FPSCR.
10663
78e5cee6
PA
106642009-03-23 Pedro Alves <pedro@codesourcery.com>
10665
10666 * server.c (handle_query) Whitespace and formatting.
10667
1b3f6016
PA
106682009-03-22 Pedro Alves <pedro@codesourcery.com>
10669
10670 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10671 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10672 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10673 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10674 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10675 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10676 Makefile.in, configure.ac: Fix whitespace throughout.
10677 * configure: Regenerate.
10678
a07b2135
PA
106792009-03-22 Pedro Alves <pedro@codesourcery.com>
10680
10681 * inferiors.c (find_inferior): Make it safe for the callback
10682 function to delete the currently iterated inferior.
10683
67cc2626
PA
106842009-03-22 Pedro Alves <pedro@codesourcery.com>
10685
10686 * Makefile.in (linuw_low_h): Move higher.
10687 (thread-db.o): Depend on $(linux_low_h).
10688
54a0b537
PA
106892009-03-17 Pedro Alves <pedro@codesourcery.com>
10690
10691 Rename "process" to "lwp" throughout.
10692
10693 * linux-low.c (all_processes): Rename to...
10694 (all_lwps): ... this.
10695 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10696 (add_process): Rename to ...
10697 (add_lwp): ... this. Adjust.
10698 (linux_create_inferior): Adjust.
10699 (linux_attach_lwp): Adjust.
10700 (linux_attach): Adjust.
10701 (linux_kill_one_process): Rename to ...
10702 (linux_kill_one_lwp): ... this. Adjust.
10703 (linux_kill): Adjust.
10704 (linux_detach_one_process): Rename to ...
10705 (linux_detach_one_lwp): ... this. Adjust.
10706 (linux_detach): Adjust.
10707 (check_removed_breakpoint): Adjust.
10708 (status_pending_p): Adjust.
10709 (linux_wait_for_process): Rename to ...
10710 (linux_wait_for_lwp): ... this. Adjust.
10711 (linux_wait_for_event): Adjust.
10712 (send_sigstop): Adjust.
10713 (wait_for_sigstop): Adjust.
10714 (stop_all_processes): Rename to ...
10715 (stop_all_lwps): ... this.
10716 (linux_resume_one_process): Rename to ...
10717 (linux_resume_one_lwp): ... this. Adjust.
10718 (linux_set_resume_request, linux_continue_one_thread)
10719 (linux_queue_one_thread, resume_status_pending_p)
10720 (usr_store_inferior_registers, regsets_store_inferior_registers)
10721 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10722 Adjust.
10723 * linux-low.h (get_process): Rename to ...
10724 (get_lwp): ... this. Adjust.
10725 (get_thread_process): Rename to ...
10726 (get_thread_lwp): ... this. Adjust.
10727 (get_process_thread): Rename to ...
10728 (get_lwp_thread): ... this. Adjust.
10729 (struct process_info): Rename to ...
10730 (struct lwp_info): ... this.
10731 (all_processes): Rename to ...
10732 (all_lwps): ... this.
10733 * proc-service.c (ps_lgetregs): Adjust.
10734 * thread-db.c (thread_db_create_event, find_one_thread)
10735 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10736
0b16c5cf
PA
107372009-03-14 Pedro Alves <pedro@codesourcery.com>
10738
10739 * server.c (handle_query): Handle "qAttached".
10740
32de4b9d
NS
107412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10742
10743 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10744 GPLv3, update license URL.
10745
2aecd87f
DE
107462009-03-01 Doug Evans <dje@google.com>
10747
93efd302 10748 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10749 (server_h): Add gdb_signals.h.
10750 (signals.o): Update.
10751 * server.h (target_signal_from_host,target_signal_to_host_p)
10752 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10753
86b1f9c5
PM
107542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10755
10756 * remote-utils.c (getpkt): Also generate remote-debug
10757 information if noack_mode is set.
10758
4aa995e1
PA
107592009-02-06 Pedro Alves <pedro@codesourcery.com>
10760
10761 * server.c (handle_query): Report qXfer:siginfo:read and
10762 qXfer:siginfo:write as supported and handle them.
10763 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10764 * linux-low.c (linux_xfer_siginfo): New.
10765 (linux_target_ops): Set it.
10766
62709adf
PA
107672009-01-26 Pedro Alves <pedro@codesourcery.com>
10768
10769 * server.c (gdbserver_usage): Mention --remote-debug.
10770 (main): Accept '--remote-debug' switch.
10771
aef93bd7
DE
107722009-01-18 Doug Evans <dje@google.com>
10773
10774 * regcache.c (new_register_cache): No need to check result of xcalloc.
10775 * server.c (handle_search_memory): Back out calls to xmalloc,
10776 result is checked and error is returned to user upon failure.
10777 (handle_query): Ditto. Add more checks for result of malloc.
10778 (handle_v_cont): Check result of malloc, report error back to
10779 user upon failure.
10780 (handle_v_run): Ditto. Call freeargv.
10781 * server.h (freeargv): Declare.
10782 * utils.c (freeargv): New fn.
10783
54363045
DE
107842009-01-15 Doug Evans <dje@google.com>
10785
f626972c
DE
10786 * gdbreplay.c (perror_with_name): Make arg const char *.
10787 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10788 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10789 * utils.c (perror_with_name): Make arg const char *.
54363045 10790
18aae699
PA
107912009-01-14 Pedro Alves <pedro@codesourcery.com>
10792
10793 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10794 when handling a EXIT_PROCESS_DEBUG_EVENT.
10795
ff703abe
JB
107962009-01-06 Joel Brobecker <brobecker@adacore.com>
10797
10798 * gdbreplay.c (gdbreplay_version): Update copyright year.
10799 * server.c (gdbserver_version): Likewise.
10800
f21cc1a2 108012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10802
10803 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10804 (handle_extended_wait): Improve comment.
0e21c1ec 10805
bca929d3
DE
108062008-12-13 Doug Evans <dje@google.com>
10807
10808 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10809 * server.h (ATTR_MALLOC): New macro.
10810 (xmalloc,xcalloc,xstrdup): Declare.
10811 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10812 * inferiors.c: Ditto.
10813 * linux-low.c: Ditto.
10814 * mem-break.c: Ditto.
10815 * regcache.c: Ditto.
10816 * remote-utils.c: Ditto.
10817 * server.c: Ditto.
10818 * target.c: Ditto.
10819 * win32-low.c: Ditto.
10820
97438e3f
DE
108212008-12-12 Doug Evans <dje@google.com>
10822
896c7fbb
DE
10823 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10824 in debugging printf.
10825
97438e3f
DE
10826 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10827
e3b886f8
DE
108282008-12-09 Doug Evans <dje@google.com>
10829
10830 * linux-low.h (struct process_info): Delete member tid, unused.
10831 * thread-db.c (find_one_thread): Update.
10832 (maybe_attach_thread): Update.
10833
07e059b5
VP
108342008-12-02 Pedro Alves <pedro@codesourcery.com>
10835
889bf7c5
PA
10836 * target.h (struct target_ops): Add qxfer_osdata member.
10837 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10838 and dirent.h.
10839 (linux_qxfer_osdata): New functions.
10840 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10841 callback.
10842 * server.c (handle_query): Handle "qXfer:osdata:read:".
10843 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10844 (buffer_xml_printf): New functions.
10845 * server.h (struct buffer): New.
10846 (buffer_grow_str, buffer_grow_str0): New macros.
10847 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10848 (buffer_xml_printf): Declare.
07e059b5 10849
4cab47ab
DE
108502008-11-24 Doug Evans <dje@google.com>
10851
10852 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10853
f142445f
DJ
108542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10855
10856 * server.c (handle_v_run): Always use the supplied argument list.
10857
d0107bb6 108582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10859
d0107bb6
BW
10860 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10861 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10862
2c4ad781
TJB
108632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10864
10865 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10866 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10867 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10868 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10869 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10870 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10871 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10872 XML target descriptions.
10873 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10874 when inferior is running on an ISA 2.05 or later processor. Add
10875 special case to return offset for full 64-bit slot of FPSCR when
10876 in 32-bits.
10877
dfb64f85
DJ
108782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10879
10880 * Makefile.in (SFILES, clean): Added sparc64 files.
10881 (reg-sparc64.o, reg-sparc64.c): New.
10882 * configure.srv (sparc*-*-linux*): New configuration.
10883 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10884 syscall arguments for SPARC.
10885 (regsets_store_inferior_registers): Likewise.
10886 * linux-sparc-low.c: New file.
10887
66b6e1dd
DE
108882008-10-21 Doug Evans <dje@google.com>
10889
10890 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10891 (READLINE_DIR,READLINE_DEP): Delete.
10892 (INTERNAL_CFLAGS): Update.
10893 (LINTFLAGS): Update.
10894
9b710a42
PA
108952008-10-10 Pedro Alves <pedro@codesourcery.com>
10896
10897 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10898 whole argv from the last run, not just argv[0].
10899
5822d809
PA
109002008-09-08 Pedro Alves <pedro@codesourcery.com>
10901
10902 * regcache.c (new_register_cache): Return NULL if the register
10903 cache size isn't known yet.
10904 (free_register_cache): Avoid dereferencing a NULL regcache.
10905
74aac56f
DJ
109062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10907
10908 * configure.srv: Merge MIPS and MIPS64.
10909
400b20f5
MR
109102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10911
10912 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10913
677c5bb1
LM
109142008-08-18 Luis Machado <luisgpm@br.ibm.com>
10915
10916 * Makefile.in: Add required vsx dependencies.
10917
10918 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10919 Declare init_registers_powerpc_vsx32l.
10920 Declare init_registers_powerpc_vsx64l.
10921 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10922 (ppc_arch_setup): Check for VSX in hwcap.
10923 (ppc_fill_vsxregset): New function.
10924 (ppc_store_vsxregset): New function.
10925 Add new VSX entry in regset_info target_regsets.
10926
10927 * configure.srv: Add new VSX dependencies.
10928
a6f3e723
SL
109292008-08-12 Pedro Alves <pedro@codesourcery.com>
10930
10931 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10932 (remote_open): Set or clear transport_is_reliable.
10933 (putpkt_binary): Don't expect acks in noack mode.
10934 (getpkt): Don't send ack/nac in noack mode.
10935 * server.c (handle_general_set): Handle QStartNoAckMode.
10936 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10937 qSupported.
10938 (main): Reset noack_mode on every connection.
10939 * server.h (noack_mode): Declare.
10940
a417dc56
RW
109412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10942
10943 * Makefile.in (GDBREPLAY_OBS): New variable.
10944 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10945
3221518c
UW
109462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10947 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10950 (usr_store_inferior_registers): Likewise.
10951 (regsets_store_inferior_registers): Likewise.
10952
ec56be1b
PA
109532008-07-31 Rolf Jansen <rj@surtec.com>
10954 Pedro Alves <pedro@codesourcery.com>
10955
10956 * configure.ac: Check for memmem declaration.
10957 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10958 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10959 (disable_packet_qfThreadInfo): Unconditionally compile.
10960 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10961 * configure, config.in: Regenerate.
10962
2fe5e3ff
DE
109632008-07-28 Doug Kwan <dougkwan@google.com>
10964
10965 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10966 (linux_write_memory): Remove declaration of errno.
10967
836acd6d
UW
109682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10969
10970 * linux-low.c (handle_extended_wait): Do not use "status"
10971 variable uninitialized.
10972
aeba519e
PA
109732008-07-07 Pedro Alves <pedro@codesourcery.com>
10974
10975 * server.c (handle_v_attach): Inhibit reporting dll changes.
10976
db42f210
PA
109772008-06-27 Pedro Alves <pedro@codesourcery.com>
10978
10979 * remote-utils.c (prepare_resume_reply): If requested, don't
10980 output "thread:TID" in the T stop reply.
10981
10982 * server.c (disable_packet_vCont, disable_packet_Tthread)
10983 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10984 (handle_query): If requested, disable support for qC, qfThreadInfo
10985 and qsThreadInfo.
10986 (handle_v_requests): If requested, disable support for vCont.
10987 (gdbserver_show_disableable): New.
10988 (main): Handle --disable-packet and --disable-packet=LIST.
10989
10990 * server.h (disable_packet_vCont, disable_packet_Tthread)
10991 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10992
8e4c5421
CD
109932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10994
10995 * server.c (gdbserver_usage): Mention --version.
10996
6e23a804
DJ
109972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10998
10999 * Makefile.in (gdbreplay.o): New rule.
11000
90aa6a40
JM
110012008-06-06 Joseph Myers <joseph@codesourcery.com>
11002
11003 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11004 message, not gdbserver.
11005
c16158bc 110062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11007 Nathan Sidwell <nathan@codesourcery.com>
11008 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11009
11010 * acinclude.m4: Include ../../config/acx.m4.
11011 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11012 * configure, config.in: Regenerate.
11013 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11014 * server.c (gdbserver_version): Print PKGVERSION.
11015 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11016 (main): Adjust gdbserver_usage calls.
11017 * gdbreplay.c (version, host_name): Add declarations.
11018 (gdbreplay_version, gdbreplay_usage): New.
11019 (main): Accept --version and --help options.
11020
aeb75bf5
DJ
110212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11022
11023 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11024 (arm_breakpoint_at): Handle Thumb.
11025 (the_low_target): Add comment.
11026
76b233dd
UW
110272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11028
11029 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11030
08388c79
DE
110312008-05-09 Doug Evans <dje@google.com>
11032
a3c83fae
DE
11033 * server.h (decode_search_memory_packet): Declare.
11034 * remote-utils.c (decode_search_memory_packet): New fn.
11035 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11036 (handle_search_memory): New fn.
11037 (handle_query): Process qSearch:memory packets.
11038
bb9c3d36
UW
110392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11040
11041 * regcache.c (registers_length): Remove.
11042 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11043 full register packet.
11044 * regcache.h (registers_length): Remove prototype.
11045 * server.h (PBUFSIZ): Define to 16384.
11046
7284e1be
UW
110472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11048
11049 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11050 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11051 powerpc-64l.o, and powerpc-altivec64l.o.
11052 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11053 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11054 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11055 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11056 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11057 to srv_xmlfiles.
11058
11059 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11060 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11061 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11062 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11063 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11064 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11065 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11066 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11067 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11068 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11069 (clean): Update.
11070
11071 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11072 (init_registers_powerpc_32l): ... this new prototype.
11073 (init_registers_powerpc_32): Remove, replace by ...
11074 (init_registers_powerpc_altivec32l): ... this new prototype.
11075 (init_registers_powerpc_e500): Remove, replace by ...
11076 (init_registers_powerpc_e500l): ... this new prototype.
11077 (init_registers_ppc64): Remove, replace by ...
11078 (init_registers_powerpc_64l): ... this new prototype.
11079 (init_registers_powerpc_64): Remove, replace by ...
11080 (init_registers_powerpc_altivec64l): ... this new prototype.
11081 (ppc_num_regs): Set to 73.
11082 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11083 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11084 (ppc_cannot_store_register): Handle orig_r3 and trap.
11085 (ppc_arch_setup): Update init_registers_... calls.
11086 (ppc_fill_gregset): Handle orig_r3 and trap.
11087
11088 * inferiors.c (clear_inferiors): Reset current_inferior.
11089
fdc59709
PB
110902008-04-23 Paolo Bonzini <bonzini@gnu.org>
11091
889bf7c5
PA
11092 * acinclude.m4: Add override.m4.
11093 * configure: Regenerate.
fdc59709 11094
c9b2f845
UW
110952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11096
11097 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11098 initial call to init_register_ppc64.
11099
550512b8
UW
111002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11101
43aaf8b6
PA
11102 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11103 single powerpc*-*-linux* case.
550512b8
UW
11104 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11105
b6430ec3
UW
111062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11107
11108 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11109 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11110 from reg_xmlfiles.
11111 * linux-ppc-low.c: Include <elf.h>.
11112 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11113 (ppc_hwcap): New global variable.
11114 (ppc_regmap): Remove __SPE__ #ifdef sections.
11115 (ppc_regmap_e500): New global variable.
11116 (ppc_cannot_store_register): Update __SPE__ special case.
11117 (ppc_get_hwcap): New function.
11118 (ppc_arch_setup): Use it to determine whether inferior supports
11119 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11120 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11121 Do not access registers if target does not support AltiVec.
11122 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11123 Do not access registers if target does not support SPE.
11124 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11125
52fa2412
UW
111262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * linux-low.c (disabled_regsets, num_regsets): New.
11129 (use_regsets_p): Delete.
11130 (linux_wait_for_process): Clear disabled_regsets.
11131 (regsets_fetch_inferior_registers): Check and set it.
11132 (regsets_store_inferior_registers): Likewise.
11133 (linux_fetch_registers, linux_store_registers): Do not use
11134 use_regsets_p.
11135 (initialize_low): Allocate disabled_regsets.
11136
e28b3332
DJ
111372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * Makefile.in (LIBOBJS): New.
11140 (OBS): Use LIBOBJS.
11141 (memmem.o): New rule.
11142 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11143 * configure: Regenerated.
11144
4536995d
UW
111452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11146
11147 * server.c (handle_query): Never return "unsupported" for
11148 qXfer:features:read queries.
11149
221c031f
UW
111502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11151
11152 * server.c (get_features_xml): Fix inverted condition.
11153 (handle_query): Always support qXfer:feature:read.
11154
ccd213ac
DJ
111552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11156
11157 * server.c (wrapper_argv): New.
11158 (start_inferior): Handle wrapper_argv. If set, expect an extra
11159 trap.
11160 (gdbserver_usage): Document --wrapper.
11161 (main): Parse --wrapper.
11162
6fe305f7
UW
111632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11164
11165 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11166 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11167 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11168 (ppc_set_pc): Likewise.
11169 (ppc_arch_setup): New function.
11170 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11171 of collect_register.
889bf7c5 11172 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11173
5b0a002e
UW
111742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11175
11176 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11177 instead of linux-ppc64-low.o.
11178 * linux-ppc64-low.c: Remove file.
11179 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11180 (linux-ppc64-low.o): Remove rule.
11181
11182 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11183 (init_registers_powerpc_64): Likewise.
11184 (ppc_regmap): Conditionally define depending on __powerpc64__.
11185 (ppc_cannot_store_register): Do not special-case "fpscr" when
11186 compiled on __powerpc64__.
11187 (ppc_collect_ptrace_register): New function.
11188 (ppc_supply_ptrace_register): New function.
11189 (ppc_breakpoint): Change type to "unsigned int".
11190 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11191 (the_low_target): Conditionally provide initializers for the
889bf7c5 11192 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11193 collect_ptrace_register and supply_ptrace_register members.
11194
9b4b61c8
UW
111952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11196
11197 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11198 * server.c (gdbserver_xmltarget): Define.
11199 (get_features_xml): Use it to replace "target.xml" and arch_string.
11200
11201 * configure.srv: Remove srv_xmltarget. Add XML files that were
11202 mentioned there to srv_xmlfiles instead. Remove conditional tests
11203 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11204 srv_xmlfiles and srv_regobj to include all possible choices.
11205 * configure.ac (srv_xmltarget): Remove.
11206 (srv_xmlfiles): Do not add "target.xml".
11207 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11208 checks for supplementary target information.
11209 * configure: Regenerate.
11210 * Makefile.in (XML_TARGET): Remove.
11211 (target.xml): Remove rule.
11212 (clean): Do not clean up target.xml.
11213 (.PRECIOUS): Do not mention target.xml.
11214
11215 * target.h (struct target_ops): Remove arch_string member.
11216 * linux-low.c (linux_arch_string): Remove.
11217 (linux_target_ops): Remove arch_string initializer.
11218 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11219 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11220 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11221 * spu-low.c (spu_arch_string): Remove.
11222 (spu_target_ops): Remove arch_string initializer.
11223 * win32-low.c (win32_arch_string): Remove.
11224 (win32_target_ops): Remove arch_string initializer.
11225 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11226 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11227 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11228
ee1a7ae4
UW
112292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11230
11231 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11232 by collect_ptrace_register and supply_ptrace_register hooks.
11233 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11234 instead of checking for the_low_target.left_pad_xfer.
11235 (usr_store_inferior_registers): Use collect_ptrace_register callback
11236 instead of checking for the_low_target.left_pad_xfer.
11237
11238 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11239 (s390_supply_ptrace_register): Likewise.
11240 (s390_fill_gregset): Call s390_collect_ptrace_register.
11241 (the_low_target): Update.
11242
11243 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11244 (ppc_supply_ptrace_register): Likewise.
11245 (the_low_target): Update.
11246
11247 * linux-i386-low.c (the_low_target): Update.
11248 * linux-x86-64-low.c (the_low_target): Update.
11249
d61ddec4
UW
112502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11251
11252 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11253 reg-s390.o and reg-s390x.o.
11254
11255 * linux-low.c (new_inferior): New global variable.
11256 (linux_create_inferior, linux_attach): Set it.
11257 (linux_wait_for_process): Call the_low_target.arch_setup after the
11258 target has stopped for the first time.
11259 (initialize_low): Do not call the_low_target.arch_setup.
11260
11261 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11262 (s390_set_pc): Likewise.
11263 (s390_arch_setup): New function.
11264 (the_low_target): Use s390_arch_setup as arch_setup routine.
11265
11266 * regcache.c (realloc_register_cache): New function.
11267 (set_register_cache): Call it for each existing regcache.
11268
d05b4ac3
UW
112692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11270
11271 * server.h (init_registers): Remove prototype.
11272
11273 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11274 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11275 instead of init_registers ().
11276 * linux-arm-low.c (init_registers_arm): Add prototype.
11277 (init_registers_arm_with_iwmmxt): Likewise.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * linux-cris-low.c (init_registers_cris): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11282 (the_low_target): Add initializer for arch_setup field.
11283 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11284 (the_low_target): Add initializer for arch_setup field.
11285 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11286 (the_low_target): Add initializer for arch_setup field.
11287 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11288 (the_low_target): Add initializer for arch_setup field.
11289 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11290 (the_low_target): Add initializer for arch_setup field.
11291 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11292 (init_registers_mips64_linux): Likewise.
11293 (the_low_target): Add initializer for arch_setup field.
11294 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11295 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11296 (the_low_target): Add initializer for arch_setup field.
11297 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11298 (init_registers_powerpc_64): Likewise.
11299 (the_low_target): Add initializer for arch_setup field.
11300 * linux-s390-low.c (init_registers_s390): Add prototype.
11301 (init_registers_s390x): Likewise.
11302 (the_low_target): Add initializer for arch_setup field.
11303 * linux-sh-low.c (init_registers_sh): Add prototype.
11304 (the_low_target): Add initializer for arch_setup field.
11305 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11306 (the_low_target): Add initializer for arch_setup field.
11307 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11308 (the_low_target): Add initializer for arch_setup field.
11309
11310 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11311 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11312 instead of init_registers ().
11313 * win32-arm-low.c (init_registers_arm): Add prototype.
11314 (the_low_target): Add initializer for arch_setup field.
11315 * win32-i386-low.c (init_registers_i386): Add prototype.
11316 (the_low_target): Add initializer for arch_setup field.
11317
11318 * spu-low.c (init_registers_spu): Add prototype.
11319 (initialize_low): Call initialie_registers_spu () instead of
11320 initialize_registers ().
11321
fd96d250
PA
113222008-02-19 Pedro Alves <pedro@codesourcery.com>
11323
11324 * server.c (handle_v_requests): When handling the vRun and vAttach
11325 packets, if already debugging a process, don't kill it. Return an
11326 error instead.
11327
d41b6bb4
DJ
113282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * server.c (handle_query): Correct length check.
11331
5ac588cf
PA
113322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11333
11334 * win32-low.c (do_initial_child_stuff): Add process handle
11335 parameter. Set current_process_handle and current_process_id from the
11336 parameters. Clear globals.
11337 (win32_create_inferior): Don't set current_process_handle and
11338 current_process_id here. Instead pass them on the call to
11339 do_initial_child_stuff.
11340 (win32_attach): Likewise.
11341 (win32_clear_inferiors): New.
11342 (win32_kill): Don't close the current process handle or the
11343 current thread handle here. Instead call win32_clear_inferiors.
11344 (win32_detach): Don't open a new handle to the process. Call
11345 win32_clear_inferiors.
11346 (win32_join): Don't rely on current_process_handle; open a new
11347 handle using the process id.
11348 (win32_wait): Call win32_clear_inferiors when the inferior process
11349 has exited.
11350
ecd7ecbc
DJ
113512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11352
11353 * server.c (monitor_show_help): Add "exit".
11354
1525d545
MG
113552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11356
ecd7ecbc 11357 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11358 (clean): Add reg-xtensa.c.
11359 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11360 * configure.srv (xtensa*-*-linux*) New target.
11361 * linux-xtensa-low.c: New.
11362 * xtensa-xtregs.c: New.
1525d545 11363
59a016f0
PA
113642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11365
11366 * hostio.c: Don't include errno.h.
11367 (errno_to_fileio_errno): Move to hostio-errno.
11368 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11369 error number outputting to the target->hostio_last_error callback.
11370 (hostio_packet_error): Use FILEIO_EINVAL directly.
11371 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11372 calls to hostio_error.
11373 * hostio-errno.c: New.
11374 * server.h (hostio_last_error_from_errno): Declare.
11375 * target.h (target_ops): Add hostio_last_error member.
11376 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11377 as hostio_last_error handler.
889bf7c5 11378 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11379 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11380 (wince_hostio_last_error): New functions.
11381 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11382 as hostio_last_error handler.
11383 (win32_target_ops) [!_WIN32_WCE]: Register
11384 hostio_last_error_from_errno as hostio_last_error handler.
11385 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11386 (hostio-errno.o): New rule.
11387 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11388 * configure.srv (srv_hostio_err_objs): New variable. Default to
11389 hostio-errno.o.
11390 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11391 * configure: Regenerate.
11392
2d717e4f
DJ
113932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11394
11395 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11396 (linux_kill, linux_detach): Clean up the process list.
11397 * remote-utils.c (remote_open): Improve port number parsing.
11398 (putpkt_binary, input_interrupt): Only send interrupts if the target
11399 is running.
11400 * server.c (extended_protocol): Make static.
11401 (attached): Define earlier.
11402 (exit_requested, response_needed, program_argv): New variables.
11403 (target_running): New.
11404 (start_inferior): Clear attached here.
11405 (attach_inferior): Set attached here.
11406 (require_running): Define.
11407 (handle_query): Use require_running and target_running. Implement
11408 "monitor exit".
11409 (handle_v_attach, handle_v_run): New.
11410 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11411 (gdbserver_usage): Update.
11412 (main): Redo argument parsing. Handle --debug and --multi. Handle
11413 --attach along with other options or after the port. Save
11414 program_argv. Support no initial program. Resynchronize
11415 communication with GDB after an error. Handle "monitor exit".
11416 Use require_running and target_running. Always allow the extended
11417 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11418 restart in extended mode.
11419 * README: Refer to the GDB manual. Update --attach usage.
11420
7407e2de
AS
114212007-12-20 Andreas Schwab <schwab@suse.de>
11422
11423 * linux-low.c (STACK_SIZE): Define.
11424 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11425 (linux_test_for_tracefork): Likewise.
11426
b65d95c5
DJ
114272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11428
11429 * linux-low.c (linux_wait_for_event): Update messages. Do not
11430 reinsert auto-delete breakpoints.
11431 * mem-break.c (struct breakpoint): Change return type of handler to
11432 int.
11433 (set_breakpoint_at): Update handler type.
11434 (reinsert_breakpoint_handler): Return 1 instead of calling
11435 delete_breakpoint.
11436 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11437 setting a new one.
11438 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11439 * mem-break.h (set_breakpoint_at): Update handler type.
11440 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11441 * win32-low.c (auto_delete_breakpoint): New.
11442 (get_child_debug_event): Use it.
11443
4e799345
DJ
114442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11445
11446 * configure.ac: Check for pread and pwrite.
11447 * hostio.c (handle_pread): Fall back to lseek and read.
11448 (handle_pwrite): Fall back to lseek and write.
11449 * config.in, configure: Regenerated.
11450
27524b67
DJ
114512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * server.c (myresume): Add own_buf argument.
11454 (main): Update calls.
11455
a20d5e98
DJ
114562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11457
11458 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11459 * remote-utils.c (remote_open): Do not call disable_async_io.
11460 (block_async_io): Delete.
11461 (unblock_async_io): Make static.
11462 (initialize_async_io): New.
11463 * server.c (handle_v_cont): Handle async I/O here.
11464 (myresume): Likewise. Move other common resume tasks here...
11465 (main): ... from here. Call initialize_async_io. Disable async
11466 I/O before the main loop.
11467 * server.h (initialize_async_io): Declare.
11468 (block_async_io, unblock_async_io): Delete prototypes.
11469 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11470
b79d787e
DJ
114712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11472
11473 * remote-utils.c (readchar): Allow binary data in received messages.
11474
d97903b2
PA
114752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11476
11477 * win32-low.c (attaching): New global.
11478 (win32_create_inferior): Clear the `attaching' global.
11479 (win32_attach): Set the `attaching' global.
11480 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11481 attaching. Only set a breakpoint at the entry point if not
11482 attaching.
11483
311de423
PA
114842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11485
11486 * server.c (main): Don't report dll events on the initial
11487 connection on attaches.
11488
6c2d16d2
PA
114892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11490
11491 * server.c (main): Relax numerical bases supported for the pid of
11492 the --attach command line argument.
11493
5ca906e6
PA
114942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11495
11496 * win32-low.c (win32_attach): Call OpenProcess before
11497 DebugActiveProcess, not after. Add last error output to error
11498 call.
11499
9c6c8194
PA
115002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11501
11502 * win32-low.c (win32_get_thread_context)
11503 (win32_set_thread_context): New functions.
11504 (thread_rec): Use win32_get_thread_context.
11505 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11506 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11507 field.
11508
4d5d1aaa
PA
115092007-12-03 Leo Zayas
11510 Pedro Alves <pedro_alves@portugalmail.pt>
11511
11512 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11513 global variables.
11514 (child_add_thread): Minor cleanup.
11515 (child_continue): Resume artificially suspended threads before
11516 calling ContinueDebugEvent.
11517 (suspend_one_thread): New.
11518 (fake_breakpoint_event): New.
11519 (get_child_debug_event): Change return type to int. Check here if
11520 gdb sent an interrupt request. If a soft interrupt was requested,
11521 fake a breakpoint event. Return 0 if there is no event to handle,
11522 and 1 otherwise.
11523 (win32_wait): Don't check here if gdb sent an interrupt request.
11524 Ensure there is a valid event to handle.
11525 (win32_request_interrupt): Add soft interruption method as last
11526 resort.
11527
c436e841
PA
115282007-12-03 Leo Zayas
11529 Pedro Alves <pedro_alves@portugalmail.pt>
11530
11531 * win32-low.h (win32_thread_info): Add descriptions to the
11532 structure members. Replace `suspend_count' counter by a
11533 `suspended' flag.
11534 * win32-low.c (thread_rec): Update condition of when to get the
11535 context from the inferior. Rely on ContextFlags being set if it
11536 has already been retrieved. Only suspend the inferior thread if
11537 we haven't already. Warn if that fails.
11538 (continue_one_thread): s/suspend_count/suspended/. Only call
11539 ResumeThread once. Warn if that fails.
11540
e7b5fa67
PA
115412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11542
11543 * win32-low.c (win32_wait): Don't read from the inferior when it
11544 has already exited.
11545
a385171d
PA
115462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11547
11548 * Makefile.in (win32_low_h): New variable.
11549 (win32-low.o): Add dependency on $(win32_low_h).
11550 (win32-arm-low.o, win32-i386-low.o): New rules.
11551
f80c84b3
DJ
115522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11553
11554 * hostio.c: Correct copyright year.
11555
a6b151f1
DJ
115562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11557
11558 * Makefile.in (OBS): Add hostio.o.
11559 (hostio.o): New rule.
11560 * server.h (handle_vFile): Declare.
11561 * hostio.c: New file.
11562 * server.c (handle_v_requests): Take packet_len and new_packet_len
11563 for binary packets. Call handle_vFile.
11564 (main): Update call to handle_v_requests.
11565
f9387fc3
DJ
115662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11567
11568 * linux-low.c: Include <sched.h>.
11569
51c2684e
DJ
115702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11571
11572 * linux-low.c (linux_tracefork_grandchild): New.
11573 (linux_tracefork_child): Use clone.
11574 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11575
75f83163
JB
115762007-10-31 Joel Brobecker <brobecker@adacore.com>
11577
11578 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11579
da5898ce
DJ
115802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11581
11582 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11583
24a09b5f
DJ
115842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11585
11586 * inferiors.c (change_inferior_id): Delete.
11587 (add_pid_to_list, pull_pid_from_list): New.
11588 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11589 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11590 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11591 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11592 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11593 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11594 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11595 (using_threads): Always set to 1.
11596 (handle_extended_wait): New.
11597 (add_process): Do not set TID.
11598 (linux_create_inferior): Set must_set_ptrace_flags.
11599 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11600 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11601 (linux_thread_alive): Rename TID argument to LWPID.
11602 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11603 (linux_wait_for_event): Do not use TID or check using_threads. Update
11604 call to dead_thread_notify. Call handle_extended_wait.
11605 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11606 (send_sigstop): Delete sigstop_sent.
11607 (wait_for_sigstop): Avoid TID.
11608 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11609 (linux_test_for_tracefork): New.
11610 (linux_lookup_signals): Use thread_db_active and
11611 linux_supports_tracefork_flag.
11612 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11613 * linux-low.h (get_process_thread): Avoid TID.
11614 (struct process_ifo): Move thread_known and tid to the end. Remove
11615 sigstop_sent.
11616 (linux_attach_lwp, thread_db_init): Update prototypes.
11617 * server.h (change_inferior_id): Delete prototype.
11618 (add_pid_to_list, pull_pid_from_list): New prototypes.
11619 * thread-db.c (thread_db_use_events): New.
11620 (find_first_thread): Rename to...
11621 (find_one_thread): ...this. Update callers and messages. Do not
11622 call fatal. Check thread_db_use_events. Do not call
11623 change_inferior_id or new_thread_notify.
11624 (maybe_attach_thread): Update. Do not call new_thread_notify.
11625 (thread_db_init): Set thread_db_use_events. Check use_events.
11626 * utils.c (fatal, warning): Correct message prefix.
11627
30ed0a8f
DJ
116282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * Makefile.in (clean): Remove new files.
11631 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11632 (powerpc-64.o, powerpc-64.c): New rules.
11633 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11634 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11635 with SPE.
11636 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11637 SPE targets.
11638 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11639 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11640 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11641 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11642 (target_regsets): Add AltiVec and SPE register sets.
11643 * configure.ac: Check for AltiVec and SPE.
11644 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11645 (ppc_fill_vrregset, ppc_store_vrregset): New.
11646 (target_regsets): Add AltiVec register set.
11647 * configure: Regenerated.
11648
fd462a61
DJ
116492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11650
11651 * linux-low.c (O_LARGEFILE): Define.
11652 (linux_read_memory): Use /proc/PID/mem.
11653 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11654 * configure, config.in: Regenerated.
11655
69f223ed
DJ
116562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * linux-low.c (linux_wait_for_event): Do not pass signals while
11659 single-stepping.
11660
aec18585
PA
116612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11662
11663 * win32-low.c (create_process): New.
11664 (win32_create_inferior): Use create_process instead of
11665 CreateProcess. If create_process failed retry appending an ".exe"
11666 suffix. Store the GetLastError result immediatelly after
11667 create_process calls and use it on the call to error.
11668
34d86ddd
PA
116692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11670
11671 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11672
5a0e3bd0
JB
116732007-08-23 Joel Brobecker <brobecker@adacore.com>
11674
11675 * configure.ac: Switch license to GPLv3.
11676
f88c79e6
MS
116772007-08-01 Michael Snyder <msnyder@access-company.com>
11678
11679 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11680
6b3d9b83
PA
116812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11682
11683 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11684 typedef.
11685 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11686 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11687 CloseToolhelp32Snapshot.
11688 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11689 CloseToolhelp32Snapshot.
11690
c588c53c
MS
116912007-07-27 Michael Snyder <michael.snyder@access-company.com>
11692
11693 * server.c (main): Check for inferior exit before main loop.
11694
aa0403d9
PA
116952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11696
11697 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11698 instead of on tmp_desc.
11699
255e7678
DJ
117002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11701 Daniel Jacobowitz <dan@codesourcery.com>
11702
11703 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11704 (add_thread): Minor cleanups.
11705 (clear_inferiors): Move lower in the file. Clear the DLL
11706 list.
11707 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11708 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11709 (xml_escape_text): New.
11710 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11711 for qSupported.
11712 (handle_v_cont): Report errors.
11713 (gdbserver_version): Update.
11714 (main): Correct size of own_buf. Do not report initial DLL events.
11715 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11716 (unloaded_dll, xml_escape_text): New.
11717 * win32-low.c (enum target_waitkind): Update comments.
11718 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11719 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11720 (win32_EnumProcessModules, win32_GetModuleInformation)
11721 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11722 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11723 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11724 (win32_Module32First, win32_Module32Next, load_toolhelp)
11725 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11726 (get_child_debug_event): Handle DLL events.
11727 (win32_wait): Likewise.
11728
0d37add9
DJ
117292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11732 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11733
45e2715e
PA
117342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11735
11736 * win32-low.c (handle_output_debug_string): Ignore event if not
11737 waiting.
11738
c5674cf1
PA
117392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11740
11741 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11742
2bbe3cc1
DJ
117432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11746
ae13219e
DJ
117472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * inferiors.c (change_inferior_id): Add comment.
11750 * linux-low.c (check_removed_breakpoint): Add an early
11751 prototype. Improve debug output.
11752 (linux_attach): Doc update.
11753 (linux_detach_one_process, linux_detach): Clean up before releasing
11754 each process.
11755 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11756 * linux-low.h (struct process_info): Doc improvement.
11757 * mem-break.c (delete_all_breakpoints): New.
11758 * mem-break.h (delete_all_breakpoints): New prototype.
11759 * thread-db.c (find_first_thread): New.
11760 (thread_db_create_event): Call it instead of
11761 thread_db_find_new_threads. Clean up unused variables.
11762 (maybe_attach_thread): Remove first thread handling.
11763 (thread_db_find_new_threads): Use find_first_thread.
11764 (thread_db_get_tls_address): Likewise.
11765
4105de34
DJ
117662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11767
11768 * thread-db.c (thread_db_find_new_threads): Add prototype.
11769 (thread_db_create_event): Check for the main thread before adding
11770 a new thread.
11771 (maybe_attach_thread): Only enable event reporting if TID == 0.
11772 (thread_db_get_tls_address): Check for new threads.
11773
2b876972
DJ
117742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11775
11776 * linux-low.c (linux_create_inferior): Try execv before execvp.
11777 * spu-low.c (spu_create_inferior): Likewise.
11778
7a245884
DJ
117792007-06-13 Mike Frysinger <vapier@gentoo.org>
11780
11781 * linux-low.c (linux_create_inferior): Change execv to execvp.
11782 * spu-low.c (spu_create_inferior): Likewies.
11783
117ce543
DJ
117842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11785
11786 * Makefile.in (clean): Clean new files instead of deleted ones.
11787 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11788 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11789 rules.
11790 * configure.srv: Specify XML files and new regformats for MIPS and
11791 MIPS64 GNU/Linux.
11792 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11793 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11794 an entry for the restart register.
11795 (mips_cannot_fetch_register, mips_cannot_store_register)
11796 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11797 register names to match the XML descriptions.
11798 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11799 restart register instead of $0.
11800
0e7f50da
UW
118012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11802 Markus Deuling <deuling@de.ibm.com>
11803
11804 * remote-utils.c (decode_xfer_write): New function.
11805 * server.h (decode_xfer_write): Add prototype.
11806 * server.c (handle_query): Add PACKET_LEN argument. Support
11807 qXfer:spu:read and qXfer:spu:write packets.
11808 (main): Pass packet_len to handle_query.
11809 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11810 * target.h (target_ops): Add qxfer_spu.
11811
374c1d38
UW
118122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11813
11814 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11815 accessing non-seekable spufs files.
11816
bb63802a
UW
118172007-05-16 Markus Deuling <deuling@de.ibm.com>
11818
889bf7c5 11819 * server.c (handle_query): Add reply for qC packet.
bb63802a 11820
7390519e
PA
118212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11822 Leo Zayas <lerele@champenstudios@com>
11823
11824 * server.h (check_remote_input_interrupt_request): New function.
11825 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11826 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11827 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11828 (check_remote_input_interrupt_request): New function.
11829 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11830 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11831 winapi_GenerateConsoleCtrlEvent): New typedefs.
11832 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11833 to 250 ms.
11834 (win32_wait): Check for remote interrupt request
11835 with check_remote_input_interrupt_request.
11836 (win32_request_interrupt): New function.
11837 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11838
34b34921
PA
118392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11840
11841 * win32-low.c (debug_registers_changed,
11842 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11843 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11844 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11845 (thread_rec): Get context using the low target.
11846 (child_add_thread): Call thread_added on the low target,
11847 which does the same thing.
11848 (regptr): Delete.
11849 (do_initial_child_stuff): Remove debug registers references.
11850 Set context using the low target. Resume threads after
11851 setting the contexts.
11852 (child_continue): Remove dead variable. Remove debug
11853 registers references.
11854 (child_fetch_inferior_registers): Go through the low target.
11855 (do_child_store_inferior_registers): Remove.
11856 (child_store_inferior_registers): Go through the low target.
11857 (win32_resume): Remove debug registers references.
11858 Set context using the low target.
11859 (handle_exception): Change return type to void. Don't record
11860 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11861 first chance exception.
889bf7c5 11862 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11863 goto loop. Always return after waiting for debug event.
11864 (win32_wait): Convert to switch statement. Handle spurious
11865 events.
11866
11867 * win32-i386-low.c (debug_registers_changed,
11868 debug_registers_used): New.
11869 (initial_stuff): Rename to ...
11870 (i386_initial_stuff): ... this. Clear debug registers
11871 state variables.
11872 (store_debug_registers): Delete.
11873 (i386_get_thread_context): New.
11874 (load_debug_registers): Delete.
11875 (i386_set_thread_context): New.
11876 (i386_thread_added): New.
11877 (single_step): Rename to ...
11878 (i386_single_step): ... this.
11879 (do_fetch_inferior_registers): Rename to ...
11880 (i386_fetch_inferior_register): ... this.
11881 (i386_store_inferior_register): New.
11882 (the_low_target): Adapt to new interface.
11883
11884 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11885 (arm_get_thread_context): New.
11886 (arm_set_thread_context): New.
11887 (regptr): New.
11888 (do_fetch_inferior_registers): Rename to ...
11889 (arm_fetch_inferior_register): ... this.
11890 (arm_store_inferior_register): New.
11891 (arm_wince_breakpoint): Reimplement as unsigned long.
11892 (arm_wince_breakpoint_len): Define.
11893 (the_low_target): Adapt to new interface.
11894
11895 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11896 load_debug_registers. Add get_thread_context, set_thread_context,
11897 thread_added and store_inferior_register. Rename
11898 fetch_inferior_registers to fetch_inferior_register.
11899 (regptr): Remove declaration.
11900
dd6953e1
PA
119012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11902
11903 * linux-low.c (linux_detach): Change return type to int. Return 0.
11904 * spu-low.c (spu_detach): Likewise.
11905
444d6139
PA
119062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11907
11908 * target.h (target_ops): Change return type of detach to int.
11909 Add join.
11910 (join_inferior): New.
11911 * server.c (main): Don't skip detach support on mingw32.
11912 If the inferior doesn't support detaching return error.
11913 Call join_inferior instead of using waitpid.
11914 * linux-low.c (linux_join): New.
11915 (linux_target_op): Add linux_join.
11916 * spu-low.c (spu_join): New.
11917 (spu_target_ops): Add spu_join.
11918 * win32-low.c (win32_detach): Adapt to new interface.
11919 Reopen current_process_handle before detaching. Issue a child
11920 resume before detaching.
11921 (win32_join): New.
11922 (win32_target_op): Add win32_join.
11923
1d5315fe
PA
119242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11925
11926 * win32-low.c (win32-attach): Fix return value.
11927 * target.h (target_ops): Describe ATTACH return values.
11928
bf914831
PA
119292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11930
11931 * win32-low.c (GETPROCADDRESS): Define.
11932 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11933 (winapi_DebugSetProcessKillOnExit): Likewise.
11934 (win32_create_inferior): Force usage of ansi CreateProcessA.
11935 (win32_attach): Use GETPROCADDRESS.
11936 (win32_detach): Likewise.
11937
f72f3e60
PA
119382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11939
11940 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11941
ed50f18f
PA
119422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11943
11944 * win32-low.c: Commit leftover changes from 2007-03-29.
11945
0c2ead7e
DJ
119462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11947
11948 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11949 fields short instead of int. Add explicit padding.
11950 (i387_cache_to_fsave): Remove unnecessary casts.
11951 (i387_fsave_to_cache): Doc fix.
11952 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11953
73725ff3
DJ
119542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11955
11956 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11957 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11958
d99f33d8
PA
119592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11960
11961 * configure.srv (arm*-*-mingw32ce*): Move near the other
11962 arm targets.
11963
68070c10
PA
119642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11965
2482afc6 11966 * configure.ac: Add errno checking.
68070c10
PA
11967 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11968 sys/file.h and malloc.h.
11969 (AC_CHECK_DECLS): Add perror.
11970 (srv_mingwce): Handle.
2482afc6 11971 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11972 win32-i386-low.o to srv_tgtobj.
11973 (i[34567]86-*-mingw*): Likewise.
11974 (arm*-*-mingw32ce*): Add case.
11975 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11976 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11977 [__MINGW32CE__] (strerror): New function.
11978 [__MINGW32CE__] (errno): Define to GetLastError.
11979 [__MINGW32CE__] (COUNTOF): New macro.
11980 (remote_open): Remove extra close call.
11981 * mem-break.c (delete_breakpoint_at): New function.
11982 * mem-break.h (delete_breakpoint_at): Declare.
11983 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11984 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11985 [USE_WIN32API] (read, write): Add char* casts.
11986 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11987 * server.h: Include wincecompat.h on Windows CE.
11988 [HAVE_ERRNO_H]: Check.
11989 (perror): Declare if not declared.
11990 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11991 (perror_with_name): Remove errno declaration.
11992 * wincecompat.h: New.
11993 * wincecompat.c: New.
11994 * win32-low.h: New.
11995 * win32-arm-low.c: New.
11996 * win32-i386-low.c: New.
11997 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11998 (OUTMSG2): Make it safe.
11999 (_T): New macro.
12000 (COUNTOF): New macro.
12001 (NUM_REGS): Get it from the low target.
12002 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12003 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12004 (thread_rec): Let low target handle debug registers.
12005 (child_add_thread): Likewise.
12006 (child_init_thread_list): Likewise.
12007 (continue_one_thread): Likewise.
12008 (regptr): New.
12009 (do_child_fetch_inferior_registers): Move to ...
12010 * win32-i386-low.c: ... here, and rename to ...
12011 (do_fetch_inferior_registers): ... this.
889bf7c5 12012 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12013 Go through the low target.
12014 (do_child_store_inferior_registers): Use regptr.
12015 (strwinerror): New function.
12016 (win32_create_inferior): Handle Windows CE.
12017 Use strwinerror instead of strerror on Windows error
12018 codes. Add program to the error output.
12019 Don't close the main thread handle on Windows CE.
12020 (win32_attach): Use coredll.dll on Windows CE.
12021 (win32_kill): Close current process and current
12022 thread handles.
12023 (win32_detach): Use coredll.dll on Windows CE.
12024 (win32_resume): Let low target handle debug registers, and
12025 step request.
12026 (handle_exception): Add/Remove initial breakpoint. Avoid
12027 non-existant WSTOPSIG on Windows CE.
12028 (win32_read_inferior_memory): Cast to remove warning.
12029 (win32_arch_string): Go through the low target.
12030 (initialize_low): Call set_breakpoint_data with the low
12031 target's breakpoint.
12032 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12033 FOP_REGNUM, mappings): Move to ...
12034 * win32-i386-low.c: ... here.
12035 * win32-low.c (win32_thread_info): Move to ...
12036 * win32-low.h: ... here.
12037 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12038 win32-arm-low.c and wincecompat.c.
12039 (all:): Add $EXEEXT.
12040 (install-only:): Likewise.
12041 (gdbserver:): Likewise.
12042 (gdbreplay:): Likewise.
12043 * config.in: Regenerate.
12044 * configure: Regenerate.
12045
41093d81
PA
120462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12047
12048 * win32-low.c: Rename typedef thread_info to
12049 win32_thread_info throughout.
12050
544afa54
PA
120512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12052
12053 * win32-i386-low.c: Rename to ...
12054 * win32-low.c: ... this.
12055 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12056 * Makefile.in: Likewise.
12057
bce7165d
PA
120582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12059
12060 * remote-utils.c (monitor_output): Constify msg parameter.
12061 * server.h (monitor_output): Likewise.
12062 * win32-i386-low.c (handle_output_debug_string): New.
12063 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12064 handle_output_debug_string.
12065 (get_child_debug_event): Likewise.
12066
506c7aa0
DJ
120672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12068
12069 * server.c (main): Correct strtoul check.
12070
42c81e2a
DJ
120712007-03-27 Jon Ringle <jon@ringle.org>
12072
12073 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12074
9453113a
DJ
120752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12076
12077 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12078
64a69107
DJ
120792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12080
12081 * terminal.h: Check HAVE_SGTTY_H.
12082
120832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12084
12085 * remote-utils.c (remote_open): Print out the assigned port number.
12086
c74d0ad8
DJ
120872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12088
12089 * remote-utils.c (monitor_output): New function.
12090 * server.c (debug_threads): Define here.
12091 (monitor_show_help): New function.
12092 (handle_query): Handle qRcmd.
12093 (main): Do not handle 'd' packet.
12094 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12095 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12096 of debug_threads.
12097
de7c3b4a
PA
120982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12099
12100 * Makefile.in (EXEEXT): New.
12101 (clean): Use $(EXEEXT).
12102
ef57601b
PA
121032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12104
12105 * target.h (target_ops): Rename send_signal to request_interrupt,
12106 and remove enum target_signal parameter.
12107 * linux-low.c (linux_request_interrupt): Rename from
12108 linux_send_signal, and always send SIGINT.
12109 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12110 and always send SIGINT.
12111 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12112 of send_signal.
12113 (input_interrupt): Likewise.
12114
820f2bda
PA
121152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12116
12117 * server.c (get_features_xml): Check if target implemented
12118 arch_string.
12119 * win32-i386-low.c (win32_arch_string): New.
12120 (win32_target_ops): Add win32_arch_string as arch_string member.
12121
ab39bf24
UW
121222007-02-22 Markus Deuling <deuling@de.ibm.com>
12123
12124 * spu-low.c (spu_arch_string): New.
12125 (spu_target_ops): Add spu_arch_string.
12126
61ff6e04
DJ
121272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12128
12129 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12130 * configure.ac: Do not check for terminal.h.
12131 * configure, config.in: Regenerated.
12132
fb1e4ffc
DJ
121332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12134
12135 * Makefile.in (OBS): Add $(XML_BUILTIN).
12136 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12137 (clean): Update.
12138 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12139 (arm-with-iwmmxt.c): New.
12140 * config.in, configure: Regenerate.
12141 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12142 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12143 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12144 (arm*-*-linux*): Add iWMMXt and regset support.
12145 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12146 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12147 (arm_store_wmmxregset, target_regsets): New.
12148 * server.c (get_features_xml): Take annex argument. Check builtin
12149 XML documents.
12150 (handle_query): Handle multiple annexes.
12151
0f48aa01
DJ
121522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * remote-utils.c [USE_WIN32API] (read, write): Define.
12155 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12156 write.
12157
23181151
DJ
121582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12159
12160 * linux-i386-low.c (the_low_target): Set arch_string.
12161 * linux-x86-64-low.c (the_low_target): Likewise.
12162 * linux-low.c (linux_arch_string): New.
12163 (linux_target_ops): Add it.
12164 * linux-low.h (struct linux_target_ops): Add arch_string.
12165 * server.c (write_qxfer_response): Use const void * for DATA.
12166 (get_features_xml): New.
12167 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12168 * target.h (struct target_ops): Add arch_string method.
12169
9d606399
DJ
121702007-01-03 Denis Pilat <denis.pilat@st.com>
12171 Daniel Jacobowitz <dan@codesourcery.com>
12172
12173 * linux-low.c (linux_kill): Handle being called with no threads.
12174 * win32-i386-low.c (win32_kill): Likewise.
12175 (get_child_debug_event): Clear current_process_handle.
12176
121772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12178 Daniel Jacobowitz <dan@codesourcery.com>
12179
12180 * remote-utils.c (remote_open): Check the type of specified
12181 serial port devices before opening them.
12182 * server.c (main): Kill the inferior if an error occurs during
12183 the first remote_open.
12184
a5e13d24
DJ
121852006-12-05 Markus Deuling <deuling@de.ibm.com>
12186
12187 * README: Update supported targets.
12188
186947f7
DJ
121892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12190
12191 * Makefile.in (clean): Remove reg-mips64.c.
12192 (reg-mips64.c, reg-mips64.o): New rules.
12193 * configure.srv: Handle mips64. Include regset support for mips.
12194 * linux-mips-low.c (union mips_register): New.
12195 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12196 (mips_breakpoint, mips_breakpoint_at): Use int.
12197 (mips_collect_register, mips_supply_register)
12198 (mips_collect_register_32bit, mips_supply_register_32bit)
12199 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12200 (mips_store_fpregset, target_regsets): New.
12201 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12202
a13e2c95
UW
122032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12204
12205 * configure.srv: Add target "spu*-*-*".
12206 * Makefile.in (clean): Remove reg-spu.c.
12207 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12208 * spu-low.c: New file.
12209
cb7283db
DJ
122102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * configure.ac: Correct td_thr_tls_get_addr test.
12213 * configure: Regenerated.
12214
89be2091
DJ
122152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12216
12217 * linux-low.c (linux_wait_for_event): Reformat. Use the
12218 pass_signals array.
12219 * remote-utils.c (decode_address_to_semicolon): New.
12220 * server.c (pass_signals, handle_general_set): New.
12221 (handle_query): Mention QPassSignals for qSupported.
12222 (main): Call handle_general_set.
12223 * server.h (pass_signals, decode_address_to_semicolon): New.
12224
000ef4f0
DJ
122252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12226
12227 * server.c (handle_query): Correct error handling for read_auxv.
12228
b7149293
UW
122292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12230
12231 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12232 and srv_linux_thread_db to yes.
12233 * linux-s390-low.c (s390_fill_gregset): New function.
12234 (target_regsets): Define data structure.
12235
dae5f5cf
DJ
122362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12237
12238 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12239 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12240 * config.in, configure: Regenerated.
12241 * inferiors.c (gdb_id_to_thread): New function.
12242 (gdb_id_to_thread_id): Use it.
12243 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12244 * linux-low.h (struct process_info): Add th member.
12245 (thread_db_get_tls_address): New prototype.
12246 * remote-utils.c (decode_address): Make non-static.
12247 * server.c (handle_query): Handle qGetTLSAddr.
12248 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12249 * target.h (struct target_ops): Add get_tls_address.
12250 * thread-db.c (maybe_attach_thread): Save the thread handle.
12251 (thread_db_get_tls_address): New.
12252
32ca6d61
DJ
122532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12254
12255 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12256 (linux_resume_one_process): Take a siginfo_t *. Update all
12257 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12258 (struct pending_signals): Add a siginfo_t.
12259 (linux_wait_for_process): Always set last_status.
12260 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12261 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12262 * linux-low.h (struct process_info): Add last_status.
12263
5ffff7c1
DJ
122642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12265
12266 * remote-utils.c (try_rle): New function.
12267 (putpkt_binary): Use it.
12268
8695c747
DJ
122692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12270
12271 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12272 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12273 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12274 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12275 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12276 point registers.
12277
290fadea
RS
122782006-08-08 Richard Sandiford <richard@codesourcery.com>
12279
12280 * server.c (terminal_fd): New variable.
12281 (old_foreground_pgrp): Likewise.
12282 (restore_old_foreground_pgrp): New function.
12283 (start_inferior): Record the terminal file descriptor in terminal_fd
12284 and its original foreground group in old_foreground_pgrp. Register
12285 restore_old_foreground_pgrp with atexit().
12286
9f2e1e63
DJ
122872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * server.c (handle_query): Correct qPart to qXfer.
12290
b80864fb
DJ
122912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12292
12293 * configure.ac: Check for more headers which are missing on
12294 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12295 * configure.srv: Add Cygwin and mingw32.
12296 * remote-utils.c: Don't include headers unconditionally which
12297 are missing on mingw32. Include <winsock.h> for mingw32.
12298 (remote_open): Adjust for mingw32 support. Flush
12299 standard error after writing to it.
12300 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12301 (unblock_async_io, enable_async_io, disable_async_io)
12302 (readchar, getpkt): Update for Winsock support.
12303 (prepare_resume_reply): Expect a protocol signal number.
12304 * server.c: Disable <sys/wait.h> on mingw32.
12305 (start_inferior): Adjust for mingw32 support. Flush
12306 standard error after writing to it.
12307 (attach_inferior): Likewise. Use protocol signal
12308 numbers.
12309 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12310 and names.
12311 * win32-i386-low.c: New file.
12312 * Makefile.in (XM_CLIBS): Set.
12313 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12314 (win32-i386-low.o): New dependency rule.
12315 * linux-low.c (linux_wait): Use target signal numbers.
12316 * target.h (struct target_ops): Doc fix.
12317 * server.h (target_signal_to_name): New prototype.
12318 * gdbreplay.c: Don't include headers unconditionally which
12319 are missing on mingw32. Include <winsock.h> for mingw32.
12320 (remote_close, remote_open): Adjust for Winsock support.
12321 * configure, config.in: Regenerated.
12322
0876f84a
DJ
123232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12324
12325 * server.c (decode_xfer_read, write_qxfer_response): New.
12326 (handle_query): Take a packet length argument. Handle
12327 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12328 the qSupported response.
12329 (main): Update call to handle_query.
12330
01f9e8fa
DJ
123312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12332
12333 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12334 (putpkt_binary): Renamed from putpkt and adjusted for binary
12335 data.
12336 (putpkt): New wrapper for putpkt_binary.
12337 (readchar): Don't mask off the high bit.
12338 (decode_X_packet): New function.
12339 * server.c (main): Call putpkt_binary if a handler sets the packet
12340 length. Save the length of the incoming packet. Handle 'X'.
12341 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12342
be2a5f71
DJ
123432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * server.c (handle_query): Handle qSupported.
12346
ea025f5f
DJ
123472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12348
12349 * remote-utils.c (all_symbols_looked_up): New variable.
12350 (look_up_one_symbol): Check it.
12351 * server.h (look_up_one_symbol): New declaration.
12352 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12353
9308fc88
DJ
123542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12355
12356 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12357 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12358 (PTRACE_GET_THREAD_AREA): Define.
12359 (ps_get_thread_area): New function.
12360
52fb6437
NS
123612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12362
12363 * configure.srv (m68k*-*-uclinux*): New target.
12364 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12365 (linux_resume_one_process): Remove extraneous cast.
12366 (linux_read_offsets): New.
12367 (linux_target_op): Add linux_read_offsets on mmuless systems.
12368 * server.c (handle_query): Add qOffsets logic.
12369 * target.h (struct target_ops): Add read_offsets.
12370
21b0f40c
DJ
123712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12372
12373 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12374 (PTRACE_GET_THREAD_AREA): Define.
12375 (ps_get_thread_area): New function.
12376 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12377 (linux-x86-64-low.o): Update.
12378
0050a760
DJ
123792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12380
12381 * configure.ac: Remove checks for prfpregset_t.
12382 * gdb_proc_service.h: New file.
12383 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12384 new "gdb_proc_service.h".
12385 * proc-service.c: Likewise.
12386 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12387 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12388 * Makefile.in (gdb_proc_service_h): Updated.
12389 * configure, config.in: Regenerated.
12390
b92a518e
DJ
123912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12392
12393 * remote-utils.c (prepare_resume_reply): Move declaration
12394 of gdb_id_from_wait to the top of the block.
12395
545587ee
DJ
123962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12397
12398 * linux-low.c (regsets_store_inferior_registers): Read the regset
12399 from the target before filling it.
12400
9db87ebd
DJ
124012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * server.c (attach_inferior): Return SIGTRAP for a successful
12404 attach.
12405
dd24457d
DJ
124062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12407
12408 * Makefile.in (OBS): Add version.o.
12409 (STAGESTUFF): Delete.
12410 (version.o): Add dependencies.
12411 (version.c): Replace rule.
12412 (clean): Remove version.c.
12413 * server.c (gdbserver_version): New.
12414 (gdbserver_usage): Use printf.
12415 (main): Handle --version and --help.
12416 * server.h (version, host_name): Add declarations.
12417
6f0f660e
EZ
124182005-12-23 Eli Zaretskii <eliz@gnu.org>
12419
889bf7c5
PA
12420 * linux-arm-low.c:
12421 * linux-arm-low.c:
12422 * inferiors.c:
12423 * i387-fp.h:
12424 * i387-fp.c:
12425 * gdbreplay.c:
12426 * regcache.c:
12427 * proc-service.c:
12428 * mem-break.h:
12429 * mem-break.c:
12430 * linux-x86-64-low.c:
12431 * linux-sh-low.c:
12432 * linux-s390-low.c:
12433 * linux-ppc64-low.c:
12434 * linux-ppc-low.c:
12435 * linux-mips-low.c:
12436 * linux-m68k-low.c:
12437 * linux-m32r-low.c:
12438 * linux-low.h:
12439 * linux-low.c:
12440 * linux-ia64-low.c:
12441 * linux-i386-low.c:
12442 * linux-crisv32-low.c:
12443 * thread-db.c:
12444 * terminal.h:
12445 * target.h:
12446 * target.c:
12447 * server.h:
12448 * server.c:
12449 * remote-utils.c:
12450 * regcache.h:
12451 * utils.c:
12452 * Makefile.in:
12453 * configure.ac:
6f0f660e
EZ
12454 * gdbserver.1: Add (C) after Copyright. Update the FSF
12455 address.
12456
9d1fb177
DJ
124572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12460 (arm_breakpoint_at): Recognize both breakpoints.
12461 (the_low_target): Use the correct breakpoint instruction.
12462
011a70c2
DJ
124632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12464
12465 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12466 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12467 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12468 (the_low_target): Update.
12469
7fb85e41
AS
124702005-10-25 Andreas Schwab <schwab@suse.de>
12471
12472 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12473
12474 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12475 (ia64_num_regs): Reduce to 462.
12476
3db0444b
DJ
124772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12478
12479 * acinclude.m4: Correct quoting.
12480 * aclocal.m4: Regenerated.
12481
12482 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12483 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12484 (thread_db_init): Call thread_db_err_str.
12485 * configure.ac: Check for TD_VERSION.
12486 * config.in, configure: Regenerated.
12487
bee0189a
DJ
124882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12489
12490 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12491
e9d25b98
DJ
124922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12495 is not available. Define HAVE_PTRACE_GETREGS if it is.
12496 * config.in, configure: Regenerated.
12497 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12498 * linux-i386-low.c, linux-m68k-low.c: Update to use
12499 HAVE_PTRACE_GETREGS.
12500 * linux-low.c (regsets_fetch_inferior_registers)
12501 (regsets_store_inferior_registers): Only return 0 if we processed
12502 GENERAL_REGS.
12503 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12504 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12505
a06660f7
DJ
125062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12507
12508 * inferiors.c (struct thread_info): Add gdb_id.
12509 (add_thread): Add gdb_id argument.
12510 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12511 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12512 calls to add_thread.
12513 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12514 * server.c (handle_query): Use thread_to_gdb_id.
12515 (handle_v_cont, main): Use gdb_id_to_thread_id.
12516 * server.h (add_thread): Update prototype.
12517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12518 prototypes.
12519
5a1f5858
DJ
125202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12521
12522 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12523 left-padded registers.
12524 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12525 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12526
e122f1f5
SE
125272005-07-01 Steve Ellcey <sje@cup.hp.com>
12528
12529 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12530 * configure: Regenerate.
12531 * config.in: Regenerate.
12532 * server.h (NEED_DECLARATION_STRERROR):
12533 Replace with !HAVE_DECL_STRERROR.
12534
d592fa2f
DJ
125352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12536
12537 * linux-low.c (linux_wait, linux_send_signal): Don't test
12538 an unsigned long variable for > 0 if it could be MAX_ULONG.
12539 * server.c (myresume): Likewise.
12540 * target.c (set_desired_inferior): Likewise.
12541
ccbd4912
MK
125422005-06-13 Mark Kettenis <kettenis@gnu.org>
12543
12544 * configure.ac: Simplify and improve check for socklen_t.
12545 * configure, config.in: Regenerate.
12546
f450004a
DJ
125472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12548
12549 * acconfig.h: Remove.
12550 * configure.ac: Add a test for socklen_t. Use three-argument
12551 AC_DEFINE throughout.
12552 * config.in: Regenerated using autoheader 2.59.
12553 * configure: Regenerated.
12554
12555 * gdbreplay.c (socklen_t): Provide a default.
12556 (remote_open): Use socklen_t.
12557 * remote-utils.c (socklen_t): Provide a default.
12558 (remote_open): Use socklen_t.
12559 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12560 unsigned char.
12561
12562 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12563 char for buffers.
12564 * linux-low.c (linux_read_memory, linux_write_memory)
12565 (linux_read_auxv): Likewise.
12566 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12567 (check_mem_write): Likewise.
12568 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12569 Likewise.
12570 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12571 (registers_from_string, register_data): Likewise.
12572 * server.c (handle_query, main): Likewise.
12573 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12574 (decode_M_packet): Likewise.
12575 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12576 * target.h (struct target_ops): Update read_memory, write_memory,
12577 and read_auxv.
12578 (read_inferior_memory, write_inferior_memory): Update.
12579 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12580 to unsigned char *.
12581 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12582 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12583 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12584 linux-s390-low.c, linux-sh-low.c: Update for changes in
12585 read_inferior_memory and the_low_target->breakpoint.
12586
eee84df1
DJ
125872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12588
12589 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12590 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12591 * configure.srv: Add powerpc64-*-linux*.
12592 * linux-ppc64-low.c: New file.
12593
45b134e5
OF
125942005-05-23 Orjan Friberg <orjanf@axis.com>
12595
12596 * linux-cris-low.c: New file with support for CRIS.
12597 * linux-crisv32-low.c: Ditto for CRISv32.
12598 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12599 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12600 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12601 reg-crisv32.o, and reg-crisv32.c to make rules.
12602 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12603 recognized targets.
12604
48d93c75
UW
126052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12608 of sizeof (PTRACE_XFER_TYPE).
12609 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12610
e013ee27
OF
126112005-05-12 Orjan Friberg <orjanf@axis.com>
12612
889bf7c5 12613 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12614 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12615 pointers for hardware watchpoint support.
12616 * linux-low.h (struct linux_target_ops): Ditto.
12617 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12618 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12619 to linux_target_ops.
12620 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12621 reply packet.
12622 * server.c (main): Recognize 'Z' and 'z' packets.
12623
b0ded00b
UW
126242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12625
12626 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12627 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12628 (the_low_target): Add new members.
12629
8643e2ad
DJ
126302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12631
12632 * proc-service.c (ps_lgetregs): Search all_processes instead of
12633 all_threads.
12634
fc620387
DJ
126352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12636
12637 * server.c (start_inferior): Change return type to int.
12638 (attach_inferior): Change sigptr to int *.
12639 (handle_v_cont, handle_v_requests): Change signal to int *.
12640 (main): Change signal to int.
12641
126422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12643
12644 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12645 * configure.srv: Add m32r*-*-linux*.
12646 * linux-m32r-low.c: New file.
12647
e0e76420
DJ
126482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12649
12650 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12651
a1928bad
DJ
126522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12653
12654 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12655 Take unsigned long arguments for PIDs.
12656 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12657 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12658 (wait_for_sigstop, linux_resume_one_process)
12659 (regsets_fetch_inferior_registers, linux_send_signal)
12660 (linux_read_auxv): Likewise. Update the types of variables holding
12661 PIDs. Update format string specifiers.
12662 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12663 * remote-utils.c (prepare_resume_reply): Likewise.
12664 * server.c (cont_thread, general_thread, step_thread)
12665 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12666 unsigned long.
12667 (handle_query): Update format specifiers.
12668 (handle_v_cont, main): Use strtoul for thread IDs.
12669 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12670 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12671 (general_thread, step_thread, thread_from_wait)
12672 (old_thread_from_wait): Update.
12673 * target.h (struct thread_resume): Use unsigned long for THREAD.
12674 (struct target_ops): Use unsigned long for arguments to attach and
12675 thread_alive.
12676
dcdb98d2
DJ
126772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * acinclude.m4: Include bfd/bfd.m4 directly.
12680 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12681 <agriffis@toolchain.org>.
12682 * aclocal.m4, configure: Regenerated.
12683
bec39cab
AC
126842005-01-07 Andrew Cagney <cagney@gnu.org>
12685
12686 * configure.ac: Rename configure.in, require autoconf 2.59.
12687 * configure: Re-generate.
12688
434c4c77
DJ
126892004-12-08 Daniel Jacobowitz <dan@debian.org>
12690
12691 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12692 LIBS when finished.
12693 * aclocal.m4: Regenerated.
12694 * configure: Regenerated.
12695
db1d3e1b
AS
126962004-11-21 Andreas Schwab <schwab@suse.de>
12697
12698 * linux-m68k-low.c (m68k_num_gregs): Define.
12699 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12700 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12701 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12702 (m68k_breakpoint_at): New. Add to the_low_target.
12703
12704 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12705 srv_linux_thread_db to yes.
12706
43360365
JB
127072004-10-20 Joel Brobecker <brobecker@gnat.com>
12708
12709 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12710 (ARCH_SET_FS): Likewise.
12711 (ARCH_GET_FS): Likewise.
12712 (ARCH_GET_GS): Likewise.
12713
fd500816
DJ
127142004-10-16 Daniel Jacobowitz <dan@debian.org>
12715
12716 * linux-i386-low.c (ps_get_thread_area): New.
12717 * linux-x86-64-low.c (ps_get_thread_area): New.
12718 * linux-low.c: Include <sys/syscall.h>.
12719 (linux_kill_one_process): Don't kill the first thread here.
12720 (linux_kill): Kill the first thread here.
12721 (kill_lwp): New function.
12722 (send_sigstop, linux_send_signal): Use it.
12723 * proc-service.c: Clean up #ifdefs.
12724 (fpregset_info): Delete.
12725 (ps_lgetregs): Update and enable implementation.
12726 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12727 implementations.
12728 * remote-utils.c (struct sym_cache, symbol_cache): New.
12729 (input_interrupt): Print a clearer message.
12730 (async_io_enabled): New variable.
12731 (enable_async_io, disable_async_io): Use it. Update comments.
12732 (look_up_one_symbol): Use the symbol cache.
12733 * thread-db.c (thread_db_look_up_symbols): New function.
12734 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12735
f6de3c42
DJ
127362004-10-16 Daniel Jacobowitz <dan@debian.org>
12737
12738 * configure.in: Test for -rdynamic.
12739 * configure: Regenerated.
12740 * Makefile (INTERNAL_LDFLAGS): New.
12741 (gdbserver, gdbreplay): Use it.
12742
2c0fc042
AC
127432004-09-02 Andrew Cagney <cagney@gnu.org>
12744
12745 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12746
075b3282
DJ
127472004-03-23 Daniel Jacobowitz <drow@mvista.com>
12748
12749 * linux-low.c (linux_wait): Clear all_processes list also.
12750
fa6a77dc
DJ
127512004-03-12 Daniel Jacobowitz <drow@mvista.com>
12752
12753 * linux-low.c: Include <errno.h>. Remove extern declaration of
12754 errno.
12755
6d782a97
DJ
127562004-03-12 Daniel Jacobowitz <drow@mvista.com>
12757
12758 * gdbreplay.c, server.h, utils.c: Update copyright years.
12759
3a7fb99b
DJ
127602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12761
12762 * server.c (main): Print child status or termination signal from
12763 variable 'signal', not 'sig'.
12764
c3e735a6
DJ
127652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12766
12767 * linux-low.c (linux_read_memory): Change return type to
12768 int. Check for and return error from ptrace().
12769 * target.c (read_inferior_memory): Change return type to int. Pass
12770 back return status from the_target->read_memory().
12771 * target.h (struct target_ops): Adapt *read_memory() prototype.
12772 Update comment.
12773 (read_inferior_memory): Adapt prototype.
12774 * server.c (main): Return an error packet if
12775 read_inferior_memory() returns an error.
12776
a59d1c82
DJ
127772004-03-04 Daniel Jacobowitz <drow@mvista.com>
12778
12779 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12780 Unify with other clean targets.
12781
dc3f8883
DJ
127822004-02-29 Daniel Jacobowitz <drow@mvista.com>
12783
12784 * server.c (handle_v_cont): Call set_desired_inferior.
12785
89a208da
DJ
127862004-02-29 Daniel Jacobowitz <drow@mvista.com>
12787
12788 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12789
62ea82f5
DJ
127902004-02-29 Daniel Jacobowitz <drow@mvista.com>
12791
12792 * linux-low.c (linux_wait): Unblock async I/O.
12793 (linux_resume): Block and enable async I/O.
12794 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12795 * server.h (block_async_io, unblock_async_io): Add prototypes.
12796
6910d122
DJ
127972004-02-29 Daniel Jacobowitz <drow@mvista.com>
12798
12799 * remote-utils.c (remote_open): Print a status notice after
12800 opening a TCP port.
12801 * server.c (attach_inferior): Print a status notice after
12802 attaching.
12803
128042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12805
12806 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12807
c89dc5d4
DJ
128082004-02-26 Daniel Jacobowitz <drow@mvista.com>
12809
12810 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12811 error packet.
12812 * server.c, target.h: Update copyright years.
12813
4b8dad4a
RM
128142004-02-25 Roland McGrath <roland@redhat.com>
12815
12816 * target.h (struct target_ops): New member `read_auxv'.
12817 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12818 * linux-low.c (linux_read_auxv): New function.
12819 (linux_target_ops): Initialize `read_auxv' member to that.
12820
d7446758
JB
128212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12822
12823 Committed by Jim Blandy <jimb@redhat.com>.
12824
12825 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12826 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12827 instead of GPR_SIZE to distiguish s390 and s390x targets.
12828
5544ad89
DJ
128292004-01-31 Daniel Jacobowitz <drow@mvista.com>
12830
12831 * linux-low.c: Update copyright year.
12832 (check_removed_breakpoint): Clear pending_is_breakpoint.
12833 (linux_set_resume_request, linux_queue_one_thread)
12834 (resume_status_pending_p): New functions.
12835 (linux_continue_one_thread): Use process->resume.
12836 (linux_resume): Only resume threads if there are no pending events.
12837 * linux-low.h (struct process_info): Add resume request
12838 pointer.
12839
2a68b70e
DJ
128402004-01-30 Daniel Jacobowitz <drow@mvista.com>
12841
12842 * regcache.c (new_register_cache): Clear the allocated register
12843 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12844
64386c31
DJ
128452003-10-13 Daniel Jacobowitz <drow@mvista.com>
12846
12847 * linux-low.c (linux_resume): Take a struct thread_resume *
12848 argument.
12849 (linux_wait): Update call.
12850 (resume_ptr): New static variable.
12851 (linux_continue_one_thread): Renamed from
12852 linux_continue_one_process. Use resume_ptr.
12853 (linux_resume): Use linux_continue_one_thread.
12854 * server.c (handle_v_cont, handle_v_requests): New functions.
12855 (myresume): New function.
12856 (main): Handle 'v' case.
12857 * target.h (struct thread_resume): New type.
12858 (struct target_ops): Change argument of "resume" to struct
12859 thread_resume *.
12860 (myresume): Delete macro.
12861
c938e9b0
L
128622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12863
12864 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12865 (uninstall): Support DESTDIR.
12866
7f313d07
BC
12867Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12868
12869 * configure.srv: Add xscale*linux copy of arm*linux entry.
12870
3b2fc2ea
DJ
128712003-07-24 Daniel Jacobowitz <drow@mvista.com>
12872
12873 * linux-arm-low.c (arm_reinsert_addr): New function.
12874 (the_low_target): Add arm_reinsert_addr.
12875
1c0a559e
MK
128762003-07-08 Mark Kettenis <kettenis@gnu.org>
12877
12878 * mem-break.c: Remove whitespace at end of file.
12879
43d5792c
DJ
128802003-06-28 Daniel Jacobowitz <drow@mvista.com>
12881
12882 * configure.in: Check whether we need to prototype strerror.
12883 * server.h: Optionally prototype strerror.
12884 * gdbreplay.c (perror_with_name): Use strerror.
12885 * linux-low.c (linux_attach_lwp): Use strerror.
12886 * utils.c (perror_with_name): Use strerror.
12887 * config.in, configure: Regenerated.
12888
c8a86edf
DJ
128892003-06-28 Daniel Jacobowitz <drow@mvista.com>
12890
12891 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12892 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12893
73d37363
DJ
128942003-06-20 Daniel Jacobowitz <drow@mvista.com>
12895
12896 * Makefile.in (SFILES): Update.
12897 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12898 low-sun3.c: Remove files.
12899
6ad8ae5c
DJ
129002003-06-17 Daniel Jacobowitz <drow@mvista.com>
12901
12902 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12903 (linux_detach_one_process, linux_detach): New functions.
12904 (linux_target_ops): Add linux_detach.
12905 * server.c (main): Handle 'D' packet.
12906 * target.h (struct target_ops): Add "detach" member.
12907 (detach_inferior): Define.
12908
1581182a
MK
129092003-06-13 Mark Kettenis <kettenis@gnu.org>
12910
12911 From Kelley Cook <kelleycook@wideopenwest.com>:
12912 * configure.srv: Accept i[34567]86 variants.
12913
e5379b03
DJ
129142003-06-05 Daniel Jacobowitz <drow@mvista.com>
12915
12916 * linux-low.c (linux_wait_for_event): Correct comment typos.
12917 (linux_resume_one_process): Call check_removed_breakpoint.
12918 (linux_send_signal): New function.
12919 (linux_target_ops): Add linux_send_signal.
12920 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12921 of kill.
12922 * target.h (struct target_ops): Add send_signal.
12923
2ff29de4
JB
129242003-05-29 Jim Blandy <jimb@redhat.com>
12925
12926 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12927 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12928 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12929 away part of the register's value.
12930
254787d4
DJ
129312003-03-26 Daniel Jacobowitz <drow@mvista.com>
12932
12933 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12934 (linux_wait_for_event, linux_init_signals): Likewise.
12935
94e10508
DJ
129362003-03-17 Daniel Jacobowitz <drow@mvista.com>
12937
12938 * configure.in: Check for stdlib.h.
12939 * configure: Regenerated.
12940 * config.in: Regenerated.
12941
4c0711e0
DJ
129422003-01-04 Andreas Schwab <schwab@suse.de>
12943
12944 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12945
ef66e766
AC
129462003-01-02 Andrew Cagney <ac131313@redhat.com>
12947
12948 * Makefile.in: Remove obsolete code.
12949
a1358604
DJ
129502002-11-20 Daniel Jacobowitz <drow@mvista.com>
12951
12952 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12953 defined(PT_FPR0_HI).
12954
23ce3b1c
DJ
129552002-11-17 Stuart Hughes <seh@zee2.com>
12956
12957 * linux-arm-low.c (arm_num_regs): Increase.
12958 (arm_regmap): Include status register.
12959
129602002-11-17 Daniel Jacobowitz <drow@mvista.com>
12961
12962 * linux-low.c (register_addr): Remove incorrect -1 check.
12963
a9fa9f7d
DJ
129642002-08-29 Daniel Jacobowitz <drow@mvista.com>
12965
12966 * linux-low.c (linux_create_inferior): Call setpgid. Return
12967 the new PID.
12968 (unstopped_p, linux_signal_pid): Remove.
12969 (linux_target_ops): Remove linux_signal_pid.
12970 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12971 global instead of target method.
12972 * target.h (struct target_ops): Remove signal_pid. Update comment
12973 for create_inferior.
12974 * server.c (signal_pid): New variable.
12975 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12976 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12977 (attach_inferior): Set signal_pid.
12978
17574093
DJ
129792002-08-23 Daniel Jacobowitz <drow@mvista.com>
12980
12981 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12982
129832002-08-20 Jim Blandy <jimb@redhat.com>
12984
12985 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12986 default for this.
12987
129882002-08-01 Andrew Cagney <cagney@redhat.com>
12989
12990 * Makefile.in: Make chill references obsolete.
12991
129922002-07-24 Kevin Buettner <kevinb@redhat.com>
12993
12994 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12995 * configure: Regenerate.
12996 * config.in: Regenerate.
12997
129982002-07-09 David O'Brien <obrien@FreeBSD.org>
12999
13000 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13001 (perror_with_name, remote_close, remote_open, expect, play): Static.
13002
130032002-07-04 Michal Ludvig <mludvig@suse.cz>
13004
4b8dad4a 13005 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13006 byte offsets instead of an array of indexes.
13007 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13008
130092002-06-13 Daniel Jacobowitz <drow@mvista.com>
13010
13011 * regcache.c: Add comment.
13012
130132002-06-11 Daniel Jacobowitz <drow@mvista.com>
13014
13015 * thread-db.c: New file.
13016 * proc-service.c: New file.
13017 * acinclude.m4: New file.
13018 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13019 proc-service.o, and thread-db.o.
13020 (linux-low.o): Add USE_THREAD_DB.
13021 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13022 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13023 * aclocal.m4: Regenerated.
13024 * config.in: Regenerated.
13025 * configure: Regenerated.
13026 * configure.in: Check for proc_service.h, sys/procfs.h,
13027 thread_db.h, and linux/elf.h headrs.
13028 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13029 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13030 Check for -lthread_db and thread support.
13031 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13032 PowerPC, and SuperH.
13033 * i387-fp.c: Constify arguments.
13034 * i387-fp.h: Likewise.
13035 * inferiors.c: (struct thread_info): Renamed from
13036 `struct inferior_info'. Remove PID member. Use generic inferior
13037 list header. All uses updated.
13038 (inferiors, signal_pid): Removed.
13039 (all_threads): New variable.
13040 (get_thread): Define.
13041 (add_inferior_to_list): New function.
13042 (for_each_inferior): New function.
13043 (change_inferior_id): New function.
13044 (add_inferior): Removed.
13045 (remove_inferior): New function.
13046 (add_thread): New function.
13047 (free_one_thread): New function.
13048 (remove_thread): New function.
13049 (clear_inferiors): Use for_each_inferior and free_one_thread.
13050 (find_inferior): New function.
13051 (find_inferior_id): New function.
13052 (inferior_target_data): Update argument type.
13053 (set_inferior_target_data): Likewise.
13054 (inferior_regcache_data): Likewise.
13055 (set_inferior_regcache_data): Likewise.
13056 * linux-low.c (linux_bp_reinsert): Remove.
13057 (all_processes, stopping_threads, using_thrads)
13058 (struct pending_signals, debug_threads, pid_of): New.
13059 (inferior_pid): Replace with macro.
13060 (struct inferior_linux_data): Remove.
13061 (get_stop_pc, add_process): New functions.
13062 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13063 Use add_process and add_thread.
13064 (linux_attach_lwp): New function, based on old linux_attach. Use
13065 add_process and add_thread. Set stop_expected for new threads.
13066 (linux_attach): New function.
13067 (linux_kill_one_process): New function.
13068 (linux_kill): Kill all LWPs.
13069 (linux_thread_alive): Use find_inferior_id.
13070 (check_removed_breakpoints, status_pending_p): New functions.
13071 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13072 Update. Use WNOHANG. Wait for cloned processes also. Update process
13073 struct for the found process.
13074 (linux_wait_for_event): New function.
13075 (linux_wait): Use it. Support LWPs.
13076 (send_sigstop, wait_for_sigstop, stop_all_processes)
13077 (linux_resume_one_process, linux_continue_one_process): New functions.
13078 (linux_resume): Support LWPs.
13079 (REGISTER_RAW_SIZE): Remove.
13080 (fetch_register): Use register_size instead. Call supply_register.
13081 (usr_store_inferior_registers): Likewise. Call collect_register.
13082 Fix recursive case.
13083 (regsets_fetch_inferior_registers): Improve error message.
13084 (regsets_store_inferior_registers): Add debugging.
13085 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13086 (unstopped_p, linux_signal_pid): New functions.
13087 (linux_target_ops): Add linux_signal_pid.
13088 (linux_init_signals): New function.
13089 (initialize_low): Call it. Initialize using_threads.
13090 * regcache.c (inferior_regcache_data): Add valid
13091 flag.
13092 (get_regcache): Fetch registers lazily. Add fetch argument
13093 and update all callers.
13094 (regcache_invalidate_one, regcache_invalidate): New
13095 functions.
13096 (new_register_cache): Renamed from create_register_cache.
13097 Return the new regcache.
13098 (free_register_cache): Change argument to a void *.
13099 (registers_to_string, registers_from_string): Call get_regcache
13100 with fetch flag set.
13101 (register_data): Make static. Pass fetch flag to get_regcache.
13102 (supply_register): Call get_regcache with fetch flag clear.
13103 (collect_register): Call get_regcache with fetch flag set.
13104 (collect_register_as_string): New function.
13105 * regcache.h: Update.
13106 * remote-utils.c (putpkt): Flush after debug output and use
13107 stderr.
13108 Handle input interrupts while waiting for an ACK.
13109 (input_interrupt): Use signal_pid method.
13110 (getpkt): Flush after debug output and use stderr.
13111 (outreg): Use collect_register_as_string.
13112 (new_thread_notify, dead_thread_notify): New functions.
13113 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13114 and general_thread.
13115 (look_up_one_symbol): Flush after debug output.
13116 * server.c (step_thread, server_waiting): New variables.
13117 (start_inferior): Don't use signal_pid. Update call to mywait.
13118 (attach_inferior): Update call to mywait.
13119 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13120 (main): Don't fetch/store registers explicitly. Use
13121 set_desired_inferior. Support proposed ``Hs'' packet. Update
13122 calls to mywait.
13123 * server.h: Update.
13124 (struct inferior_list, struct_inferior_list_entry): New.
13125 * target.c (set_desired_inferior): New.
13126 (write_inferior_memory): Constify.
13127 (mywait): New function.
13128 * target.h: Update.
13129 (struct target_ops): New signal_pid method.
13130 (mywait): Removed macro, added prototype.
13131
13132 * linux-low.h (regset_func): Removed.
13133 (regset_fill_func, regset_store_func): New.
13134 (enum regset_type): New.
13135 (struct regset_info): Add type field. Use new operation types.
13136 (struct linux_target_ops): stop_pc renamed to get_pc.
13137 Add decr_pc_after_break and breakpoint_at.
13138 (get_process, get_thread_proess, get_process_thread)
13139 (strut process_info, all_processes, linux_attach_lwp)
13140 (thread_db_init): New.
13141
13142 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13143 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13144 (the_low_target): Add new members.
13145 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13146 (i386_store_fpxregset): Constify.
13147 (target_regsets): Add new kind identifier.
13148 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13149 (i386_set_pc): Add debugging.
13150 (i386_breakpoint_at): New function.
13151 (the_low_target): Add new members.
13152 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13153 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13154 (mips_breakpoint_at): New.
13155 (the_low_target): Add new members.
13156 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13157 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13158 (the_low_target): Add new members.
13159 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13160 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13161 (the_low_target): Add new members.
13162 * linux-x86-64-low.c (target_regsets): Add new kind
13163 identifier.
13164
131652002-05-15 Daniel Jacobowitz <drow@mvista.com>
13166
13167 From Martin Pool <mbp@samba.org>:
13168 * server.c (gdbserver_usage): New function.
13169 (main): Call it.
13170
131712002-05-14 Daniel Jacobowitz <drow@mvista.com>
13172
13173 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13174 stop_at -> stop_pc.
13175
131762002-05-04 Andrew Cagney <ac131313@redhat.com>
13177
13178 * Makefile.in: Remove obsolete code.
13179
131802002-04-24 Michal Ludvig <mludvig@suse.cz>
13181
13182 * linux-low.c (regsets_fetch_inferior_registers),
13183 (regsets_store_inferior_registers): Removed cast to int from
13184 ptrace() calls.
13185 * regcache.h: Added declaration of struct inferior_info.
13186
131872002-04-20 Daniel Jacobowitz <drow@mvista.com>
13188
13189 * inferiors.c (struct inferior_info): Add regcache_data.
13190 (add_inferior): Call create_register_cache.
13191 (clear_inferiors): Call free_register_cache.
13192 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13193 * regcache.c (struct inferior_regcache_data): New.
13194 (registers): Remove.
13195 (get_regcache): New function.
13196 (create_register_cache, free_register_cache): New functions.
13197 (set_register_cache): Don't initialize the register cache here.
13198 (registers_to_string, registers_from_string, register_data): Call
13199 get_regcache.
13200 * regcache.h: Add prototypes.
13201 * server.h: Likewise.
13202
132032002-04-20 Daniel Jacobowitz <drow@mvista.com>
13204
13205 * mem-break.c: New file.
13206 * mem-break.h: New file.
13207 * Makefile.in: Add mem-break.o rule; update server.h
13208 dependencies.
13209 * inferiors.c (struct inferior_info): Add target_data
13210 member.
13211 (clear_inferiors): Free target_data member if set.
13212 (inferior_target_data, set_inferior_target_data): New functions.
13213 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13214 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13215 * linux-low.c (linux_bp_reinsert): New variable.
13216 (struct inferior_linux_data): New.
13217 (linux_create_inferior): Use set_inferior_target_data.
13218 (linux_attach): Likewise. Call add_inferior.
13219 (linux_wait_for_one_inferior): New function.
13220 (linux_wait): Call it.
13221 (linux_write_memory): Add const.
13222 (initialize_low): Call set_breakpoint_data.
13223 * linux-low.h (struct linux_target_ops): Add breakpoint
13224 handling members.
13225 * server.c (attach_inferior): Remove extra add_inferior
13226 call.
13227 * server.h: Include mem-break.h. Update inferior.c
13228 prototypes.
13229 * target.c (read_inferior_memory)
13230 (write_inferior_memory): New functions.
13231 * target.h (read_inferior_memory)
13232 (write_inferior_memory): Change macros to prototypes.
13233 (struct target_ops): Update comments. Add const to write_memory
13234 definition.
13235
132362002-04-11 Daniel Jacobowitz <drow@mvista.com>
13237
13238 * linux-low.c (usr_store_inferior_registers): Support
13239 registers which are allowed to fail to store.
13240 * linux-low.h (linux_target_ops): Likewise.
13241 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13242 (ppc_cannot_store_register): FPSCR may not be storable.
13243
132442002-04-09 Daniel Jacobowitz <drow@mvista.com>
13245
13246 * server.h: Include <string.h> if HAVE_STRING_H.
13247 * ChangeLog: Correct paths in last ChangeLog entry.
13248
132492002-04-09 Daniel Jacobowitz <drow@mvista.com>
13250
13251 * linux-low.h: Remove obsolete prototypes.
13252 (struct linux_target_ops): New.
13253 (extern the_low_target): New.
13254 * linux-low.c (num_regs, regmap): Remove declarations.
13255 (register_addr): Use the_low_target explicitly.
13256 (fetch_register): Likewise.
13257 (usr_fetch_inferior_registers): Likewise.
13258 (usr_store_inferior_registers): Likewise.
13259 * linux-arm-low.c (num_regs): Remove.
13260 (arm_num_regs): Define.
13261 (arm_regmap): Renamed from regmap, made static.
13262 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13263 made static.
13264 (arm_cannot_store_register): Renamed from cannot_store_register,
13265 made static.
13266 (the_low_target): New.
13267 * linux-i386-low.c (num_regs): Remove.
13268 (i386_num_regs): Define.
13269 (i386_regmap): Renamed from regmap, made static.
13270 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13271 made static.
13272 (i386_cannot_store_register): Renamed from cannot_store_register,
13273 made static.
13274 (the_low_target): New.
13275 * linux-ia64-low.c (num_regs): Remove.
13276 (ia64_num_regs): Define.
13277 (ia64_regmap): Renamed from regmap, made static.
13278 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13279 made static.
13280 (ia64_cannot_store_register): Renamed from cannot_store_register,
13281 made static.
13282 (the_low_target): New.
13283 * linux-m68k-low.c (num_regs): Remove.
13284 (m68k_num_regs): Define.
13285 (m68k_regmap): Renamed from regmap, made static.
13286 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13287 made static.
13288 (m68k_cannot_store_register): Renamed from cannot_store_register,
13289 made static.
13290 (the_low_target): New.
13291 * linux-mips-low.c (num_regs): Remove.
13292 (mips_num_regs): Define.
13293 (mips_regmap): Renamed from regmap, made static.
13294 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13295 made static.
13296 (mips_cannot_store_register): Renamed from cannot_store_register,
13297 made static.
13298 (the_low_target): New.
13299 * linux-ppc-low.c (num_regs): Remove.
13300 (ppc_num_regs): Define.
13301 (ppc_regmap): Renamed from regmap, made static.
13302 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13303 made static.
13304 (ppc_cannot_store_register): Renamed from cannot_store_register,
13305 made static.
13306 (the_low_target): New.
13307 * linux-s390-low.c (num_regs): Remove.
13308 (s390_num_regs): Define.
13309 (s390_regmap): Renamed from regmap, made static.
13310 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13311 made static.
13312 (s390_cannot_store_register): Renamed from cannot_store_register,
13313 made static.
13314 (the_low_target): New.
13315 * linux-sh-low.c (num_regs): Remove.
13316 (sh_num_regs): Define.
13317 (sh_regmap): Renamed from regmap, made static.
13318 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13319 made static.
13320 (sh_cannot_store_register): Renamed from cannot_store_register,
13321 made static.
13322 (the_low_target): New.
13323 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13324 (the_low_target): New.
13325
133262002-04-09 Daniel Jacobowitz <drow@mvista.com>
13327
13328 * Makefile.in: Add stamp-h target.
13329 * configure.in: Create stamp-h.
13330 * configure: Regenerated.
13331
133322002-04-09 Daniel Jacobowitz <drow@mvista.com>
13333
13334 * inferiors.c: New file.
13335 * target.c: New file.
13336 * target.h: New file.
13337 * Makefile.in: Add target.o and inferiors.o. Update
13338 dependencies.
13339 * linux-low.c (inferior_pid): New static variable,
13340 moved from server.c.
13341 (linux_create_inferior): Renamed from create_inferior.
13342 Call add_inferior. Return 0 on success instead of a PID.
13343 (linux_attach): Renamed from myattach.
13344 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13345 (linux_thread_alive): Renamed from mythread_alive.
13346 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13347 child dies.
13348 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13349 (regsets_store_inferior_registers): Correct error message.
13350 Add missing ``return 0''.
13351 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13352 (linux_store_registers): Renamed from store_inferior_registers.
13353 (linux_read_memory): Renamed from read_inferior_memory.
13354 (linux_write_memory): Renamed from write_inferior_memory.
13355 (linux_target_ops): New structure.
13356 (initialize_low): Call set_target_ops ().
13357 * remote-utils.c (unhexify): New function.
13358 (hexify): New function.
13359 (input_interrupt): Send signals to ``signal_pid''.
13360 * server.c (inferior_pid): Remove.
13361 (start_inferior): Update create_inferior call.
13362 (attach_inferior): Call add_inferior.
13363 (handle_query): New function.
13364 (main): Call handle_query for `q' packets.
13365 * server.h: Include "target.h". Remove obsolete prototypes.
13366 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13367
133682002-04-09 Daniel Jacobowitz <drow@mvista.com>
13369
13370 * Makefile.in: Add WARN_CFLAGS. Update configury
13371 dependencies.
13372 * configure.in: Check for <string.h>
13373 * configure: Regenerate.
13374 * config.in: Regenerate.
13375 * gdbreplay.c: Include needed system headers.
13376 (remote_open): Remove strchr prototype.
13377 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13378 * regcache.c (supply_register): Change buf argument to const void *.
13379 (supply_register_by_name): Likewise.
13380 (collect_register): Change buf argument to void *.
13381 (collect_register_by_name): Likewise.
13382 * regcache.h: Add missing prototypes.
13383 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13384 * server.c (handle_query): New function.
13385 (attached): New static variable, moved out of main.
13386 (main): Quiet longjmp clobber warnings.
13387 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13388 * utils.c (error): Remove NORETURN.
13389 (fatal): Likewise.
This page took 1.5681 seconds and 4 git commands to generate.