]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[GDBserver] Use regcache_read_pc in install_software_single_step_breakpoints
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d8020970
YQ
12016-01-26 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (install_software_single_step_breakpoints): Call
4 regcache_read_pc instead of get_pc.
5
8b207339
YQ
62016-01-26 Yao Qi <yao.qi@linaro.org>
7
8 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9 (unblock_async_io): Rename to ...
10 (block_unblock_async_io): ... it. New function.
11 (enable_async_io): Don't install SIGIO handler. Unblock it
12 instead.
13 (disable_async_io): Don't ignore SIGIO. Block it instead.
14 (initialize_async_io): Install SIGIO handler. Don't call
15 unblock_async_io.
16
18879fef
YQ
172016-01-26 Yao Qi <yao.qi@linaro.org>
18
19 * remote-utils.c (getpkt): If the buffer isn't empty, and the
20 first character is '\003', call *the_target->request_interrupt.
21
a0f8e08a
YQ
222016-01-25 Yao Qi <yao.qi@linaro.org>
23
24 * remote-utils.c (new_thread_notify): Remove.
25 (dead_thread_notify): Likewise.
26 * remote-utils.h (new_thread_notify): Remove declaration.
27 (dead_thread_notify): Likewise.
28
cc5fd9ab
MK
292016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
30
31 * gdb.trace/pending.exp: Fix expected message on continue.
32
99e8eb11
MK
332016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
34
35 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
36 it works properly on big-endian machines where sizeof (CORE_ADDR)
37 != sizeof (void *).
38
a994041d
PA
392016-01-21 Pedro Alves <palves@redhat.com>
40
41 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
42 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
43 * configure: Regenerate.
44
f7a6a40d
YQ
452016-01-21 Yao Qi <yao.qi@linaro.org>
46
47 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
48 is_thumb and set it according to CPSR saved on the stack.
49 (get_next_pcs_syscall_next_pc): Pass is_thumb to
50 arm_sigreturn_next_pc.
51
6f69e520
YQ
522016-01-18 Yao Qi <yao.qi@linaro.org>
53
54 * linux-low.c (linux_set_pc_64bit): New function.
55 (linux_get_pc_64bit): New function.
56 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
57 Declare.
58 * linux-sparc-low.c (debug_threads): Remove declaration.
59 (sparc_get_pc): Remove.
60 (the_low_target): Use linux_get_pc_64bit instead of
61 sparc_get_pc.
62 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
63 (the_low_target): Use linux_get_pc_64bit and
64 linux_set_pc_64bit.
65
276d4552
YQ
662016-01-18 Yao Qi <yao.qi@linaro.org>
67
68 * linux-arm-low.c (debug_threads): Remove declaration.
69 (arm_get_pc, arm_set_pc): Remove.
70 (the_low_target): Use linux_get_pc_32bit and
71 linux_set_pc_32bit.
72 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
73 (the_low_target): Use linux_get_pc_32bit and
74 linux_set_pc_32bit.
75 * linux-cris-low.c (debug_threads): Remove declaration.
76 (cris_get_pc, cris_set_pc,): Remove.
77 (the_low_target): Use linux_get_pc_32bit and
78 linux_set_pc_32bit.
79 * linux-crisv32-low.c (debug_threads): Remove declaration.
80 (cris_get_pc, cris_set_pc): Remove.
81 (the_low_target): Use linux_get_pc_32bit and
82 linux_set_pc_32bit.
83 * linux-low.c: Include inttypes.h.
84 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
85 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
86 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
87 (the_low_target): Use linux_get_pc_32bit and
88 linux_set_pc_32bit.
89 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
90 (the_low_target): Use linux_get_pc_32bit and
91 linux_set_pc_32bit.
92 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
93 (the_low_target): Use linux_get_pc_32bit and
94 linux_set_pc_32bit.
95 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
96 (the_low_target): Use linux_get_pc_32bit and
97 linux_set_pc_32bit.
98 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
99 (the_low_target): Use linux_get_pc_32bit and
100 linux_set_pc_32bit.
101
eb0edac8
GB
1022016-01-18 Gary Benson <gbenson@redhat.com>
103
104 * configure.ac (AC_FUNC_FORK): New check.
105 * config.in: Regenerate.
106 * configure: Likewise.
107
1b451dda
YQ
1082016-01-14 Yao Qi <yao.qi@linaro.org>
109
110 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
111 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
112 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
113 arm_get_next_pcs_ctor.
114
82075af2
JS
1152016-01-12 Josh Stone <jistone@redhat.com>
116 Philippe Waroquiers <philippe.waroquiers@skynet.be>
117
118 * inferiors.h: Include "gdb_vecs.h".
119 (struct process_info): Add syscalls_to_catch.
120 * inferiors.c (remove_process): Free syscalls_to_catch.
121 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
122 syscall_return stops.
123 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
124 * server.c (handle_general_set): Handle QCatchSyscalls.
125 (handle_query): Report support for QCatchSyscalls.
126 * target.h (struct target_ops): Add supports_catch_syscall.
127 (target_supports_catch_syscall): New macro.
128 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
129 (struct lwp_info): Add syscall_state.
130 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
131 Maintain syscall_state and syscalls_to_catch across exec.
132 (get_syscall_trapinfo): New function, proxy to the_low_target.
133 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
134 (linux_low_filter_event): Toggle syscall_state entry/return for
135 syscall traps, and set it ignored for all others.
136 (gdb_catching_syscalls_p): New function.
137 (gdb_catch_this_syscall_p): New function.
138 (linux_wait_1): Handle SYSCALL_SIGTRAP.
139 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
140 (linux_supports_catch_syscall): New function.
141 (linux_target_ops): Install it.
142 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
143 (the_low_target): Install it.
144
8f13a3ce
MF
1452016-01-12 Mike Frysinger <vapier@gentoo.org>
146
147 * acinclude.m4: Include new ../warning.m4 file.
148 * configure: Regenerated.
149 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
150
5b3da067
MF
1512016-01-12 Mike Frysinger <vapier@gentoo.org>
152
153 * ax.c (is_goto_target): Mark static.
154 * linux-low.c (register_addr): Likewise.
155 (linux_fetch_registers, linux_store_registers): Likewise.
156 * mem-break.c (any_persistent_commands): Fix old prototype.
157 (add_commands_to_breakpoint): Mark static.
158 * regcache.c (find_register_by_name): Delete unused func.
159 * remote-utils.c (hex_or_minus_one): Mark static.
160 * server.c (monitor_show_help): Mark static.
161 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
162 handle_v_requests): Likewise.
163
bc504a31
PA
1642016-01-12 Pedro Alves <palves@redhat.com>
165
166 Remove use of the registered trademark symbol throughout.
167
5a0dd67a
YQ
1682016-01-08 Yao Qi <yao.qi@linaro.org>
169
170 * remote-utils.c (getpkt): If c is '\003', call target hook
171 request_interrupt.
172
b2ca446f
YQ
1732016-01-06 Yao Qi <yao.qi@linaro.org>
174
175 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
176 linux-aarch32-low.c.
177 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
178 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
179 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
180 (thumb2_breakpoint): Declare.
181 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
182 linux-aarch32-low.h.
183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
184 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
185 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
186
edd88788
JB
1872016-01-01 Joel Brobecker <brobecker@adacore.com>
188
189 * gdbreplay.c (gdbreplay_version): Change copyright year in
190 version message.
191 * server.c (gdbserver_version): Likewise.
192
65da7f14
PP
1932015-12-28 Patrick Palka <patrick@parcs.ath.cx>
194
195 * server.c (crc32_table): Delete.
196 (crc32): Use libiberty's xcrc32 function.
197
4abd5ed2
JB
1982015-12-22 Joel Brobecker <brobecker@adacore.com>
199
200 * lynx-low.c (lynx_delete_thread_callback): New function.
201 (lynx_mourn): Properly delete our process and all of its
202 threads. Remove call to clear_inferiors.
203
0e50fe5c
JB
2042015-12-22 Joel Brobecker <brobecker@adacore.com>
205
206 * target.c (thread_search_callback): Add check that
207 the thread_stopped target callback is not NULL before
208 calling it.
209
35adc03f
YQ
2102015-12-21 Yao Qi <yao.qi@linaro.org>
211
212 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
213 arm breakpoint.
214
bd2b2909
AT
2152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
216
217 * server.c (handle_query): Call target_supports_software_single_step.
218
7fe5e27e
AT
2192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
220
221 * linux-low.c (single_step): New function.
222 (linux_resume_one_lwp_throw): Call single_step.
223 (start_step_over): Likewise.
224
d9311bfa
AT
2252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
226
227 * Makefile.in (SFILES): Append arch/arm-linux.c,
228 arch/arm-get-next-pcs.c.
229 (arm-linux.o): New rule.
230 (arm-get-next-pcs.o): New rule.
231 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
232 arm-linux.o.
233 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
234 to linux-aarch32-low.c.
235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
236 (arm_breakpoint_len, thumb_breakpoint): Likewise.
237 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
238 (thumb2_breakpoint_len): Likewise.
239 (arm_is_thumb_mode): Make non-static.
240 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
241 from linux-aarch32-low.c.
242 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
243 (arm_breakpoint_len, thumb_breakpoint): Likewise.
244 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
245 (thumb2_breakpoint_len): Likewise.
246 (arm_is_thumb_mode): New declaration.
247 * linux-arm-low.c: Include arch/arm-linux.h
248 aarch/arm-get-next-pcs.h, sys/syscall.h.
249 (get_next_pcs_ops): New struct.
250 (get_next_pcs_addr_bits_remove): New function.
251 (get_next_pcs_is_thumb): New function.
252 (get_next_pcs_read_memory_unsigned_integer): Likewise.
253 (arm_sigreturn_next_pc): Likewise.
254 (get_next_pcs_syscall_next_pc): Likewise.
255 (arm_gdbserver_get_next_pcs): Likewise.
256 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
257 Initialize.
258 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
259 * server.h: Include gdb_vecs.h.
260
68ce2059
AT
2612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
262
263 * Makefile.in (SFILES): Append common/common-regcache.c.
264 (OBS): Append common-regcache.o.
265 (common-regcache.o): New rule.
266 * regcache.c (init_register_cache): Initialize cache to
267 REG_UNAVAILABLE.
268 (regcache_raw_read_unsigned): New function.
269 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
270 register_status enum.
271
fa5308bd
AT
2722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
273
274 * linux-aarch64-low.c (the_low_targets): Rename
275 breakpoint_reinsert_addr to get_next_pcs.
276 * linux-arm-low.c (the_low_targets): Likewise.
277 * linux-bfin-low.c (the_low_targets): Likewise.
278 * linux-cris-low.c (the_low_targets): Likewise.
279 * linux-crisv32-low.c (the_low_targets): Likewise.
280 * linux-low.c (can_software_single_step): Likewise.
281 (install_software_single_step_breakpoints): New function.
282 (start_step_over): Use install_software_single_step_breakpoints.
283 * linux-low.h: New CORE_ADDR vector.
284 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
285 get_next_pcs.
286 * linux-mips-low.c (the_low_targets): Likewise.
287 * linux-nios2-low.c (the_low_targets): Likewise.
288 * linux-sparc-low.c (the_low_targets): Likewise.
289
4a6ed09b
PA
2902015-12-17 Pedro Alves <palves@redhat.com>
291
292 * linux-low.c (linux_kill_one_lwp): Remove references to
293 LinuxThreads.
294 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
295 to 'kill'.
296 (linux_init_signals): Delete.
297 (initialize_low): Adjust.
298 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
299
7544db95
PA
3002015-12-16 Pedro Alves <palves@redhat.com>
301
302 * configure.ac (compiler warning flags): When testing a
303 -Wno-foo option, check whether -Wfoo works instead.
304 * configure: Regenerate.
305
8020350c
DB
3062015-12-11 Don Breazeal <donb@codesourcery.com>
307
308 * server.c (process_serial_event): Don't exit from gdbserver
309 in remote mode if there are still active inferiors.
310
db91f502
YQ
3112015-12-11 Yao Qi <yao.qi@linaro.org>
312
313 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
314 arm_breakpoint_at if the process is 32-bit.
315
b37a6290
YQ
3162015-12-11 Yao Qi <yao.qi@linaro.org>
317
318 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
319 arm breakpoint.
320
17b1509a
YQ
3212015-12-07 Yao Qi <yao.qi@linaro.org>
322
323 * configure.srv: Append arm.o to srv_tgtobj for
324 aarch64*-*-linux* target.
325 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
326 from linux-arm-low.c.
327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
330 (thumb2_breakpoint_len): Likewise.
331 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
332 (arm_breakpoint_kinds): Likewise.
333 (arm_breakpoint_kind_from_pc): Likewise.
334 (arm_sw_breakpoint_from_kind): Likewise.
335 (arm_breakpoint_kind_from_current_state): Likewise.
336 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
337 (arm_sw_breakpoint_from_kind): Declare.
338 (arm_breakpoint_kind_from_current_state): Declare.
339 (arm_breakpoint_at): Declare.
340 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
341 arm_sw_breakpoint_from_kind if process is 32-bit.
342 (aarch64_breakpoint_kind_from_pc): New function.
343 (aarch64_breakpoint_kind_from_current_state): New function.
344 (the_low_target): Initialize fields breakpoint_kind_from_pc
345 and breakpoint_kind_from_current_state.
346 * linux-arm-low.c (arm_breakpoint_kinds): Move to
347 linux-aarch32-low.c.
348 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
349 (arm_breakpoint, arm_breakpoint_len): Likewise.
350 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
351 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
352 (arm_is_thumb_mode): Likewise.
353 (arm_breakpoint_at): Likewise.
354 (arm_breakpoint_kind_from_pc): Likewise.
355 (arm_sw_breakpoint_from_kind): Likewise.
356 (arm_breakpoint_kind_from_current_state): Likewise.
357
358 Revert:
359 2015-08-04 Yao Qi <yao.qi@linaro.org>
360
361 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
362 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
363 * server.c (extended_protocol): Remove "static".
364 * server.h (extended_protocol): Declare it.
365
ece66d65
JS
3662015-12-04 Josh Stone <jistone@redhat.com>
367
368 * target.h (struct target_ops) <arch_setup>: Rename to ...
369 (struct target_ops) <post_create_inferior>: ... this.
370 (target_arch_setup): Rename to ...
371 (target_post_create_inferior): ... this, calling post_create_inferior.
372 * server.c (start_inferior): Update target_arch_setup calls to
373 target_post_create_inferior.
374 * linux-low.c (linux_low_ptrace_options): Forward declare.
375 (linux_arch_setup): Update its comment for general use.
376 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
377 (struct linux_target_ops): Use linux_post_create_inferior.
378 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
379 to post_create_inferior.
380 * nto-low.c (struct nto_target_ops): Likewise.
381 * spu-low.c (struct spu_target_ops): Likewise.
382 * win32-low.c (struct win32_target_ops): Likewise.
383
e58c48b4
AT
3842015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
385
386 * linux-arm-low.c: Remove duplicate arch/arm.h include.
387
fbec8956
AT
3882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
389
390 * linux-arm-low.c (arm_reinsert_addr): Remove function.
391 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
392 * linux-cris-low.c (cris_reinsert_addr> Remove function.
393 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
394 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
396 * linux-mips-low.c (mips_reinsert_addr): Remove function.
397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
398 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
400 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
402
9b4c5f87
AT
4032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
404
405 * linux-low.c (linux_look_up_symbols): Don't call
406 linux_supports_traceclone.
407 * linux-low.h (thread_db_init): Remove use_events argument.
408 * thread-db.c (thread_db_use_event): Remove global variable.
409 (struct thread_db) <td_thr_event_enable_p>: Remove field.
410 (struct thread_db) <td_create_bp>: Remove field.
411 (thread_db_create_event): Remove function.
412 (thread_db_enable_reporting): Likewise.
413 (find_one_thread): Don't check for thread_db_use_events.
414 (attach_thread): Likewise.
415 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
416 (try_thread_db_load_1): Don't check for thread_db_use_events.
417 (thread_db_init): Remove use_events argument and thread events
418 handling.
419 (remove_thread_event_breakpoints): Remove function.
420 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
421
7d00775e
AT
4222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
423
424 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
425 New function.
426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
427 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
429 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
430 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
431 Initialize.
432 * linux-crisv32-low.c (cris_supports_hardware_single_step):
433 New function.
434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
435 * linux-low.c (can_hardware_single_step): Use
436 supports_hardware_single_step.
437 (can_software_single_step): New function.
438 (start_step_over): Call can_software_single_step.
439 (linux_supports_hardware_single_step): New function.
440 (struct target_ops) <supports_software_single_step>: Initialize.
441 * linux-low.h (struct linux_target_ops)
442 <supports_hardware_single_step>: Initialize.
443 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
445 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
446 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
447 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
449 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
451 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
452 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
453 Initialize.
454 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
455 (struct linux_target_ops) <tile_supports_hardware_single_step>:
456 Initialize.
457 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
459 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
460 New function.
461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
462 * target.h (struct target_ops): <supports_software_single_step>:
463 New field.
464 (target_supports_software_single_step): New macro.
465
2d97cd35
AT
4662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
467
468 * linux-low.c (linux_wait_1): Fix pc advance condition.
469 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
470 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
471
769ef81f
AT
4722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
473
474 * linux-arm-low.c (arm_is_thumb_mode): New function.
475 (arm_breakpoint_at): Use arm_is_thumb_mode.
476 (arm_breakpoint_kind_from_current_state): New function.
477 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
478 Initialize.
479 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
480 (linux_breakpoint_kind_from_current_state): New function.
481 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
482 * linux-low.h (struct linux_target_ops)
483 <breakpoint_kind_from_current_state>: New field.
484 * target.h (struct target_ops): Likewise.
485 (target_breakpoint_kind_from_current_state): New macro.
486
1bebeeca
PA
4872015-11-30 Pedro Alves <palves@redhat.com>
488
489 * linux-low.c (linux_resume): Wake up the event loop before
490 returning.
491
a67a9fae
PA
4922015-11-30 Pedro Alves <palves@redhat.com>
493
494 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
495 check.
496 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
497 to -1.
498 * target.c (struct thread_search): New structure.
499 (thread_search_callback): New function.
500 (prev_general_thread): New global.
501 (prepare_to_access_memory, done_accessing_memory): New functions.
502 * target.h (prepare_to_access_memory, done_accessing_memory):
503 Replace macros with function declarations.
504
f2faf941
PA
5052015-11-30 Pedro Alves <palves@redhat.com>
506
507 PR 14618
508 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
509 report TARGET_WAITKIND_NO_RESUMED.
510 * remote-utils.c (prepare_resume_reply): Handle
511 TARGET_WAITKIND_NO_RESUMED.
512 * server.c (report_no_resumed): New global.
513 (handle_query) <qSupported>: Handle "no-resumed+". Report
514 "no-resumed+" support.
515 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
516 return error if the client doesn't support no-resumed events.
517 (push_stop_notification): New function.
518 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
519 events if the client supports them.
520
a681f9c9
PA
5212015-11-30 Pedro Alves <palves@redhat.com>
522
523 * linux-low.c (thread_still_has_status_pending_p): Don't check
524 vCont;t here.
525 (lwp_resumed): New function.
526 (status_pending_p_callback): Return early if the LWP is not
527 supposed to be resumed.
528
65706a29
PA
5292015-11-30 Pedro Alves <palves@redhat.com>
530
531 * linux-low.c (handle_extended_wait): Assert that the LWP's
532 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
533 thread create events, leave the new child's status pending.
534 (linux_low_filter_event): If GDB wants to hear about thread exit
535 events, leave the LWP marked dead and don't delete it.
536 (linux_wait_for_event_filtered): Don't check for thread exit.
537 (filter_exit_event): New function.
538 (linux_wait_1): Use it, when returning an exit event.
539 (linux_resume_one_lwp_throw): Assert that the LWP's
540 waitstatus is TARGET_WAITKIND_IGNORE.
541 * remote-utils.c (prepare_resume_reply): Handle
542 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
543 * server.c (report_thread_events): New global.
544 (handle_general_set): Handle QThreadEvents.
545 (handle_query) <qSupported>: Handle and report QThreadEvents+;
546 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
547 TARGET_WAITKIND_THREAD_EXITED.
548 * server.h (report_thread_events): Declare.
549
56cf4bed
PA
5502015-11-30 Pedro Alves <palves@redhat.com>
551
552 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
553 the thread's last_resume_kind was resume_stop.
554
500c1d85
PA
5552015-11-30 Pedro Alves <palves@redhat.com>
556
557 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
558 before returning.
559
de979965
PA
5602015-11-30 Pedro Alves <palves@redhat.com>
561
562 * server.c (handle_v_requests): Handle vCtrlC.
563
34c65914
PA
5642015-11-30 Pedro Alves <palves@redhat.com>
565
566 * gdbthread.h (find_any_thread_of_pid): Declare.
567 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
568 functions.
569 * server.c (handle_query): If current_thread is NULL, look for
570 another thread of the selected process.
571
79efa585 5722015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 573 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
574
575 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
576 * server.c (handle_qxfer_threads_worker): Refactor to include thread
577 name in reply.
578 * target.h (struct target_ops) <thread_name>: New field.
579 (target_thread_name): New macro.
580
80d82c19
JB
5812015-11-23 Joel Brobecker <brobecker@adacore.com>
582
583 * regcache.h (regcache_invalidate_pid): Add declaration.
584 * regcache.c (regcache_invalidate_pid): New function, extracted
585 from regcache_invalidate.
586 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
587 Add trivial documentation comment.
588 * lynx-low.c: Use regcache_invalidate_pid instead of
589 regcache_invalidate.
590
64da5dd5
JB
5912015-11-23 Joel Brobecker <brobecker@adacore.com>
592
593 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
594 and Elf64_auxv_t if the target is Android.
595
37ce4055
DE
5962015-11-22 Doug Evans <xdje42@gmail.com>
597
598 * target.h: #include <sys/types.h>.
599
06e03fff
PA
6002015-11-19 Pedro Alves <palves@redhat.com>
601
602 * linux-low.c (linux_process_qsupported): Change prototype.
603 Adjust.
604 * linux-low.h (struct linux_target_ops) <process_qsupported>:
605 Change prototype.
606 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
607 and adjust to loop over all features.
608 * server.c (handle_query) <qSupported>: Adjust to call
609 target_process_qsupported once, passing it a vector of unprocessed
610 features.
611 * target.h (struct target_ops) <process_qsupported>: Change
612 prototype.
613 (target_process_qsupported): Adjust.
614
9a084706
PA
6152015-11-19 Pedro Alves <palves@redhat.com>
616
617 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
618 mode.
619 * configure: Regenerate.
620
dad44a1f
PA
6212015-11-19 Pedro Alves <palves@redhat.com>
622
623 * configure: Regenerate.
624
231c0592
YQ
6252015-11-19 Yao Qi <yao.qi@linaro.org>
626
627 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
628 type to uint32_t.
629
6c1c9a8b
YQ
6302015-11-19 Yao Qi <yao.qi@linaro.org>
631
632 * linux-aarch64-low.c (enum aarch64_operand_type): New.
633 (struct aarch64_operand): Move enum out.
634
9caa3311
YQ
6352015-11-19 Yao Qi <yao.qi@linaro.org>
636
637 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
638 struct user_fpsimd_state *.
639 (aarch64_store_fpregset): Likewise.
640
6a69a054
YQ
6412015-11-19 Yao Qi <yao.qi@linaro.org>
642
643 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
644 struct user_pt_regs *.
645 (aarch64_store_gregset): Likewise.
646
1798301e
PA
6472015-11-18 Pedro Alves <palves@redhat.com>
648
649 * Makefile.in (all_object_files): Add $IPA_OBJS.
650
ce7715e2
PA
6512015-11-17 Pedro Alves <palves@redhat.com>
652
653 * win32-low.c (win32_resume): Use gdb_signal_from_host,
654 GDB_SIGNAL_0 and gdb_signal_to_string.
655
c0879059
PA
6562015-11-17 Pedro Alves <palves@redhat.com>
657
658 * win32-low.c (handle_output_debug_string): Remove parameter.
659 (win32_kill): Remove our_status local and adjust call to
660 handle_output_debug_string.
661 (get_child_debug_event): Adjust call to
662 handle_output_debug_string.
663
1996e237
SM
6642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
665
666 * linux-mips-low.c (mips_fill_gregset): Add cast.
667 (mips_store_gregset): Likewise.
668 (mips_fill_fpregset): Likewise.
669 (mips_store_fpregset): Likewise.
670
cbec665b
SM
6712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
672
673 * linux-mips-low.c (mips_add_watchpoint): Rename private to
674 priv.
675
eb3e3c67
SM
6762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * linux-mips-low.c (mips_linux_new_thread): Change type of
679 watch_type to enum target_hw_bp_type.
680
171de4b8
SM
6812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
684 Change return type to arm_hwbp_type.
685
04248ead
SM
6862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
687
688 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
689 (arm_store_gregset): Likewise.
690 * linux-arm-low.c (arm_get_hwcap): Likewise.
691 (arm_read_description): Likewise.
692
04b3479c
SM
6932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
696
2bc84e8a
SM
6972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
698
699 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
700 (ppc_fill_vsxregset): Likewise.
701 (ppc_store_vsxregset): Likewise.
702 (ppc_fill_vrregset): Likewise.
703 (ppc_store_vrregset): Likewise.
704 (ppc_fill_evrregset): Likewise.
705 (ppc_store_evrregset): Likewise.
706
e6c5bb05
SM
7072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * linux-ppc-low.c (ppc_usrregs_info): Remove
710 forward-declaration.
711 (ppc_arch_setup): Move lower in file.
712
7ea45d72
SM
7132015-10-30 Simon Marchi <simon.marchi@ericsson.com>
714
715 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
716 (ps_pdwrite): Likewise.
717
69291610
HW
7182015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
719
720 * linux-arm-low.c (arm_new_thread): Move pointer dereference
721 to after assert checks.
722
b42945fd
SM
7232015-10-29 Simon Marchi <simon.marchi@ericsson.com>
724
725 * proc-service.c (ps_pdread): Add/adjust casts.
726 (ps_pdwrite): Add/adjust casts.
727
d6f85c84
SM
7282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
729
730 * server.c (handle_search_memory_1): Cast return value of
731 memmem.
732
f98cd059
SM
7332015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
734
735 * server.c (write_qxfer_response): Change type of data to
736 gdb_byte *.
737
d2412fa5
PA
7382015-10-29 Pedro Alves <palves@redhat.com>
739
740 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
741
c17414a2
PA
7422015-10-29 Pedro Alves <palves@redhat.com>
743
744 * tracepoint.c (clear_installed_tracepoints): Add casts.
745
e053fbc4
PA
7462015-10-29 Pedro Alves <palves@redhat.com>
747
748 * server.c (handle_v_cont, process_serial_event): Add enum
749 gdb_signal casts to signal parsing code.
750
add67df8
PA
7512015-10-29 Pedro Alves <palves@redhat.com>
752
753 * linux-low.h (NULL_REGSET): Define.
754 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
755 * linux-arm-low.c (arm_regsets): Likewise.
756 * linux-crisv32-low.c (cris_regsets): Likewise.
757 * linux-m68k-low.c (m68k_regsets): Likewise.
758 * linux-mips-low.c (mips_regsets): Likewise.
759 * linux-nios2-low.c (nios2_regsets): Likewise.
760 * linux-ppc-low.c (ppc_regsets): Likewise.
761 * linux-s390-low.c (s390_regsets): Likewise.
762 * linux-sh-low.c (sh_regsets): Likewise.
763 * linux-sparc-low.c (sparc_regsets): Likewise.
764 * linux-tic6x-low.c (tic6x_regsets): Likewise.
765 * linux-tile-low.c (tile_regsets): Likewise.
766 * linux-x86-low.c (x86_regsets): Likewise.
767 * linux-xtensa-low.c (xtensa_regsets): Likewise.
768
50bc912a
PA
7692015-10-29 Pedro Alves <palves@redhat.com>
770
771 * linux-low.h (NULL_REGSET): Define.
772 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
773 * linux-arm-low.c (arm_regsets): Likewise.
774 * linux-crisv32-low.c (cris_regsets): Likewise.
775 * linux-m68k-low.c (m68k_regsets): Likewise.
776 * linux-mips-low.c (mips_regsets): Likewise.
777 * linux-nios2-low.c (nios2_regsets): Likewise.
778 * linux-ppc-low.c (ppc_regsets): Likewise.
779 * linux-s390-low.c (s390_regsets): Likewise.
780 * linux-sh-low.c (sh_regsets): Likewise.
781 * linux-sparc-low.c (sparc_regsets): Likewise.
782 * linux-tic6x-low.c (tic6x_regsets): Likewise.
783 * linux-tile-low.c (tile_regsets): Likewise.
784 * linux-x86-low.c (x86_regsets): Likewise.
785 * linux-xtensa-low.c (xtensa_regsets): Likewise.
786
682b2546
DE
7872015-10-26 Doug Evans <dje@google.com>
788
789 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
790
963843d4
DE
7912015-10-26 Doug Evans <dje@google.com>
792
793 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
794
d41401ac
DE
7952015-10-26 Doug Evans <dje@google.com>
796
797 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
798 for debug_printf.
799 (attach_thread, find_new_threads_callback): Ditto.
800
3db28855
AT
8012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
802
803 * mem-break.h (set_breakpoint_data): Remove.
804
fb78e89c
AT
8052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
806
807 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
808 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
809 (initialize_low): Remove set_breakpoint_data call.
810 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
811 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
812 (initialize_low): Remove set_breakpoint_data call.
813 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
814 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
815 (initialize_low): Remove set_breakpoint_data call.
816
2e6ee069
AT
8172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
818
819 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
820 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
821 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
822 * target.h (target_breakpoint_kind_from_pc): New macro.
823
1652a986
AT
8242015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
825
826 * linux-low.c (default_breakpoint_kind_from_pc): New function.
827 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
828 the default breakpoint kind.
829
abeead09
AT
8302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
831
832 * linux-arm-low.c (arm_supports_z_point_type): Add software
833 breakpoint support.
834
b0b4b501
AT
8352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
836
837 * linux-arm-low.c: Refactor breakpoint definitions.
838 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
839 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
840
8689682c
AT
8412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
842
843 * Makefile.in: Add arm.c/o.
844 * configure.srv: Likewise.
845 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
846 (arm_breakpoint_kind_from_pc): New function.
847 (arm_sw_breakpoint_from_kind): Return proper kind.
848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
849
27165294
AT
8502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
851
852 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
853 removal.
854 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
855 (struct raw_breakpoint) <size>: Remove.
856 (struct raw_breakpoint) <kind>: Add.
857 (bp_size): New function.
858 (bp_opcode): Likewise.
859 (find_raw_breakpoint_at): Adjust for kind.
860 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
861 (remove_memory_breakpoint): Adjust for kind call bp_size.
862 (set_raw_breakpoint_at): Adjust for kind.
863 (set_breakpoint): Likewise.
864 (set_breakpoint_at): Call breakpoint_kind_from_pc.
865 (delete_raw_breakpoint): Adjust for kind.
866 (delete_breakpoint): Likewise.
867 (find_gdb_breakpoint): Likewise.
868 (set_gdb_breakpoint_1): Likewise.
869 (set_gdb_breakpoint): Likewise.
870 (delete_gdb_breakpoint_1): Likewise.
871 (delete_gdb_breakpoint): Likewise.
872 (uninsert_raw_breakpoint): Likewise.
873 (reinsert_raw_breakpoint): Likewise.
874 (set_breakpoint_data): Remove.
875 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
876 (check_mem_read): Adjust for kind call bp_size.
877 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
878 (clone_one_breakpoint): Adjust for kind.
879 * mem-break.h (set_gdb_breakpoint): Likewise.
880 (delete_gdb_breakpoint): Likewise.
881 * server.c (process_serial_event): Likewise.
882
dd373349
AT
8832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
884
885 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
886 (struct linux_target_ops) <breakpoint>: Remove.
887 (struct linux_target_ops) <breakpoint_len>: Remove.
888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
890 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
891 (arm_sw_breakpoint_from_kind): New function.
892 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
893 (struct linux_target_ops) <breakpoint>: Remove.
894 (struct linux_target_ops) <breakpoint_len>: Remove.
895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
897 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
898 (struct linux_target_ops) <breakpoint>: Remove.
899 (struct linux_target_ops) <breakpoint_len>: Remove.
900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
902 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
903 (struct linux_target_ops) <breakpoint>: Remove.
904 (struct linux_target_ops) <breakpoint_len>: Remove.
905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
908 and sw_breakpoint_from_kind to increment the pc.
909 (linux_breakpoint_kind_from_pc): New function.
910 (linux_sw_breakpoint_from_kind): New function.
911 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
912 (initialize_low): Call breakpoint_kind_from_pc and
913 sw_breakpoint_from_kind to replace breakpoint_data/len.
914 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
915 New field.
916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
917 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
918 (struct linux_target_ops) <breakpoint>: Remove.
919 (struct linux_target_ops) <breakpoint_len>: Remove.
920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
922 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
923 (struct linux_target_ops) <breakpoint>: Remove.
924 (struct linux_target_ops) <breakpoint_len>: Remove.
925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
927 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
928 (struct linux_target_ops) <breakpoint>: Remove.
929 (struct linux_target_ops) <breakpoint_len>: Remove.
930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
932 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
933 (struct linux_target_ops) <breakpoint>: Remove.
934 (struct linux_target_ops) <breakpoint_len>: Remove.
935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
937 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
938 (struct linux_target_ops) <breakpoint>: Remove.
939 (struct linux_target_ops) <breakpoint_len>: Remove.
940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
942 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
943 (struct linux_target_ops) <breakpoint>: Remove.
944 (struct linux_target_ops) <breakpoint_len>: Remove.
945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
947 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
948 (struct linux_target_ops) <breakpoint>: Remove.
949 (struct linux_target_ops) <breakpoint_len>: Remove.
950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
952 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
953 (struct linux_target_ops) <breakpoint>: Remove.
954 (struct linux_target_ops) <breakpoint_len>: Remove.
955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
957 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
958 (struct linux_target_ops) <breakpoint>: Remove.
959 (struct linux_target_ops) <breakpoint_len>: Remove.
960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
962 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
963 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
964 (struct linux_target_ops) <breakpoint>: Remove.
965 (struct linux_target_ops) <breakpoint_len>: Remove.
966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
968 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
969 (struct linux_target_ops) <breakpoint>: Remove.
970 (struct linux_target_ops) <breakpoint_len>: Remove.
971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
973
4cd98a19
AT
9742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
975
976 * linux-cris-low.c (cris_get_pc): Remove void arg.
977
774ee6d2
AR
9782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
979
980 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
981 variable name.
982
833dcd29
AR
9832015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
984
985 * inferiors.c (thread_pid_matches_callback): New function.
986 (find_thread_process): New function.
987 (remove_thread): Reset current_thread.
988 (remove_process): Assert threads have been removed first.
989
8d689ee5
YQ
9902015-10-15 Yao Qi <yao.qi@linaro.org>
991
992 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
993 if it is 3.
994 (aarch64_remove_point): Likewise.
995 * regcache.c (regcache_register_size): New function.
996
1c2e1515
YQ
9972015-10-12 Yao Qi <yao.qi@linaro.org>
998
999 * linux-aarch64-low.c: Update all callers as emit_load_store
1000 is renamed to aarch64_emit_load_store.
1001
e1c587c3
YQ
10022015-10-12 Yao Qi <yao.qi@linaro.org>
1003
1004 * linux-aarch64-low.c: Update all callers of function renaming
1005 from emit_insn to aarch64_emit_insn.
1006
b6542f81
YQ
10072015-10-12 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1010 arch/aarch64-insn.h.
1011 (struct aarch64_memory_operand): Likewise.
1012 (ENCODE): Likewise.
1013 (emit_insn): Move to arch/aarch64-insn.c.
1014 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1015 (emit_load_store): Move to arch/aarch64-insn.c.
1016 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1017 (can_encode_int32): Remove.
1018
246994ce
YQ
10192015-10-12 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1022 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1023 (aarch64_relocate_instruction): Likewise.
1024 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1025 (struct aarch64_insn_visitor): Likewise.
1026
0badd99f
YQ
10272015-10-12 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1030 (struct aarch64_insn_visitor): New.
1031 (struct aarch64_insn_relocation_data): New.
1032 (aarch64_ftrace_insn_reloc_b): New function.
1033 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1034 (aarch64_ftrace_insn_reloc_cb): Likewise.
1035 (aarch64_ftrace_insn_reloc_tb): Likewise.
1036 (aarch64_ftrace_insn_reloc_adr): Likewise.
1037 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1038 (aarch64_ftrace_insn_reloc_others): Likewise.
1039 (visitor): New.
1040 (aarch64_relocate_instruction): Use visitor.
1041
dfaffe9d
YQ
10422015-10-12 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1045 int. Add argument buf.
1046 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1047 aarch64_relocate_instruction.
1048
70b439f0
YQ
10492015-10-12 Yao Qi <yao.qi@linaro.org>
1050
1051 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1052 argument insn. Remove local variable insn. Don't call
1053 target_read_uint32.
1054 (aarch64_install_fast_tracepoint_jump_pad): Call
1055 target_read_uint32.
1056
7781c06f
YQ
10572015-09-30 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1060 (emit_load_store_pair): Likewise.
1061
9a3c8263
SM
10622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * dll.c (match_dll): Add cast(s).
1065 (unloaded_dll): Likewise.
1066 * linux-low.c (second_thread_of_pid_p): Likewise.
1067 (delete_lwp_callback): Likewise.
1068 (count_events_callback): Likewise.
1069 (select_event_lwp_callback): Likewise.
1070 (linux_set_resume_request): Likewise.
1071 * server.c (accumulate_file_name_length): Likewise.
1072 (emit_dll_description): Likewise.
1073 (handle_qxfer_threads_worker): Likewise.
1074 (visit_actioned_threads): Likewise.
1075 * thread-db.c (any_thread_of): Likewise.
1076 * tracepoint.c (same_process_p): Likewise.
1077 (match_blocktype): Likewise.
1078 (build_traceframe_info_xml): Likewise.
1079
224c3ddb
SM
10802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1081
1082 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1083 assignment.
1084 (gdb_unparse_agent_expr): Likewise.
1085 * hostio.c (require_data): Likewise.
1086 (handle_pread): Likewise.
1087 * linux-low.c (disable_regset): Likewise.
1088 (fetch_register): Likewise.
1089 (store_register): Likewise.
1090 (get_dynamic): Likewise.
1091 (linux_qxfer_libraries_svr4): Likewise.
1092 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1093 (set_fast_tracepoint_jump): Likewise.
1094 (uninsert_fast_tracepoint_jumps_at): Likewise.
1095 (reinsert_fast_tracepoint_jumps_at): Likewise.
1096 (validate_inserted_breakpoint): Likewise.
1097 (clone_agent_expr): Likewise.
1098 * regcache.c (init_register_cache): Likewise.
1099 * remote-utils.c (putpkt_binary_1): Likewise.
1100 (decode_M_packet): Likewise.
1101 (decode_X_packet): Likewise.
1102 (look_up_one_symbol): Likewise.
1103 (relocate_instruction): Likewise.
1104 (monitor_output): Likewise.
1105 * server.c (handle_search_memory): Likewise.
1106 (handle_qxfer_exec_file): Likewise.
1107 (handle_qxfer_libraries): Likewise.
1108 (handle_qxfer): Likewise.
1109 (handle_query): Likewise.
1110 (handle_v_cont): Likewise.
1111 (handle_v_run): Likewise.
1112 (captured_main): Likewise.
1113 * target.c (write_inferior_memory): Likewise.
1114 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1115 * tracepoint.c (init_trace_buffer): Likewise.
1116 (add_tracepoint_action): Likewise.
1117 (add_traceframe): Likewise.
1118 (add_traceframe_block): Likewise.
1119 (cmd_qtdpsrc): Likewise.
1120 (cmd_qtdv): Likewise.
1121 (cmd_qtstatus): Likewise.
1122 (response_source): Likewise.
1123 (response_tsv): Likewise.
1124 (cmd_qtnotes): Likewise.
1125 (gdb_collect): Likewise.
1126 (initialize_tracepoint): Likewise.
1127
afbe19f8
PL
11282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1129
1130 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1131 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1132 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1133 <NOP>: New.
1134 (enum aarch64_condition_codes): New enum.
1135 (w0): New static global.
1136 (fp): Likewise.
1137 (lr): Likewise.
1138 (struct aarch64_memory_operand) <type>: New
1139 MEMORY_OPERAND_POSTINDEX type.
1140 (postindex_memory_operand): New helper function.
1141 (emit_ret): New function.
1142 (emit_load_store_pair): New function, factored out of emit_stp
1143 with support for MEMORY_OPERAND_POSTINDEX.
1144 (emit_stp): Rewrite using emit_load_store_pair.
1145 (emit_ldp): New function.
1146 (emit_load_store): Likewise.
1147 (emit_ldr): Mention post-index instruction in comment.
1148 (emit_ldrh): New function.
1149 (emit_ldrb): New function.
1150 (emit_ldrsw): Mention post-index instruction in comment.
1151 (emit_str): Likewise.
1152 (emit_subs): New function.
1153 (emit_cmp): Likewise.
1154 (emit_and): Likewise.
1155 (emit_orr): Likewise.
1156 (emit_orn): Likewise.
1157 (emit_eor): Likewise.
1158 (emit_mvn): Likewise.
1159 (emit_lslv): Likewise.
1160 (emit_lsrv): Likewise.
1161 (emit_asrv): Likewise.
1162 (emit_mul): Likewise.
1163 (emit_sbfm): Likewise.
1164 (emit_sbfx): Likewise.
1165 (emit_ubfm): Likewise.
1166 (emit_ubfx): Likewise.
1167 (emit_csinc): Likewise.
1168 (emit_cset): Likewise.
1169 (emit_nop): Likewise.
1170 (emit_ops_insns): New helper function.
1171 (emit_pop): Likewise.
1172 (emit_push): Likewise.
1173 (aarch64_emit_prologue): New function.
1174 (aarch64_emit_epilogue): Likewise.
1175 (aarch64_emit_add): Likewise.
1176 (aarch64_emit_sub): Likewise.
1177 (aarch64_emit_mul): Likewise.
1178 (aarch64_emit_lsh): Likewise.
1179 (aarch64_emit_rsh_signed): Likewise.
1180 (aarch64_emit_rsh_unsigned): Likewise.
1181 (aarch64_emit_ext): Likewise.
1182 (aarch64_emit_log_not): Likewise.
1183 (aarch64_emit_bit_and): Likewise.
1184 (aarch64_emit_bit_or): Likewise.
1185 (aarch64_emit_bit_xor): Likewise.
1186 (aarch64_emit_bit_not): Likewise.
1187 (aarch64_emit_equal): Likewise.
1188 (aarch64_emit_less_signed): Likewise.
1189 (aarch64_emit_less_unsigned): Likewise.
1190 (aarch64_emit_ref): Likewise.
1191 (aarch64_emit_if_goto): Likewise.
1192 (aarch64_emit_goto): Likewise.
1193 (aarch64_write_goto_address): Likewise.
1194 (aarch64_emit_const): Likewise.
1195 (aarch64_emit_call): Likewise.
1196 (aarch64_emit_reg): Likewise.
1197 (aarch64_emit_pop): Likewise.
1198 (aarch64_emit_stack_flush): Likewise.
1199 (aarch64_emit_zero_ext): Likewise.
1200 (aarch64_emit_swap): Likewise.
1201 (aarch64_emit_stack_adjust): Likewise.
1202 (aarch64_emit_int_call_1): Likewise.
1203 (aarch64_emit_void_call_2): Likewise.
1204 (aarch64_emit_eq_goto): Likewise.
1205 (aarch64_emit_ne_goto): Likewise.
1206 (aarch64_emit_lt_goto): Likewise.
1207 (aarch64_emit_le_goto): Likewise.
1208 (aarch64_emit_gt_goto): Likewise.
1209 (aarch64_emit_ge_got): Likewise.
1210 (aarch64_emit_ops_impl): New static global variable.
1211 (aarch64_emit_ops): New target function, return
1212 &aarch64_emit_ops_impl.
1213 (struct linux_target_ops): Install it.
1214
bb903df0
PL
12152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1216
1217 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1218 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1219 aarch64-ipa.o.
1220 * linux-aarch64-ipa.c: New file.
1221 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1222 and endian.h.
1223 (aarch64_get_thread_area): New target method.
1224 (extract_signed_bitfield): New helper function.
1225 (aarch64_decode_ldr_literal): New function.
1226 (enum aarch64_opcodes): New enum.
1227 (struct aarch64_register): New struct.
1228 (struct aarch64_operand): New struct.
1229 (x0): New static global.
1230 (x1): Likewise.
1231 (x2): Likewise.
1232 (x3): Likewise.
1233 (x4): Likewise.
1234 (w2): Likewise.
1235 (ip0): Likewise.
1236 (sp): Likewise.
1237 (xzr): Likewise.
1238 (aarch64_register): New helper function.
1239 (register_operand): Likewise.
1240 (immediate_operand): Likewise.
1241 (struct aarch64_memory_operand): New struct.
1242 (offset_memory_operand): New helper function.
1243 (preindex_memory_operand): Likewise.
1244 (enum aarch64_system_control_registers): New enum.
1245 (ENCODE): New macro.
1246 (emit_insn): New helper function.
1247 (emit_b): New function.
1248 (emit_bcond): Likewise.
1249 (emit_cb): Likewise.
1250 (emit_tb): Likewise.
1251 (emit_blr): Likewise.
1252 (emit_stp): Likewise.
1253 (emit_ldp_q_offset): Likewise.
1254 (emit_stp_q_offset): Likewise.
1255 (emit_load_store): Likewise.
1256 (emit_ldr): Likewise.
1257 (emit_ldrsw): Likewise.
1258 (emit_str): Likewise.
1259 (emit_ldaxr): Likewise.
1260 (emit_stxr): Likewise.
1261 (emit_stlr): Likewise.
1262 (emit_data_processing_reg): Likewise.
1263 (emit_data_processing): Likewise.
1264 (emit_add): Likewise.
1265 (emit_sub): Likewise.
1266 (emit_mov): Likewise.
1267 (emit_movk): Likewise.
1268 (emit_mov_addr): Likewise.
1269 (emit_mrs): Likewise.
1270 (emit_msr): Likewise.
1271 (emit_sevl): Likewise.
1272 (emit_wfe): Likewise.
1273 (append_insns): Likewise.
1274 (can_encode_int32_in): New helper function.
1275 (aarch64_relocate_instruction): New function.
1276 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1277 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1278 (struct linux_target_ops): Install aarch64_get_thread_area,
1279 aarch64_install_fast_tracepoint_jump_pad and
1280 aarch64_get_min_fast_tracepoint_insn_len.
1281
787749ea
PL
12822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1283
1284 * Makefile.in (aarch64-insn.o): New rule.
1285 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1286
9812b2e6
YQ
12872015-09-21 Yao Qi <yao.qi@linaro.org>
1288
1289 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1290
18fe412b
YQ
12912015-09-21 Yao Qi <yao.qi@linaro.org>
1292
1293 * tracepoint.c (max_jump_pad_size): Remove.
1294
a0cc84cd
YQ
12952015-09-18 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-aarch64-low.c: Don't include sys/uio.h.
1298 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1299
d78908cf
WW
13002015-09-16 Wei-cheng Wang <cole945@gmail.com>
1301
1302 * tracepoint.c (eval_result_type): Change prototype.
1303 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1304
d57e0d50
PA
13052015-09-15 Pedro Alves <palves@redhat.com>
1306
1307 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1308 Check whether to report exec events instead of checking whether
1309 multiprocess is enabled.
1310
5a676acc
PA
13112015-09-15 Pedro Alves <palves@redhat.com>
1312
1313 PR remote/18965
1314 * remote-utils.c (prepare_resume_reply): Merge
1315 TARGET_WAITKIND_VFORK_DONE switch case with the
1316 TARGET_WAITKIND_FORKED case.
1317
7c5d0fad
YQ
13182015-09-15 Yao Qi <yao.qi@linaro.org>
1319
1320 * server.c (handle_query): Check string comparison using
1321 "else if" instead of "if".
1322
750ce8d1
YQ
13232015-09-15 Yao Qi <yao.qi@linaro.org>
1324
1325 * server.c (vCont_supported): New global variable.
1326 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1327 matches. Append ";vContSupported+" to own_buf.
1328 (handle_v_requests): Append ";s;S" to own_buf if target supports
1329 hardware single step or vCont_supported is false.
1330 (capture_main): Set vCont_supported to zero.
1331
70b90b91
YQ
13322015-09-15 Yao Qi <yao.qi@linaro.org>
1333
1334 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1335 it to ...
1336 (linux_supports_hardware_single_step): ... New function.
1337 (linux_target_ops): Update.
1338 * lynx-low.c (lynx_target_ops): Set field
1339 supports_hardware_single_step to target_can_do_hardware_single_step.
1340 * nto-low.c (nto_target_ops): Likewise.
1341 * spu-low.c (spu_target_ops): Likewise.
1342 * win32-low.c (win32_target_ops): Likewise.
1343 * target.c (target_can_do_hardware_single_step): New function.
1344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1345 Remove. <supports_hardware_single_step>: New field.
1346 (target_supports_conditional_breakpoints): Remove.
1347 (target_supports_hardware_single_step): New macro.
1348 (target_can_do_hardware_single_step): Declare.
1349 * server.c (handle_query): Use target_supports_hardware_single_step
1350 instead of target_supports_conditional_breakpoints.
1351
ade90bde
YQ
13522015-09-15 Yao Qi <yao.qi@linaro.org>
1353
1354 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1355 function.
1356 (struct linux_target_ops the_low_target): Install
1357 aarch64_linux_siginfo_fixup.
1358
94585166
DB
13592015-09-11 Don Breazeal <donb@codesourcery.com>
1360 Luis Machado <lgustavo@codesourcery.com>
1361
1362 * linux-low.c (linux_mourn): Static declaration.
1363 (linux_arch_setup): Move in front of
1364 handle_extended_wait.
1365 (linux_arch_setup_thread): New function.
1366 (handle_extended_wait): Handle exec events. Call
1367 linux_arch_setup_thread. Make event_lwp argument a
1368 pointer-to-a-pointer.
1369 (check_zombie_leaders): Do not check stopped threads.
1370 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1371 (linux_low_filter_event): Add lwp and thread for exec'ing
1372 non-leader thread if leader thread has been deleted.
1373 Refactor code into linux_arch_setup_thread and call it.
1374 Pass child lwp pointer by reference to handle_extended_wait.
1375 (linux_wait_for_event_filtered): Update comment.
1376 (linux_wait_1): Prevent clobbering exec event status.
1377 (linux_supports_exec_events): New function.
1378 (linux_target_ops) <supports_exec_events>: Initialize new member.
1379 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1380 new member.
1381 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1382 * server.c (report_exec_events): New global variable.
1383 (handle_query): Handle qSupported query for exec-events feature.
1384 (captured_main): Initialize report_exec_events.
1385 * server.h (report_exec_events): Declare new global variable.
1386 * target.h (struct target_ops) <supports_exec_events>: New
1387 member.
1388 (target_supports_exec_events): New macro.
1389 * win32-low.c (win32_target_ops) <supports_exec_events>:
1390 Initialize new member.
1391
0568462b
MM
13922015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1393
1394 * linux-low.c (linux_low_enable_btrace): Remove.
1395 (linux_target_ops): Replace linux_low_enable_btrace with
1396 linux_enable_btrace.
1397
39edd165
YQ
13982015-09-03 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-aarch64-low.c (aarch64_insert_point): Call
1401 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1402 returns true.
1403
1db33b5a
UW
14042015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1405
1406 * linux-low.c (check_stopped_by_breakpoint): Use
1407 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1408
ab290430
PA
14092015-08-27 Pedro Alves <palves@redhat.com>
1410
1411 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1412
8d749320
SM
14132015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1414
6711b7f8
SM
1415 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1416 the XNEW-family equivalent.
8d749320
SM
1417 (compile_bytecodes): Likewise.
1418 * dll.c (loaded_dll): Likewise.
1419 * event-loop.c (append_callback_event): Likewise.
1420 (create_file_handler): Likewise.
1421 (create_file_event): Likewise.
1422 * hostio.c (handle_open): Likewise.
1423 * inferiors.c (add_thread): Likewise.
1424 (add_process): Likewise.
1425 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1426 * linux-arm-low.c (arm_new_process): Likewise.
1427 (arm_new_thread): Likewise.
1428 * linux-low.c (add_to_pid_list): Likewise.
1429 (linux_add_process): Likewise.
1430 (handle_extended_wait): Likewise.
1431 (add_lwp): Likewise.
1432 (enqueue_one_deferred_signal): Likewise.
1433 (enqueue_pending_signal): Likewise.
1434 (linux_resume_one_lwp_throw): Likewise.
1435 (linux_resume_one_thread): Likewise.
1436 (linux_read_memory): Likewise.
1437 (linux_write_memory): Likewise.
1438 * linux-mips-low.c (mips_linux_new_process): Likewise.
1439 (mips_linux_new_thread): Likewise.
1440 (mips_add_watchpoint): Likewise.
1441 * linux-x86-low.c (initialize_low_arch): Likewise.
1442 * lynx-low.c (lynx_add_process): Likewise.
1443 * mem-break.c (set_raw_breakpoint_at): Likewise.
1444 (set_breakpoint): Likewise.
1445 (add_condition_to_breakpoint): Likewise.
1446 (add_commands_to_breakpoint): Likewise.
1447 (clone_agent_expr): Likewise.
1448 (clone_one_breakpoint): Likewise.
1449 * regcache.c (new_register_cache): Likewise.
1450 * remote-utils.c (look_up_one_symbol): Likewise.
1451 * server.c (queue_stop_reply): Likewise.
1452 (start_inferior): Likewise.
1453 (queue_stop_reply_callback): Likewise.
1454 (handle_target_event): Likewise.
1455 * spu-low.c (fetch_ppc_memory): Likewise.
1456 (store_ppc_memory): Likewise.
1457 * target.c (set_target_ops): Likewise.
1458 * thread-db.c (thread_db_load_search): Likewise.
1459 (try_thread_db_load_1): Likewise.
1460 * tracepoint.c (add_tracepoint): Likewise.
1461 (add_tracepoint_action): Likewise.
1462 (create_trace_state_variable): Likewise.
1463 (cmd_qtdpsrc): Likewise.
1464 (cmd_qtro): Likewise.
1465 (add_while_stepping_state): Likewise.
1466 * win32-low.c (child_add_thread): Likewise.
1467 (get_image_name): Likewise.
1468
ed8b7b42
YQ
14692015-08-25 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1472
db3cb7cb
YQ
14732015-08-25 Yao Qi <yao.qi@linaro.org>
1474
1475 * Makefile.in (aarch64-linux.o): New rule.
1476 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1477 srv_tgtobj.
1478 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1479 (aarch64_init_debug_reg_state): Make it extern.
1480 (aarch64_linux_prepare_to_resume): Remove.
1481
f6011a1c
YQ
14822015-08-25 Yao Qi <yao.qi@linaro.org>
1483
1484 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1485 lwp_arch_private_info and ptid_of_lwp.
1486
88e2cf7e
YQ
14872015-08-25 Yao Qi <yao.qi@linaro.org>
1488
1489 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1490 Find proc_info by find_process_pid. All callers updated.
1491
5e35436e
YQ
14922015-08-25 Yao Qi <yao.qi@linaro.org>
1493
1494 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1495 Remove.
1496 (debug_reg_change_callback): Remove.
1497 (aarch64_notify_debug_reg_change): Remove.
1498
4a8a7965
YQ
14992015-08-25 Yao Qi <yao.qi@linaro.org>
1500
1501 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1502 Call current_lwp_ptid.
1503
32a271ee
YQ
15042015-08-25 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-aarch64-low.c (debug_reg_change_callback): Use
1507 debug_printf.
1508
0d51c8d7
YQ
15092015-08-25 Yao Qi <yao.qi@linaro.org>
1510
1511 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1512
31a43dd5
YQ
15132015-08-25 Yao Qi <yao.qi@linaro.org>
1514
1515 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1516
8ee52567
YQ
15172015-08-25 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1520 the code.
1521
ff3f0f45
YQ
15222015-08-25 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1525 Remove.
1526 (debug_reg_change_callback): Remove argument entry and add argument
1527 lwp. Remove local variable thread. Don't print thread id in the
1528 debugging output. Don't check whether pid of thread equals to pid.
1529 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1530 iterate_over_lwps instead find_inferior.
1531
3d40fbb5
PA
15322015-08-24 Pedro Alves <palves@redhat.com>
1533
1534 * inferiors.c (get_first_process): New function.
1535 * inferiors.h (get_first_process): New declaration.
1536 * remote-utils.c (read_ptid): Default to the first process in the
1537 list, instead of to the current thread's process.
1538
438e1e42
PA
15392015-08-24 Pedro Alves <palves@redhat.com>
1540
1541 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1542 * event-loop.c: Likewise.
1543 * remote-utils.c: Likewise.
1544 * tracepoint.c: Likewise.
1545
a8c6d4fc
PA
15462015-08-24 Pedro Alves <palves@redhat.com>
1547
1548 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1549 ptid_get_lwp.
1550
99b0bb12
PA
15512015-08-21 Pedro Alves <palves@redhat.com>
1552
1553 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1554 instead of literal 1.
1555
f8904751
PA
15562015-08-21 Pedro Alves <palves@redhat.com>
1557
1558 * tdesc.c (default_description): Explicitly zero-initialize.
1559
465a859e
PA
15602015-08-21 Pedro Alves <palves@redhat.com>
1561
1562 PR gdb/18749
1563 * inferiors.c (remove_thread): Discard any pending stop reply for
1564 this thread.
1565 * server.c (remove_all_on_match_pid): Rename to ...
1566 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1567 instead of a pid.
1568 (discard_queued_stop_replies): Change parameter to a ptid. Now
1569 extern.
1570 (handle_v_kill, kill_inferior_callback, captured_main)
1571 (process_serial_event): Adjust.
1572 * server.h (discard_queued_stop_replies): Declare.
1573
f0db101d
PA
15742015-08-21 Pedro Alves <palves@redhat.com>
1575
1576 * linux-low.c (wait_for_sigstop): Always switch to no thread
1577 selected if the previously current thread dies.
1578 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1579 process instead of the current thread's.
1580 * remote-utils.c (input_interrupt): Don't check if there's no
1581 current thread.
1582 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1583 current thread to the general thread fails, error out.
1584 (handle_qxfer_auxv, handle_qxfer_libraries)
1585 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1586 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1587 (handle_query): Check if there's a thread selected instead of
1588 checking whether there's any thread in the thread list.
1589 (handle_qxfer_threads, handle_qxfer_btrace)
1590 (handle_qxfer_btrace_conf): Don't error out early if there's no
1591 thread in the thread list.
1592 (handle_v_cont, myresume): Don't set the current thread to the
1593 continue thread.
1594 (process_serial_event) <Hg handling>: Also set thread_id if the
1595 previous general thread is still alive.
1596 (process_serial_event) <g/G handling>: If setting the current
1597 thread to the general thread fails, error out.
1598 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1599 thread's lwp instead of the current thread's.
1600 * target.c (set_desired_thread): If the desired thread was not
1601 found, leave the current thread pointing to NULL. Return an int
1602 (boolean) indicating success.
1603 * target.h (set_desired_thread): Change return type to int.
1604
40045d91
MF
16052015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1606
1607 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1608 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1609 #includes.
1610 (ps_get_thread_area): New function.
1611
45face3b
GB
16122015-08-19 Gary Benson <gbenson@redhat.com>
1613
1614 * hostio.c (handle_pread): Do not attempt to read more data
1615 than hostio_reply_with_data can fit in a packet.
1616
16d5f642
JB
16172015-08-18 Joel Brobecker <brobecker@adacore.com>
1618
1619 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1620
a738da3a
MF
16212015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1622
1623 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1624
33ebda9d
PA
16252015-08-06 Pedro Alves <palves@redhat.com>
1626
1627 * tracepoint.c (expr_eval_result): Now an int.
1628
a44892be
PA
16292015-08-06 Pedro Alves <palves@redhat.com>
1630
1631 * gdbthread.h (struct regcache): Forward declare.
1632 (struct thread_info) <regcache_data>: Now a struct regcache
1633 pointer.
1634 * inferiors.c (inferior_regcache_data)
1635 (set_inferior_regcache_data): Now work with struct regcache
1636 pointers.
1637 * inferiors.h (struct regcache): Forward declare.
1638 (inferior_regcache_data, set_inferior_regcache_data): Now work
1639 with struct regcache pointers.
1640 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1641 (free_register_cache_thread): Remove struct regcache pointer
1642 casts.
1643
608a1e46
PA
16442015-08-06 Pedro Alves <palves@redhat.com>
1645
1646 * server.c (captured_main): On error, print the exception message
1647 to stderr, and if run_once is set, throw a quit.
1648
f0ce0d3a
PA
16492015-08-06 Pedro Alves <palves@redhat.com>
1650
1651 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1652 the current thread.
1653
bf47e248
PA
16542015-08-06 Pedro Alves <palves@redhat.com>
1655
1656 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1657 reading beyond the passed in buffer length.
1658
b6b9ffcc
PL
16592015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1660
1661 * tracepoint.c (symbol_list) <required>: Remove.
1662
863d01bd
PA
16632015-08-06 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1666 count if stopping and suspending threads.
1667 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1668 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1669 (linux_detach): Complete an ongoing step-over.
1670 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1671 throughout.
1672 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1673 (linux_wait_1): If passing a signal to the inferior after
1674 finishing a step-over, unsuspend and re-resume all lwps. If we
1675 see a single-step event but the thread should be continuing, don't
1676 pass the trap to gdb.
1677 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1678 internal_error instead of gdb_assert.
1679 (enqueue_pending_signal): New function.
1680 (check_ptrace_stopped_lwp_gone): Add debug output.
1681 (start_step_over): Use internal_error instead of gdb_assert.
1682 (complete_ongoing_step_over): New function.
1683 (linux_resume_one_thread): Don't resume a suspended thread.
1684 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1685 it stepping.
1686
00db26fa
PA
16872015-08-06 Pedro Alves <palves@redhat.com>
1688
1689 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1690 (linux_thread_alive): Use lwp_is_marked_dead.
1691 (extended_event_reported): Delete.
1692 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1693 instead of extended_event_reported.
1694 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1695 as well.
1696 (lwp_is_marked_dead): New function.
1697 (lwp_running): Use lwp_is_marked_dead.
1698 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1699 comment.
1700
ad071a30
PA
17012015-08-06 Pedro Alves <palves@redhat.com>
1702
1703 * linux-low.c (linux_wait_1): Move fork event output out of the
1704 !report_to_gdb check. Pass event_child->waitstatus to
1705 target_waitstatus_to_string instead of ourstatus.
1706
524b57e6
YQ
17072015-08-04 Yao Qi <yao.qi@linaro.org>
1708
1709 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1710 if current_thread is 32 bit.
1711
6085d6f6
YQ
17122015-08-04 Yao Qi <yao.qi@linaro.org>
1713
1714 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1715 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1716 * server.c (extended_protocol): Remove "static".
1717 * server.h (extended_protocol): Declare it.
1718
8a7e4587
YQ
17192015-08-04 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1722 both aarch64 and aarch32.
1723 (aarch64_set_pc): Likewise.
1724
3b53ae99
YQ
17252015-08-04 Yao Qi <yao.qi@linaro.org>
1726
1727 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1728 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1729 arm-with-neon.xml to srv_xmlfiles.
1730 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1731 (is_64bit_tdesc): New function.
1732 (aarch64_linux_read_description): New function.
1733 (aarch64_arch_setup): Call aarch64_linux_read_description.
1734 (regs_info): Rename to regs_info_aarch64.
1735 (aarch64_regs_info): Return right regs_info.
1736 (initialize_low_arch): Call initialize_low_arch_aarch32.
1737
bd9e6534
YQ
17382015-08-04 Yao Qi <yao.qi@linaro.org>
1739
1740 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1741 * linux-aarch32-low.c: New file.
1742 * linux-aarch32-low.h: New file.
1743 * linux-arm-low.c (arm_fill_gregset): Move it to
1744 linux-aarch32-low.c.
1745 (arm_store_gregset): Likewise.
1746 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1747 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1748 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1749 (regs_info): Rename to regs_info_arm.
1750 (arm_regs_info): Return regs_info_aarch32 if
1751 have_ptrace_getregset is 1 and target description is
1752 arm_with_neon or arm_with_vfpv3.
1753 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1754 Call initialize_low_arch_aarch32 instead.
1755
ded48a5e
YQ
17562015-08-04 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1759 * linux-low.c: ... here.
1760 * linux-low.h (have_ptrace_getregset): Declare it.
1761
96e9210f
PA
17622015-08-04 Pedro Alves <palves@redhat.com>
1763
1764 * thread-db.c (struct thread_db): Use new typedefs.
1765 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1766 CHK calls.
1767 (disable_thread_event_reporting): Cast result of dlsym to
1768 destination function pointer type.
1769 (thread_db_mourn): Use td_ta_delete_ftype.
1770
af60a1ef
SL
17712015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1772
1773 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1774 arch variant.
1775 (CDX_BREAKPOINT): Define for R2.
1776 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1777 (the_low_target): Add comments.
1778
e8b41681
YQ
17792015-07-30 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-arm-low.c (arm_hwcap): Remove it.
1782 (arm_read_description): New local variable arm_hwcap. Don't
1783 set arm_hwcap to zero.
1784
89abb039
YQ
17852015-07-30 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1788 Use regcache->tdesc instead.
1789 (arm_store_wmmxregset): Likewise.
1790 (arm_fill_vfpregset): Likewise.
1791 (arm_store_vfpregset): Likewise.
1792
deca266c
YQ
17932015-07-30 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-arm-low.c: Include arch/arm.h.
1796 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1797 (arm_store_gregset): Likewise.
1798
aa58a496
SM
17992015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1802 ptrace's 4th parameter.
1803
50904b25
YQ
18042015-07-27 Yao Qi <yao.qi@linaro.org>
1805
1806 * configure.srv (case aarch64*-*-linux*): Don't set
1807 srv_linux_usrregs.
1808
5826e159
PA
18092015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1810
1811 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1812 sys/ptrace.h.
1813 * linux-arm-low.c: Likewise.
1814 * linux-cris-low.c: Likewise.
1815 * linux-crisv32-low.c: Likewise.
1816 * linux-low.c: Likewise.
1817 * linux-m68k-low.c: Likewise.
1818 * linux-mips-low.c: Likewise.
1819 * linux-nios2-low.c: Likewise.
1820 * linux-s390-low.c: Likewise.
1821 * linux-sparc-low.c: Likewise.
1822 * linux-tic6x-low.c: Likewise.
1823 * linux-tile-low.c: Likewise.
1824 * linux-x86-low.c: Likewise.
1825
54019719
PA
18262015-07-24 Pedro Alves <palves@redhat.com>
1827
1828 * config.in: Regenerate.
1829 * configure: Regenerate.
1830
eb7aa561
PA
18312015-07-24 Pedro Alves <palves@redhat.com>
1832
1833 * acinclude.m4: Include ../ptrace.m4.
1834 * configure.ac: Call GDB_AC_PTRACE.
1835 * config.in, configure: Regenerate.
1836
55d7b841
YQ
18372015-07-24 Yao Qi <yao.qi@linaro.org>
1838
1839 * linux-low.c (linux_create_inferior): Remove setting to
1840 proc->priv->new_inferior.
1841 (linux_attach): Likewise.
1842 (linux_low_filter_event): Likewise.
1843 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1844
c06cbd92
YQ
18452015-07-24 Yao Qi <yao.qi@linaro.org>
1846
1847 * linux-low.c (linux_arch_setup): New function.
1848 (linux_low_filter_event): If proc->tdesc is NULL and
1849 proc->attached is true, call the_low_target.arch_setup.
1850 Otherwise, keep status pending, and return.
1851 (linux_resume_one_lwp_throw): Don't call get_pc if
1852 thread->while_stepping isn't NULL. Don't call
1853 get_thread_regcache if proc->tdesc is NULL.
1854 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1855 (linux_target_ops): Install arch_setup.
1856 * server.c (start_inferior): Call the_target->arch_setup.
1857 * target.h (struct target_ops) <arch_setup>: New field.
1858 (target_arch_setup): New marco.
1859 * lynx-low.c (lynx_target_ops): Update.
1860 * nto-low.c (nto_target_ops): Update.
1861 * spu-low.c (spu_target_ops): Update.
1862 * win32-low.c (win32_target_ops): Update.
1863
5ae3ebba
YQ
18642015-07-24 Yao Qi <yao.qi@linaro.org>
1865
1866 * linux-low.c (linux_add_process): Don't set
1867 proc->priv->new_inferior.
1868 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1869 (linux_attach): Likewise.
1870
eb97750b
YQ
18712015-07-24 Yao Qi <yao.qi@linaro.org>
1872
1873 * server.c (start_inferior): Code refactor.
1874
51aee833
YQ
18752015-07-24 Yao Qi <yao.qi@linaro.org>
1876
1877 * server.c (process_serial_event): Set general_thread.
1878
af1b22f3
YQ
18792015-07-21 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1882 aarch64_linux_get_debug_reg_capacity.
1883
554717a3
YQ
18842015-07-17 Yao Qi <yao.qi@linaro.org>
1885
1886 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1887 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1888 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1889 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1890 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1891 (AARCH64_HWP_ALIGNMENT): Likewise.
1892 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1893 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1894 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1895 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1896 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1897 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1898 (struct aarch64_debug_reg_state): Likewise.
1899 (struct arch_lwp_info): Likewise.
1900 (aarch64_align_watchpoint): Likewise.
1901 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1902 (aarch64_watchpoint_length): Likewise.
1903 (aarch64_point_encode_ctrl_reg): Likewise
1904 (aarch64_point_is_aligned): Likewise.
1905 (aarch64_align_watchpoint): Likewise.
1906 (aarch64_linux_set_debug_regs):
1907 (aarch64_dr_state_insert_one_point): Likewise.
1908 (aarch64_dr_state_remove_one_point): Likewise.
1909 (aarch64_handle_breakpoint): Likewise.
1910 (aarch64_handle_aligned_watchpoint): Likewise.
1911 (aarch64_handle_unaligned_watchpoint): Likewise.
1912 (aarch64_handle_watchpoint): Likewise.
1913
c67ca4de
YQ
19142015-07-17 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1917 and don't aarch64_get_debug_reg_state. All callers update.
1918 (aarch64_handle_aligned_watchpoint): Likewise.
1919 (aarch64_handle_unaligned_watchpoint): Likewise.
1920 (aarch64_handle_watchpoint): Likewise.
1921 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1922 (aarch64_remove_point): Likewise.
1923
25abf979
YQ
19242015-07-17 Yao Qi <yao.qi@linaro.org>
1925
1926 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1927 debug_printf.
1928 (aarch64_handle_unaligned_watchpoint): Likewise.
1929
db1ff28b
JK
19302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1931
1932 Revert the previous 3 commits:
1933 Move gdb_regex* to common/
1934 Move linux_find_memory_regions_full & co.
1935 gdbserver build-id attribute generator
1936
700ca40f
JK
19372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1938 Jan Kratochvil <jan.kratochvil@redhat.com>
1939
1940 gdbserver build-id attribute generator.
1941 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1942 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1943 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1944 (find_phdr): New.
1945 (get_dynamic): Use find_pdhr to traverse program headers.
1946 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1947 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1948 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1949 (get_hex_build_id): New.
1950 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1951 to reply XML document.
1952
9904185c
JK
19532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1954 Jan Kratochvil <jan.kratochvil@redhat.com>
1955
1956 * target.c: Include target/target-utils.h and fcntl.h.
1957 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1958 (target_fileio_read_stralloc): New functions.
1959
6e5b4429
JK
19602015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1961
1962 * Makefile.in (OBS): Add gdb_regex.o.
1963 (gdb_regex.o): New.
1964 * config.in: Rebuilt.
1965 * configure: Rebuilt.
1966
ddc98fbf
JK
19672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1968 Jan Kratochvil <jan.kratochvil@redhat.com>
1969
1970 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1971 * Makefile.in (OBS): Add target-utils.o.
1972 (linux-maps.o, target-utils.o): New.
1973 * configure.srv (srv_linux_obj): Add linux-maps.o.
1974
e57bb7a0
PL
19752015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1976
1977 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1978 function, return 1.
1979 (the_low_target): Install it.
1980
586b02a9
PA
19812015-07-14 Pedro Alves <palves@redhat.com>
1982
1983 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1984 Instead, ignore ECHILD, and throw an error for other errnos.
1985
58c1b36c
PA
19862015-07-10 Pedro Alves <palves@redhat.com>
1987
1988 * event-loop.c (struct callback_event) <data>: Change type to
1989 gdb_client_data instance instead of gdb_client_data pointer.
1990 (append_callback_event): Adjust.
1991
421530db
PL
19922015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1993
1994 * linux-aarch64-low.c: Add comments for each linux_target_ops
1995 method. Remove comments already covered in target_ops and
1996 linux_target_ops definitions.
1997 (the_low_target): Add comments for each unimplemented method.
1998
c2d65f38
YQ
19992015-07-09 Yao Qi <yao.qi@linaro.org>
2000
2001 * linux-aarch64-low.c (aarch64_regmap): Remove.
2002 (aarch64_usrregs_info): Remove.
2003 (regs_info): Set field usrregs to NULL.
2004
b20a6524
MM
20052015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2006
2007 * linux-low.c: Include "rsp-low.h"
2008 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2009 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2010 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2011 (handle_btrace_enable_pt): New.
2012 (handle_btrace_general_set): Support "pt".
2013 (handle_btrace_conf_general_set): Support "pt:size".
2014
96c97461
PL
20152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2016
2017 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2018 Z_PACKET_SW_BP.
2019
37d66942
PL
20202015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2021
2022 * linux-aarch64-low.c: Remove comment about endianness.
2023 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2024 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2025 memcmp.
2026
dc06243f
GB
20272015-06-24 Gary Benson <gbenson@redhat.com>
2028
2029 * linux-i386-ipa.c (stdint.h): Do not include.
2030 * lynx-i386-low.c (stdint.h): Likewise.
2031 * lynx-ppc-low.c (stdint.h): Likewise.
2032 * mem-break.c (stdint.h): Likewise.
2033 * thread-db.c (stdint.h): Likewise.
2034 * tracepoint.c (stdint.h): Likewise.
2035 * win32-low.c (stdint.h): Likewise.
2036
124e13d9
SM
20372015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2038
2039 * server.c (write_qxfer_response): Update call to
2040 remote_escape_output.
2041
909c2cda
JK
20422015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2043 Jan Kratochvil <jan.kratochvil@redhat.com>
2044
2045 Merge multiple hex conversions.
2046 * gdbreplay.c (tohex): Rename to 'fromhex'.
2047 (logchar): Use fromhex.
2048
24c05f46
JK
20492015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2050
2051 * server.c (handle_qxfer_libraries): Set `version' attribute for
2052 <library-list>.
2053
14d2069a
GB
20542015-06-10 Gary Benson <gbenson@redhat.com>
2055
2056 * target.h (struct target_ops) <multifs_open>: New field.
2057 <multifs_unlink>: Likewise.
2058 <multifs_readlink>: Likewise.
2059 * linux-low.c (nat/linux-namespaces.h): New include.
2060 (linux_target_ops): Initialize the_target->multifs_open,
2061 the_target->multifs_unlink and the_target->multifs_readlink.
2062 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2063 * hostio.c (hostio_fs_pid): New static variable.
2064 (hostio_handle_new_gdb_connection): New function.
2065 (handle_setfs): Likewise.
2066 (handle_open): Use the_target->multifs_open as appropriate.
2067 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2068 (handle_readlink): Use the_target->multifs_readlink as
2069 appropriate.
2070 (handle_vFile): Handle vFile:setfs packets.
2071 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2072 after target_handle_new_gdb_connection.
2073
4b8b5e72
GB
20742015-06-10 Gary Benson <gbenson@redhat.com>
2075
2076 * configure.ac (AC_CHECK_FUNCS): Add setns.
2077 * config.in: Regenerate.
2078 * configure: Likewise.
2079 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2080 (linux-namespaces.o): New rule.
2081 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2082
3ac2e371
GB
20832015-06-09 Gary Benson <gbenson@redhat.com>
2084
2085 * hostio.c (handle_open): Process mode argument with
2086 fileio_to_host_mode.
2087
ca9b78ce
YQ
20882015-06-01 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2091 * linux-x86-low.c: Likewise.
2092
bfacd19d
DB
20932015-05-28 Don Breazeal <donb@codesourcery.com>
2094
2095 * linux-low.c (handle_extended_wait): Initialize
2096 thread_info.last_resume_kind for new fork children.
2097
452003ef
PA
20982015-05-15 Pedro Alves <palves@redhat.com>
2099
2100 * target.h (target_handle_new_gdb_connection): Rewrite using if
2101 wrapped in do/while.
2102
1041a03c
JB
21032015-05-14 Joel Brobecker <brobecker@adacore.com>
2104
2105 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2106 * configure, config.in: Regenerate.
2107 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2108 Declare typedef.
2109
c269dbdb
DB
21102015-05-12 Don Breazeal <donb@codesourcery.com>
2111
2112 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2113 PTRACE_EVENT_VFORK_DONE.
2114 (linux_low_ptrace_options, extended_event_reported): Add vfork
2115 events.
2116 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2117 and "vforkdone" for RSP 'T' Stop Reply Packet.
2118 * server.h (report_vfork_events): Declare
2119 global variable.
2120
3a8a0396
DB
21212015-05-12 Don Breazeal <donb@codesourcery.com>
2122
2123 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2124 (the_low_target) <new_fork>: Initialize new member.
2125 * linux-arm-low.c (arm_new_fork): New function.
2126 (the_low_target) <new_fork>: Initialize new member.
2127 * linux-low.c (handle_extended_wait): Call new target function
2128 new_fork.
2129 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2130 * linux-mips-low.c (mips_add_watchpoint): New function
2131 extracted from mips_insert_point.
2132 (the_low_target) <new_fork>: Initialize new member.
2133 (mips_linux_new_fork): New function.
2134 (mips_insert_point): Call mips_add_watchpoint.
2135 * linux-x86-low.c (x86_linux_new_fork): New function.
2136 (the_low_target) <new_fork>: Initialize new member.
2137
de0d863e
DB
21382015-05-12 Don Breazeal <donb@codesourcery.com>
2139
2140 * linux-low.c (handle_extended_wait): Implement return value,
2141 rename argument 'event_child' to 'event_lwp', handle
2142 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2143 (linux_low_ptrace_options): New function.
2144 (linux_low_filter_event): Call linux_low_ptrace_options,
2145 use different argument fo linux_enable_event_reporting,
2146 use return value from handle_extended_wait.
2147 (extended_event_reported): New function.
2148 (linux_wait_1): Call extended_event_reported and set
2149 status to report fork events.
2150 (linux_write_memory): Add pid to debug message.
2151 (reset_lwp_ptrace_options_callback): New function.
2152 (linux_handle_new_gdb_connection): New function.
2153 (linux_target_ops): Initialize new structure member.
2154 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2155 * lynx-low.c: Initialize new structure member.
2156 * remote-utils.c (prepare_resume_reply): Implement stop reason
2157 "fork" for "T" stop message.
2158 * server.c (handle_query): Call handle_new_gdb_connection.
2159 * server.h (report_fork_events): Declare global flag.
2160 * target.h (struct target_ops) <handle_new_gdb_connection>:
2161 New member.
2162 (target_handle_new_gdb_connection): New macro.
2163 * win32-low.c: Initialize new structure member.
2164
ddcbc397
DB
21652015-05-12 Don Breazeal <donb@codesourcery.com>
2166
2167 * mem-break.c (APPEND_TO_LIST): Define macro.
2168 (clone_agent_expr): New function.
2169 (clone_one_breakpoint): New function.
2170 (clone_all_breakpoints): New function.
2171 * mem-break.h: Declare new functions.
2172
89245bc0
DB
21732015-05-12 Don Breazeal <donb@codesourcery.com>
2174
2175 * linux-low.c (linux_supports_fork_events): New function.
2176 (linux_supports_vfork_events): New function.
2177 (linux_target_ops): Initialize new structure members.
2178 (initialize_low): Call linux_check_ptrace_features.
2179 * lynx-low.c (lynx_target_ops): Initialize new structure
2180 members.
2181 * server.c (report_fork_events, report_vfork_events):
2182 New global flags.
2183 (handle_query): Add new features to qSupported packet and
2184 response.
2185 (captured_main): Initialize new global variables.
2186 * target.h (struct target_ops) <supports_fork_events>:
2187 New member.
2188 <supports_vfork_events>: New member.
2189 (target_supports_fork_events): New macro.
2190 (target_supports_vfork_events): New macro.
2191 * win32-low.c (win32_target_ops): Initialize new structure
2192 members.
2193
835205d0
GB
21942015-05-12 Gary Benson <gbenson@redhat.com>
2195
2196 * server.c (handle_qxfer_exec_file): Use current process
2197 if annex is empty.
2198
21e94bd9
SL
21992015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2200
2201 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2202 Remove HAVE_PTRACE_GETREGS conditionals.
2203 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2204 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2205
45614f15
YQ
22062015-05-08 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-low.c (linux_supports_conditional_breakpoints): New
2209 function.
2210 (linux_target_ops): Install new target method.
2211 * lynx-low.c (lynx_target_ops): Install NULL hook for
2212 supports_conditional_breakpoints.
2213 * nto-low.c (nto_target_ops): Likewise.
2214 * spu-low.c (spu_target_ops): Likewise.
2215 * win32-low.c (win32_target_ops): Likewise.
2216 * server.c (handle_query): Check
2217 target_supports_conditional_breakpoints.
2218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2219 New field.
2220 (target_supports_conditional_breakpoints): New macro.
2221
80ad801e
PA
22222015-05-06 Pedro Alves <palves@redhat.com>
2223
2224 PR server/18081
2225 * server.c (start_inferior): If the process exits, mourn it.
2226
819843c7
GB
22272015-04-21 Gary Benson <gbenson@redhat.com>
2228
2229 * hostio.c (fileio_open_flags_to_host): Factored out to
2230 fileio_to_host_openflags in common/fileio.c. Single use
2231 updated.
2232
a2d5a9d7
MF
22332015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2234
2235 * linux-xtensa-low.c (xtensa_fill_gregset)
2236 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2237 XCHAL_HAVE_LOOP.
2238
deb44829
MF
22392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2240
2241 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2242 (regs_info): Replace usrregs pointer with NULL.
2243
e57f1de3
GB
22442015-04-17 Gary Benson <gbenson@redhat.com>
2245
2246 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2247 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2248 * server.c (handle_qxfer_exec_file): New function.
2249 (qxfer_packets): Add exec-file entry.
2250 (handle_query): Report qXfer:exec-file:read as supported packet.
2251
62828379
RN
22522015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2253
2254 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2255
b88bb450
GB
22562015-04-09 Gary Benson <gbenson@redhat.com>
2257
2258 * hostio-errno.c (errno_to_fileio_error): Remove function.
2259 Update caller to use remote_fileio_to_fio_error.
2260
c8f4bfdd
YQ
22612015-04-09 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-low.c (linux_insert_point): Call
2264 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2265 (linux_remove_point): Call remove_memory_breakpoint if type is
2266 raw_bkpt_type_sw.
2267 * linux-x86-low.c (x86_insert_point): Don't call
2268 insert_memory_breakpoint.
2269 (x86_remove_point): Don't call remove_memory_breakpoint.
2270
41f98f02
PA
22712015-04-01 Pedro Alves <palves@redhat.com>
2272 Cleber Rosa <crosa@redhat.com>
2273
2274 * server.c (gdbserver_usage): Reorganize and extend the usage
2275 message.
2276
2bf6fb9d
PA
22772015-03-24 Pedro Alves <palves@redhat.com>
2278
2279 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2280 output. Also dump TRAP_TRACE.
2281 (linux_low_filter_event): In debug output, distinguish a
2282 resume_stop SIGSTOP from a delayed SIGSTOP.
2283
369f6daa
GB
22842015-03-24 Gary Benson <gbenson@redhat.com>
2285
2286 * linux-x86-low.c (x86_linux_new_thread): Moved to
2287 nat/x86-linux.c.
2288 (x86_linux_prepare_to_resume): Likewise.
2289
8e5d4070
GB
22902015-03-24 Gary Benson <gbenson@redhat.com>
2291
2292 * Makefile.in (x86-linux-dregs.o): New rule.
2293 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2294 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2295 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2296 (x86_linux_dr_get): Likewise.
2297 (x86_linux_dr_set): Likewise.
2298 (update_debug_registers_callback): Likewise.
2299 (x86_linux_dr_set_addr): Likewise.
2300 (x86_linux_dr_get_addr): Likewise.
2301 (x86_linux_dr_set_control): Likewise.
2302 (x86_linux_dr_get_control): Likewise.
2303 (x86_linux_dr_get_status): Likewise.
2304 (x86_linux_update_debug_registers): Likewise.
2305
2b95d440
GB
23062015-03-24 Gary Benson <gbenson@redhat.com>
2307
2308 * linux-x86-low.c (x86_linux_update_debug_registers):
2309 New function, factored out from...
2310 (x86_linux_prepare_to_resume): ...this.
2311
14b0bc68
GB
23122015-03-24 Gary Benson <gbenson@redhat.com>
2313
2314 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2315 (x86_linux_dr_set): Likewise.
2316 (update_debug_registers_callback): Likewise.
2317 (x86_linux_dr_set_addr): Likewise.
2318 (x86_linux_dr_get_addr): Likewise.
2319 (x86_linux_dr_set_control): Likewise.
2320 (x86_linux_dr_get_control): Likewise.
2321 (x86_linux_dr_get_status): Likewise.
2322 (x86_linux_prepare_to_resume): Likewise.
2323
5dfe6ca8
GB
23242015-03-24 Gary Benson <gbenson@redhat.com>
2325
2326 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2327 Use perror_with_name. Pass string through gettext.
2328 (x86_linux_dr_set): Likewise.
2329
d33472ad
GB
23302015-03-24 Gary Benson <gbenson@redhat.com>
2331
2332 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2333 (x86_linux_dr_set_addr): ...this.
2334 (x86_dr_low_get_addr): Rename to...
2335 (x86_linux_dr_get_addr): ...this.
2336 (x86_dr_low_set_control): Rename to...
2337 (x86_linux_dr_set_control): ...this.
2338 (x86_dr_low_get_control): Rename to...
2339 (x86_linux_dr_get_control): ...this.
2340 (x86_dr_low_get_status): Rename to...
2341 (x86_linux_dr_get_status): ...this.
2342 (x86_dr_low): Update with new function names.
2343
4b134ca1
GB
23442015-03-24 Gary Benson <gbenson@redhat.com>
2345
2346 * Makefile.in (x86-linux.o): New rule.
2347 * configure.srv: Add x86-linux.o to relevant targets.
2348 * linux-low.c (lwp_set_arch_private_info): New function.
2349 (lwp_arch_private_info): Likewise.
2350 * linux-x86-low.c: Include nat/x86-linux.h.
2351 (arch_lwp_info): Removed structure.
2352 (update_debug_registers_callback):
2353 Use lwp_set_debug_registers_changed.
2354 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2355 and lwp_set_debug_registers_changed.
2356 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2357
34c703da
GB
23582015-03-24 Gary Benson <gbenson@redhat.com>
2359
2360 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2361 * linux-arm-low.c (arm_new_thread): Likewise.
2362 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2363 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2364 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2365 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2366
cff068da
GB
23672015-03-24 Gary Benson <gbenson@redhat.com>
2368
2369 * linux-low.c (ptid_of_lwp): New function.
2370 (lwp_is_stopped): Likewise.
2371 (lwp_stop_reason): Likewise.
2372 * linux-x86-low.c (update_debug_registers_callback):
2373 Use lwp_is_stopped.
2374 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2375 lwp_stop_reason.
2376
b2f7c7e8
GB
23772015-03-24 Gary Benson <gbenson@redhat.com>
2378
2379 * linux-low.h (linux_stop_lwp): Remove declaration.
2380
6d4ee8c6
GB
23812015-03-24 Gary Benson <gbenson@redhat.com>
2382
2383 * linux-low.h: Include nat/linux-nat.h.
2384 * linux-low.c (iterate_over_lwps_args): New structure.
2385 (iterate_over_lwps_filter): New function.
2386 (iterate_over_lwps): Likewise.
2387 * linux-x86-low.c (update_debug_registers_callback):
2388 Update signature to what iterate_over_lwps expects.
2389 Remove PID check that iterate_over_lwps now performs.
2390 (x86_dr_low_set_addr): Use iterate_over_lwps.
2391 (x86_dr_low_set_control): Likewise.
2392
70a0bb6b
GB
23932015-03-24 Gary Benson <gbenson@redhat.com>
2394
2395 * linux-x86-low.c (x86_debug_reg_state): New function.
2396 (x86_linux_prepare_to_resume): Use the above.
2397
7b669087
GB
23982015-03-24 Gary Benson <gbenson@redhat.com>
2399
2400 * linux-low.c (current_lwp_ptid): New function.
2401 * linux-x86-low.c: Include nat/linux-nat.h.
2402 (x86_dr_low_get_addr): Use current_lwp_ptid.
2403 (x86_dr_low_get_control): Likewise.
2404 (x86_dr_low_get_status): Likewise.
2405
eef49a3d
PA
24062015-03-20 Pedro Alves <palves@redhat.com>
2407
2408 * tracepoint.c (cmd_qtstatus): Make "str" const.
2409
b2333d22
PA
24102015-03-20 Pedro Alves <palves@redhat.com>
2411
2412 * server.c (handle_general_set): Make "req_str" const.
2413
23f238d3
PA
24142015-03-19 Pedro Alves <palves@redhat.com>
2415
2416 * linux-low.c (linux_resume_one_lwp): Rename to ...
2417 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2418 instead call perror_with_name.
2419 (check_ptrace_stopped_lwp_gone): New function.
2420 (linux_resume_one_lwp): Reimplement as wrapper around
2421 linux_resume_one_lwp_throw that swallows errors if the LWP is
2422 gone.
2423
91baf43f
PA
24242015-03-19 Pedro Alves <palves@redhat.com>
2425
2426 * linux-low.c (count_events_callback, select_event_lwp_callback):
2427 No longer check whether the thread has resume_stop as last resume
2428 kind.
2429
8bf3b159
PA
24302015-03-19 Pedro Alves <palves@redhat.com>
2431
2432 * linux-low.c (count_events_callback, select_event_lwp_callback):
2433 Use the lwp's status_pending_p field, not the thread's.
2434
b90fc188
PA
24352015-03-19 Pedro Alves <palves@redhat.com>
2436
2437 * linux-low.c (select_event_lwp_callback): Update comments to
2438 no longer mention SIGTRAP.
2439
464b0089
GB
24402015-03-18 Gary Benson <gbenson@redhat.com>
2441
2442 * server.c (handle_query): Do not report vFile:fstat as supported.
2443
aa9e327f
GB
24442015-03-11 Gary Benson <gbenson@redhat.com>
2445
2446 * hostio.c (sys/types.h): New include.
2447 (sys/stat.h): Likewise.
2448 (common-remote-fileio.h): Likewise.
2449 (handle_fstat): New function.
2450 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2451
791c0056
GB
24522015-03-11 Gary Benson <gbenson@redhat.com>
2453
2454 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2455 struct stat.st_blocks and struct stat.st_blksize.
2456 * configure: Regenerate.
2457 * config.in: Likewise.
2458 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2459 (OBS): Add common-remote-fileio.o.
2460 (common-remote-fileio.o): New rule.
2461
9a9df970
PA
24622015-03-09 Pedro Alves <palves@redhat.com>
2463
2464 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2465 'struct sockaddr' pointer in 'accept' call.
2466
9eb1356e
PA
24672015-03-09 Pedro Alves <palves@redhat.com>
2468
2469 Revert:
2470 2015-03-07 Pedro Alves <palves@redhat.com>
2471 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2472 or <winsock2.h> here. Instead include "gdb_socket.h".
2473 (remote_open): Use union gdb_sockaddr_u.
2474 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2475 or <winsock2.h> here. Instead include "gdb_socket.h".
2476 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2477 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2478 or <sys/un.h>.
2479 (init_named_socket, gdb_agent_helper_thread): Use union
2480 gdb_sockaddr_u.
2481
aac331e4
PA
24822015-03-07 Pedro Alves <palves@redhat.com>
2483
2484 * configure.ac (build_warnings): Move
2485 -Wdeclaration-after-statement to the C-specific set.
2486 * configure: Regenerate.
2487
366c75fc
PA
24882015-03-07 Pedro Alves <palves@redhat.com>
2489
2490 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2491 or <winsock2.h> here. Instead include "gdb_socket.h".
2492 (remote_open): Use union gdb_sockaddr_u.
2493 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2494 or <winsock2.h> here. Instead include "gdb_socket.h".
2495 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2496 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2497 or <sys/un.h>.
2498 (init_named_socket, gdb_agent_helper_thread): Use union
2499 gdb_sockaddr_u.
2500
492d29ea
PA
25012015-03-07 Pedro Alves <palves@redhat.com>
2502
2503 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2504 instead.
2505
60a191ed
YQ
25062015-03-06 Yao Qi <yao.qi@linaro.org>
2507
2508 * linux-aarch64-low.c (aarch64_insert_point): Use
2509 show_debug_regs as a boolean.
2510 (aarch64_remove_point): Likewise.
2511
f5771b1d
PA
25122015-03-05 Pedro Alves <palves@redhat.com>
2513
2514 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2515 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2516 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2517 * nto-low.c (nto_target_ops): Likewise.
2518 * spu-low.c (spu_target_ops): Likewise.
2519 * win32-low.c (win32_target_ops): Likewise.
2520
3e572f71
PA
25212015-03-04 Pedro Alves <palves@redhat.com>
2522
72f4393d 2523 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2524 Decide whether a breakpoint triggered based on the SIGTRAP's
2525 siginfo.si_code.
72f4393d
L
2526 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2527 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2528 (linux_low_filter_event): Check for breakpoints before checking
2529 watchpoints.
2530 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2531 siginfo.si_code.
72f4393d
L
2532 (linux_stopped_by_sw_breakpoint)
2533 (linux_supports_stopped_by_sw_breakpoint)
2534 (linux_stopped_by_hw_breakpoint)
2535 (linux_supports_stopped_by_hw_breakpoint): New functions.
2536 (linux_target_ops): Install new target methods.
3e572f71 2537
1ec68e26
PA
25382015-03-04 Pedro Alves <palves@redhat.com>
2539
2540 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2541 * server.c (swbreak_feature, hwbreak_feature): New globals.
2542 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2543 (captured_main): Clear swbreak_feature and hwbreak_feature.
2544 * server.h (swbreak_feature, hwbreak_feature): Declare.
2545 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2546 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2547 supports_stopped_by_hw_breakpoint>: New fields.
2548 (target_supports_stopped_by_sw_breakpoint)
2549 (target_stopped_by_sw_breakpoint)
2550 (target_supports_stopped_by_hw_breakpoint)
2551 (target_stopped_by_hw_breakpoint): Declare.
2552
15c66dd6
PA
25532015-03-04 Pedro Alves <palves@redhat.com>
2554
2555 enum lwp_stop_reason -> enum target_stop_reason
2556 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2557 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2558 (linux_wait_1, stuck_in_jump_pad_callback)
2559 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2560 (linux_stopped_by_watchpoint):
2561 * linux-low.h (enum lwp_stop_reason): Delete.
2562 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2563 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2564
98fc70d6
YQ
25652015-03-04 Yao Qi <yao.qi@linaro.org>
2566
2567 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2568
dd2ac174
GB
25692015-03-03 Gary Benson <gbenson@redhat.com>
2570
2571 * hostio.c (handle_vFile): Fix prefix lengths.
2572
d68e53f4
MM
25732015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2574
2575 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2576 ptr_bits.
2577
bf2d68ab
AA
25782015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2579
2580 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2581 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2582 (clean): Add "rm -f" for above C files.
2583 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2584 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2585 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2586 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2587 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2588 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2589 (init_registers_s390x_vx_linux64)
2590 (init_registers_s390x_tevx_linux64)
2591 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2592 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2593 declarations.
2594 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2595 (s390_store_vxrs_high): New functions.
2596 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2597 NT_S390_VXRS_HIGH.
2598 (s390_arch_setup): Add logic for selecting one of the new target
2599 descriptions. Activate the new vector regsets if applicable.
2600 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2601 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2602 and init_registers_s390x_tevx_linux64.
2603
c966a859
PA
26042015-03-01 Pedro Alves <palves@redhat.com>
2605
2606 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2607 parameter.
2608
4180215b
PA
26092015-02-27 Pedro Alves <palves@redhat.com>
2610
2611 * linux-x86-low.c (u_debugreg_offset): New function.
2612 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2613
749bab01
PA
26142015-02-27 Pedro Alves <palves@redhat.com>
2615
2616 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2617 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2618 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2619 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2620 (ps_lsetfpregs, ps_getpid)
2621 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2622 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2623 (ps_lsetxregs, ps_plog): Declare.
2624
3c14e5a3
PA
26252015-02-27 Pedro Alves <palves@redhat.com>
2626
2627 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2628 IP_AGENT_EXPORT_FUNC.
2629 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2630 IP_AGENT_EXPORT_FUNC.
2631 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2632 (IP_AGENT_EXPORT): Delete.
2633 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2634 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2635 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2636 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2637 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2638 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2639 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2640 (traceframe_read_count, traceframe_write_count)
2641 (traceframes_created, trace_state_variables, get_raw_reg)
2642 (get_trace_state_variable_value, set_trace_state_variable_value)
2643 (ust_loaded, helper_thread_id, cmd_buf): Use
2644 IPA_SYM_EXPORTED_NAME.
2645 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2646 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2647 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2648 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2649 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2650 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2651 EXTERN_C_PUSH/EXTERN_C_POP.
2652 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2653 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2654 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2655 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2656 (traceframe_write_count, traceframe_read_count)
2657 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2658 (about_to_request_buffer_space, get_trace_state_variable_value)
2659 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2660 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2661 EXTERN_C_PUSH/EXTERN_C_POP.
2662 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2663 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2664 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2665 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2666 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2667 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2668 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2669 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2670 Define.
2671 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2672 (IP_AGENT_EXPORT_VAR_DECL): Define.
2673 (tracing): Declare.
2674 (gdb_agent_get_raw_reg): Declare.
2675
fe978cb0
PA
26762015-02-27 Tom Tromey <tromey@redhat.com>
2677 Pedro Alves <palves@redhat.com>
2678
2679 Rename symbols whose names are reserved C++ keywords throughout.
2680
3bc3d82a
PA
26812015-02-27 Pedro Alves <palves@redhat.com>
2682
2683 * Makefile.in (COMPILER): New, get it from autoconf.
2684 (CXX): Get from autoconf instead.
2685 (COMPILE.pre): Use COMPILER.
2686 (CC-LD): Rename to ...
2687 (CC_LD): ... this. Use COMPILER.
2688 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2689 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2690 * acinclude.m4: Include build-with-cxx.m4.
2691 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2692 Disable -Werror by default if building in C++ mode.
2693 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2694 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2695 the C++ compiler. Save/restore CXXFLAGS too.
2696 * configure: Regenerate.
2697
07697489
PA
26982015-02-27 Pedro Alves <palves@redhat.com>
2699
2700 * acinclude.m4: Include libiberty.m4.
2701 * configure.ac: Call libiberty_INIT.
2702 * config.in, configure: Regenerate.
2703
9beb7c4e
PA
27042015-02-26 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (linux_wait_1): When incrementing the PC past a
2707 program breakpoint always use the_low_target.breakpoint_len as
2708 increment, rather than the maximum between that and
2709 the_low_target.decr_pc_after_break.
2710
8090aef2
PA
27112015-02-23 Pedro Alves <palves@redhat.com>
2712
2713 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2714 thread was doing a step-over; always adjust the PC if
2715 we stepped over a permanent breakpoint.
2716 (linux_wait_1): If we stepped over breakpoint that was on top of a
2717 permanent breakpoint, manually advance the PC past it.
2718
bc9540e8
PA
27192015-02-23 Pedro Alves <palves@redhat.com>
2720
2721 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2722 modes.
2723 (x86_fill_gregset, x86_store_gregset): Use it when handling
2724 $orig_eax.
2725
2db9a427
PA
27262015-02-20 Pedro Alves <palves@redhat.com>
2727
2728 * thread-db.c: Include "nat/linux-procfs.h".
2729 (thread_db_init): Skip listing new threads if the kernel supports
2730 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2731
afa8d396
PA
27322015-02-20 Pedro Alves <palves@redhat.com>
2733
2734 * linux-low.c (status_pending_p_callback): Use ptid_match.
2735
c9587f88
AT
27362015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2737
2738 PR breakpoints/16812
2739 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2740 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2741 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2742
b05ec7a5
AT
27432015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2744
2745 PR breakpoints/15956
2746 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2747
d33501a5
MM
27482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2749
2750 * linux-low.c (linux_low_btrace_conf): Print size.
2751 * server.c (handle_btrace_conf_general_set): New.
2752 (hanle_general_set): Call handle_btrace_conf_general_set.
2753 (handle_query): Report Qbtrace-conf:bts:size as supported.
2754
f4abbc16
MM
27552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2756
2757 * linux-low.c (linux_low_enable_btrace): Update parameters.
2758 (linux_low_btrace_conf): New.
2759 (linux_target_ops)<to_btrace_conf>: Initialize.
2760 * server.c (current_btrace_conf): New.
2761 (handle_btrace_enable): Rename to ...
2762 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2763 to target_enable_btrace. Update comment. Update users.
2764 (handle_qxfer_btrace_conf): New.
2765 (qxfer_packets): Add btrace-conf entry.
2766 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2767 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2768 (target_ops)<read_btrace_conf>: New.
2769 (target_enable_btrace): Update parameters.
2770 (target_read_btrace_conf): New.
2771
043c3577
MM
27722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2773
2774 * server.c (handle_btrace_general_set): Remove call to
2775 target_supports_btrace.
2776 (supported_btrace_packets): New.
2777 (handle_query): Call supported_btrace_packets.
2778 * target.h: include btrace-common.h.
2779 (btrace_target_info): Removed.
2780 (supports_btrace, target_supports_btrace): Update parameters.
2781
734b0e4b
MM
27822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2783
2784 * Makefile.in (SFILES): Add common/btrace-common.c.
2785 (OBS): Add common/btrace-common.o.
2786 (btrace-common.o): Add build rules.
2787 * linux-low: Include btrace-common.h.
2788 (linux_low_read_btrace): Use struct btrace_data. Call
2789 btrace_data_init and btrace_data_fini.
2790
d6c146e9
PA
27912015-02-06 Pedro Alves <palves@redhat.com>
2792
2793 * thread-db.c (find_new_threads_callback): Add debug output.
2794
20ba1ce6
PA
27952015-02-04 Pedro Alves <palves@redhat.com>
2796
2797 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2798 (resume_stopped_resumed_lwps): New function.
2799 (linux_wait_for_event_filtered): Use it.
2800
8cc73a39
SDJ
28012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2802
2803 * Makefile.in (SFILES): Add linux-personality.c.
2804 (linux-personality.o): New rule.
2805 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2806 list of objects to be built.
2807 * linux-low.c: Include nat/linux-personality.h.
2808 (linux_create_inferior): Remove code to disable address space
2809 randomization (moved to ../nat/linux-personality.c). Create
2810 cleanup to disable address space randomization.
2811
fb23d554
SDJ
28122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2813
2814 * Makefile.in (posix-strerror.o): New rule.
2815 (mingw-strerror.o): Likewise.
2816 * configure: Regenerated.
2817 * configure.ac: Source file ../common/common.host. Initialize new
2818 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2819
cdf43629
YQ
28202015-01-14 Yao Qi <yao@codesourcery.com>
2821
2822 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2823 (ppc-linux.o): New rule.
2824 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2825 * configure.ac: AC_CHECK_FUNCS(getauxval).
2826 * config.in: Re-generated.
2827 * configure: Re-generated.
2828 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2829 ppc64_64bit_inferior_p
2830
514c5338
YQ
28312015-01-14 Yao Qi <yao@codesourcery.com>
2832
2833 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2834 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2835 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2836 (PT_ORIG_R3, PT_TRAP): Likewise.
2837 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2839 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2840
3368c1e5
JB
28412015-01-10 Joel Brobecker <brobecker@adacore.com>
2842
2843 * i387-fp.c (i387_cache_to_xsave): In look over
2844 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2845 zmmh_low_space field by use of zmmh_high_space.
2846
582511be
PA
28472015-01-09 Pedro Alves <palves@redhat.com>
2848
2849 * linux-low.c (step_over_bkpt): Move higher up in the file.
2850 (handle_extended_wait): Don't store the stop_pc here.
2851 (get_stop_pc): Adjust comments and rename to ...
2852 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2853 stopped for a software breakpoint or hardware breakpoint.
2854 (thread_still_has_status_pending_p): New function.
2855 (status_pending_p_callback): Use
2856 thread_still_has_status_pending_p. If the event is no longer
2857 interesting, resume the LWP.
2858 (handle_tracepoints): Add assert.
2859 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2860 (wstatus_maybe_breakpoint): New function.
2861 (cancel_breakpoint): Delete function.
2862 (check_stopped_by_watchpoint): New function, factored out from
2863 linux_low_filter_event.
2864 (lp_status_maybe_breakpoint): Delete function.
2865 (linux_low_filter_event): Remove filter_ptid argument.
2866 Leave thread group exits pending here. Store the LWP's stop PC.
2867 Always leave events pending.
2868 (linux_wait_for_event_filtered): Pull all events out of the
2869 kernel, and leave them all pending.
2870 (count_events_callback, select_event_lwp_callback): Consider all
2871 events.
2872 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2873 (select_event_lwp): Only give preference to the stepping LWP in
2874 all-stop mode. Adjust comments.
2875 (ignore_event): New function.
2876 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2877 references to cancel_breakpoints. Adjust to renames. Also give
2878 equal priority to all LWPs that have had events in non-stop mode.
2879 If reporting a software breakpoint event, unadjust the LWP's PC.
2880 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2881 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2882 Adjust.
2883 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2884 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2885 (linux_stopped_by_watchpoint): Adjust.
2886 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2887 * linux-low.h (enum lwp_stop_reason): New.
2888 (struct lwp_info) <stop_pc>: Adjust comment.
2889 <stopped_by_watchpoint>: Delete field.
2890 <stop_reason>: New field.
2891 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2892 * mem-break.c (software_breakpoint_inserted_here)
2893 (hardware_breakpoint_inserted_here): New function.
2894 * mem-break.h (software_breakpoint_inserted_here)
2895 (hardware_breakpoint_inserted_here): Declare.
2896 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2897 (cancel_breakpoints): Delete.
2898 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2899 (upload_fast_traceframes): Remove references to
2900 cancel_breakpoints.
2901
a33e3959
PA
29022015-01-09 Pedro Alves <palves@redhat.com>
2903
2904 * thread-db.c (find_new_threads_callback): Ignore thread if the
2905 kernel thread ID is -1.
2906
8784d563
PA
29072015-01-09 Pedro Alves <palves@redhat.com>
2908
2909 * linux-low.c (linux_attach_fail_reason_string): Move to
2910 nat/linux-ptrace.c, and rename.
2911 (linux_attach_lwp): Update comment.
2912 (attach_proc_task_lwp_callback): New function.
2913 (linux_attach): Adjust to rename and use
2914 linux_proc_attach_tgid_threads.
2915 (linux_attach_fail_reason_string): Delete declaration.
2916
76f2b779
JB
29172015-01-01 Joel Brobecker <brobecker@adacore.com>
2918
2919 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2920 * server.c (gdbserver_version): Likewise.
2921
fafcc06a
SDJ
29222014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2923
2924 * remote-utils.c: Include ctype.h.
2925 (input_interrupt): Explicitly handle the case when the char
2926 received is the NUL byte. Improve the printing of non-ASCII
2927 characters.
2928
beed38b8
JB
29292014-12-16 Joel Brobecker <brobecker@adacore.com>
2930
2931 * linux-low.c (linux_low_filter_event): Update call to
2932 linux_enable_event_reporting following the addition of
2933 a new parameter to that function.
2934
bf330350
CU
29352014-12-16 Catalin Udma <catalin.udma@freescale.com>
2936
2937 PR server/17457
2938 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2939 (AARCH64_FPCR_REGNO): Likewise.
2940 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2941 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2942 (aarch64_store_fpregset): Likewise.
2943
5227d625
JB
29442014-12-15 Joel Brobecker <brobecker@adacore.com>
2945
2946 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2947 Remove FIXME comment about assumption about N.
2948
f93b65a0
JB
29492014-12-13 Joel Brobecker <brobecker@adacore.com>
2950
2951 * configure.ac: If large-file support is disabled in GDBserver,
2952 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2953 * configure: Regenerate.
2954
e5a9158d
AA
29552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2956
2957 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2958 warning upon ENODATA from ptrace.
2959 * linux-s390-low.c (s390_store_tdb): New.
2960 (s390_regsets): Add regset for NT_S390_TDB.
2961
feea5f36
AA
29622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2963
2964 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2965 without a fill_function.
2966 * linux-s390-low.c (s390_fill_last_break): Remove.
2967 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2968 (s390_arch_setup): Use regset's size instead of fill_function for
2969 loop end condition.
2970
098dbe61
AA
29712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2972
2973 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2974 the regset's store function when ptrace returned an error.
2975 * regcache.c (get_thread_regcache): Invalidate register cache
2976 before fetching inferior's registers.
2977
28eef672
AA
29782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2979
2980 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2981 while-loop as for-loop.
2982 (regsets_store_inferior_registers): Likewise.
2983
bdca27a2
YQ
29842014-11-28 Yao Qi <yao@codesourcery.com>
2985
2986 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2987 * config.in, configure: Re-generate.
2988 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2989 is defined.
2990
9c232dda
YQ
29912014-11-21 Yao Qi <yao@codesourcery.com>
2992
2993 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2994 (AC_CHECK_HEADERS): Remove malloc.h.
2995 * configure: Re-generated.
2996 * config.in: Re-generated.
2997 * server.h: Don't include alloca.h and malloc.h.
2998 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2999 Don't include malloc.h.
3000
43968415
JB
30012014-11-17 Joel Brobecker <brobecker@adacore.com>
3002
3003 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3004 corresponding ERRNO check in same block.
3005
40e91bc7
PA
30062014-11-12 Pedro Alves <palves@redhat.com>
3007
3008 * server.c (cont_thread): Update comment.
3009 (start_inferior, attach_inferior): No longer clear cont_thread.
3010 (handle_v_cont): No longer set cont_thread.
3011 (captured_main): Clear cont_thread each time a GDB connects.
3012
c2c118cf
PA
30132014-11-12 Pedro Alves <palves@redhat.com>
3014
3015 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3016 thread, and don't resume all threads if the Hc thread has exited.
3017
78708b7c
PA
30182014-11-12 Pedro Alves <palves@redhat.com>
3019
3020 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3021 the process group instead of to a specific LWP.
3022
a2abc7de
PA
30232014-10-15 Pedro Alves <palves@redhat.com>
3024
3025 PR server/17487
3026 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3027 parameter.
3028 (arm_set_thread_context): Delete.
3029 (the_low_target): Adjust.
3030 * win32-i386-low.c (debug_registers_changed)
3031 (debug_registers_used): Delete.
3032 (update_debug_registers_callback): New function.
3033 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3034 needing to update their debug registers.
3035 (win32_get_current_dr): New function.
3036 (x86_dr_low_get_addr, x86_dr_low_get_control)
3037 (x86_dr_low_get_status): Fetch the debug register from the thread
3038 record's context.
3039 (i386_initial_stuff): Adjust.
3040 (i386_get_thread_context): Remove current_event parameter. Don't
3041 clear debug_registers_changed nor copy DR values to
3042 debug_reg_state.
3043 (i386_set_thread_context): Delete.
3044 (i386_prepare_to_resume): New function.
3045 (i386_thread_added): Mark the thread as needing to update irs
3046 debug registers.
3047 (the_low_target): Remove i386_set_thread_context and install
3048 i386_prepare_to_resume.
3049 * win32-low.c (win32_get_thread_context): Adjust.
3050 (win32_set_thread_context): Use SetThreadContext
3051 directly.
3052 (win32_prepare_to_resume): New function.
3053 (win32_require_context): New function, factored out from ...
3054 (thread_rec): ... this.
3055 (continue_one_thread): Call win32_prepare_to_resume on each thread
3056 we're about to continue.
3057 (win32_resume): Call win32_prepare_to_resume on the event thread.
3058 * win32-low.h (struct win32_thread_info)
3059 <debug_registers_changed>: New field.
3060 (struct win32_target_ops): Change prototype of set_thread_context,
3061 delete set_thread_context and add prepare_to_resume.
3062 (win32_require_context): New declaration.
3063
a442d071
GB
30642014-10-08 Gary Benson <gbenson@redhat.com>
3065
3066 * server.h: Do not include common-exceptions.h.
3067
6f1947e8
GB
30682014-10-08 Gary Benson <gbenson@redhat.com>
3069
3070 * server.h: Do not include cleanups.h.
3071
63b434a4
JH
30722014-09-30 James Hogan <james.hogan@imgtec.com>
3073
3074 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3075 mips64-dsp-linux.c.
3076
c4d9ceb6
YQ
30772014-09-23 Yao Qi <yao@codesourcery.com>
3078
3079 * linux-low.c (lp_status_maybe_breakpoint): New function.
3080 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3081 (count_events_callback): Likewise.
3082 (select_event_lwp_callback): Likewise.
3083 (cancel_breakpoints_callback): Likewise.
3084
89a5711c
DB
30852014-09-19 Don Breazeal <donb@codesourcery.com>
3086
3087 * linux-low.c (handle_extended_wait): Call
3088 linux_ptrace_get_extended_event.
3089 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3090 linux_is_extended_waitstatus.
3091
bffc0964
JB
30922014-09-16 Joel Brobecker <brobecker@adacore.com>
3093
3094 * Makefile.in (CPPFLAGS): Define.
3095 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3096 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3097
0bfdf32f
GB
30982014-09-16 Gary Benson <gbenson@redhat.com>
3099
3100 * inferiors.h (current_inferior): Renamed as...
3101 (current_thread): New variable. All uses updated.
3102 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3103 (maybe_move_out_of_jump_pad): Likewise.
3104 (cancel_breakpoint): Likewise.
3105 (linux_low_filter_event): Likewise.
3106 (wait_for_sigstop): Likewise.
3107 (linux_resume_one_lwp): Likewise.
3108 (need_step_over_p): Likewise.
3109 (start_step_over): Likewise.
3110 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3111 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3112 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3113 and save_inferior as saved_thread.
3114 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3115 saved_thread.
3116 (regcache_invalidate_thread): Likewise.
3117 * remote-utils.c (prepare_resume_reply): Likewise.
3118 * thread-db.c (thread_db_get_tls_address): Likewise.
3119 (disable_thread_event_reporting): Likewise.
3120 (remove_thread_event_breakpoints): Likewise.
3121 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3122 as saved_thread.
3123 * target.h (set_desired_inferior): Renamed as...
3124 (set_desired_thread): New declaration. All uses updated.
3125 * server.c (myresume): Updated comment to reference thread instead
3126 of inferior.
3127 (handle_serial_event): Likewise.
3128 (handle_target_event): Likewise.
3129
361c8ade
GB
31302014-09-12 Tom Tromey <tromey@redhat.com>
3131 Gary Benson <gbenson@redhat.com>
3132
3133 * regcache.h: Include common-regcache.h.
3134 (regcache_read_pc): Don't declare.
3135 * regcache.c (get_thread_regcache_for_ptid): New function.
3136
bd9269f7
GB
31372014-09-11 Tom Tromey <tromey@redhat.com>
3138 Gary Benson <gbenson@redhat.com>
3139
3140 * symbol.c: New file.
3141 * Makefile.in (SFILES): Add symbol.c.
3142 (OBS): Add symbol.o.
3143
f8c1d06b
GB
31442014-09-11 Gary Benson <gbenson@redhat.com>
3145
3146 * target.c (target_stop_ptid, target_continue_ptid): New
3147 functions.
3148
721ec300
GB
31492014-09-11 Tom Tromey <tromey@redhat.com>
3150 Gary Benson <gbenson@redhat.com>
3151
3152 * target.h: Include target/target.h.
3153 * target.c (target_read_memory, target_read_uint32)
3154 (target_write_memory): New functions.
3155
c5e92cca
GB
31562014-09-11 Gary Benson <gbenson@redhat.com>
3157
3158 * server.h (debug_hw_points): Don't declare.
3159 * server.c (debug_hw_points): Don't define. Replace all uses
3160 with show_debug_regs.
3161 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3162 all uses with show_debug_regs.
3163
2e4bb98a
EBM
31642014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3165
3166 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3167 endianness into account.
3168 (ppc_supply_ptrace_register): Likewise.
3169
ac740bc7
JH
31702014-09-03 James Hogan <james.hogan@imgtec.com>
3171
3172 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3173 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3174
97ea6506
GB
31752014-09-03 Gary Benson <gbenson@redhat.com>
3176
3177 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3178 ALL_DEBUG_ADDRESS_REGISTERS.
3179
df7e5265
GB
31802014-09-02 Gary Benson <gbenson@redhat.com>
3181
3182 * i386-low.h: Renamed as...
3183 * x86-low.h: New file. All type, function and variable name
3184 prefixes changed from "i386_" to "x86_". All references updated.
3185 * i386-low.c: Renamed as...
3186 * x86-low.c: New file. All type, function and variable name
3187 prefixes changed from "i386_" to "x86_". All references updated.
3188
ed859da7
GB
31892014-09-02 Gary Benson <gbenson@redhat.com>
3190
3191 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3192 (x86_linux_new_thread): Likewise.
3193
860789c7
GB
31942014-08-29 Gary Benson <gbenson@redhat.com>
3195
3196 * server.h (setjmp.h): Do not include.
3197 (toplevel): Do not declare.
3198 (common-exceptions.h): Include.
3199 (cleanups.h): Likewise.
3200 * server.c (toplevel): Do not define.
3201 (exit_code): New static global.
3202 (detach_or_kill_for_exit_cleanup): New function.
3203 (main): New function. Original main renamed to...
3204 (captured_main): New function.
3205 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3206
ff55e1b5
GB
32072014-08-29 Gary Benson <gbenson@redhat.com>
3208
3209 * Makefile.in (SFILES): Add common/common-exceptions.c.
3210 (OBS): Add common-exceptions.o.
3211 (common-exceptions.o): New rule.
3212 * utils.c (prepare_to_throw_exception): New function.
3213
e9bcb658
GB
32142014-08-29 Gary Benson <gbenson@redhat.com>
3215
3216 * config.in: Regenerate.
3217 * configure: Likewise.
3218
e3180625
GB
32192014-08-29 Gary Benson <gbenson@redhat.com>
3220
3221 * Makefile.in (SFILES): Add common/cleanups.c.
3222 (OBS): cleanups.o.
3223 (cleanups.o): New rule.
3224
e3d6ba5d
GB
32252014-08-29 Gary Benson <gbenson@redhat.com>
3226
3227 * utils.c (internal_vwarning): New function.
3228
7096e886
GB
32292014-08-28 Gary Benson <gbenson@redhat.com>
3230
3231 * utils.h (fatal): Remove declaration.
3232 * utils.c (fatal): Remove function.
3233
14ce3192
GB
32342014-08-28 Gary Benson <gbenson@redhat.com>
3235
3236 * tracepoint.c (gdb_agent_init): Replace fatal with
3237 perror_with_name.
3238 (initialize_tracepoint): Likewise.
3239
50278d59
GB
32402014-08-28 Gary Benson <gbenson@redhat.com>
3241
3242 * remote-utils.c (remote_prepare): Replace fatal with error.
3243
aa96c426
GB
32442014-08-28 Gary Benson <gbenson@redhat.com>
3245
3246 * linux-low.c (linux_async): Replace fatal with warning.
3247 Tidy up and return.
3248 (linux_start_non_stop): Return -1 if linux_async failed.
3249
f7160e97
GB
32502014-08-28 Gary Benson <gbenson@redhat.com>
3251
3252 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3253 gdb_assert.
3254 (i386_dr_low_get_addr): Remove vague comment.
3255 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3256 gdb_assert.
3257
38e08fca
GB
32582014-08-28 Gary Benson <gbenson@redhat.com>
3259
3260 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3261 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3262 internal_error.
3263 (linux_resume_one_lwp): Likewise.
3264 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3265 gdb_assert.
3266 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3267 with internal_error.
3268 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3269 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3270 (find_register_by_name): Replace fatal with internal_error.
3271 (find_regno): Likewise.
3272 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3273 * thread-db.c (thread_db_create_event): Likewise.
3274 (thread_db_load_search): Likewise.
3275 (try_thread_db_load_1): Likewise.
3276 * tracepoint.c (get_jump_space_head): Replace fatal with
3277 internal_error.
3278 (claim_trampoline_space): Likewise.
3279 (have_fast_tracepoint_trampoline_buffer): Likewise.
3280 (cmd_qtstart): Likewise.
3281 (stop_tracing): Likewise.
3282 (fast_tracepoint_collecting): Likewise.
3283 (target_malloc): Likewise.
3284 (download_tracepoint): Likewise.
3285 (download_trace_state_variables): Replace check with gdb_assert.
3286 (upload_fast_traceframes): Replace fatal with internal_error.
3287
34abf635
GB
32882014-08-19 Tom Tromey <tromey@redhat.com>
3289 Gary Benson <gbenson@redhat.com>
3290
3291 * Makefile.in (SFILES): Add common/common-debug.c.
3292 (OBS): Add common-debug.o.
3293 (common-debug.o): New rule.
3294 * debug.h (debug_printf): Don't declare.
3295 * debug.c (debug_printf): Renamed and rewritten as...
3296 (debug_vprintf): New function.
3297
f6e94d78
GB
32982014-08-19 Gary Benson <gbenson@redhat.com>
3299
3300 * utils.h: Do not include print-utils.h.
3301
9239eeab
GB
33022014-08-19 Tom Tromey <tromey@redhat.com>
3303 Gary Benson <gbenson@redhat.com>
3304
3305 * server.h: Add static assertion.
3306 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3307
ef87c8bb
GB
33082014-08-19 Tom Tromey <tromey@redhat.com>
3309 Gary Benson <gbenson@redhat.com>
3310
3311 * Makefile.in (SFILES): Add common/errors.c.
3312 (OBS): Add errors.o.
3313 (IPA_OBS): Add errors-ipa.o.
3314 (errors.o): New rule.
3315 (errors-ipa.o): Likewise.
3316 * utils.h (perror_with_name, error, warning): Don't declare.
3317 * utils.c (warning): Renamed and rewritten as...
3318 (vwarning): New function.
3319 (error): Renamed and rewritten as...
3320 (verror): New function.
3321 (internal_error): Renamed and rewritten as...
3322 (internal_verror): New function.
3323
bb974a24
GB
33242014-08-07 Gary Benson <gbenson@redhat.com>
3325
3326 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3327 * configure: Regenerate.
3328 * config.in: Likewise.
3329 * server.h: Do not include errno.h.
3330 * event-loop.c: Likewise.
3331 * hostio-errno.c: Likewise.
3332 * linux-low.c: Likewise.
3333 * remote-utils.c: Likewise.
3334 * spu-low.c: Likewise.
3335 * utils.c: Likewise.
3336 * gdbreplay.c: Unconditionally include errno.h.
3337
6d3d12eb
GB
33382014-08-07 Gary Benson <gbenson@redhat.com>
3339
3340 * server.h: Do not include string.h.
3341 * event-loop.c: Likewise.
3342 * linux-low.c: Likewise.
3343 * regcache.c: Likewise.
3344 * remote-utils.c: Likewise.
3345 * spu-low.c: Likewise.
3346 * utils.c: Likewise.
3347
dccbb609
GB
33482014-08-07 Gary Benson <gbenson@redhat.com>
3349
3350 * server.h: Do not include gdb_assert.h.
3351
e76df0d0
GB
33522014-08-07 Gary Benson <gbenson@redhat.com>
3353
3354 * server.h: Do not include common-utils.h.
3355
4cb9c816
GB
33562014-08-07 Gary Benson <gbenson@redhat.com>
3357
3358 * server.h: Do not include ptid.h.
3359 * notif.h: Likewise.
3360
3995eeee
GB
33612014-08-07 Gary Benson <gbenson@redhat.com>
3362
3363 * server.h: Do not include gdb_locale.h.
3364
cb9f1a9b
GB
33652014-08-07 Gary Benson <gbenson@redhat.com>
3366
3367 * server.h: Do not include gdb/signals.h.
3368 * win32-low.c: Likewise.
3369
a5fceff8
GB
33702014-08-07 Gary Benson <gbenson@redhat.com>
3371
3372 * server.h: Do not include pathmax.h.
3373
b9391142
GB
33742014-08-07 Gary Benson <gbenson@redhat.com>
3375
3376 * server.h: Do not include libiberty.h.
3377 * linux-bfin-low.c: Likewise.
3378
0e443c87
GB
33792014-08-07 Gary Benson <gbenson@redhat.com>
3380
3381 * server.h: Do not include ansidecl.h.
3382
8ebb3f56
GB
33832014-08-07 Gary Benson <gbenson@redhat.com>
3384
3385 * linux-x86-low.c: Do not include stddef.h.
3386 * lynx-ppc-low.c: Likewise.
3387 * tracepoint.c: Likewise.
3388
8980bdf6
GB
33892014-08-07 Gary Benson <gbenson@redhat.com>
3390
3391 * server.h: Do not include stdarg.h.
3392 * nto-low.c: Likewise.
3393
d7096f71
GB
33942014-08-07 Gary Benson <gbenson@redhat.com>
3395
3396 * server.h: Do not include stdlib.h.
3397 * inferiors.c: Likewise.
3398 * linux-low.c: Likewise.
3399 * regcache.c: Likewise.
3400 * spu-low.c: Likewise.
3401 * tracepoint.c: Likewise.
3402 * utils.c: Likewise.
3403
d02f550d
GB
34042014-08-07 Gary Benson <gbenson@redhat.com>
3405
3406 * server.h: Do not include stdio.h.
3407 * linux-low.c: Likewise.
3408 * remote-utils.c: Likewise.
3409 * spu-low.c: Likewise.
3410 * utils.c: Likewise.
3411 * wincecompat.c: Likewise.
3412
87f6c4e3
GB
34132014-08-06 Gary Benson <gbenson@redhat.com>
3414
3415 * regcache.c (init_register_cache): Move conditionals inside if.
3416
7089dca4
GB
34172014-08-06 Gary Benson <gbenson@redhat.com>
3418
3419 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3420
462f517e
GB
34212014-07-31 Gary Benson <gbenson@redhat.com>
3422
3423 * ax.h: Do not include server.h.
3424 * gdbthread.h: Likewise.
3425 * lynx-low.h: Likewise.
3426 * notif.h: Likewise.
3427
976411d6
GB
34282014-07-30 Gary Benson <gbenson@redhat.com>
3429
3430 * server.h: Include common-defs.h.
3431 Do not include config.h or build-gnulib-gdbserver/config.h.
3432
d41f6d8e
GB
34332014-07-30 Gary Benson <gbenson@redhat.com>
3434
3435 * hostio-errno.c: Move server.h to top of includes list.
3436 * inferiors.c: Likewise.
3437 * linux-x86-low.c: Likewise.
3438 * notif.c: Include server.h.
3439
314c6a35
TT
34402014-07-24 Tom Tromey <tromey@redhat.com>
3441 Gary Benson <gbenson@redhat.com>
3442
3443 * server.h (CORE_ADDR): Now unsigned.
3444
69ff6be5
PA
34452014-07-16 Pedro Alves <palves@redhat.com>
3446
3447 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3448
ce9e3fe7
PA
34492014-07-15 Pedro Alves <palves@redhat.com>
3450
3451 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3452 copy.
3453
e76126e8
PA
34542014-07-11 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (kill_wait_lwp): New function, based on
3457 kill_one_lwp_callback, but use my_waitpid directly.
3458 (kill_one_lwp_callback, linux_kill): Use it.
3459
8e9db26e
PA
34602014-06-23 Pedro Alves <palves@redhat.com>
3461
3462 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3463 before setting DR0..DR3.
3464
698b3e08
GB
34652014-06-20 Gary Benson <gbenson@redhat.com>
3466
3467 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3468 * configure: Regenerated.
3469 * config.in: Likewise.
3470
125f8a3d
GB
34712014-06-20 Gary Benson <gbenson@redhat.com>
3472
3473 * Makefile.in (SFILES): Update locations for files moved
3474 from common to nat.
3475 (object file files): Reordered.
3476
42995dbd
GB
34772014-06-20 Gary Benson <gbenson@redhat.com>
3478
3479 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3480 (i386_dr_low_set_addr): Likewise.
3481 (i386_dr_low_get_addr): Likewise.
3482 (i386_dr_low_can_set_control): Likewise.
3483 (i386_dr_low_set_control): Likewise.
3484 (i386_dr_low_get_control): Likewise.
3485 (i386_dr_low_get_status): Likewise.
3486 (i386_get_debug_register_length): Likewise.
3487 * linux-x86-low.c (i386_dr_low_set_addr):
3488 Changed signature. Made static.
3489 (i386_dr_low_get_addr): Likewise.
3490 (i386_dr_low_set_control): Likewise.
3491 (i386_dr_low_get_control): Likewise.
3492 (i386_dr_low_get_status): Likewise.
3493 (i386_dr_low): New global variable.
3494 * win32-i386-low.c (i386_dr_low_set_addr):
3495 Changed signature. Made static.
3496 (i386_dr_low_get_addr): Likewise.
3497 (i386_dr_low_set_control): Likewise.
3498 (i386_dr_low_get_control): Likewise.
3499 (i386_dr_low_get_status): Likewise.
3500 (i386_dr_low): New global variable.
3501
e1d2394b
MS
35022014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3503
3504 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3505 * Makefile.in (AR, AR_FLAGS): Define.
3506 * configure: Regenerate.
3507
3a8ee006
GB
35082014-06-19 Gary Benson <gbenson@redhat.com>
3509
3510 * Makefile.in (i386-dregs.o): New rule.
3511 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3512 * i386-low.c (target.h): Remove include.
3513 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3514 (DR_CONTROL_SHIFT): Likewise.
3515 (DR_CONTROL_SIZE): Likewise.
3516 (DR_RW_EXECUTE): Likewise.
3517 (DR_RW_WRITE): Likewise.
3518 (DR_RW_READ): Likewise.
3519 (DR_RW_IORW): Likewise.
3520 (DR_LEN_1): Likewise.
3521 (DR_LEN_2): Likewise.
3522 (DR_LEN_4): Likewise.
3523 (DR_LEN_8): Likewise.
3524 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3525 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3526 (DR_ENABLE_SIZE): Likewise.
3527 (DR_LOCAL_SLOWDOWN): Likewise.
3528 (DR_GLOBAL_SLOWDOWN): Likewise.
3529 (DR_CONTROL_RESERVED): Likewise.
3530 (I386_DR_CONTROL_MASK): Likewise.
3531 (I386_DR_VACANT): Likewise.
3532 (I386_DR_LOCAL_ENABLE): Likewise.
3533 (I386_DR_GLOBAL_ENABLE): Likewise.
3534 (I386_DR_DISABLE): Likewise.
3535 (I386_DR_SET_RW_LEN): Likewise.
3536 (I386_DR_GET_RW_LEN): Likewise.
3537 (I386_DR_WATCH_HIT): Likewise.
3538 (i386_wp_op_t): Likewise.
3539 (i386_show_dr): Likewise.
3540 (i386_length_and_rw_bits): Likewise.
3541 (i386_insert_aligned_watchpoint): Likewise.
3542 (i386_remove_aligned_watchpoint): Likewise.
3543 (i386_handle_nonaligned_watchpoint): Likewise.
3544 i386_update_inferior_debug_regs(): Likewise.
3545 (i386_dr_insert_watchpoint): Likewise.
3546 (i386_dr_remove_watchpoint): Likewise.
3547 (i386_dr_region_ok_for_watchpoint): Likewise.
3548 (i386_dr_stopped_data_address): Likewise.
3549 (i386_dr_stopped_by_watchpoint): Likewise.
3550
8f26655c
GB
35512014-06-19 Gary Benson <gbenson@redhat.com>
3552
3553 * i386-low.c (i386_dr_show): Renamed to
3554 i386_show_dr and made static. All uses updated.
3555 (i386_dr_length_and_rw_bits): Renamed to
3556 i386_length_and_rw_bits and made static.
3557 All uses updated.
3558 (i386_dr_insert_aligned_watchpoint): Renamed to
3559 i386_insert_aligned_watchpoint and made static.
3560 All uses updated.
3561 (i386_dr_remove_aligned_watchpoint): Renamed to
3562 i386_remove_aligned_watchpoint and made static.
3563 All uses updated.
3564 (i386_dr_update_inferior_debug_regs): Renamed to
3565 i386_update_inferior_debug_regs and made static.
3566 All uses updated.
3567
b9228891
GB
35682014-06-18 Gary Benson <gbenson@redhat.com>
3569
5171def3
GB
3570 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3571 (i386_dr_low_can_set_control): Likewise.
3572 (i386_get_debug_register_length): Likewise.
3573 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3574 (i386_dr_low_can_set_control): Likewise.
3575 (i386_get_debug_register_length): Likewise.
3576
35772014-06-17 Gary Benson <gbenson@redhat.com>
3578
b9228891
GB
3579 * i386-low.h (i386-dregs.h): New include.
3580 (DR_FIRSTADDR): Now in i386-dregs.h.
3581 (DR_LASTADDR): Likewise.
3582 (DR_NADDR): Likewise.
3583 (DR_STATUS): Likewise.
3584 (DR_CONTROL): Likewise.
3585 (i386_debug_reg_state): Likewise.
3586 (i386_dr_insert_watchpoint): Likewise.
3587 (i386_dr_remove_watchpoint): Likewise.
3588 (i386_dr_region_ok_for_watchpoint): Likewise.
3589 (i386_dr_stopped_data_address): Likewise.
3590 (i386_dr_stopped_by_watchpoint): Likewise.
3591 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3592
4be83cc2
GB
35932014-06-18 Gary Benson <gbenson@redhat.com>
3594
3595 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3596 i386_dr_insert_watchpoint.
3597 (i386_low_remove_watchpoint): Renamed to
3598 i386_dr_remove_watchpoint.
3599 (i386_low_region_ok_for_watchpoint): Renamed to
3600 i386_dr_region_ok_for_watchpoint.
3601 (i386_low_stopped_data_address): Renamed to
3602 i386_dr_stopped_data_address.
3603 (i386_low_stopped_by_watchpoint): Renamed to
3604 i386_dr_stopped_by_watchpoint.
3605 * i386-low.c (i386_show_dr): Renamed to
3606 i386_dr_show and made nonstatic. All uses updated.
3607 (i386_length_and_rw_bits): Renamed to
3608 i386_dr_length_and_rw_bits and made nonstatic.
3609 All uses updated.
3610 (i386_insert_aligned_watchpoint): Renamed to
3611 i386_dr_insert_aligned_watchpoint and made nonstatic.
3612 All uses updated.
3613 (i386_remove_aligned_watchpoint): Renamed to
3614 i386_dr_remove_aligned_watchpoint and made nonstatic.
3615 All uses updated.
3616 (i386_update_inferior_debug_regs): Renamed to
3617 i386_dr_update_inferior_debug_regs and made nonstatic.
3618 All uses updated.
3619 (i386_low_insert_watchpoint): Renamed to
3620 i386_dr_insert_watchpoint. All uses updated.
3621 (i386_low_remove_watchpoint): Renamed to
3622 i386_dr_remove_watchpoint. All uses updated.
3623 (i386_low_region_ok_for_watchpoint): Renamed to
3624 i386_dr_region_ok_for_watchpoint. All uses updated.
3625 (i386_low_stopped_data_address): Renamed to
3626 i386_dr_stopped_data_address. All uses updated.
3627 (i386_low_stopped_by_watchpoint): Renamed to
3628 i386_dr_stopped_by_watchpoint. All uses updated.
3629
131aa0d4
GB
36302014-06-18 Gary Benson <gbenson@redhat.com>
3631
3632 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3633 (i386_dr_low_can_set_control): Likewise.
3634 (i386_insert_aligned_watchpoint): New check.
3635
d9305f7f
GB
36362014-06-18 Gary Benson <gbenson@redhat.com>
3637
3638 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3639 Renamed to state.
3640
e927c9fc
GB
36412014-06-18 Gary Benson <gbenson@redhat.com>
3642
3643 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3644 instead of fatal and error.
3645 (i386_handle_nonaligned_watchpoint): Likewise.
3646
1b6d4134
GB
36472014-06-18 Gary Benson <gbenson@redhat.com>
3648
3649 * i386-low.c (i386_get_debug_register_length): New macro.
3650 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3651 (i386_show_dr): Use debug_printf instead of fprintf. Use
3652 phex to format values.
3653
6e62758f
GB
36542014-06-18 Gary Benson <gbenson@redhat.com>
3655
3656 * i386-low.h: Comment changes.
3657 * i386-low.c: Likewise.
3658
fc6e2f03
GB
36592014-06-18 Gary Benson <gbenson@redhat.com>
3660
3661 * i386-low.c: Whitespace changes.
3662
f9d1eeed
TT
36632014-06-12 Tom Tromey <tromey@redhat.com>
3664
3665 * utils.c (freeargv): Remove.
3666
0b04e523
TT
36672014-06-12 Tom Tromey <tromey@redhat.com>
3668
3669 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3670 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3671 (parse_debug_format_options): Likewise.
3672 (gdbserver_usage): Likewise.
3673 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3674 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3675 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3676 against libiberty.
3677 ($(LIBGNU)): Depend on libiberty.
3678 (all-lib): Recurse into all subdirs.
3679 (install-only): Invoke "install" target in subdirs.
3680 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3681 targets.
3682 * configure: Rebuild.
3683 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3684 for vasprintf, vsnprintf, or gettimeofday.
3685 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3686 srv_tgtobj.
3687
270c9937
JB
36882014-06-05 Joel Brobecker <brobecker@adacore.com>
3689
3690 * development.sh: Delete.
3691 * Makefile.in (config.status): Adjust dependency on development.sh.
3692 * configure.ac: Adjust development.sh source call.
3693 * configure: Regenerate.
3694
0a261ed8
PA
36952014-06-02 Pedro Alves <palves@redhat.com>
3696
3697 * ax.c (gdb_free_agent_expr): New function.
3698 * ax.h (gdb_free_agent_expr): New declaration.
3699 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3700 list.
3701 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3702 static.
3703 (clear_breakpoint_conditions_and_commands): New function.
3704 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3705 (clear_breakpoint_conditions_and_commands): New declaration.
3706
e9dae05e
RR
37072014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3708
3709 * linux-aarch64-low.c (asm/ptrace.h): Include.
3710
5876f503
JK
37112014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3712
3713 Fix TLS access for -static -pthread.
3714 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3715 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3716 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3717
802e8e6d
PA
37182014-05-20 Pedro Alves <palves@redhat.com>
3719
3720 * linux-aarch64-low.c (aarch64_insert_point)
3721 (aarch64_remove_point): No longer check whether the type is
3722 supported here. Adjust to new interface.
3723 (the_low_target): Install aarch64_supports_z_point_type as
3724 supports_z_point_type method.
3725 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3726 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3727 instead of a Z packet char. Adjust.
3728 (arm_supports_z_point_type): New function.
3729 (arm_insert_point, arm_remove_point): Adjust to new interface.
3730 (the_low_target): Install arm_supports_z_point_type.
3731 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3732 (cris_insert_point, cris_remove_point): Adjust to new interface.
3733 Don't check whether the type is supported here.
3734 (the_low_target): Install cris_supports_z_point_type.
3735 * linux-low.c (linux_supports_z_point_type): New function.
3736 (linux_insert_point, linux_remove_point): Adjust to new interface.
3737 * linux-low.h (struct linux_target_ops) <insert_point,
3738 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3739 raw_breakpoint pointer parameter.
3740 <supports_z_point_type>: New method.
3741 * linux-mips-low.c (mips_supports_z_point_type): New function.
3742 (mips_insert_point, mips_remove_point): Adjust to new interface.
3743 Use mips_supports_z_point_type.
3744 (the_low_target): Install mips_supports_z_point_type.
3745 * linux-ppc-low.c (the_low_target): Install NULL as
3746 supports_z_point_type method.
3747 * linux-s390-low.c (the_low_target): Install NULL as
3748 supports_z_point_type method.
3749 * linux-sparc-low.c (the_low_target): Install NULL as
3750 supports_z_point_type method.
3751 * linux-x86-low.c (x86_supports_z_point_type): New function.
3752 (x86_insert_point): Adjust to new insert_point interface. Use
3753 insert_memory_breakpoint. Adjust to new
3754 i386_low_insert_watchpoint interface.
3755 (x86_remove_point): Adjust to remove_point interface. Use
3756 remove_memory_breakpoint. Adjust to new
3757 i386_low_remove_watchpoint interface.
3758 (the_low_target): Install x86_supports_z_point_type.
3759 * lynx-low.c (lynx_target_ops): Install NULL as
3760 supports_z_point_type callback.
3761 * nto-low.c (nto_supports_z_point_type): New.
3762 (nto_insert_point, nto_remove_point): Adjust to new interface.
3763 (nto_target_ops): Install nto_supports_z_point_type.
3764 * mem-break.c: Adjust intro comment.
3765 (struct raw_breakpoint) <raw_type, size>: New fields.
3766 <inserted>: Update comment.
3767 <shlib_disabled>: Delete field.
3768 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3769 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3770 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3771 (raw_bkpt_type_to_target_hw_bp_type): New function.
3772 (find_enabled_raw_code_breakpoint_at): New function.
3773 (find_raw_breakpoint_at): New type and size parameters. Use them.
3774 (insert_memory_breakpoint): New function, based off
3775 set_raw_breakpoint_at.
3776 (remove_memory_breakpoint): New function.
3777 (set_raw_breakpoint_at): Reimplement.
3778 (set_breakpoint): New, based on set_breakpoint_at.
3779 (set_breakpoint_at): Reimplement.
3780 (delete_raw_breakpoint): Go through the_target->remove_point
3781 instead of assuming memory breakpoints.
3782 (find_gdb_breakpoint_at): Delete.
3783 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3784 (find_gdb_breakpoint): New function.
3785 (set_gdb_breakpoint_at): Delete.
3786 (z_type_supported): New function.
3787 (set_gdb_breakpoint_1): New function, loosely based off
3788 set_gdb_breakpoint_at.
3789 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3790 (delete_gdb_breakpoint_at): Delete.
3791 (delete_gdb_breakpoint_1): New function, loosely based off
3792 delete_gdb_breakpoint_at.
3793 (delete_gdb_breakpoint): New function.
3794 (clear_gdb_breakpoint_conditions): Rename to ...
3795 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3796 breakpoint.
3797 (add_condition_to_breakpoint): Make static.
3798 (add_breakpoint_condition): Take a struct breakpoint pointer
3799 instead of an address. Adjust.
3800 (gdb_condition_true_at_breakpoint): Rename to ...
3801 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3802 z_type parameter.
3803 (gdb_condition_true_at_breakpoint): Reimplement.
3804 (add_breakpoint_commands): Take a struct breakpoint pointer
3805 instead of an address. Adjust.
3806 (gdb_no_commands_at_breakpoint): Rename to ...
3807 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3808 parameter. Return true if no breakpoint was found. Change debug
3809 output.
3810 (gdb_no_commands_at_breakpoint): Reimplement.
3811 (run_breakpoint_commands): Rename to ...
3812 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3813 and change return type to boolean.
3814 (run_breakpoint_commands): New function.
3815 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3816 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3817 breakpoint. Go through the_target->remove_point instead of
3818 assuming memory breakpoint.
3819 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3820 software and hardware breakpoints.
3821 (reinsert_raw_breakpoint): Go through the_target->insert_point
3822 instead of assuming memory breakpoint.
3823 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3824 software and hardware breakpoints.
3825 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3826 Check both software and hardware breakpoints.
3827 (validate_inserted_breakpoint): Assert the breakpoint is a
3828 software breakpoint. Set the inserted flag to -1 instead of
3829 setting shlib_disabled.
3830 (delete_disabled_breakpoints): Adjust.
3831 (validate_breakpoints): Only validate software breakpoints.
3832 Adjust to inserted flag change.
3833 (check_mem_read, check_mem_write): Skip breakpoint types other
3834 than software breakpoints. Adjust to inserted flag change.
3835 * mem-break.h (enum raw_bkpt_type): New enum.
3836 (raw_breakpoint, struct process_info): Forward declare.
3837 (Z_packet_to_target_hw_bp_type): Delete declaration.
3838 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3839 (set_gdb_breakpoint, delete_gdb_breakpoint)
3840 (clear_breakpoint_conditions): New declarations.
3841 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3842 (breakpoint_inserted_here): Update comment.
3843 (add_breakpoint_condition, add_breakpoint_commands): Replace
3844 address parameter with a breakpoint pointer parameter.
3845 (gdb_breakpoint_here): Update comment.
3846 (delete_gdb_breakpoint_at): Delete.
3847 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3848 * server.c (process_point_options): Take a struct breakpoint
3849 pointer instead of an address. Adjust.
3850 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3851 delete_gdb_breakpoint.
3852 * spu-low.c (spu_target_ops): Install NULL as
3853 supports_z_point_type method.
3854 * target.h: Include mem-break.h.
3855 (struct target_ops) <prepare_to_access_memory>: Update comment.
3856 <supports_z_point_type>: New field.
3857 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3858 instead of a char. Also take a raw breakpoint pointer.
3859 * win32-arm-low.c (the_low_target): Install NULL as
3860 supports_z_point_type.
3861 * win32-i386-low.c (i386_supports_z_point_type): New function.
3862 (i386_insert_point, i386_remove_point): Adjust to new interface.
3863 (the_low_target): Install i386_supports_z_point_type.
3864 * win32-low.c (win32_supports_z_point_type): New function.
3865 (win32_insert_point, win32_remove_point): Adjust to new interface.
3866 (win32_target_ops): Install win32_supports_z_point_type.
3867 * win32-low.h (struct win32_target_ops):
3868 <supports_z_point_type>: New method.
3869 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3870 instead of a char. Also take a raw breakpoint pointer.
3871
932539e3
PA
38722014-05-20 Pedro Alves <palves@redhat.com>
3873
3874 * mem-break.h: Include break-common.h.
3875 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3876 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3877 (Z_packet_to_target_hw_bp_type): New declaration.
3878 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3879 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3880 (Z_PACKET_ACCESS_WP): Delete macros.
3881 (Z_packet_to_hw_type): Delete function.
3882 * i386-low.h: Don't include break-common.h here.
3883 (Z_packet_to_hw_type): Delete declaration.
3884 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3885 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3886 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3888 * linux-aarch64-low.c: Don't include break-common.h here.
3889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3891 (Z_packet_to_target_hw_bp_type): Delete function.
3892 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3893 function.
3894 (mips_insert_point, mips_remove_point): Use
3895 Z_packet_to_target_hw_bp_type.
3896
4ff0d3d8
PA
38972014-05-20 Pedro Alves <palves@redhat.com>
3898
3899 * linux-aarch64-low.c: Include break-common.h.
3900 (enum target_point_type): Delete.
3901 (Z_packet_to_point_type): Rename to ...
3902 (Z_packet_to_target_hw_bp_type): ... this, and return a
3903 target_hw_bp_type instead.
3904 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3905 instead of an enum target_point_type.
3906 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3907 breakpoint type.
3908 (aarch64_dr_state_insert_one_point)
3909 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3910 (aarch64_handle_aligned_watchpoint)
3911 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3912 Take an enum target_hw_bp_type instead of an enum
3913 target_point_type.
3914 (aarch64_supports_z_point_type): New function.
3915 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3916 use Z_packet_to_target_hw_bp_type.
3917
786dc519
JB
39182014-05-20 Joel Brobecker <brobecker@adacore.com>
3919
3920 * configure.ac: Only use -Werror by default when DEVELOPMENT
3921 is true.
3922 * configure: Regenerate.
3923
9e0aa64f
JK
39242014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3925
3926 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3927 * linux-x86-low.c (X86_64_USER_REGS): New.
3928 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3929
2b577b92
YQ
39302014-04-28 Yao Qi <yao@codesourcery.com>
3931
3932 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3933 name.
3934
94611da2
PA
39352014-04-25 Pedro Alves <palves@redhat.com>
3936
3937 PR server/16255
3938 * linux-low.c (linux_attach_fail_reason_string): New function.
3939 (linux_attach_lwp): Delete.
3940 (linux_attach_lwp_1): Rename to ...
3941 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3942 argument. Remove "initial" parameter. Return int instead of
3943 void. Don't error or warn here.
3944 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3945 failure to attach to the tgid. Call warning when failing to
3946 attach to an lwp.
3947 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3948 argument. Remove "initial" parameter. Return int instead of
3949 void. Don't error or warn here.
3950 (linux_attach_fail_reason_string): New declaration.
3951 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3952 interface change. Use linux_attach_fail_reason_string.
3953
01f9f808
MS
39542014-04-24 Michael Sturm <michael.sturm@mintel.com>
3955 Walfred Tedeschi <walfred.tedeschi@intel.com>
3956
3957 * Makefile.in: Added rules to handle new files
3958 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3959 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3960 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3961 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3962 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3963 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3964 x32-avx512-linux.o.
3965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3967 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3968 i386/x32-avx512.xml.
3969 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3971 i386/x32-avx512-linux.xml.
3972 * i387-fp.c (num_avx512_k_registers): New constant for number
3973 of K registers.
3974 (num_avx512_zmmh_low_registers): New constant for number of
3975 lower ZMM registers (0-15).
3976 (num_avx512_zmmh_high_registers): New constant for number of
3977 higher ZMM registers (16-31).
3978 (num_avx512_ymmh_registers): New contant for number of higher
3979 YMM registers (ymm16-31 added by avx521 on x86_64).
3980 (num_avx512_xmm_registers): New constant for number of higher
3981 XMM registers (xmm16-31 added by AVX512 on x86_64).
3982 (struct i387_xsave): Add space for AVX512 registers.
3983 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3984 Add code to handle AVX512 registers.
3985 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3986 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3987 prototypei from generated file.
3988 (tdesc_amd64_avx512_linux): Likewise.
3989 (init_registers_x32_avx512_linux): Likewise.
3990 (tdesc_x32_avx512_linux): Likewise.
3991 (init_registers_i386_avx512_linux): Likewise.
3992 (tdesc_i386_avx512_linux): Likewise.
3993 (x86_64_regmap): Add AVX512 registers.
3994 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3995 mask.
3996 (initialize_low_arch): Add code to initialize AVX512 registers.
3997
51aa91f9
PA
39982014-04-23 Pedro Alves <palves@redhat.com>
3999
4000 * mem-break.c (find_gdb_breakpoint_at): Make static.
4001 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4002
a4165e94
PA
40032014-04-23 Pedro Alves <palves@redhat.com>
4004
4005 * i386-low.c: Don't include break-common.h here.
4006 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4007 prototype to take target_hw_bp_type as argument instead of a Z
4008 packet char.
4009 * i386-low.h: Include break-common.h here.
4010 (Z_packet_to_hw_type): Declare.
4011 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4012 prototypes.
4013 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4014 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4015 (x86_remove_point): Convert the packet number to a
4016 target_hw_bp_type before calling i386_low_remove_watchpoint.
4017 * win32-i386-low.c (i386_insert_point): Convert the packet number
4018 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4019 (i386_remove_point): Convert the packet number to a
4020 target_hw_bp_type before calling i386_low_remove_watchpoint.
4021
b8acf843
PA
40222014-04-23 Pedro Alves <palves@redhat.com>
4023
4024 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4025
d708bcd1
PA
40262014-04-10 Pedro Alves <palves@redhat.com>
4027
4028 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4029 Check if the condition or command is NULL before checking if the
4030 breakpoint is known. On success, return true.
4031 * mem-break.h (add_breakpoint_condition): Document return.
4032 (add_breakpoint_commands): Add describing comment.
4033 * server.c (skip_to_semicolon): New function.
4034 (process_point_options): Use it.
4035
2eec7d5b
PA
40362014-04-09 Pedro Alves <palves@redhat.com>
4037
4038 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4039 to lwpid_of.
4040
fa96cb38
PA
40412014-02-27 Pedro Alves <palves@redhat.com>
4042
4043 PR 12702
4044 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4045 macros.
4046 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4047 output.
4048 (last_thread_of_process_p): Take a PID argument instead of a
4049 thread pointer.
4050 (linux_wait_for_lwp): Delete.
4051 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4052 functions.
4053 (linux_low_filter_event): New function, party factored out from
4054 linux_wait_for_event.
4055 (linux_wait_for_event): Rename to ...
4056 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4057 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4058 sigsuspend. Check for zombie leaders.
4059 (linux_wait_for_event): Reimplement as wrapper around
4060 linux_wait_for_event_filtered.
4061 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4062 a normal or signal exit is seen, it's the whole process exiting.
4063 (wait_for_sigstop): No longer a for_each_inferior callback.
4064 Rewrite on top of linux_wait_for_event_filtered.
4065 (stop_all_lwps): Call wait_for_sigstop directly.
4066 * server.c (resume, handle_target_event): Handle
4067 TARGET_WAITKIND_NO_RESUMED.
4068
d763de10
JB
40692014-02-26 Joel Brobecker <brobecker@adacore.com>
4070
4071 * win32-low.c (psapi_get_dll_name,
4072 * win32_CreateToolhelp32Snapshot): Delete.
4073 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4074 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4075 Delete.
4076 (handle_load_dll): Add function description.
4077 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4078
850a0f76
JB
40792014-02-26 Joel Brobecker <brobecker@adacore.com>
4080
4081 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4082 Add comment.
4083 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4084 base address when calling win32_add_one_solib.
4085 (handle_load_dll): Delete local variable load_addr.
4086 Remove 0x1000 offset applied to DLL base address when calling
4087 win32_add_one_solib.
4088 (handle_unload_dll): Add comment.
4089
f25b3fc3
JB
40902014-02-26 Joel Brobecker <brobecker@adacore.com>
4091
4092 * win32-low.c (win32_add_all_dlls): Renames
4093 win32_ensure_ntdll_loaded. Rewrite function documentation.
4094 Adjust implementation to always load all DLLs.
4095 Add 0x1000 offset to DLL base address when calling
4096 win32_add_one_solib.
4097 (child_initialization_done): New static global.
4098 (do_initial_child_stuff): Set child_initialization_done to
4099 zero during child initialization, and 1 after. Replace call
4100 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4101 Add comment.
4102 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4103 (handle_unload_dll): Add function documentation.
4104 (get_child_debug_event): Ignore load and unload DLL events
4105 during child initialization.
4106
d86d4aaf
DE
41072014-02-20 Doug Evans <dje@google.com>
4108
3bc32da3 4109 Remove global all_lwps.
d86d4aaf
DE
4110 * inferiors.h (ptid_of): Move here from linux-low.h.
4111 (pid_of, lwpid_of): Ditto.
4112 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4113 parameter is a struct thread_info * now.
4114 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4115 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4116 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4117 directly.
4118 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4119 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4120 * linux-arm-low.c (update_registers_callback): Update, "entry"
4121 parameter is a struct thread_info * now.
4122 Fetch lwpid from current_inferior directly.
4123 (arm_insert_point): Pass &all_threads to find_inferior instead of
4124 &all_lwps.
4125 (arm_remove_point): Ditto.
4126 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4127 (arm_prepare_to_resume): Fetch pid from thread.
4128 (arm_read_description): Fetch lwpid from current_inferior directly.
4129 * linux-low.c (all_lwps): Delete.
4130 (delete_lwp): Delete call to remove_inferior.
4131 (handle_extended_wait): Fetch lwpid from thread.
4132 (add_lwp): Don't set lwp->entry.id. Remove call to
4133 add_inferior_to_list.
4134 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4135 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4136 (kill_one_lwp_callback): Ditto.
4137 (linux_kill): Don't dereference NULL pointer.
4138 Fetch ptid,lwpid from thread.
4139 (get_detach_signal): Fetch ptid from thread.
4140 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4141 Simplify call to regcache_invalidate_thread.
4142 (delete_lwp_callback): Update, "entry" parameter is a
4143 struct thread_info * now. Fetch pid from thread.
4144 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4145 (status_pending_p_callback): Update, "entry" parameter is a
4146 struct thread_info * now. Fetch ptid from thread.
4147 (find_lwp_pid): Update, "entry" parameter is a
4148 struct thread_info * now.
4149 (linux_wait_for_lwp): Fetch pid from thread.
4150 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4151 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4152 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4153 (dequeue_one_deferred_signal): Ditto.
4154 (cancel_breakpoint): Fetch ptid from current_inferior.
4155 (linux_wait_for_event): Pass &all_threads to find_inferior,
4156 not &all_lwps. Fetch ptid, lwpid from thread.
4157 (count_events_callback): Update, "entry" parameter is a
4158 struct thread_info * now.
4159 (select_singlestep_lwp_callback): Ditto.
4160 (select_event_lwp_callback): Ditto.
4161 (cancel_breakpoints_callback): Ditto.
4162 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4163 not &all_lwps.
4164 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4165 (unsuspend_one_lwp): Update, "entry" parameter is a
4166 struct thread_info * now.
4167 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4168 not &all_lwps.
4169 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4170 Fetch lwpid from thread, not lwp.
4171 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4172 Pass &all_threads to find_inferior, not &all_lwps.
4173 (send_sigstop): Fetch lwpid from thread, not lwp.
4174 (send_sigstop_callback): Update, "entry" parameter is a
4175 struct thread_info * now.
4176 (suspend_and_send_sigstop_callback): Ditto.
4177 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4178 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4179 struct thread_info * now.
4180 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4181 from thread, lwp.
4182 (lwp_running): Update, "entry" parameter is a
4183 struct thread_info * now.
4184 (stop_all_lwps): Fetch ptid from thread.
4185 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4186 (linux_resume_one_lwp): Fetch lwpid from thread.
4187 (linux_set_resume_request): Update, "entry" parameter is a
4188 struct thread_info * now. Fetch pid, lwpid from thread.
4189 (resume_status_pending_p): Update, "entry" parameter is a
4190 struct thread_info * now.
4191 (need_step_over_p): Ditto. Fetch lwpid from thread.
4192 (start_step_over): Fetch lwpid from thread.
4193 (linux_resume_one_thread): Update, "entry" parameter is a
4194 struct thread_info * now. Fetch lwpid from thread.
4195 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4196 (proceed_one_lwp): Update, "entry" parameter is a
4197 struct thread_info * now. Fetch lwpid from thread.
4198 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4199 struct thread_info * now.
4200 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4201 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4202 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4203 directly.
4204 (regsets_store_inferior_registers): Ditto.
4205 (fetch_register, store_register): Ditto.
4206 (linux_read_memory, linux_write_memory): Ditto.
4207 (linux_request_interrupt): Ditto.
4208 (linux_read_auxv): Ditto.
4209 (linux_xfer_siginfo): Ditto.
4210 (linux_qxfer_spu): Ditto.
4211 (linux_qxfer_libraries_svr4): Ditto.
4212 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4213 moved to inferiors.h.
4214 (get_lwp): Delete.
4215 (get_thread_lwp): Update.
4216 (struct lwp_info): Delete member "entry". Simplify comment for
4217 member "thread".
4218 (all_lwps): Delete.
4219 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4220 current_inferior directly.
4221 (update_watch_registers_callback): Update, "entry" parameter is a
4222 struct thread_info * now. Fetch pid from thread.
4223 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4224 (mips_insert_point): Fetch lwpid from current_inferior.
4225 Pass &all_threads to find_inferior, not &all_lwps.
4226 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4227 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4228 directly.
4229 (mips_stopped_data_address): Ditto.
4230 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4231 directly.
4232 * linux-tile-low.c (tile_arch_setup): Ditto.
4233 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4234 (update_debug_registers_callback): Update, "entry" parameter is a
4235 struct thread_info * now. Fetch pid from thread.
4236 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4237 Pass &all_threads to find_inferior, not &all_lwps.
4238 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4239 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4240 Pass &all_threads to find_inferior, not &all_lwps.
4241 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4242 (i386_dr_low_get_status): Ditto.
4243 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4244 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4245 (x86_linux_read_description): Ditto.
4246 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4247
3b8361aa
DE
42482014-02-20 Doug Evans <dje@google.com>
4249
4250 * inferiors.c (get_first_inferior): Fix buglet.
4251
f7667f0d
DE
42522014-02-19 Doug Evans <dje@google.com>
4253
4254 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4255 * inferiors.c (add_thread): Change result type to struct thread_info *.
4256 All callers updated.
4257 (add_lwp): Call add_thread here instead of in callers.
4258 All callers updated.
4259 * linux-low.h (get_lwp_thread): Rewrite.
4260 (struct lwp_info): New member "thread".
4261
b3312d80
DE
42622014-02-19 Doug Evans <dje@google.com>
4263
4264 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4265 All callers updated.
4266
ecc6f45c
DE
42672014-02-19 Doug Evans <dje@google.com>
4268
4269 * inferiors.c (add_thread): Fix whitespace.
4270
649ebbca
DE
42712014-02-19 Doug Evans <dje@google.com>
4272
4273 * dll.c (clear_dlls): Replace accessing list implemention details
4274 with API function.
4275 * gdbthread.h (get_first_thread): Declare.
4276 * inferiors.c (for_each_inferior_with_data): New function.
4277 (get_first_thread): New function.
4278 (find_thread_ptid): Simplify.
4279 (get_first_inferior): New function.
4280 (clear_list): Delete.
4281 (one_inferior_p): New function.
4282 (clear_inferior_list): New function.
4283 (clear_inferiors): Update.
4284 * inferiors.h (for_each_inferior_with_data): Declare.
4285 (clear_inferior_list): Declare.
4286 (one_inferior_p): Declare.
4287 (get_first_inferior): Declare.
4288 * linux-low.c (linux_wait_for_event): Replace accessing list
4289 implemention details with API function.
4290 * server.c (target_running): Ditto.
4291 (accumulate_file_name_length): New function.
4292 (emit_dll_description): New function.
4293 (handle_qxfer_libraries): Replace accessing list implemention
4294 details with API function.
4295 (handle_qxfer_threads_worker): New function.
4296 (handle_qxfer_threads_proper): Replace accessing list implemention
4297 details with API function.
4298 (handle_query): Ditto.
4299 (visit_actioned_threads_callback_ftype): New typedef.
4300 (visit_actioned_threads_data): New struct.
4301 (visit_actioned_threads): Rewrite to be find_inferior callback.
4302 (resume): Call find_inferior.
4303 (handle_status): Replace accessing list implemention
4304 details with API function.
4305 (process_serial_event): Replace accessing list implemention details
4306 with API function.
4307 * target.c (set_desired_inferior): Replace accessing list implemention
4308 details with API function.
4309 * tracepoint.c (same_process_p): New function.
4310 (gdb_agent_about_to_close): Replace accessing list implemention
4311 details with API function.
4312 * win32-low.c (child_delete_thread): Replace accessing list
4313 implemention details with API function.
4314 (match_dll_by_basename): New function.
4315 (dll_is_loaded_by_basename): New function.
4316 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4317 details call to dll_is_loaded_by_basename.
4318
80894984
DE
43192014-02-19 Doug Evans <dje@google.com>
4320
4321 * dll.h (struct dll_info): Add comment.
4322 * gdbthread.h (struct thread_info): Add comment.
4323 (current_ptid): Simplify.
4324 * inferiors.c (add_process): Update.
4325 (remove_process): Update.
4326 * inferiors.h (struct process_info): Rename member "head" to "entry".
4327 * linux-low.c (delete_lwp): Update.
4328 (add_lwp): Update.
4329 (last_thread_of_process_p): Update.
4330 (kill_one_lwp_callback, linux_kill): Update.
4331 (status_pending_p_callback): Update.
4332 (wait_for_sigstop): Update. Simplify read of ptid.
4333 (start_step_over): Update.
4334 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4335 (get_lwp_thread): Update.
4336 (struct lwp_info): Rename member "head" to "entry".
4337 * regcache.h (inferior_list_entry): Delete.
4338 * server.c (kill_inferior_callback): Update.
4339 (detach_or_kill_inferior_callback): Update.
4340 (print_started_pid): Update.
4341 (print_attached_pid): Update.
4342 (process_serial_event): Simplify read of ptid.
4343 * thread-db.c (thread_db_create_event): Update.
4344 (thread_db_get_tls_address): Update.
4345 * win32-low.c (current_inferior_ptid): Simplify.
4346
46917d26
TT
43472014-02-19 Tom Tromey <tromey@redhat.com>
4348
4349 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4350 argument.
4351 (target_supports_btrace): Update.
4352
0759a81e
YQ
43532014-02-14 Yao Qi <yao@codesourcery.com>
4354
4355 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4356 (rsp-low-ipa.o): New target.
4357
a7191e8b
TT
43582014-02-12 Tom Tromey <tromey@redhat.com>
4359
4360 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4361 convert_ascii_to_int.
4362 * regcache.c (registers_to_string): Likewise.
4363 * remote-utils.c (decode_M_packet): Likewise.
4364 * server.c (process_serial_event): Likewise.
4365
ff0e980e
TT
43662014-02-12 Tom Tromey <tromey@redhat.com>
4367
4368 * server.c (handle_query, handle_v_run): Use hex2bin, not
4369 unhexify.
4370 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4371
e9371aff
TT
43722014-02-12 Tom Tromey <tromey@redhat.com>
4373
4374 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4375 convert_int_to_ascii.
4376 * regcache.c (registers_to_string, collect_register_as_string):
4377 Likewise.
4378 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4379 Likewise.
4380 * server.c (process_serial_event): Likewise.
4381 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4382 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4383
971dc0b8
TT
43842014-02-12 Tom Tromey <tromey@redhat.com>
4385
4386 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4387 bin2hex, not hexify.
4388 * tracepoint.c (cmd_qtstatus): Likewise.
4389
0a822afb
TT
43902014-02-12 Tom Tromey <tromey@redhat.com>
4391
4392 * remote-utils.c (monitor_output): Pass explicit length to
4393 hexify.
4394
9c3d6531
TT
43952014-02-12 Tom Tromey <tromey@redhat.com>
4396
4397 * tracepoint.c: Include rsp-low.h.
4398 * server.c: Include rsp-low.h.
4399 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4400 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4401 declare.
4402 * remote-utils.c: Include rsp-low.h.
4403 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4404 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4405 (convert_int_to_ascii, convert_ascii_to_int): Move to
4406 common/rsp-low.c.
4407 * regcache.c: Include rsp-low.h.
4408 * ax.c: Include rsp-low.h.
4409 * Makefile.in (SFILES): Add common/rsp-low.c.
4410 (OBS): Add rsp-low.o.
4411 (rsp-low.o): New target.
4412
01fd3ea5
TT
44132014-02-12 Tom Tromey <tromey@redhat.com>
4414
4415 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4416 Include print-utils.h.
4417 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4418 (plongest, thirty_two, phex_nz): Remove.
4419 * Makefile.in (SFILES): Add common/print-utils.c.
4420 (OBS): Add print-utils.o.
4421 (print-utils-ipa.o): New target.
4422 (print-utils.o): New target.
4423 (IPA_OBJS): Add print-utils-ipa.o.
4424
e99dc820
TT
44252014-02-06 Tom Tromey <tromey@redhat.com>
4426
4427 * Makefile.in (SFILES): Fix indentation.
4428
ee1e2d4f
DE
44292014-02-05 Doug Evans <dje@google.com>
4430
4431 * linux-low.c (linux_wait_for_event): Improve comment.
4432 (linux_wait_1): Keep current_inferior in sync with event_child.
4433
f5a02773
DE
44342014-01-22 Doug Evans <dje@google.com>
4435
4436 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4437
87ce2a04
DE
44382014-01-22 Doug Evans <dje@google.com>
4439
4440 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4441 * configure: Regenerate.
4442 * config.in: Regenerate.
4443 * Makefile.in (SFILES): Add debug.c.
4444 (OBS): Add debug.o.
4445 * debug.c: New file.
4446 * debug.h: New file.
4447 * linux-aarch64-low.c (*): Update all debugging printfs to use
4448 debug_printf instead of fprintf.
4449 * linux-arm-low.c (*): Ditto.
4450 * linux-cris-low.c (*): Ditto.
4451 * linux-crisv32-low.c (*): Ditto.
4452 * linux-m32r-low.c (*): Ditto.
4453 * linux-sparc-low.c (*): Ditto.
4454 * linux-x86.c (*): Ditto.
4455 * linux-low.c (*): Ditto.
4456 (linux_wait_1): Add calls to debug_enter, debug_exit.
4457 (linux_wait): Remove redundant debugging printf.
4458 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4459 (linux_resume, unstop_all_lwps): Ditto.
4460 * mem-break.c (*): Update all debugging printfs to use
4461 debug_printf instead of fprintf.
4462 * remote-utils.c (*): Ditto.
4463 * thread-db.c (*): Ditto.
4464 * server.c #include <ctype.h>, "gdb_vecs.h".
4465 (debug_threads): Moved to debug.c.
4466 (*): Update all debugging printfs to use debug_printf instead of
4467 fprintf.
4468 (start_inferior): Replace call to fflush with call to debug_flush.
4469 (monitor_show_help): Mention set debug-format.
4470 (parse_debug_format_options): New function.
4471 (handle_monitor_command): Handle "monitor set debug-format".
4472 (gdbserver_usage): Mention --debug-format.
4473 (main): Parse --debug-format.
4474 * server.h (debug_threads): Declaration moved to debug.h.
4475 #include "debug.h".
4476 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4477 trace_debug_1 that uses debug_printf.
4478 (tracepoint_look_up_symbols): Update all debugging printfs to use
4479 debug_printf instead of fprintf.
4480
e671835b
BS
44812014-01-20 Baruch Siach <baruch@tkos.co.il>
4482
4483 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4484 sys/ptrace.h.
4485
b5737fa9
PA
44862014-01-17 Pedro Alves <palves@redhat.com>
4487
ea38d2a9 4488 PR build/16445
c7faa97a
PA
4489 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4490 defined after including gdb_proc_service.h.
b5737fa9 4491
40ed484e
DE
44922014-01-16 Doug Evans <dje@google.com>
4493
4494 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4495 (match_dll): Use it.
4496
969c39fb
MM
44972014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4498
4499 * target.h (target_ops) <read_btrace>: Change parameters and
4500 return type to allow error reporting.
4501 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4502 trace reading errors on.
4503 * linux-low.c (linux_low_read_btrace): Pass trace reading
4504 errors on.
4505 (linux_low_disable_btrace): New.
4506
ab7f45ba
DE
45072014-01-15 Doug Evans <dje@google.com>
4508
4509 * inferiors.c (thread_id_to_gdb_id): Delete.
4510 * inferiors.h (thread_id_to_gdb_id): Delete.
4511
66af0f44
EZ
45122014-01-13 Eli Zaretskii <eliz@gnu.org>
4513
4514 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4515 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4516 versions.
4517
9939e131
PA
45182014-01-08 Pedro Alves <palves@redhat.com>
4519
4520 * server.c (handle_status): Don't discard previous queued stop
4521 replies or thread's pending status here.
4522 (main) <disconnection>: Do it here instead.
4523
b7ea362b
PA
45242014-01-08 Pedro Alves <palves@redhat.com>
4525
4526 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4527 * server.c (visit_actioned_threads, handle_pending_status): New
4528 function.
4529 (handle_v_cont): Factor out parts to ...
4530 (resume): ... this new function. If in all-stop, and a thread
4531 being resumed has a pending status, report it without actually
4532 resuming.
4533 (myresume): Adjust to use the new 'resume' function.
4534 (clear_pending_status_callback, set_pending_status_callback)
4535 (find_status_pending_thread_callback): New functions.
4536 (handle_status): Handle the case of multiple threads having
4537 interesting statuses to report. Report threads' real last signal
4538 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4539 with an interesting thread to report the status for, instead of
4540 always reporting the status of the first thread.
4541
28498c42
JB
45422014-01-01 Joel Brobecker <brobecker@adacore.com>
4543
4544 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4545 * gdbreplay.c (gdbreplay_version): Likewise.
4546
f45c82da
YZ
45472013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4548
4549 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4550 iov.iov_len with the real length in use.
4551
379a5e2d
JB
45522013-12-13 Joel Brobecker <brobecker@adacore.com>
4553
4554 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4555 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4556 for all targets that use win32-low.c.
4557 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4558 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4559
4210d83e
PA
45602013-12-13 Pedro Alves <palves@redhat.com>
4561
4562 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4563 if equal to TARGET_WAITKIND_LOADED.
4564 * win32-low.c (cached_status): New static global.
4565 (win32_wait): Add declaration.
4566 (do_initial_child_stuff): Flush all initial pending debug events
4567 up to the initial breakpoint.
4568 (win32_wait): If CACHED_STATUS was set, return that instead
4569 of doing a real wait. Remove the code resuming the execution
4570 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4571 during the initial phase. Also remove the code changing
4572 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4573 TARGET_WAITKIND_STOPPED.
4574
e7f0d979
YQ
45752013-12-11 Yao Qi <yao@codesourcery.com>
4576
4577 * notif.c (handle_notif_ack): Return 0 if no notification
4578 matches.
4579
ebcf782c
DE
45802013-11-20 Doug Evans <dje@google.com>
4581
4582 * linux-low.c (linux_set_resume_request): Fix comment.
4583
20ad9378
DE
45842013-11-20 Doug Evans <dje@google.com>
4585
4586 * linux-low.c (resume_status_pending_p): Tweak comment.
4587
a196ebeb
WT
45882013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4589
4590 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4591 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4592 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4593 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4594 (srv_amd64_regobj): Add amd64-mpx.o.
4595 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4596 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4597 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4598 * i387-fp.c (num_pl_bnd_register) Added constant.
4599 (num_pl_bnd_cfg_registers) Added constant.
4600 (struct i387_xsave) Added reserved area and MPX fields.
4601 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4602 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4603 function.
4604 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4605 (init_registers_amd64_mpx_linux): Declare new function.
4606 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4607 (x86_64_regmap): Add MPX registers.
4608 (x86_linux_read_description): Add MPX case.
4609 (initialize_low_arch): Initialize MPX targets.
4610
0080a2f6
TT
46112013-11-18 Tom Tromey <tromey@redhat.com>
4612
4613 * configure: Rebuild.
4614 * configure.ac: Don't check for stdlib.h.
4615 * gdbreplay.c: Unconditionally include stdlib.h.
4616
2978b111
TT
46172013-11-18 Tom Tromey <tromey@redhat.com>
4618
4619 * config.in: Rebuild.
4620 * configure: Rebuild.
4621 * configure.ac: Don't use AC_HEADER_DIRENT.
4622
a3d08894
TT
46232013-11-18 Tom Tromey <tromey@redhat.com>
4624
4625 * server.h: Don't check HAVE_STRING_H.
4626 * gdbreplay.c: Don't check HAVE_STRING_H.
4627 * configure: Rebuild.
4628
0a5dd17d
TT
46292013-11-18 Tom Tromey <tromey@redhat.com>
4630
4631 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4632 LIBGNU.
4633
1bd2f0ba
TT
46342013-11-08 Tom Tromey <tromey@redhat.com>
4635
4636 * configure, config.in: Rebuild.
4637 * configure.ac: Remove unused configury.
4638
3266f10b
TT
46392013-11-08 Tom Tromey <tromey@redhat.com>
4640
4641 * acinclude.m4: Include common.m4, codeset.m4.
4642 * configure, config.in: Rebuild.
4643 * configure.ac: Use GDB_AC_COMMON.
4644
6682d959
AA
46452013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4646
4647 * linux-s390-low.c (HWCAP_S390_TE): New define.
4648 (s390_arch_setup): Consider the TE field in the HWCAP for
4649 determining 'have_regset_tdb'.
4650
fd0a4d76
SDJ
46512013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4652
4653 PR gdb/16014
4654 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4655 call to sizeof.
4656
1a3d890b
PA
46572013-10-02 Pedro Alves <palves@redhat.com>
4658
4659 * server.c (process_serial_event): Don't output "GDBserver
4660 exiting" if GDB is connected through stdio.
4661 * target.c (mywait): Likewise, be silent if GDB is connected
4662 through stdio.
4663
97ad4581
JB
46642013-10-01 Joel Brobecker <brobecker@adacore.com>
4665
4666 * lynx-low.c (lynx_add_threads_after_attach): New function.
4667 (lynx_attach): Remove call to add_thread. Add call to
4668 lynx_add_threads_after_attach instead.
4669
5b4e221c
MF
46702013-09-28 Mike Frysinger <vapier@gentoo.org>
4671
4672 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4673 * config.in, configure: Regenerated.
4674
ee47b2f8
YQ
46752013-09-18 Yao Qi <yao@codesourcery.com>
4676
4677 PR server/15959
4678 * server.c (start_inferior): Clear 'resume_info'.
4679
d6707650 46802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4681
d6707650
JW
4682 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4683 for each register.
4684
9243dd0e 46852013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4686
9243dd0e
JW
4687 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4688 linux-tile-low.o to srv_tgtobj.
4689
c623a6ef
WN
46902013-09-16 Will Newton <will.newton@linaro.org>
4691
4692 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4693 out regs.
4694
fb71d39e
PA
46952013-09-06 Pedro Alves <palves@redhat.com>
4696
4697 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4698 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4699 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4700 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4701 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4702 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4703
8e7e9910
PA
47042013-09-06 Pedro Alves <palves@redhat.com>
4705
4706 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4707 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4708
7c3a12ca
PA
47092013-09-06 Pedro Alves <palves@redhat.com>
4710
4711 * linux-amd64-ipa.c: Include tracepoint.h.
4712 * linux-i386-ipa.c: Include tracepoint.h.
4713
8eb3d7b6
RW
47142013-09-06 Ricard Wanderlof <ricardw@axis.com>
4715
4716 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4717 (ps_get_thread_area): New function.
4718
eddddb9d
RW
47192013-09-06 Ricard Wanderlof <ricardw@axis.com>
4720
4721 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4722 (initialize_low_arch): Call init_registers_crisv32 rather than
4723 init_register_crisv32.
4724
533b0600
PA
47252013-09-05 Pedro Alves <palves@redhat.com>
4726
4727 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4728 to ...
4729 * hostio.h: ... this new file.
4730 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4731 win32-low.c: Include hostio.h.
4732
0ce3d3b5
PA
47332013-09-05 Pedro Alves <palves@redhat.com>
4734
4735 * server.h (gdb_client_data, handler_func, callback_handler_func)
4736 (delete_file_handler, add_file_handler, append_callback_event)
4737 (delete_callback_event, start_event_loop, initialize_event_loop):
4738 Move to event-loop.h and include it.
4739 * event-loop.h: New file.
4740
799cdc37
PA
47412013-09-05 Pedro Alves <palves@redhat.com>
4742
4743 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4744 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4745 (loaded_dll, unloaded_dll): Move to ...
4746 * dll.h: ... this new file.
4747 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4748
6a6bbd9d
PA
47492013-09-05 Pedro Alves <palves@redhat.com>
4750
4751 * server.h (current_process, get_thread_process, all_processes)
4752 (add_inferior_to_list, for_each_inferior, current_inferior)
4753 (remove_inferior, add_process, remove_process, find_process_pid)
4754 (have_started_inferiors_p, have_attached_inferiors_p)
4755 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4756 (clear_inferiors, find_inferior, find_inferior_id)
4757 (inferior_target_data, set_inferior_target_data)
4758 (inferior_regcache_data, set_inferior_regcache_data): Move to
4759 inferiors.h, and include it.
4760 * inferiors.h: New file.
4761
f699aaba
PA
47622013-09-05 Pedro Alves <palves@redhat.com>
4763
4764 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4765 Move ...
72f4393d 4766 * ax.h: ... here.
f699aaba 4767
c144c7a0
PA
47682013-09-05 Pedro Alves <palves@redhat.com>
4769
4770 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4771 tracepoint.h.
4772 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4773 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4774 (handle_tracepoint_general_set, handle_tracepoint_query)
4775 (tracepoint_finished_step, tracepoint_was_hit)
4776 (release_while_stepping_state_list, current_traceframe)
4777 (in_readonly_region, traceframe_read_mem)
4778 (fetch_traceframe_registers, traceframe_read_sdata)
4779 (traceframe_read_info, struct fast_tpoint_collect_status)
4780 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4781 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4782 (supply_fast_tracepoint_registers)
4783 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4784 (ipa_tdesc, claim_trampoline_space)
4785 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4786 (agent_mem_read, agent_get_trace_state_variable_value)
4787 (agent_set_trace_state_variable_value, agent_tsv_read)
4788 (agent_mem_read_string, get_raw_reg_func_addr)
4789 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4790 * tracepoint.h: ... this new file.
4791
ff42e6ab
PA
47922013-09-05 Pedro Alves <palves@redhat.com>
4793
4794 * server.h (perror_with_name, error, fatal, warning, paddress)
4795 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4796 include it.
4797 * utils.h: New file.
4798
541af0f4
PA
47992013-09-05 Pedro Alves <palves@redhat.com>
4800
4801 * server.h (remote_debug, noack_mode, transport_is_reliable)
4802 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4803 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4804 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4805 (write_enn, initialize_async_io, enable_async_io)
4806 (disable_async_io, check_remote_input_interrupt_request)
4807 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4808 (dead_thread_notify, prepare_resume_reply)
4809 (decode_address_to_semicolon, decode_address, decode_m_packet)
4810 (decode_M_packet, decode_X_packet, decode_xfer_write)
4811 (decode_search_memory_packet, unhexify, hexify)
4812 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4813 (look_up_one_symbol, relocate_instruction)
4814 (monitor_output): Move to remote-utils.h, and include it.
4815 * remote-utils.h: New file.
4816
eebdf26b
PA
48172013-09-05 Pedro Alves <palves@redhat.com>
4818
4819 * server.h (_): Delete.
4820
3aafd2ff
PA
48212013-09-02 Pedro Alves <palves@redhat.com>
4822
4823 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4824 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4825 allocated.
4826 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4827
cee83bcb
PM
48282013-09-02 Pierre Muller <muller@sourceware.org>
4829
4830 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4831 or WriteProcessMemory complete successfully and handle
4832 ERROR_PARTIAL_COPY error.
4833
9a13b2fa
PA
48342013-09-02 Pedro Alves <palves@redhat.com>
4835
4836 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4837 error instead of EIO.
4838
602e3198
JK
48392013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4840
4841 PR server/15604
4842 * linux-low.c: Include filestuff.h.
4843 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4844 * lynx-low.c: Include filestuff.h.
4845 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4846 * server.c: Include filestuff.h.
4847 (main): Call notice_open_fds.
4848 * spu-low.c: Include filestuff.h.
4849 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4850
96d7229d
LM
48512013-08-22 Luis Machado <lgustavo@codesourcery.com>
4852
4853 * Makefile.in: Explain why ../target and ../nat are not
4854 listed as include file search paths.
4855 (linux-waitpid.o): New object file rule.
4856 * configure.srv (srv_native_linux_obj): New variable.
4857 Replace all occurrences of linux native object files with
4858 $srv_native_linux_obj.
4859 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4860 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4861 (linux_enable_event_reporting): Remove declaration.
4862 (my_waitpid): Moved to common/linux-waitpid.c.
4863 (linux_wait_for_event): Pass ptid when calling
4864 linux_enable_event_reporting.
4865 (linux_supports_tracefork_flag): Remove.
4866 (linux_enable_event_reporting): Likewise.
4867 (linux_tracefork_grandchild): Remove.
4868 (STACK_SIZE): Moved to common/linux-ptrace.c.
4869 (linux_tracefork_child): Remove.
4870 (linux_test_for_tracefork): Remove.
4871 (linux_look_up_symbols): Call linux_supports_traceclone.
4872 (initialize_low): Remove call to linux_test_for_tracefork.
4873 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4874 common/linux-ptrace.h.
4875 (PTRACE_TYPE_ARG4): Likewise.
4876 Include linux-ptrace.h.
4877
32940073
PA
48782013-08-21 Pedro Alves <palves@redhat.com>
4879
4880 * config.in: Renegerate.
4881
33b60d58 48822013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4883
33b60d58
LM
4884 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4885 (SFILES): Remove $(srcdir)/common/target-common.c and
4886 add $(srcdir)/target/waitstatus.c.
4887 (OBS): Remove target-common.o and add waitstatus.o.
4888 (server_h): Remove $(srcdir)/../common/target-common.h and
4889 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4890 and $(srcdir)/../target/waitstatus.h.
4891 (target-common.o): Remove.
4892 (waitstatus.o): New target object file.
4893 * target.h: Do not include target-common.h and
4894 include target/resume.h, target/wait.h and
4895 target/waitstatus.h.
4896
b8e1b30e
LM
48972013-08-13 Luis Machado <lgustavo@codesourcery.com>
4898
4899 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4900 to PTRACE_TYPE_ARG3.
4901 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4902 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4903 PTRACE_TYPE_ARG4.
4904 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4905 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4906
7a60ad40
YQ
49072013-07-27 Jie Zhang <jie@codesourcery.com>
4908 Daniel Jacobowitz <dan@codesourcery.com>
4909 Yao Qi <yao@codesourcery.com>
4910
4911 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4912 (mips-linux-watch.o): New rule.
4913 (mips_linux_watch_h): New variable.
4914 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4915 srv_tgtobj.
4916 * linux-mips-low.c: Include mips-linux-watch.h.
4917 (struct arch_process_info, struct arch_lwp_info): New.
4918 (update_watch_registers_callback): New function.
4919 (mips_linux_new_process, mips_linux_new_thread) New functions.
4920 (mips_linux_prepare_to_resume, mips_insert_point): New
4921 functions.
4922 (mips_remove_point, mips_stopped_by_watchpoint): New
4923 functions.
4924 (rsp_bp_type_to_target_hw_bp_type): New function.
4925 (mips_stopped_data_address): New function.
4926 (the_low_target): Add watchpoint support functions.
4927
de6f69ad
YQ
49282013-07-27 Yao Qi <yao@codesourcery.com>
4929
4930 * i386-low.c: Include break-common.h.
4931 (enum target_hw_bp_type): Remove.
4932
3360c0bf
LM
49332013-07-24 Luis Machado <lgustavo@codesourcery.com>
4934
4935 * Makefile.in (SFILES): /common/target-common.c.
4936 (OBS): Add target-common.o.
4937 (server_h): Add $(srcdir)/../common/target-common.h.
4938 (target-common.o): New target.
4939 * server.c (queue_stop_reply_callback): Free
4940 status string after use.
4941 * target.c (target_waitstatus_to_string): Remove.
4942 * target.h: Include target-common.h.
4943 (resume_kind): Likewise.
4944 (target_waitkind): Likewise.
4945 (target_waitstatus): Likewise.
4946 (TARGET_WNOHANG): Likewise.
4947
bd885420
YQ
49482013-07-04 Yao Qi <yao@codesourcery.com>
4949
4950 * Makefile.in (host_alias): Use @host_noncanonical@.
4951 (target_alias): Use @target_noncanonical@.
4952 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4953 ACX_NONCANONICAL_HOST.
4954 * configure: Regenerated.
4955
4956 Revert:
4957 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4958
4959 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4960 * configure: Rebuild.
4961 * Makefile.in (version_host, version_target): Get from configure.
4962 (version.c): Use $(version_host) and $(version_target).
4963
17ef446e
PA
49642013-07-03 Pedro Alves <palves@redhat.com>
4965
4966 * Makefile.in (config.status): Depend on development.sh.
4967 * acinclude.m4: Include libmcheck.m4.
4968 * configure: Regenerate.
4969
7a9a7487
MG
49702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4971
4972 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4973 attribute inside the parentheses.
4974 (winapi_DebugSetProcessKillOnExit): Ditto.
4975 (winapi_DebugBreakProcess): Ditto.
4976 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4977
49b64de6
MG
49782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4979
4980 * notif.h (notif_event): Add a dummy member to avoid compiler
4981 errors.
4982
d5749ee7
PA
49832013-07-01 Pedro Alves <palves@redhat.com>
4984
4985 * hostio.c (HOSTIO_PATH_MAX): Define.
4986 (require_filename, handle_open, handle_unlink, handle_readlink):
4987 Use it.
4988
d8d2a3ee
PA
49892013-07-01 Pedro Alves <palves@redhat.com>
4990
4991 * server.h: Include "pathmax.h".
4992 * linux-low.c: Don't include sys/param.h.
4993 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4994 MAXPATHLEN.
4995 * win32-low.c: Don't include sys/param.h.
4996 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4997
bc7dea8d
PA
49982013-07-01 Pedro Alves <palves@redhat.com>
4999
5000 * event-loop.c: Don't check HAVE_UNISTD_H before including
5001 <unistd.h>.
5002 * gdbreplay.c: Likewise.
5003 * remote-utils.c: Likewise.
5004 * server.c: Likewise.
5005 * configure.ac: Don't check for unistd.h.
5006 * configure: Regenerate.
5007
d6c2da54
TT
50082013-06-28 Tom Tromey <tromey@redhat.com>
5009
5010 * Makefile.in (version.c): Use version.in, not
5011 common/version.in.
5012
257b6bec
MG
50132013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5014
5015 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5016 * configure: Rebuild.
5017 * Makefile.in (version_host, version_target): Get from configure.
5018 (version.c): Use $(version_host) and $(version_target).
5019
86ebe149
DK
50202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5021
5022 Fix trace-status to output user name without trailing colon.
5023 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5024
f30aa5af
DK
50252013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5026
5027 Fix trace-status to output proper start-time and stop-time.
5028 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5029 output start time and stop time in hex as gdb expects.
5030
28a93511
YQ
50312013-06-26 Pedro Alves <pedro@codesourcery.com>
5032
5033 * tracepoint.c (build_traceframe_info_xml): Output trace state
5034 variables present in the trace buffer.
5035
01208463
TT
50362013-06-24 Tom Tromey <tromey@redhat.com>
5037
5038 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5039 create-version.sh.
5040 (version.o): Remove.
5041 * gdbreplay.c: Include version.h.
5042 (version, host_name): Don't declare.
5043 * server.h: Include version.h.
5044 (version, host_name): Don't declare.
5045
760256f9
PA
50462013-06-12 Pedro Alves <palves@redhat.com>
5047
5048 * linux-x86-low.c (linux_is_elf64): Delete global.
5049 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5050 with local linux_pid_exe_is_elf_64_file use.
5051
030031ee
PA
50522013-06-11 Pedro Alves <palves@redhat.com>
5053
5054 * linux-low.c (regset_disabled, disable_regset): New functions.
5055 (regsets_fetch_inferior_registers)
5056 (regsets_store_inferior_registers): Use them.
5057 (initialize_regsets_info); Don't allocate the disabled_regsets
5058 array here.
5059 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5060 comment.
5061
5da6eb0a
PA
50622013-06-11 Pedro Alves <palves@redhat.com>
5063
5064 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5065 xmalloc.
5066
7e5aaa09
PA
50672013-06-11 Pedro Alves <palves@redhat.com>
5068
5069 * linux-x86-low.c (initialize_low_arch): Call
5070 init_registers_x32_avx_linux.
5071
d878444c
JK
50722013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5073
5074 Fix compatibility with Android Bionic.
5075 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5076 it is not empty.
5077
3aee8918
PA
50782013-06-07 Pedro Alves <palves@redhat.com>
5079
5f2b57b5 5080 PR server/14823
3aee8918
PA
5081 * Makefile.in (OBS): Add tdesc.o.
5082 (IPA_OBJS): Add tdesc-ipa.o.
5083 (tdesc-ipa.o): New rule.
5084 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5085 interface.
5086 * linux-low.c (new_inferior): Delete.
5087 (disabled_regsets, num_regsets): Delete.
5088 (linux_add_process): Adjust to set the new per-process
5089 new_inferior flag.
5090 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5091 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5092 was a stop. When calling arch_setup, switch the current inferior
5093 to the thread that got an event.
5094 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5095 (regsets_fetch_inferior_registers)
5096 (regsets_store_inferior_registers): New regsets_info parameter.
5097 Adjust to use it.
5098 (linux_register_in_regsets): New regs_info parameter. Adjust to
5099 use it.
5100 (register_addr, fetch_register, store_register): New usrregs_info
5101 parameter. Adjust to use it.
5102 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5103 parameter regs_info. Adjust to use it.
5104 (linux_fetch_registers): Get the current inferior's regs_info, and
5105 adjust to use it.
5106 (linux_store_registers): Ditto.
5107 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5108 (initialize_low): Don't initialize the target_regsets here. Call
5109 initialize_low_arch.
5110 * linux-low.h (target_regsets): Delete declaration.
5111 (struct regsets_info): New.
5112 (struct usrregs_info): New.
5113 (struct regs_info): New.
5114 (struct process_info_private) <new_inferior>: New field.
5115 (struct linux_target_ops): Delete the num_regs, regmap, and
5116 regset_bitmap fields. New field regs_info.
5117 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5118 * i387-fp.c (num_xmm_registers): Delete.
5119 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5120 calls to new interface.
5121 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5122 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5123 Infer the number of xmm registers from the regcache's target
5124 description.
5125 * i387-fp.h (num_xmm_registers): Delete.
5126 * inferiors.c (add_thread): Don't install the thread's regcache
5127 here.
5128 * proc-service.c (gregset_info): Fetch the current inferior's
5129 regs_info. Adjust to use it.
5130 * regcache.c: Include tdesc.h.
5131 (register_bytes, reg_defs, num_registers)
5132 (gdbserver_expedite_regs): Delete.
5133 (get_thread_regcache): If the thread doesn't have a regcache yet,
5134 create one, instead of aborting gdbserver.
5135 (regcache_invalidate_one): Rename to ...
5136 (regcache_invalidate_thread): ... this.
5137 (regcache_invalidate_one): New.
5138 (regcache_invalidate): Only invalidate registers of the current
5139 process.
5140 (init_register_cache): Add target_desc parameter, and use it.
5141 (new_register_cache): Ditto. Assert the target description has a
5142 non zero registers_size.
5143 (regcache_cpy): Add assertions. Adjust.
5144 (realloc_register_cache, set_register_cache): Delete.
5145 (registers_to_string, registers_from_string): Adjust.
5146 (find_register_by_name, find_regno, find_register_by_number)
5147 (register_cache_size): Add target_desc parameter, and use it.
5148 (free_register_cache_thread, free_register_cache_thread_one)
5149 (regcache_release, register_cache_size): New.
5150 (register_size): Add target_desc parameter, and use it.
5151 (register_data, supply_register, supply_register_zeroed)
5152 (supply_regblock, supply_register_by_name, collect_register)
5153 (collect_register_as_string, collect_register_by_name): Adjust.
5154 * regcache.h (struct target_desc): Forward declare.
5155 (struct regcache) <tdesc>: New field.
5156 (init_register_cache, new_register_cache): Add target_desc
5157 parameter.
5158 (regcache_invalidate_thread): Declare.
5159 (regcache_invalidate_one): Delete declaration.
5160 (regcache_release): Declare.
5161 (find_register_by_number, register_cache_size, register_size)
5162 (find_regno): Add target_desc parameter.
5163 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5164 declarations.
5165 * remote-utils.c: Include tdesc.h.
5166 (outreg, prepare_resume_reply): Adjust.
5167 * server.c: Include tdesc.h.
5168 (gdbserver_xmltarget): Delete declaration.
5169 (get_features_xml, process_serial_event): Adjust.
5170 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5171 declare.
5172 (struct process_info) <tdesc>: New field.
5173 (ipa_tdesc): Declare.
5174 * tdesc.c: New file.
5175 * tdesc.h: New file.
5176 * tracepoint.c: Include tdesc.h.
5177 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5178 (get_context_regcache): Adjust to pass ipa_tdesc down.
5179 (do_action_at_tracepoint): Adjust to get the register cache size
5180 from the context regcache's description.
5181 (traceframe_walk_blocks): Adjust to get the register cache size
5182 from the current trace frame's description.
5183 (traceframe_get_pc): Adjust to get current trace frame's
5184 description and pass it down.
5185 (gdb_collect): Adjust to get the register cache size from the
5186 IPA's description.
5187 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5188 (gdbserver_xmltarget): Delete.
5189 (initialize_low_tracepoint): Set the ipa's target description.
5190 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5191 (initialize_low_tracepoint): Set the ipa's target description.
5192 * linux-x86-low.c: Include tdesc.h.
5193 [__x86_64__] (is_64bit_tdesc): New.
5194 (ps_get_thread_area, x86_get_thread_area): Use it.
5195 (i386_cannot_store_register): Rename to ...
5196 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5197 (i386_cannot_fetch_register): Rename to ...
5198 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5199 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5200 to new interface.
5201 (target_regsets): Rename to ...
5202 (x86_regsets): ... this.
5203 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5204 interface.
5205 (x86_siginfo_fixup): Use is_64bit_tdesc.
5206 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5207 (tdesc_x32_avx_linux, tdesc_x32_linux)
5208 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5209 Declare.
5210 (x86_linux_update_xmltarget): Delete.
5211 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5212 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5213 (AMD64_LINUX_USER64_CS): New.
5214 (x86_linux_read_description): New, based on
5215 x86_linux_update_xmltarget.
5216 (same_process_callback): New.
5217 (x86_arch_setup_process_callback): New.
5218 (x86_linux_update_xmltarget): New.
5219 (x86_regsets_info): New.
5220 (amd64_linux_regs_info): New.
5221 (i386_linux_usrregs_info): New.
5222 (i386_linux_regs_info): New.
5223 (x86_linux_regs_info): New.
5224 (x86_arch_setup): Reimplement.
5225 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5226 (x86_emit_ops): Ditto.
5227 (the_low_target): Adjust. Install x86_linux_regs_info,
5228 x86_cannot_fetch_register, and x86_cannot_store_register.
5229 (initialize_low_arch): New.
5230 * linux-ia64-low.c (tdesc_ia64): Declare.
5231 (ia64_fetch_register): Adjust.
5232 (ia64_usrregs_info, regs_info): New globals.
5233 (ia64_regs_info): New function.
5234 (the_low_target): Adjust.
5235 (initialize_low_arch): New function.
5236 * linux-sparc-low.c (tdesc_sparc64): Declare.
5237 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5238 Adjust.
5239 (sparc_arch_setup): New function.
5240 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5241 (the_low_target): Adjust.
5242 (initialize_low_arch): New function.
5243 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5244 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5245 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5246 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5247 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5248 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5249 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5250 (tdesc_powerpc_isa205_vsx64l): Declare.
5251 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5252 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5253 (ppc_set_pc, ppc_get_hwcap): Adjust.
5254 (ppc_usrregs_info): Forward declare.
5255 (!__powerpc64__) ppc_regmap_adjusted: New global.
5256 (ppc_arch_setup): Adjust to the current process'es target
5257 description.
5258 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5259 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5260 (ppc_store_evrregset): Adjust.
5261 (target_regsets): Rename to ...
5262 (ppc_regsets): ... this, and make static.
5263 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5264 (ppc_regs_info): New function.
5265 (the_low_target): Adjust.
5266 (initialize_low_arch): New function.
5267 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5268 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5269 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5270 (tdesc_s390x_linux64v2): Declare.
5271 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5272 (s390_fill_gregset, s390_store_last_break): Adjust.
5273 (target_regsets): Rename to ...
5274 (s390_regsets): ... this, and make static.
5275 (s390_get_pc, s390_set_pc): Adjust.
5276 (s390_get_hwcap): New target_desc parameter, and use it.
5277 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5278 (s390_arch_setup): Adjust to set the current process'es target
5279 description. Don't adjust the regmap.
5280 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5281 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5282 (regs_info_3264): New globals.
5283 (s390_regs_info): New function.
5284 (the_low_target): Adjust.
5285 (initialize_low_arch): New function.
5286 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5287 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5288 [__mips64] (init_registers_mips_linux)
5289 (init_registers_mips_dsp_linux): Delete defines.
5290 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5291 (have_dsp): New global.
5292 (mips_read_description): New, based on mips_arch_setup.
5293 (mips_arch_setup): Reimplement.
5294 (get_usrregs_info): New function.
5295 (mips_cannot_fetch_register, mips_cannot_store_register)
5296 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5297 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5298 (target_regsets): Rename to ...
5299 (mips_regsets): ... this, and make static.
5300 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5301 (dsp_regs_info, regs_info): New globals.
5302 (mips_regs_info): New function.
5303 (the_low_target): Adjust.
5304 (initialize_low_arch): New function.
5305 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5306 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5307 Declare.
5308 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5309 (arm_read_description): New, with bits factored from
5310 arm_arch_setup.
5311 (arm_arch_setup): Reimplement.
5312 (target_regsets): Rename to ...
5313 (arm_regsets): ... this, and make static.
5314 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5315 (arm_regs_info): New function.
5316 (the_low_target): Adjust.
5317 (initialize_low_arch): New function.
5318 * linux-m68k-low.c (tdesc_m68k): Declare.
5319 (target_regsets): Rename to ...
5320 (m68k_regsets): ... this, and make static.
5321 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5322 (m68k_regs_info): New function.
5323 (m68k_arch_setup): New function.
5324 (the_low_target): Adjust.
5325 (initialize_low_arch): New function.
5326 * linux-sh-low.c (tdesc_sharch): Declare.
5327 (target_regsets): Rename to ...
5328 (sh_regsets): ... this, and make static.
5329 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5330 (sh_regs_info, sh_arch_setup): New functions.
5331 (the_low_target): Adjust.
5332 (initialize_low_arch): New function.
5333 * linux-bfin-low.c (tdesc_bfin): Declare.
5334 (bfin_arch_setup): New function.
5335 (bfin_usrregs_info, regs_info): New globals.
5336 (bfin_regs_info): New function.
5337 (the_low_target): Adjust.
5338 (initialize_low_arch): New function.
5339 * linux-cris-low.c (tdesc_cris): Declare.
5340 (cris_arch_setup): New function.
5341 (cris_usrregs_info, regs_info): New globals.
5342 (cris_regs_info): New function.
5343 (the_low_target): Adjust.
5344 (initialize_low_arch): New function.
5345 * linux-cris-low.c (tdesc_crisv32): Declare.
5346 (cris_arch_setup): New function.
5347 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5348 (cris_regs_info): New function.
5349 (the_low_target): Adjust.
5350 (initialize_low_arch): New function.
5351 * linux-m32r-low.c (tdesc_m32r): Declare.
5352 (m32r_arch_setup): New function.
5353 (m32r_usrregs_info, regs_info): New globals.
5354 (m32r_regs_info): Adjust.
5355 (initialize_low_arch): New function.
5356 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5357 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5358 (tic6x_usrregs_info): Forward declare.
5359 (tic6x_read_description): New function, based on ...
5360 (tic6x_arch_setup): ... this. Reimplement.
5361 (target_regsets): Rename to ...
5362 (tic6x_regsets): ... this, and make static.
5363 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5364 (tic6x_regs_info): New function.
5365 (the_low_target): Adjust.
5366 (initialize_low_arch): New function.
5367 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5368 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5369 (target_regsets): Rename to ...
5370 (xtensa_regsets): ... this, and make static.
5371 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5372 globals.
5373 (xtensa_arch_setup, xtensa_regs_info): New functions.
5374 (the_low_target): Adjust.
5375 (initialize_low_arch): New function.
5376 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5377 (nios2_arch_setup): Set the current process'es tdesc.
5378 (target_regsets): Rename to ...
5379 (nios2_regsets): ... this.
5380 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5381 (nios2_regs_info): New function.
5382 (the_low_target): Adjust.
5383 (initialize_low_arch): New function.
a261b8f5
PA
5384 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5385 (aarch64_arch_setup): Set the current process'es tdesc.
5386 (target_regsets): Rename to ...
5387 (aarch64_regsets): ... this.
5388 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5389 (aarch64_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
3aee8918
PA
5392 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5393 globals.
5394 (target_regsets): Rename to ...
5395 (tile_regsets): ... this.
5396 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5397 (tile_regs_info): New function.
5398 (tile_arch_setup): Set the current process'es tdesc.
5399 (the_low_target): Adjust.
5400 (initialize_low_arch): New function.
5401 * spu-low.c (tdesc_spu): Declare.
5402 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5403 * win32-arm-low.c (tdesc_arm): Declare.
5404 (arm_arch_setup): New function.
5405 (the_low_target): Install arm_arch_setup instead of
5406 init_registers_arm.
5407 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5408 (init_windows_x86): Rename to ...
5409 (i386_arch_setup): ... this. Set `win32_tdesc'.
5410 (the_low_target): Adjust.
5411 * win32-low.c (win32_tdesc): New global.
5412 (child_add_thread): Don't create the thread cache here.
5413 (do_initial_child_stuff): Set the new process'es tdesc.
5414 * win32-low.h (struct target_desc): Forward declare.
5415 (win32_tdesc): Declare.
5416 * lynx-i386-low.c (tdesc_i386): Declare global.
5417 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5418 * lynx-low.c (lynx_tdesc): New global.
5419 (lynx_add_process): Set the new process'es tdesc.
5420 * lynx-low.h (struct target_desc): Forward declare.
5421 (lynx_tdesc): Declare global.
5422 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5423 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5424 * nto-low.c (nto_tdesc): New global.
5425 (do_attach): Set the new process'es tdesc.
5426 * nto-low.h (struct target_desc): Forward declare.
5427 (nto_tdesc): Declare.
5428 * nto-x86-low.c (tdesc_i386): Declare.
5429 (nto_x86_arch_setup): Set `nto_tdesc'.
5430
b1fbec62
GB
54312013-06-04 Gary Benson <gbenson@redhat.com>
5432
5433 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5434 to qSupported response when appropriate.
5435 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5436 with nonzero-length annex.
5437 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5438 arguments supplied in annex.
5439
d1ec4ce7
DE
54402013-05-31 Doug Evans <dje@google.com>
5441
ac44adcb 5442 PR server/15594
d1ec4ce7
DE
5443 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5444 64 bits in 64-cross-32 environment.
5445
9b25f2d3
PA
54462013-05-28 Pedro Alves <palves@redhat.com>
5447
5448 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5449 (aarch64-without-fpu.c): Delete rule.
5450 * configure.srv (aarch64*-*-linux*): Remove references to
5451 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5452 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5453 declaration.
5454
6740dc9c
PA
54552013-05-24 Pedro Alves <palves@redhat.com>
5456
5457 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5458 instead of strchr/decode_address. Error if the range isn't split
5459 with a ','. Don't assume there's be a ':' in the action.
5460
c2d6af84
PA
54612013-05-23 Yao Qi <yao@codesourcery.com>
5462 Pedro Alves <palves@redhat.com>
5463
5464 * linux-low.c (lwp_in_step_range): New function.
5465 (linux_wait_1): If the thread was range stepping and stopped
5466 outside the stepping range, report the stop to GDB. Otherwise,
5467 continue stepping. Add range stepping debug output.
5468 (linux_set_resume_request): Copy the step range from the resume
5469 request to the lwp.
5470 (linux_supports_range_stepping): New.
5471 (linux_target_ops) <supports_range_stepping>: Set to
5472 linux_supports_range_stepping.
5473 * linux-low.h (struct linux_target_ops)
5474 <supports_range_stepping>: New field.
5475 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5476 * linux-x86-low.c (x86_supports_range_stepping): New.
5477 (the_low_target) <supports_range_stepping>: Set to
5478 x86_supports_range_stepping.
5479 * server.c (handle_v_cont): Handle 'r' action.
5480 (handle_v_requests): Append ";r" if the target supports range
5481 stepping.
5482 * target.h (struct thread_resume) <step_range_start,
5483 step_range_end>: New fields.
5484 (struct target_ops) <supports_range_stepping>:
5485 New field.
5486 (target_supports_range_stepping): New macro.
5487
58794e1a
JB
54882013-05-17 Joel Brobecker <brobecker@adacore.com>
5489
5490 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5491 confusion in comment.
5492
d631c5a7
JB
54932013-05-17 Joel Brobecker <brobecker@adacore.com>
5494
5495 * lynx-low.c (struct process_info_private): New type.
5496 (lynx_add_process): New function.
5497 (lynx_create_inferior, lynx_attach): Replace calls to
5498 add_process by calls to lynx_add_process.
5499 (lynx_resume): If PTID is null, then try using
5500 current_process()->private->last_wait_event_ptid.
5501 Add comments.
5502 (lynx_clear_inferiors): Delete. The contents of that function
5503 has been inlined in lynx_mourn;
5504 (lynx_wait_1): Save the ptid in the process's private data.
5505 (lynx_mourn): Free the process' private data. Replace call
5506 to lynx_clear_inferiors by call to clear_inferiors.
5507
96f7a20f
YQ
55082013-05-17 Yao Qi <yao@codesourcery.com>
5509
5510 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5511 the right place.
5512
db0dfaa0
LM
55132013-05-16 Luis Machado <lgustavo@codesourcery.com>
5514
5515 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5516 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5517 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5518 PT_TEXT_END_ADDR guards. Update comments.
5519 (linux_target_op) <read_offsets>: Conditionally define to
5520 linux_read_offsets if the target is UCLIBC and if it defines
5521 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5522
68f5f838
SL
55232013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5524 Andrew Jenner <andrew@codesourcery.com>
5525
5526 * Makefile.in (SFILES): Add linux-nios2-low.c.
5527 (clean): Add action to delete nios2-linux.c.
5528 (nios2-linux.c): New rule.
5529 * configure.srv: Add nios2*-*-linux*.
5530 * linux-nios2-low.c: New.
5531
1ebff1fd
HAQ
55322013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5533
5534 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5535
f6150862
HZ
55362013-04-25 Hui Zhu <hui@codesourcery.com>
5537
5538 PR gdb/15186
f6150862
HZ
5539 * ax.c (ax_printf): Add fflush.
5540
614c279d
TT
55412013-04-22 Tom Tromey <tromey@redhat.com>
5542
5543 * Makefile.in (SFILES): Add filestuff.c.
5544 (OBS): Add filestuff.o.
5545 (filestuff.o): New target.
5546 * config.in, configure: Rebuild.
5547 * configure.ac: Check for fdwalk, pipe2.
5548
7d4e5717
PA
55492013-04-17 Pedro Alves <palves@redhat.com>
5550
5551 * configure.ac (USE_THREAD_DB): Delete variable.
5552 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5553 Don't AC_SUBST USE_THREAD_DB.
5554 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5555 * config.in, configure: Regenerate.
5556
d5c93e41
PA
55572013-04-16 Pedro Alves <palves@redhat.com>
5558
5559 * linux-low.h (struct lwp_info) <thread_known>: Move under
5560 the USE_THREAD_DB #ifdef.
5561
04f5fe89
PA
55622013-04-16 Pedro Alves <palves@redhat.com>
5563
5564 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5565 (linux-low.o): Delete rule.
5566 * linux-low.h: Always include "gdb_thread_db.h" instead of
5567 conditionally including thread_db.h.
5568 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5569 HAVE_THREAD_DB_H.
5570
480b27bf
JK
55712013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5572
5573 * Makefile.in (install-only): Fix make install regression.
5574
43662968
JK
55752013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5576
5577 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5578 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5579 installation.
5580 * gdbserver.1: Remove.
5581
3e74e146
PA
55822013-03-22 Pedro Alves <palves@redhat.com>
5583
5584 * linux-low.c (handle_extended_wait): Don't call
5585 linux_enable_event_reporting.
5586
a8347a2a
TT
55872013-03-15 Tony Theodore <tonyt@logyst.com>
5588
5589 PR build/9098:
5590 * Makefile.in (SHELL): Use @SHELL@.
5591
eeb56fa7
SDJ
55922013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5593
5594 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5595 compiler warning.
5596
4fa7e2ff
JB
55972013-03-13 Joel Brobecker <brobecker@adacore.com>
5598
5599 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5600 Remove extraneous NULL element.
5601
8ddb1965
YQ
56022013-03-13 Yao Qi <yao@codesourcery.com>
5603
5604 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5605 'V' block in trace frame.
5606
9accd112
MM
56072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5608
5609 * target.h (struct target_ops): Add btrace ops.
5610 (target_supports_btrace): New macro.
5611 (target_enable_btrace): New macro.
5612 (target_disable_btrace): New macro.
5613 (target_read_btrace): New macro.
5614 * gdbthread.h (struct thread_info): Add btrace field.
5615 * server.c: Include btrace-common.h.
5616 (handle_btrace_general_set): New function.
5617 (handle_btrace_enable): New function.
5618 (handle_btrace_disable): New function.
5619 (handle_general_set): Call handle_btrace_general_set.
5620 (handle_qxfer_btrace): New function.
5621 (struct qxfer qxfer_packets[]): Add btrace entry.
5622 * inferiors.c (remove_thread): Disable btrace.
5623 * linux-low: Include linux-btrace.h.
5624 (linux_low_enable_btrace): New function.
5625 (linux_low_read_btrace): New function.
5626 (linux_target_ops): Add btrace ops.
5627 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5628 Add srv_linux_btrace=yes.
5629 (x86_64-*-linux*): Add linux-btrace.o.
5630 Add srv_linux_btrace=yes.
5631 * configure.ac: Define HAVE_LINUX_BTRACE.
5632 * config.in: Regenerated.
5633 * configure: Regenerated.
5634
5cc22e4c
MM
56352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5636
5637 * server.c (handle_qxfer): Preserve error message if -3 is
5638 returned.
5639 (qxfer): Document the -3 return value.
5640
7c97f91e
MM
56412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5642
5643 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5644 (linux_btrace_h): New variable.
5645 (linux-btrace.o): New rule.
5646
be9a119c 56472013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5648 Hafiz Abid Qadeer <abidh@codesourcery.com>
5649
5650 * tracepoint.c (trace_buffer_size): New global.
5651 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5652 (init_trace_buffer): Change to one-argument function. Allocate
5653 trace buffer memory.
5654 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5655 handle QTBuffer:size packet.
5656 (cmd_bigqtbuffer_size): New function.
5657 (initialize_tracepoint): Call init_trace_buffer with
5658 DEFAULT_TRACE_BUFFER_SIZE.
5659 * server.c (handle_query): Add QTBuffer:size in the
5660 supported packets.
5661
e64f7499
YQ
56622013-03-07 Yao Qi <yao@codesourcery.com>
5663
5664 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5665 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5666 of -1.
5667 (cmd_qtsp): Adjust condition. Do post increment.
5668 Set cur_action and cur_step_action back to 0.
5669
f0ae6fc3
PA
56702013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5671
5672 PR server/15236
5673 * linux-low.c (linux_write_memory): Return early success if LEN is
5674 zero.
5675
b5b0b0af
CV
56762013-03-05 Corinna Vinschen <vinschen@redhat.de>
5677
334ad4a8 5678 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5679
589bc927
TT
56802013-02-28 Tom Tromey <tromey@redhat.com>
5681
5682 * configure.ac: Invoke AC_SYS_LARGEFILE.
5683 * configure, config.in: Rebuild.
5684
dfe07582
CV
56852013-02-28 Corinna Vinschen <vinschen@redhat.com>
5686
5687 * win32-low.c: Throughout, fix format strings and casts of
5688 printf-like functions to avoid type related warnings on all
5689 platforms.
5690 (get_child_debug_event): Print dwDebugEventCode as hex since
5691 that's how it's usually documented.
5692
736cd585
YQ
56932013-02-28 Yao Qi <yao@codesourcery.com>
5694
5695 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5696 pulongest.
5697
e1f58301
JW
56982013-02-27 Jiong Wang <jiwang@tilera.com>
5699
5700 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5701 (reg-tilegx32.c): New rule.
5702 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5703 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5704 different register info initializer according to elf class.
5705 (init_registers_tilgx32): New function. The tilegx32 register info
5706 initializer.
5707 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5708 (tile_store_gregset): Likewise.
5709
d171ca78
YQ
57102013-02-27 Yao Qi <yao@codesourcery.com>
5711
5712 * server.c (process_point_options): Print debug message when
5713 debug_threads is true.
5714
282bbdf3
YQ
57152013-02-26 Yao Qi <yao@codesourcery.com>
5716
5717 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5718
aca22551
PA
57192013-02-19 Pedro Alves <palves@redhat.com>
5720 Kai Tietz <ktietz@redhat.com>
5721
5722 PR gdb/15161
5723
5724 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5725 instead of strtoul to extract address from packet.
5726 (process_serial_event) <'z'>: Likewise.
5727
4f3cee1c
YQ
57282013-02-18 Yao Qi <yao@codesourcery.com>
5729
5730 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5731
8e1d55a3
PA
57322013-02-14 Pedro Alves <palves@redhat.com>
5733
5734 Plug memory leak.
5735
5736 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5737 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5738
458820da
PA
57392013-02-14 Pedro Alves <palves@redhat.com>
5740
5741 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5742
baea0dae
PA
57432013-02-14 Pedro Alves <palves@redhat.com>
5744
5745 * tracepoint.c (save_string): Delete.
5746 (add_tracepoint_action): Use savestring instead of save_string.
5747
0b1afbb3
PA
57482013-02-12 Pedro Alves <palves@redhat.com>
5749
5750 * linux-xtensa-low.c: Ditto.
5751 * xtensa-xtregs.c: Ditto.
5752
8a4ac37e
PA
57532013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5754
5755 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5756 thread_db.
5757
148de6bb
MS
57582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5759
5760 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5761 aarch64_num_wp_regs and aarch64_num_bp_regs to
5762 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5763
55fac6e0
MS
57642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5765
5766 * linux-aarch64-low.c (ps_get_thread_area): Replace
5767 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5768
176eb98c
MS
57692013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5770 Marcus Shawcroft <marcus.shawcroft@arm.com>
5771 Nigel Stephens <nigel.stephens@arm.com>
5772 Yufeng Zhang <yufeng.zhang@arm.com>
5773
5774 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5775 (aarch64.c, aarch64-without-fpu.c): New targets.
5776 * configure.srv (aarch64*-*-linux*): New.
5777 * linux-aarch64-low.c: New file.
5778
56f7af9c
MS
57792013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5780
43aaf8b6 5781 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5782 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5783 (dequeue_one_deferred_signal, linux_resume_one_thread)
5784 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5785 (linux_tracefork_grandchild, linux_test_for_tracefork)
5786 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5787 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5788 where the argument is 0.
5789
60f662b0
YQ
57902013-01-25 Yao Qi <yao@codesourcery.com>
5791
5792 * event-loop.c: Include "queue.h".
5793 (gdb_event_p): New typedef.
5794 (struct gdb_event) <next_event>: Remove.
5795 (event_queue): Change to QUEUE(gdb_event_p).
5796 (async_queue_event): Remove.
5797 (gdb_event_xfree): New.
5798 (initialize_event_loop): New.
5799 (process_event): Use API from QUEUE.
5800 (wait_for_event): Likewise.
5801 * server.c (main): Call initialize_event_loop.
5802 * server.h (initialize_event_loop): Declare.
5803
5ae4861a
YQ
58042013-01-18 Yao Qi <yao@codesourcery.com>
5805
5806 * ax.h (struct eval_agent_expr_context): New.
5807 (gdb_eval_agent_expr): Update declaration.
5808 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5809 TFRAME. Add new argument CTX.
5810 * server.h (struct eval_agent_expr_context): Declare.
5811 (agent_mem_read, agent_tsv_read): Update declaration.
5812 (agent_mem_read_string): Likewise.
5813 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5814 (add_traceframe_block): Add new argument TPOINT.
5815 Increase TPOINT->traceframe_usage.
5816 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5817 eval_tracepoint_agent_expr.
5818 (condition_true_at_tracepoint): Likewise.
5819 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5820 (agent_mem_read_string, agent_tsv_read): Likewise.
5821
85e00e85
YQ
58222013-01-16 Yao Qi <yao@codesourcery.com>
5823
5824 * linux-low.c (linux_resume_one_lwp): Don't check
5825 'lwp->bp_reinsert != 0'.
5826
4039cf45
JB
58272013-01-07 Joel Brobecker <brobecker@adacore.com>
5828 Pedro Alves <palves@redhat.com>
5829
5830 * lynx-low.c (ptrace_request_to_str): Define a temporary
5831 macro and use it to simplify this function's implementation.
5832
9044dee2
JB
58332013-01-07 Joel Brobecker <brobecker@adacore.com>
5834
5835 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5836 sets errno.
5837
e6352c8f
JB
58382013-01-07 Joel Brobecker <brobecker@adacore.com>
5839
5840 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5841
50681a27
JB
58422013-01-07 Joel Brobecker <brobecker@adacore.com>
5843
5844 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5845
3f6e77ef
JB
58462013-01-07 Joel Brobecker <brobecker@adacore.com>
5847
5848 * lynx-low.c (lynx_resume): Use the resume_info parameter
5849 to determine the ptid for the lynx_ptrace call, unless
5850 it is equal to minus_one_ptid, in which case we use the
5851 ptid of the current_inferior.
5852 (lynx_wait_1): After having received a thread create/exit
5853 event, resume the inferior's execution using the signaling
5854 thread's ptid, rather than the old ptid.
5855
7fda33ae
JB
58562013-01-07 Joel Brobecker <brobecker@adacore.com>
5857
5858 * lynx-low.c (lynx_resume): Delete variable ret.
5859
b9786c74
JB
58602013-01-01 Joel Brobecker <brobecker@adacore.com>
5861
5862 * gdbreplay.c (gdbreplay_version): Update copyright year.
5863 * server.c (gdbserver_version): Likewise.
5864
8b93d60f
JB
58652012-12-17 Joel Brobecker <brobecker@adacore.com>
5866
5867 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5868 new thread.
5869
037335a7
JB
58702012-12-17 Joel Brobecker <brobecker@adacore.com>
5871
5872 * lynx-low.c (ptrace_request_to_str): Add handling for
5873 PTRACE_GETTRACESIG.
5874
52d4cbd8
JB
58752012-12-17 Joel Brobecker <brobecker@adacore.com>
5876
5877 * lynx-low.c (lynx_attach): Delete variable new_process.
5878
ab8f6ca9
JB
58792012-12-17 Joel Brobecker <brobecker@adacore.com>
5880
5881 * lynx-low.c (lynx_create_inferior): Delete variable
5882 new_process.
5883
78cbc024
JB
58842012-12-17 Joel Brobecker <brobecker@adacore.com>
5885
5886 * lynx-low.c (ptrace_request_to_str): Do not handle
5887 PTRACE_GETTHREADLIST if this macro does not exist.
5888
14a00470
YQ
58892012-12-15 Yao Qi <yao@codesourcery.com>
5890
5891 * Makefile.in (OBS): Add notif.o.
5892 * notif.c, notif.h: New.
5893 * server.c: Include "notif.h".
5894 (struct vstop_notif) <next>: Remove.
5895 <base>: New field.
5896 (queue_stop_reply): Update.
5897 (push_event, send_next_stop_reply): Remove.
5898 (discard_queued_stop_replies): Update.
5899 (notif_stop): New variable.
5900 (handle_v_stopped): Remove.
5901 (handle_v_requests): Don't call handle_v_stopped. Call
5902 handle_ack_notif instead.
5903 (queue_stop_reply_callback): Call notif_event_enque instead
5904 of queue_stop_reply.
5905 (handle_status): Don't call send_next_stop_reply, call
5906 notif_write_event instead.
5907 (kill_inferior_callback): Likewise.
5908 (detach_or_kill_inferior_callback): Likewise.
5909 (main): Call initialize_notif.
5910 (process_serial_event): Call QUEUE_is_empty.
5911 (handle_target_event): Call notif_push instead of push event.
5912 * server.h (push_event): Remove declaration.
5913
61c125b9
TT
59142012-12-10 Tom Tromey <tromey@redhat.com>
5915
5916 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5917 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5918 macros.
5919 (.c.o): Rewrite.
5920 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5921 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5922 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5923 (amd64-linux-ipa.o, ax.o): Rewrite.
5924 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5925 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5926 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5927 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5928 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5929 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5930 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5931 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5932 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5933 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5934 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5935 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5936 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5937 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5938 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5939 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5940 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5941 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5942 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5943 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5944 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5945 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5946 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5947 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5948 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5949 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5950 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5951 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5952 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5953 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5954 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5955 (reg-tilegx.o): Remove.
5956 (all_object_files): New macro.
5957 Include .deps files.
5958 * aclocal.m4, configure: Rebuild.
5959 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5960 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5961 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5962
e90e9ad9
TT
59632012-12-05 Tom Tromey <tromey@redhat.com>
5964
5965 PR gdb/14917:
5966 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5967
02d403bf 59682012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5969
5970 * configure.ac: Check for linux/perf_event.h.
5971 * config.in: Regenerated.
5972 * configure: Regenerated.
5973
0270a750
PA
59742012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5975
5976 * hostio.c (handle_readlink): Decrease buffer size
5977 parameter passed to readlink by one byte.
5978
8c29b58e
YQ
59792012-11-26 Yao Qi <yao@codesourcery.com>
5980
5981 * configure.ac (build_warnings): Append '-Wempty-body'.
5982 * configure: Regenerated.
5983 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5984 body.
5985
8bdce1ff
PM
59862012-11-15 Pierre Muller <muller@sourceware.org>
5987
5988 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5989 * config.in: Regenerate.
5990 * configure: Regenerate.
5991 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5992 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5993 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5994 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5995 header.
5996 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5997 instead of <sys/wait.h> header.
5998 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5999
02d403bf 60002012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6001
6002 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6003 (various make rules): Remove -DGDBSERVER
6004
fbd5db48
YQ
60052012-11-09 Yao Qi <yao@codesourcery.com>
6006
6007 * spu-low.c (current_ptid): Move it to ..
6008 * gdbthread.h: ... here. New.
6009 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6010 * server.c (myresume, process_serial_event): Likewise.
6011 * thread-db.c (thread_db_find_new_threads): Likewise.
6012 * tracepoint.c (run_inferior_command): Likewise.
6013
b3dc46ff
AB
60142012-10-01 Andrew Burgess <aburgess@broadcom.com>
6015
6016 * server.c (handle_search_memory_1): Include access length in
6017 warning message.
6018
07c04788
HPN
60192012-09-05 Michael Brandt <michael.brandt@axis.com>
6020
6021 * linux-crisv32-low.c: Fix compile errors.
6022
918d227b
YQ
60232012-09-04 Yao Qi <yao@codesourcery.com>
6024
6025 * tracepoint.c (cmd_qtsv): Adjust debug message.
6026 Don't check CUR_TPOINT.
6027
18c1b81a
YQ
60282012-08-28 Yao Qi <yao@codesourcery.com>
6029
6030 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6031 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6032 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6033 Remove declarations of xmalloc, xreallloc, xstrdup and
6034 freeargv.
6035 * Makefile.in (libiberty_h): New.
6036 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6037 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6038
dc82f37b
YQ
60392012-08-23 Yao Qi <yao@codesourcery.com>
6040
6041 * server.h: Remove declaration of 'xsnprintf'.
6042
406b1477
KS
60432012-08-22 Keith Seitz <keiths@redhat.com>
6044
6045 * server.h: Include build-gnulib-gbserver/config.h.
6046 * gdbreplay.c: Likewise.
6047
e6712ff1
DE
60482012-08-08 Doug Evans <dje@google.com>
6049
6050 * Makefile.in (SFILES): Add gdb_vecs.c.
6051 (OBS): Add gdb_vecs.o.
6052 (gdb_vecs_h, host_defs_h): New variables.
6053 (thread-db.o): Add $(gdb_vecs_h) dependency.
6054 (gdb_vecs.o): New rule.
6055 * thread-db.c: #include "gdb_vecs.h".
6056 (thread_db_load_search): Use a vector to iterate over path elements.
6057 Handle text appearing after "$pdir".
6058
6059 * configure.ac: Add check for strstr.
6060 * config.in: Regenerate.
6061 * configure: Regenerate.
6062
7c3270ae
UW
60632012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6064
6065 * hostio.c (handle_pread): If pread fails, fall back to attempting
6066 lseek/read.
6067 (handle_pwrite): Likewise for pwrite.
6068
b62e2b27
UW
60692012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6070
6071 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6072 between unsupported TYPE and unimplementable ADDR/LEN combination.
6073 (arm_insert_point): Act on new return value.
6074
78a99e91
PA
60752012-07-31 Pedro Alves <palves@redhat.com>
6076
6077 * server.c (process_point_options): Only skip tokens if we find
6078 one that is unrecognized. Don't treat 'X' specially while
6079 skipping unrecognized tokens.
6080
fcf303ab
UW
60812012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6082
6083 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6084 to 4-byte-align HW breakpoint addresses for Thumb.
6085
7255706c
YQ
60862012-07-27 Yao Qi <yao@codesourcery.com>
6087
6088 PR remote/14161.
6089
6090 * server.h: Declare gdb_agent_about_to_close.
6091 * target.c (kill_inferior): Include "agent.h".
6092 New. Send command 'kill'.
6093 * target.h (kill_inferior): Removed macro.
6094 * tracepoint.c (gdb_agent_about_to_close): New.
6095 (gdb_agent_helper_thread): Handle command 'close'.
6096 Wait endlessly until the inferior stops.
6097 Install gdb_agent_remove_socket to atexit hook.
6098 (agent_socket_name): New static variable.
6099 (gdb_agent_socket_init): Replace local variable 'name' with
6100 'agent_socket_name'.
6101 (gdb_agent_remove_socket): New.
6102
5a3f286f
YQ
61032012-07-27 Yao Qi <yao@codesourcery.com>
6104
6105 * server.c (process_point_options): Stop at 'X' when parsing.
6106
961bd387
ME
61072012-07-19 Michael Eager <eager@eagercon.com>
6108
a261b8f5 6109 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6110 to hw_execute.
6111 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6112 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6113 hardware breakpoint.
6114
aa7c7447
JK
61152012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6116
6117 * gdbserver/linux-low.c (initialize_low): Call
6118 linux_ptrace_init_warnings.
6119
7f216e7c
DE
61202012-07-02 Doug Evans <dje@google.com>
6121
6122 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6123 pointer to int.
6124
d3ce09f5
SS
61252012-07-02 Stan Shebs <stan@codesourcery.com>
6126
6127 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6128 (ax.o): Add it to build rule.
6129 (ax-ipa.o): Ditto.
6130 (OBS): Add format.o.
6131 (IPA_OBS): Add format.o.
6132 * server.c (handle_query): Claim support for breakpoint commands.
6133 (process_point_options): Add command case.
6134 (process_serial_event): Leave running if there are printfs in
6135 effect.
6136 * mem-break.h (any_persistent_commands): Declare.
6137 (add_breakpoint_commands): Declare.
6138 (gdb_no_commands_at_breakpoint): Declare.
6139 (run_breakpoint_commands): Declare.
6140 * mem-break.c (struct point_command_list): New struct.
6141 (struct breakpoint): New field command_list.
6142 (any_persistent_commands): New function.
6143 (add_commands_to_breakpoint): New function.
6144 (add_breakpoint_commands): New function.
6145 (gdb_no_commands_at_breakpoint): New function.
6146 (run_breakpoint_commands): New function.
6147 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6148 locally.
6149 * ax.c: Include format.h.
6150 (ax_printf): New function.
6151 (gdb_eval_agent_expr): Add printf opcode.
6152
2f8f6aed
YQ
61532012-06-13 Yao Qi <yao@codesourcery.com>
6154
6155 * server.c (start_inferior): Remove duplicated writes to fields
6156 'last_resume_kind' and 'last_status' of 'current_inferior'.
6157
0c9070b3
YQ
61582012-06-12 Yao Qi <yao@codesourcery.com>
6159 Pedro Alves <palves@redhat.com>
6160
6161 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6162 comment.
6163 * server.c (handle_v_cont): Extend comment.
6164
c52daf70
YQ
61652012-06-11 Yao Qi <yao@codesourcery.com>
6166
6167 * linux-low.c (linux_attach): Add 'static'.
6168
d38bbb0a
YQ
61692012-06-06 Yao Qi <yao@codesourcery.com>
6170
6171 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6172
89dc0afd
JK
61732012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6174
6175 Fix gcc -flto compilation warning.
6176 * server.c (main): Make variable multi_mode and attach volatile.
6177
75f62ce7
TJB
61782012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6179
6180 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6181 if the platform doesn't know about it.
6182
65f479b6
PA
61832012-05-30 Jeff Kenton <jkenton@tilera.com>
6184
6185 * Makefile.in (SFILES): Add linux-tile-low.c.
6186 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6187 * configure.srv: Handle tilegx-*-linux*.
6188 * linux-tile-low.c: New file.
6189
0c5bf5a9
JK
61902012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6191
6192 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6193
a493e3e2
PA
61942012-05-24 Pedro Alves <palves@redhat.com>
6195
6196 PR gdb/7205
6197
43aaf8b6 6198 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6199
2ea28649
PA
62002012-05-24 Pedro Alves <palves@redhat.com>
6201
6202 PR gdb/7205
6203
6204 Replace target_signal with gdb_signal throughout.
6205
8d409d16
MR
62062012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6207
6208 * linux-low.c (linux_store_registers): Avoid the copying sequence
6209 when no data has been retrieved by ptrace.
6210
23512c01
MGD
62112012-05-22 Will Deacon <will.deacon@arm.com>
6212
6213 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6214 Include asm/ptrace.h.
6215 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6216 already defined.
6217
4934b29e
MR
62182012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6219
6220 * linux-low.c (linux_store_registers): Don't re-retrieve data
6221 with ptrace that has already been obtained from /proc. Always
6222 copy any data retrieved with ptrace to the buffer supplied.
6223
bde24c0a
PA
62242012-05-11 Yao Qi <yao@codesourcery.com>
6225 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (enum stopping_threads_kind): New.
6228 (stopping_threads): Change type to `enum stopping_threads_kind'.
6229 (handle_extended_wait): If stopping and suspending threads, leave
6230 the new_lwp suspended too.
6231 (linux_wait_for_event): Adjust.
6232 (stop_all_lwps): Set `stopping_threads' to
6233 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6234 whether we're suspending threads or just stopping them. Assert no
6235 recursion happens.
6236
623b6bdf
YQ
62372012-04-29 Yao Qi <yao@codesourcery.com>
6238
6239 * server.h: Move some code to ...
6240 * gdbthread.h: ... here. New.
6241 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6242 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6243 (nto-low.o, win32-low.o): Likewise.
6244 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6245 * regcache.c, remote-utils.c, server.c: Likewise.
6246 * target.c, tracepoint.c, win32-low.c: Likewise.
6247
f15f9948
TJB
62482012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6249
6250 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6251 (PTRACE_ARG4_TYPE): Likewise.
6252 (PTRACE_XFER_TYPE): Likewise.
6253 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6254 ptrace to PTRACE_ARG3_TYPE.
6255 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6256 (PTRACE_ARG4_TYPE): Likewise.
6257 (PTRACE_XFER_TYPE): Likewise.
6258 (linux_detach_one_lwp): Cast fourth argument of
6259 ptrace to long then PTRACE_ARG4_TYPE.
6260 (regsets_fetch_inferior_registers): Cast third argument of
6261 ptrace to long then PTRACE_ARG3_TYPE.
6262 (regsets_store_inferior_registers): Likewise.
6263
38ea300a
PA
62642012-04-20 Pedro Alves <palves@redhat.com>
6265
6266 * configure: Regenerate.
6267
c971b7fa
PA
62682012-04-19 Pedro Alves <palves@redhat.com>
6269
43aaf8b6 6270 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6271 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6272 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6273 (all, install-only, uninstall, clean-info, all-lib, clean): No
6274 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6275 (maintainer-clean realclean distclean): Use subdir_do.
6276 (subdir_do): New.
6277 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6278 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6279 * acinclude.m4: Include acx_configure_dir.m4.
6280 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6281 calls. Call AC_PROG_RANLIB. Configure gnulib using
6282 ACX_CONFIGURE_DIR.
6283 (GNULIB): New.
6284 (GNULIB_STDINT_H): Adjust.
6285 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6286 * gdbreplay.c: Include build-gnulib/config.h.
6287 * server.h: Likewise.
6288 * aclocal.m4: Regenerate.
6289 * config.in: Regenerate.
6290 * configure: Regenerate.
c971b7fa 6291
809277f8
PA
62922012-04-19 Pedro Alves <palves@redhat.com>
6293
6294 * Makefile.in (LIBGNU, INCGNU): Adjust.
6295 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6296 (all, install-only, uninstall, clean-info, all-lib, clean)
6297 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6298 * configure.ac: Adjust AC_OUTPUT output.
6299 * aclocal.m4: Regenerate.
6300 * configure: Regenerate.
6301
fd9bb8b8
PA
63022012-04-19 Pedro Alves <palves@redhat.com>
6303
6304 * Makefile.in (generated_files): New.
6305 (server_h): Remove the explicit dependency on config.h, and depend
6306 on $generated_files.
6307
1c298c66
PA
63082012-04-19 Pedro Alves <palves@redhat.com>
6309
6310 * Makefile.in (INCGNU): Add -Ignulib.
6311
57c4b50b
PA
63122012-04-19 Pedro Alves <palves@redhat.com>
6313
6314 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6315 (INCGNU): ... this, and spell out -I here.
6316 (GNULIB_LIB): Rename to ...
6317 (LIBGNU): ... this.
6318 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6319
1030e047
PA
63202012-04-19 Pedro Alves <palves@redhat.com>
6321
6322 * config.in: Regenerate.
6323
447d4319
PA
63242012-04-19 Pedro Alves <palves@redhat.com>
6325
6326 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6327 * server.h (memmem): Remove declaration.
6328 * config.in: Regenerate.
6329 * configure: Regenerate.
6330
aad9eab9
YQ
63312012-04-19 Yao Qi <yao@codesourcery.com>
6332
6333 * Makefile.in (SFILES): Add common/vec.c.
6334 (OBS): Add vec.o.
6335 (vec.o): New rule.
6336
3e10640f
YQ
63372012-04-19 Yao Qi <yao@codesourcery.com>
6338
6339 * remote-utils.c (prepare_resume_reply): Replace with macro
6340 target_core_of_thread.
6341 * server.c (handle_qxfer_threads_proper): Likewise.
6342 * target.h (traget_core_of_thread): New macro.
6343
71622373
PA
63442012-04-18 Pedro Alves <palves@redhat.com>
6345
6346 * aclocal.m4: Regenerate.
6347 * configure: Regenerate.
6348
80d26939
YQ
63492012-04-16 Yao Qi <yao@codesourcery.com>
6350
6351 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6352 duplicated on address.
6353
42476b70
YQ
63542012-04-16 Yao Qi <yao@codesourcery.com>
6355
6356 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6357 (struct tracepoint_action_ops) <send>: New field.
6358 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6359 (agent_expr_send, x_tracepoint_action_send): New.
6360 (l_tracepoint_action_send): New.
6361 (cmd_qtdp): Download and install tracepoint
6362 according to `use_agent'.
6363 (run_inferior_command): Add one more parameter `len'.
6364 Update callers.
6365 (tracepoint_send_agent): New.
6366 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6367
7bc83639
YQ
63682012-04-16 Yao Qi <yao@codesourcery.com>
6369
6370 * tracepoint.c (download_tracepoints): Moved to ...
6371 (cmd_qtstart): ... here.
6372
5f18041e
YQ
63732012-04-14 Yao Qi <yao@codesourcery.com>
6374
6375 * tracepoint.c: Include inttypes.h.
6376 (struct collect_memory_action): Use sized types.
6377 (struct tracepoint): Likewise.
6378 (cmd_qtdp, stop_tracing): Update print specifiers.
6379 (cmd_qtp, response_tracepoint): Likewise.
6380 (collect_data_at_tracepoint): Likewise.
6381 (collect_data_at_step): Likewise.
6382
55a8c076
YQ
63832012-04-14 Yao Qi <yao@codesourcery.com>
6384
6385 Import gnulib module inttypes.
6386 * aclocal.m4, config.in, configure: Regenerated.
6387
dc750257
YQ
63882012-04-14 Yao Qi <yao@codesourcery.com>
6389
6390 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6391 Makefile and config.status at last.
6392
0ab5faf9
YQ
63932012-04-13 Yao Qi <yao@codesourcery.com>
6394
6395 * tracepoint.c: Include stdint.h unconditionally.
6396
18f5fd81
TJB
63972012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6398
6399 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6400 on BFD_HAVE_SYS_PROCFS_TYPE.
6401 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6402 * configure: Regenerate.
6403 * config.in: Likewise.
6404
4d47af5c
L
64052012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6406
6407 * Makefile.in (clean): Also remove x32.c x32-linux.c
6408 x32-avx.c x32-avx-linux.c.
6409 (x32.o): New target.
6410 (x32.c): Likewise.
6411 (x32-linux.o): Likewise.
6412 (x32-linux.c): Likewise.
6413 (x32-avx.o): Likewise.
6414 (x32-avx.c): Likewise.
6415 (x32-avx-linux.o): Likewise.
6416 (x32-avx-linux.c): Likewise.
6417
6418 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6419 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6420 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6421 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6422 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6423 i386/x32-avx-linux.xml.
6424
6425 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6426 (init_registers_x32_avx_linux): Likwise.
6427 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6428 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6429
ecedbe58
PA
64302012-04-13 Pedro Alves <palves@redhat.com>
6431
6432 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6433 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6434 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6435 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6436 the sub-make.
6437
c92b5177
L
64382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6439
6440 * linux-x86-low.c (compat_x32_clock_t): New.
6441 (compat_x32_siginfo_t): Likewise.
6442 (compat_x32_siginfo_from_siginfo): Likewise.
6443 (siginfo_from_compat_x32_siginfo): Likewise.
6444 (linux_is_elf64): Likewise.
6445 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6446 and siginfo_from_compat_x32_siginfo for x32.
6447 (x86_arch_setup): Set linux_is_elf64.
6448
214d508e
L
64492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6450
6451 PR gdb/13969
6452 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6453 e_machine field.
6454 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6455 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6456 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6457 compatible with process.
6458
c9a1864a
YQ
64592012-04-12 Yao Qi <yao@codesourcery.com>
6460
6461 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6462 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6463 (install-only, install-info, clean): Handle sub dir gnulib.
6464 (all-lib, am--refresh): New targets.
6465 (memmem.o): Remove target.
6466 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6467 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6468 (AC_REPLACE_FUNCS): Remove memmem.
6469 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6470 (AC_OUTPUT): Generate Makefile in gnulib/.
6471 * aclocal.m4, config.in, configure: Regenerated.
6472
367ba2c2
MR
64732012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6474
6475 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6476
9d236627
PA
64772012-04-05 Pedro Alves <palves@redhat.com>
6478
6479 -Werror=strict-aliasing
6480
6481 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6482 pointer.
6483
111217b3
PA
64842012-04-04 Pedro Alves <palves@redhat.com>
6485
6486 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6487 (sparc_store_gregset_from_stack, sparc_store_gregset)
6488 (sparc_breakpoint_at): Fix formatting.
6489
8365dcf5
TJB
64902012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6491
6492 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6493 are available.
6494 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6495 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6496 * config.in: Regenerate.
6497 * configure: Likewise.
6498
689cc2ae
PA
64992012-03-29 Pedro Alves <palves@redhat.com>
6500
6501 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6502 Correct ptrace arguments.
6503
c14dfd32
PA
65042012-03-28 Pedro Alves <palves@redhat.com>
6505
6506 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6507 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6508 (IA64_FR1_REGNUM): New defines.
6509 (ia64_fetch_register): New.
6510 (the_low_target): Install it.
6511 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6512 field.
6513 * linux-low.c (linux_fetch_registers): Try the
6514 the_low_target.fetch_register hook first.
6515
6516 * linux-arm-low.c (the_low_target): Adjust.
6517 * linux-bfin-low.c (the_low_target): Adjust.
6518 * linux-cris-low.c (the_low_target): Adjust.
6519 * linux-crisv32-low.c (the_low_target): Adjust.
6520 * linux-m32r-low.c (the_low_target): Adjust.
6521 * linux-m68k-low.c (the_low_target): Adjust.
6522 * linux-mips-low.c (the_low_target): Adjust.
6523 * linux-ppc-low.c (the_low_target): Adjust.
6524 * linux-s390-low.c (the_low_target): Adjust.
6525 * linux-sh-low.c (the_low_target): Adjust.
6526 * linux-sparc-low.c (the_low_target): Adjust.
6527 * linux-tic6x-low.c (the_low_target): Adjust.
6528 * linux-x86-low.c (the_low_target): Adjust.
6529 * linux-xtensa-low.c (the_low_target): Adjust.
6530
63c88e13
PA
65312012-03-26 Pedro Alves <palves@redhat.com>
6532
6533 * server.c (handle_qxfer_libraries): Don't bail early if
6534 the_target->qxfer_libraries_svr4 is not NULL.
6535
fb723180
PA
65362012-03-26 Pedro Alves <palves@redhat.com>
6537
6538 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6539
0afae3cf
PA
65402012-03-23 Pedro Alves <palves@redhat.com>
6541
6542 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6543 "library-list-svr4" element's start tag when the the DSO list is
6544 empty.
6545
485f1ee4
PA
65462012-03-23 Pedro Alves <palves@redhat.com>
6547
6548 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6549 a variable whose type size is the same as the inferior's pointer
6550 size.
6551
a5362b9a
TS
65522012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6553
6554 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6555 struct siginfo.
6556 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6557 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6558 * linux-low.h: Include <signal.h>.
6559 (struct siginfo): Remove forward declaration.
6560 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6561 struct siginfo.
6562
d226c142
MF
65632012-03-21 Mike Frysinger <vapier@gentoo.org>
6564
6565 * .gitignore: Ignore more files.
6566
122f36ef
PA
65672012-03-19 Pedro Alves <palves@redhat.com>
6568 Jan Kratochvil <jan.kratochvil@redhat.com>
6569
6570 * server.c (cont_thread, general_thread): Add describing comments.
6571 (start_inferior): Clear `cont_thread'.
6572 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6573 of a process.
6574
fc3e5175
YQ
65752012-03-15 Yao Qi <yao@codesourcery.com>
6576
6577 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6578 handling to ...
6579 (cmd_qtdp): ... here.
6580
8d0d92cd
YQ
65812012-03-15 Yao Qi <yao@codesourcery.com>
6582
6583 * tracepoint.c (struct tracepoint_action_ops): New.
6584 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6585 (m_tracepoint_action_download): New.
6586 (r_tracepoint_action_download): New.
6587 (x_tracepoint_action_download): New.
6588 (l_tracepoint_action_download): New.
6589 (add_tracepoint_action): Install `action->ops' according type.
6590 (download_tracepoint_1): Move code `download' function pointer
6591 of various tracepoint_action_ops.
6592
87b0bb13
JK
65932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6594
6595 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6596 linux_ptrace_attach_warnings.
6597
5f572dec
JK
65982012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6599
6600 * Makefile.in (linux-ptrace.o): New.
6601 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6602 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6603 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6604 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6605 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6606 of these targets.
6607 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6608
f4647387
YQ
66092012-03-08 Yao Qi <yao@codesourcery.com>
6610 Pedro Alves <palves@redhat.com>
6611
6612 Fix PR server/13392.
6613 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6614 offset of JMP insn.
6615 * tracepoint.c (remove_tracepoint): New.
6616 (cmd_qtdp): Call remove_tracepoint when failed to install.
6617
9b224c5e
PA
66182012-03-07 Pedro Alves <palves@redhat.com>
6619
6620 * linux-low.c (get_detach_signal): New.
6621 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6622 Pass on pending signals to PTRACE_DETACH. Check the result of the
6623 ptrace call.
6624 * server.c (program_signals, program_signals_p): New.
6625 (handle_general_set): Handle QProgramSignals.
6626 * server.h (program_signals, program_signals_p): Declare.
6627
e237a7e2
JK
66282012-03-05 Pedro Alves <palves@redhat.com>
6629 Jan Kratochvil <jan.kratochvil@redhat.com>
6630
6631 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6632 New comment why.
6633
5808517f
YQ
66342012-03-03 Yao Qi <yao@codesourcery.com>
6635
6636 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6637 agent_look_up_symbols.
6638
58b4daa5
YQ
66392012-03-03 Yao Qi <yao@codesourcery.com>
6640
6641 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6642 (linux-x86-low.o): Likewise.
6643 * server.h: Remove in_process_agent_loaded.
6644 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6645 common/agent.c.
6646 Update callers.
6647
8ffcbaaf
YQ
66482012-03-03 Yao Qi <yao@codesourcery.com>
6649
6650 * tracepoint.c (gdb_agent_capability): New global.
6651 (in_process_agent_loaded_ust): Renamed to
6652 `in_process_agent_supports_ust'.
6653 Update callers.
6654 (in_process_agent_supports_ust): Call agent_capability_check.
6655 (clear_installed_tracepoints): Assert that agent supports
6656 agent.
6657
d1feda86
YQ
66582012-03-03 Yao Qi <yao@codesourcery.com>
6659
6660 * linux-low.c (linux_supports_agent): New.
6661 (linux_target_ops): Initialize field `supports_agent' with
6662 linux_supports_agent.
6663 * target.h (struct target_ops) <supports_agent>: New.
6664 (target_supports_agent): New macro.
6665 * server.c (handle_general_set): Handle packet 'QAgent'.
6666 (handle_query): Send `QAgent+'.
6667 * Makefile.in (server.o): Depends on agent.h.
6668
2fa291ac
YQ
66692012-03-03 Yao Qi <yao@codesourcery.com>
6670
6671 * Makefile.in (OBS): Add agent.o.
6672 Add new rule for agent.o.
6673 Track dependence of tracepoint.c on agent.h.
6674 * tracepoint.c (run_inferior_command_1):
6675 (run_inferior_command): Call agent_run_command.
6676 (gdb_ust_connect_sync_socket): Deleted. Move it to
6677 common/agent.c.
6678 (resume_thread, stop_thread): Likewise.
6679 (gdb_ust_socket_init): Renamed to ...
6680 (gdb_agent_socket_init): ... New.
6681 (gdb_ust_thread): Renamed to ...
6682 (gdb_agent_helper_thread): ... New.
6683 (gdb_ust_init): Move some code to ...
6684 (gdb_agent_init): ... here. New.
6685 [HAVE_UST]: Call gdb_ust_init.
6686 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6687 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6688 * config.in, configure: Regenerated.
6689
05044653
PA
66902012-03-02 Pedro Alves <palves@redhat.com>
6691
6692 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6693 * linux-low.c (struct simple_pid_list): New.
6694 (stopped_pids): New a struct simple_pid_list pointer.
6695 (add_to_pid_list, pull_pid_from_list): New.
6696 (handle_extended_wait): Don't assume the first signal new children
6697 report is SIGSTOP. Adjust call to pull_pid_from_list.
6698 (linux_wait_for_lwp): Adjust.
6699
8d00225b
YQ
67002012-03-02 Yao Qi <yao@codesourcery.com>
6701
6702 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6703 debug log.
6704
19560ba5
YQ
67052012-03-02 Yao Qi <yao@codesourcery.com>
6706
6707 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6708 `stop_pc' and `tpoint'. Update caller.
6709
1faeff08
MR
67102012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6711
6712 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6713 * linux-low.c (use_linux_regsets): New macro.
6714 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6715 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6716 (linux_register_in_regsets): New function.
6717 (usr_fetch_inferior_registers): Skip registers covered by
6718 regsets.
6719 (usr_store_inferior_registers): Likewise.
6720 (usr_fetch_inferior_registers): New macro.
6721 (usr_store_inferior_registers): Likewise.
6722 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6723 (linux_store_registers): Likewise.
6724 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6725 prototype.
6726 (init_registers_mips64_dsp_linux): Likewise.
6727 (init_registers_mips_linux): New macro.
6728 (init_registers_mips_dsp_linux): Likewise.
6729 (mips_dsp_num_regs): Likewise.
6730 (DSP_BASE, DSP_CONTROL): New fallback macros.
6731 (mips_base_regs): New macro.
6732 (mips_regmap): Use it. Fix the size.
6733 (mips_dsp_regmap): New variable.
6734 (mips_dsp_regset_bitmap): Likewise.
6735 (mips_arch_setup): New function.
6736 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6737 than mips_regmap.
6738 (mips_cannot_store_register): Likewise.
6739 (the_low_target): Update .arch_setup, .num_regs and .regmap
6740 initializers. Add .regset_bitmap initializer.
6741 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6742 initializer.
6743 * linux-bfin-low.c (the_low_target): Likewise.
6744 * linux-cris-low.c (the_low_target): Likewise.
6745 * linux-crisv32-low.c (the_low_target): Likewise.
6746 * linux-ia64-low.c (the_low_target): Likewise.
6747 * linux-m32r-low.c (the_low_target): Likewise.
6748 * linux-m68k-low.c (the_low_target): Likewise.
6749 * linux-ppc-low.c (the_low_target): Likewise.
6750 * linux-s390-low.c (the_low_target): Likewise.
6751 * linux-sh-low.c (the_low_target): Likewise.
6752 * linux-sparc-low.c (the_low_target): Likewise.
6753 * linux-tic6x-low.c (the_low_target): Likewise.
6754 * linux-x86-low.c (the_low_target): Likewise.
6755 * linux-xtensa-low.c (the_low_target): Likewise.
6756 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6757 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6758 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6759 srv_xmlfiles.
6760 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6761 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6762
c03e6ccc
YQ
67632012-02-29 Yao Qi <yao@codesourcery.com>
6764 Pedro Alves <palves@redhat.com>
6765
6766 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6767 `step_over_finished' is true.
6768
644cebc9
PA
67692012-02-27 Pedro Alves <palves@redhat.com>
6770
6771 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6772 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6773
c14d7ab2
PA
67742012-02-27 Pedro Alves <palves@redhat.com>
6775
6776 PR server/9684
6777 * linux-low.c (pid_is_stopped): New.
6778 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6779
412c89dd
LM
67802012-02-25 Luis Machado <lgustavo@codesourcery.com>
6781
6782 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6783 of conditions.
6784
b745defe
MR
67852012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6786
6787 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6788
9f3a5c85
LM
67892012-02-24 Luis Machado <lgustavo@codesourcery>
6790
6791 * server.c (handle_query): Advertise support for target-side
6792 breakpoint condition evaluation.
6793 (process_point_options): New function.
6794 (process_serial_event): When inserting a breakpoint, check for
6795 a target-side condition that should be evaluated.
6796
6797 * mem-break.c: Include regcache.h and ax.h.
6798 (point_cond_list_t): New data structure.
6799 (breakpoint) <cond_list>: New field.
6800 (find_gdb_breakpoint_at): Make non-static.
6801 (delete_gdb_breakpoint_at): Clear any target-side
6802 conditions.
6803 (clear_gdb_breakpoint_conditions): New function.
6804 (add_condition_to_breakpoint): Likewise.
6805 (add_breakpoint_condition): Likewise.
6806 (gdb_condition_true_at_breakpoint): Likewise.
6807 (gdb_breakpoint_here): Return result directly instead
6808 of going through a local variable.
6809
6810 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6811 (clear_gdb_breakpoint_conditions): Likewise.
6812 (add_breakpoint_condition): Likewise.
6813 (gdb_condition_true_at_breakpoint): Likewise.
6814
6815 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6816 (need_step_over_p): Take target-side breakpoint condition into
6817 consideration.
6818
5e1dc496
LM
68192012-02-24 Luis Machado <lgustavo@codesourcery>
6820
6821 * server.h: Include tracepoint.h.
6822 (agent_mem_read, agent_get_trace_state_variable_value,
6823 agent_set_trace_state_variable_value,
6824 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6825 get_set_tsv_func_addr): New prototypes.
6826
6827 * ax.h: New include file.
6828 * ax.c: New source file.
6829
6830 * tracepoint.c: Include ax.h.
6831 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6832 agent_expr, eval_result_type): Move to ax.h.
6833 (parse_agent_expr): Rename to ...
6834 (gdb_parse_agent_expr): ... this, make it non-static and move
6835 to ax.h.
6836 (unparse_agent_expr) Rename to ...
6837 (gdb_unparse_agent_expr): ... this, make it non-static and move
6838 to ax.h.
6839 (eval_agent_expr): Rename to ...
6840 (eval_tracepoint_agent_expr): ... this.
6841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6842 forward declarations.
6843 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6844 (agent_get_trace_state_variable_value): New function.
6845 (agent_set_trace_state_variable_value): New function.
6846 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6847 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6848 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6849 (condition_true_at_tracepoint): Likewise.
6850 (parse_agent_expr): Rename to ...
6851 (gdb_parse_agent_expr): ... this and move to ax.c.
6852 (unparse_agent_expr): Rename to ...
6853 (gdb_unparse_agent_expr): ... this and move to ax.c.
6854 (gdb_agent_op_name): Move to ax.c.
6855 (eval_agent_expr): Rename to ...
6856 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6857 and move to ax.c.
6858 (eval_tracepoint_agent_expr): New function.
6859 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6860 non-static.
5e1dc496
LM
6861 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6862 ax.c.
6863 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6864 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6865 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6866 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6867 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6868 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6869 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6870 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6871 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6872 (compile_bytecodes): Remove forward declaration.
6873 (is_goto_target): Move to ax.c.
6874 (compile_bytecodes): Move to ax.c and call
6875 agent_get_trace_state_variable_value (...) and
6876 agent_set_trace_state_variable_value (...).
6877
6878 * Makefile.in: Update ax.c and IPA dependencies.
6879
277e4e52
PA
68802012-02-24 Pedro Alves <palves@redhat.com>
6881
6882 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6883 (cmd_bigqtbuffer_circular): ... this. Only handle
6884 'QTBuffer:circular:'.
6885 (handle_tracepoint_general_set): Adjust.
6886
bf4c19f7
YQ
68872012-02-16 Yao Qi <yao@codesourcery.com>
6888
6889 * inferiors.c: Move code to ...
6890 * dll.c: .... here. New.
6891 * server.h: Declare clear_dlls.
6892 * Makefile.in (SFILES): Add dll.c.
6893 (OBS): Add dll.o
6894 (dll.o): New rule.
6895
d73f2619
YQ
68962012-02-11 Yao Qi <yao@codesourcery.com>
6897
6898 * server.c: (handle_monitor_command): Add a new parameter
6899 `own_buf'.
6900 (handle_query): Update caller.
6901
f8255c2a
JB
69022012-02-09 Joel Brobecker <brobecker@adacore.com>
6903
6904 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6905 * configure, config.in: Regenerate.
6906 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6907 is not defined.
6908
da84f473
PA
69092012-02-02 Pedro Alves <palves@redhat.com>
6910
6911 Try SIGKILL first, then PTRACE_KILL.
6912 * linux-low.c (linux_kill_one_lwp): New.
6913 (linux_kill_one_lwp): Rename to ...
6914 (kill_one_lwp_callback): ... this. Use the new
6915 linux_kill_one_lwp.
6916
e886a173
PA
69172012-02-02 Pedro Alves <palves@redhat.com>
6918
6919 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6920 inferior.
6921
be07f1a2
PA
69222012-01-27 Pedro Alves <palves@redhat.com>
6923
6924 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6925 (elf_64_file_p): Make static.
6926 (linux_pid_exe_is_elf_64_file): New.
6927 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6928 Delete declarations.
6929 (linux_pid_exe_is_elf_64_file): Declare.
6930 * linux-x86-low.c (x86_arch_setup): Use
6931 linux_pid_exe_is_elf_64_file.
6932
d8301ad1
JK
69332012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6934
6935 * linux-low.c (linux_wait_for_event_1): Rename to ...
6936 (linux_wait_for_event): ... here and merge it with former
6937 linux_wait_for_event - new variable wait_ptid, use it.
6938 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6939
01b17894
PA
69402012-01-23 Pedro Alves <palves@redhat.com>
6941
6942 * server.c (main): Avoid yet another case of infinite loop while
6943 detaching/killing after a longjmp.
6944
e825046f
JK
69452012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6946
6947 Code cleanup.
6948 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6949
b9e7b9c3
UW
69502012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6951
6952 * hostio.c (handle_readlink): New function.
6953 (handle_vFile): Call it to handle "vFile:readlink" packets.
6954
901f9912
UW
69552012-01-20 Pedro Alves <palves@redhat.com>
6956 Ulrich Weigand <ulrich.weigand@linaro.org>
6957
6958 * server.c (handle_v_requests): Only support vAttach and vRun to
6959 start multiple processes when in extended protocol mode.
6960
fc1ab1a0
PA
69612012-01-17 Pedro Alves <palves@redhat.com>
6962
6963 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6964 memalign plus mprotect to allocate the scratch buffer.
6965
7d5d4e98
PA
69662012-01-13 Pedro Alves <palves@redhat.com>
6967
6968 * server.c (attach_inferior): Clear `cont_thread'.
6969
f128d5e9
PA
69702012-01-13 Pedro Alves <palves@redhat.com>
6971
6972 * server.c (main): Avoid infinite loop while detaching/killing
6973 after a longjmp.
6974
06db92f0
DE
69752012-01-09 Doug Evans <dje@google.com>
6976
6977 * server.c (start_inferior): Set last_ptid in --wrapper case.
6978
32d92999
YQ
69792012-01-06 Yao Qi <yao@codesourcery.com>
6980
6981 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6982 defined.
6983 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6984
5e0a92a9
YQ
69852012-01-04 Yao Qi <yao@codesourcery.com>
6986
6987 * tracepoint.c (cmd_qtdp): Print debug message
6988 for static tracepoint.
6989
ae639e8c
YQ
69902012-01-04 Yao Qi <yao@codesourcery.com>
6991
6992 * tracepoint.c (trace_vdebug): Differentiate debug message
6993 between gdbserver and IPA.
6994
f72429c5
YQ
69952012-01-03 Yao Qi <yao@codesourcery.com>
6996
6997 * tracepoint.c (tracepoint_was_hit): Don't collect for
6998 static tracepoint.
6999
12c3e59c
JB
70002012-01-02 Joel Brobecker <brobecker@adacore.com>
7001
7002 * terminal.h: Reformat copyright header.
7003
67827812
JB
70042012-01-02 Joel Brobecker <brobecker@adacore.com>
7005
7006 * server.c (gdbserver_version): Update copyright year.
7007 * gdbreplay.c (gdbreplay_version): Likewise.
7008
3e52c33d
JK
70092011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7010
7011 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7012
7013 Revert:
7014 2011-12-18 Hui Zhu <teawater@gmail.com>
7015 * linux-low.c (linux_create_inferior): Save return value to ret.
7016
66f1260e
HZ
70172011-12-18 Hui Zhu <teawater@gmail.com>
7018
7019 * linux-low.c (linux_create_inferior): Save return value to ret.
7020
e77616d7
DE
70212011-12-16 Doug Evans <dje@google.com>
7022
e7b06c57
DE
7023 * linux-low.c (linux_create_inferior): If stdio connection,
7024 redirect stdin from /dev/null, stdout to stderr.
7025 * remote-utils.c (remote_is_stdio): New static global.
7026 (remote_connection_is_stdio): New function.
7027 (remote_prepare): Handle stdio connection.
7028 (remote_open): Ditto.
7029 (remote_close): Don't close stdin for stdio connections.
7030 (read_prim,write_prim): New functions. Replace all calls to
7031 read/write to these.
7032 * server.c (main): Watch for "-" argument. Move call to
7033 remote_prepare before start_inferior.
7034 * server.h (STDIO_CONNECTION_NAME): New macro.
7035 (remote_connection_is_stdio): Declare.
7036
e77616d7
DE
7037 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7038 in debugging output.
7039
82067193
YQ
70402011-12-15 Yao Qi <yao@codesourcery.com>
7041
7042 * tracepoint.c: Include sys/syscall.h.
7043 (gdb_ust_thread): Remove preprocessor conditional.
7044
82bfbe7e
PA
70452011-12-14 Pedro Alves <pedro@codesourcery.com>
7046
7047 * linux-low.c (linux_detach_one_lwp): Call
7048 the_low_target.prepare_to_resume before detaching.
7049
712c6575
YQ
70502011-12-14 Yao Qi <yao@codesourcery.com>
7051
7052 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7053 of write.
7054
d54d1edf
YQ
70552011-12-14 Yao Qi <yao@codesourcery.com>
7056
7057 * i386-low.c (i386_low_stopped_data_address): Initialize local
7058 variable `control'.
7059
6210a125
PA
70602011-12-13 Pedro Alves <pedro@codesourcery.com>
7061
7062 PR remote/13492
7063
7064 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7065 DR_CONTROL unless necessary. Extend comments.
7066 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7067 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7068
2ece8244
YQ
70692011-12-13 Yao Qi <yao@codesourcery.com>
7070
7071 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7072 macros.
7073 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7074
784867a5
JK
70752011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7076
7077 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7078 Print new debug message for such case.
7079
6bf36717
JK
70802011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7081
7082 Fix overlapping memcpy.
7083 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7084 the read_inferior_memory transfer.
7085 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7086 write_inferior_memory transfer.
7087 (set_fast_tracepoint_jump): New variable buf. Use it for the
7088 read_inferior_memory and write_inferior_memory transfers.
7089 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7090 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7091 Use it for the write_inferior_memory transfer.
7092 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7093 buffers.
7094
50275556
MR
70952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7096
7097 * linux-low.c (fetch_register, store_register): Make code
7098 consistent, fix formatting.
7099
7325beb4
MR
71002011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7101
7102 * linux-low.c (usr_store_inferior_registers): Factor out code
7103 to handle individual registers into...
7104 (store_register): ... this new function.
7105
c642a434
UW
71062011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7107
7108 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7109 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7110 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7111 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7112 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7113 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7114 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7115 (srv_xmlfiles): Add new XML files.
7116
7117 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7118 and <sys/uio.h>.
7119 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7120 (init_registers_s390_linux32v1): Add prototype.
7121 (init_registers_s390_linux32v2): Likewise.
7122 (init_registers_s390_linux64v1): Likewise.
7123 (init_registers_s390_linux64v2): Likewise.
7124 (init_registers_s390x_linux64v1): Likewise.
7125 (init_registers_s390x_linux64v2): Likewise.
7126 (s390_num_regs): Increment to 52.
7127 (s390_regmap): Add orig_r2 register.
7128 (s390_num_regs_3264): Increment to 68.
7129 (s390_regmap_3264): Add orig_r2 register.
7130 (s390_collect_ptrace_register): Handle orig_r2 register.
7131 (s390_supply_ptrace_register): Likewise.
7132 (s390_fill_last_break): New function.
7133 (s390_store_last_break): Likewise.
7134 (s390_fill_system_call): New function.
7135 (s390_store_system_call): Likewise.
7136 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7137 register sets.
7138 (s390_check_regset): New function.
7139 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7140 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7141 Update target_regsets for available register sets.
7142
2268b414
JK
71432011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7144 Jan Kratochvil <jan.kratochvil@redhat.com>
7145
7146 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7147 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7148 New.
7149 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7150 * linux-low.h (struct process_info_private): New member r_debug.
7151 * server.c (handle_qxfer_libraries): Call
7152 the_target->qxfer_libraries_svr4.
7153 (handle_qxfer_libraries_svr4): New function.
7154 (qxfer_packets): New entry "libraries-svr4".
7155 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7156 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7157 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7158 PACKET_qXfer_libraries_svr4.
7159
d6db1fab
UW
71602011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7161
7162 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7163 PSW address/mask between 8-byte and 16-byte formats.
7164 (s390_supply_ptrace_register): Likewise.
7165 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7166 basic addressing mode bit.
7167
242f5f1c
SS
71682011-11-24 Stan Shebs <stan@codesourcery.com>
7169
7170 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7171
f196051f
SS
71722011-11-17 Stan Shebs <stan@codesourcery.com>
7173
7174 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7175 (tracing_start_time): New global.
7176 (tracing_stop_time): New global.
7177 (tracing_user_name): New global.
7178 (tracing_notes): New global.
7179 (tracing_stop_note): New global.
7180 (cmd_qtstart): Set traceframe_usage, start_time.
7181 (stop_tracing): Set stop_time.
7182 (cmd_qtstatus): Report additional status.
7183 (cmd_qtp): New function.
7184 (handle_tracepoint_query): Call it.
7185 (cmd_qtnotes): New function.
7186 (handle_tracepoint_general_set): Call it.
7187 (get_timestamp): Rename from tsv_get_timestamp.
7188
405f8e94
SS
71892011-11-14 Stan Shebs <stan@codesourcery.com>
7190 Kwok Cheung Yeung <kcy@codesourcery.com>
7191
7192 * linux-x86-low.c (small_jump_insn): New.
7193 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7194 trampoline and error message, build a trampoline and issue a small
7195 jump instruction to it.
7196 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7197 trampoline and error message.
7198 (x86_get_min_fast_tracepoint_insn_len): New.
7199 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7200 * linux-low.h (struct linux_target_ops): Add arguments to
7201 install_fast_tracepoint_jump_pad operation, add new operation.
7202 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7203 arguments.
7204 (linux_get_min_fast_tracepoint_insn_len): New function.
7205 (linux_target_op): Add new operation.
7206 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7207 (gdb_trampoline_buffer_end): Ditto.
7208 (gdb_trampoline_buffer_error): Ditto.
7209 (struct ipa_sym_addresses): Add fields for new IPA variables.
7210 (symbol_list): Add entries for new IPA variables.
7211 (struct tracepoint): Add fields to hold the address range of the
7212 trampoline used by the tracepoint.
7213 (trampoline_buffer_head): New static variable.
7214 (trampoline_buffer_tail): Ditto.
7215 (claim_trampoline_space): New function.
7216 (have_fast_tracepoint_trampoline_buffer): New function.
7217 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7218 structure.
7219 (install_fast_tracepoint): Ditto, also add error buffer argument.
7220 (cmd_qtminftpilen): New function.
7221 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7222 (fast_tracepoint_from_trampoline_address): New function.
7223 (fast_tracepoint_collecting): Handle trampoline as part of jump
7224 pad space.
7225 (set_trampoline_buffer_space): New function.
7226 (initialize_tracepoint): Initialize new IPA variables.
7227 * target.h (struct target_ops): Add arguments to
7228 install_fast_tracepoint_jump_pad operation, add new
7229 get_min_fast_tracepoint_insn_len operation.
7230 (target_get_min_fast_tracepoint_insn_len): New.
7231 (install_fast_tracepoint_jump_pad): Add arguments.
7232 * server.h (IPA_BUFSIZ): Define.
7233 * linux-i386-ipa.c: Include extra header files.
7234 (initialize_fast_tracepoint_trampoline_buffer): New function.
7235 (initialize_low_tracepoint): Call it.
7236 * server.h (set_trampoline_buffer_space): Declare.
7237 (claim_trampoline_space): Ditto.
7238 (have_fast_tracepoint_trampoline_buffer): Ditto.
7239
1e4d1764
YQ
72402011-11-14 Yao Qi <yao@codesourcery.com>
7241
7242 * server.c (handle_query): Handle InstallInTrace for qSupported.
7243 * tracepoint.c (add_tracepoint): Sort list.
7244 (install_tracepoint, download_tracepoint): New.
7245 (cmd_qtdp): Call them to install and download tracepoints.
7246 (sort_tracepoints): Removed.
7247 (cmd_qtstart): Update.
7248
5c73ff4e
YQ
72492011-11-14 Yao Qi <yao@codesourcery.com>
7250
7251 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7252 * mem-break.h: Declare.
7253 * tracepoint.c (cmd_qtstart): Move some code to ...
7254 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7255 New.
7256 (download_tracepoints): Move some code to ...
7257 (download_tracepoint_1): ... here. New.
7258
86a30030
YQ
72592011-11-08 Yao Qi <yao@codesourcery.com>
7260
7261 * remote-utils.c (relocate_instruction): A comment fix.
7262
8d26e50c
JB
72632011-11-07 Joel Brobecker <brobecker@adacore.com>
7264
7265 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7266 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7267 dr_status_mirror and dr_control_mirror from debug_reg_state.
7268 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7269 (i386_initial_stuff): Remove use of deleted globals.
7270 (i386_get_thread_context, i386_set_thread_context,
7271 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7272 from debug_reg_state.
7273
a59306a3
YQ
72742011-11-05 Yao Qi <yao@codesourcery.com>
7275
7276 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7277 address as TPOINT's.
7278
3065dfb6
SS
72792011-11-02 Stan Shebs <stan@codesourcery.com>
7280
7281 * tracepoint.c (agent_mem_read_string): New function.
7282 (eval_agent_expr): Call it for tracenz.
7283 * server.c (handle_query): Report support for tracenz.
7284
fd0d8c7c
YQ
72852011-11-02 Yao Qi <yao@codesourcery.com>
7286
7287 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7288
609086b1
YQ
72892011-11-02 Yao Qi <yao@codesourcery.com>
7290
7291 * target.h: Fix a typo in comment.
7292
b9fd1791
PA
72932011-10-31 Pedro Alves <pedro@codesourcery.com>
7294
7295 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7296 clobber the breakpoints' shadows with fast tracepoint jumps.
7297 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7298 * target.c (write_inferior_memory): Also pass MYADDR down to
7299 check_mem_write.
7300
03583c20
UW
73012011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7302
7303 * configure.ac: Check support for personality routine.
7304 * configure: Regenerate.
7305 * config.in: Likewise.
7306 * linux-low.c: Include <sys/personality.h>.
7307 Define ADDR_NO_RANDOMIZE if necessary.
7308 (linux_create_inferior): Disable address space randomization when
7309 forking inferior, if requested.
7310 (linux_supports_disable_randomization): New function.
7311 (linux_target_ops): Install it.
7312 * server.h (disable_randomization): Declare.
7313 * server.c (disable_randomization): New global variable.
7314 (handle_general_set): Handle QDisableRandomization.
7315 (handle_query): Likewise for qSupported.
7316 (main): Support --disable-randomization and --no-disable-randomization
7317 command line arguments.
7318 * target.h (struct target_ops): Add supports_disable_randomization.
7319 (target_supports_disable_randomization): New macro.
7320
723b724b
MF
73212011-09-29 Mike Frysinger <vapier@gentoo.org>
7322
7323 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7324 ifdef check.
7325 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7326 [!PT_GETDSBT] (target_loadmap): New definition.
7327 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7328 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7329 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7330 and PT_GETDSBT to LINUX_LOADMAP.
7331 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7332 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7333
55329a5c 73342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7335
7336 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7337 (arm_linux_hwbp_cap): New static variable.
7338 (arm_linux_get_hwbp_cap): Replace by ...
7339 (arm_linux_init_hwbp_cap): ... this new function.
7340 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7341 (arm_linux_get_hw_watchpoint_count): Likewise.
7342 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7343 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7344 (arm_prepare_to_resume): Use perror_with_name instead of error.
7345
55329a5c 73462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7347
7348 * linux-arm-low.c: Include <signal.h>.
7349 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7350 (struct arm_linux_hwbp_cap): New data type.
7351 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7352 (struct arm_linux_hw_breakpoint): New data type.
7353 (MAX_BPTS, MAX_WPTS): Define.
7354 (struct arch_process_info, struct arch_lwp_info): New data types.
7355 (arm_linux_get_hwbp_cap): New function.
7356 (arm_linux_get_hw_breakpoint_count): Likewise.
7357 (arm_linux_get_hw_watchpoint_count): Likewise.
7358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7359 (arm_hwbp_control_initialize): Likewise.
7360 (arm_hwbp_control_is_enabled): Likewise.
7361 (arm_hwbp_control_is_initialized): Likewise.
7362 (arm_hwbp_control_disable): Likewise.
7363 (arm_linux_hw_breakpoint_equal): Likewise.
7364 (arm_linux_hw_point_initialize): Likewise.
7365 (struct update_registers_data): New data structure.
7366 (update_registers_callback: New function.
7367 (arm_insert_point): Likewise.
7368 (arm_remove_point): Likewise.
7369 (arm_stopped_by_watchpoint): Likewise.
7370 (arm_stopped_data_address): Likewise.
7371 (arm_new_process): Likewise.
7372 (arm_new_thread): Likewise.
7373 (arm_prepare_to_resume): Likewise.
7374 (the_low_target): Register arm_insert_point, arm_remove_point,
7375 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7376 arm_new_thread, and arm_prepare_to_resume.
7377
6b9801d4
SS
73782011-09-15 Stan Shebs <stan@codesourcery.com>
7379
7380 * server.h (struct emit_ops): Add compare-goto fields.
7381 * tracepoint.c (gdb_agent_op_sizes): New table.
7382 (emit_eq_goto): New function.
7383 (emit_ne_goto): New function.
7384 (emit_lt_goto): New function.
7385 (emit_le_goto): New function.
7386 (emit_gt_goto): New function.
7387 (emit_ge_goto): New function.
7388 (is_goto_target): New function.
7389 (compile_bytecodes): Recognize special cases of compare-goto
7390 combinations and call specialized emitters for them.
7391 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7392 (amd64_emit_ne_goto): New function.
7393 (amd64_emit_lt_goto): New function.
7394 (amd64_emit_le_goto): New function.
7395 (amd64_emit_gt_goto): New function.
7396 (amd64_emit_ge_goto): New function.
7397 (amd64_emit_ops): Add the new functions.
7398 (i386_emit_eq_goto): New function.
7399 (i386_emit_ne_goto): New function.
7400 (i386_emit_lt_goto): New function.
7401 (i386_emit_le_goto): New function.
7402 (i386_emit_gt_goto): New function.
7403 (i386_emit_ge_goto): New function.
7404 (i386_emit_ops): Add the new functions.
7405
bf15cbda
SS
74062011-09-08 Stan Shebs <stan@codesourcery.com>
7407
7408 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7409 (i386_emit_epilogue): Restore %ebx.
7410
943ca1dd
JZ
74112011-08-31 Jie Zhang <jzhang918@gmail.com>
7412
7413 * server.c (step_thread): Remove definition.
7414 (process_serial_event): Don't handle Hs.
7415 * server.h (step_thread): Remove declaration.
7416 * target.c (set_desired_inferior): Remove use of step_thread.
7417
e3deef73
LM
74182011-08-24 Luis Machado <lgustavo@codesourcery.com>
7419
7420 * linux-low.c: Include linux-procfs.h.
7421 (linux_attach_lwp_1): Update comments.
7422 (linux_attach): Scan for existing threads when attaching to a
7423 process that is the tgid.
7424 * Makefile.in: Update dependencies.
7425
13da1c97
LM
74262011-08-24 Luis Machado <lgustavo@codesourcery.com>
7427
7428 * configure.srv: Add linux-procfs.o dependencies.
7429
881127c9
YQ
74302011-08-14 Yao Qi <yao@codesourcery.com>
7431
7432 * target.h (struct target_ops): Fix indent.
7433 * win32-low.c (win32_target_ops): Fix comment.
7434
58dbd541
YQ
74352011-08-14 Andrew Jenner <andrew@codesourcery.com>
7436 Yao Qi <yao@codesourcery.com>
7437
7438 * Makefile.in (clean): Remove tic6x-*.c files.
7439 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7440 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7441 (tic6x-c64xp-linux.c): Likewise.
7442 * configure.srv: Add support for tic6x-*-uclinux.
7443 * linux-tic6x-low.c: New.
7444 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7445
78d85199
YQ
74462011-08-14 Andrew Stubbs <ams@codesourcery.com>
7447 Yao Qi <yao@codesourcery.com>
7448
7449 * target.h (struct target_ops): Add read_loadmap.
7450 * linux-low.c (struct target_loadseg): New type.
7451 (struct target_loadmap): New type.
7452 (linux_read_loadmap): New function.
7453 (linux_target_ops): Add linux_read_loadmap.
7454 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7455 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7456 to NULL.
78d85199 7457
a959a88d
EZ
74582011-08-05 Eli Zaretskii <eliz@gnu.org>
7459
7460 * win32-low.c: Include <stdint.h>.
7461
1ced966e
PA
74622011-07-22 Pedro Alves <pedro@codesourcery.com>
7463
7464 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7465 to the inferior here.
7466 (i386_remove_aligned_watchpoint): Ditto.
7467 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7468 fit part of the watchpoint in the debug registers.
7469 (i386_update_inferior_debug_regs): New.
7470 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7471 registers, and only update the inferior on success.
7472 (i386_low_remove_watchpoint): Ditto.
7473
d26e3629
KY
74742011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7475
7476 * linux-low.c (compare_ints, unique, list_threads, show_process,
7477 linux_core_of_thread): Delete.
7478 (linux_target_ops): Change linux_core_of_thread to
7479 linux_common_core_of_thread.
7480 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7481 * utils.c (malloc_failure): Change type of argument.
7482 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7483 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7484 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7485 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7486 (IPA_OBJS): Add common-utils-ipa.o.
7487 (ptid_h, linux_osdata_h): New macros.
7488 (server_h): Add common/common-utils.h, common/xml-utils.h,
7489 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7490 common/ptid.h.
7491 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7492 ptid.o, buffer.o): New rules.
7493 (linux-low.o): Add common/linux-osdata.h as a dependency.
7494 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7495 * configure.ac: Add AC_HEADER_DIRENT check.
7496 * config.in: Regenerate.
7497 * configure: Regenerate.
7498 * remote-utils.c (xml_escape_text): Delete.
7499 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7500 buffer_xml_printf): Move to common/buffer.c.
7501 * server.c (main): Remove call to initialize_inferiors.
7502 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7503 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7504 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7505 internal_error, gdb_assert, gdb_assert_fail): Delete.
7506 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7507 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7508 common/buffer.h.
7509 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7510 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7511 initialize_inferiors): Delete.
7512
2275a1a7
PA
75132011-07-20 Pedro Alves <pedro@codesourcery.com>
7514
7515 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7516 symbol error.
7517
0a5b1e09
PA
75182011-05-31 Pedro Alves <pedro@codesourcery.com>
7519
7520 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7521 assertion.
7522 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7523
6938fd34
YQ
75242011-05-26 Yao Qi <yao@codesourcery.com>
7525
7526 * Makefile.in (thread-db.o): Track dependence to
7527 common/gdb_thread_db.h.
7528 * thread-db.c: include gdb_thread_db.h from right place.
7529
b481f9e0
TT
75302011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7531
7532 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7533 __FILE__ and __LINE__ to internal_error.
7534
98a5dd13
DE
75352011-05-13 Doug Evans <dje@google.com>
7536
7537 * thread-db.c (try_thread_db_load_from_sdir): New function.
7538 (try_thread_db_load_from_dir): New function.
7539 (thread_db_load_search): Handle $sdir, ignore $pdir.
7540 Remove trying of system directories if search of
7541 libthread-db-search-path fails, that is now done via $sdir.
7542
d248b706
KY
75432011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7544
7545 * server.c (handle_query): Add EnableDisableTracepoints to the list
7546 of supported features.
43aaf8b6 7547 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7548 tracepoints.
43aaf8b6
PA
7549 (cmd_qtenable_disable): New.
7550 (cmd_qtstart): Install tracepoints even if disabled.
7551 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7552 receiving a QTEnable or QTDisable packet.
7553 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7554 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7555 tracepoints.
7556 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7557
84e578fb
DE
75582011-05-10 Doug Evans <dje@google.com>
7559
7560 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7561
71f55dd8
DE
75622011-05-04 Doug Evans <dje@google.com>
7563
7564 * linux-low.c (linux_join): Skip process lookup.
7565 * spu-low.c (spu_join): Ditto.
7566 * server.c (join_inferiors_callback): Delete.
7567 (process_serial_event): For 'D' packet (detach) call join_inferior
7568 directly.
7569
4d393d60
JM
75702011-05-04 Joseph Myers <joseph@codesourcery.com>
7571
7572 * README: Don't mention xscale*-*-linux*.
7573 * configure.srv (xscale*-*-linux*): Don't handle target.
7574
b00ad6ff
NF
75752011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7576
7577 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7578 casting pointers.
7579 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7580 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7581 (i386_emit_void_call_2): Likewise.
7582
af96c192
YQ
75832011-04-26 Yao Qi <yao@codesourcery.com>
7584
43aaf8b6
PA
7585 * linux-low.c: Move common macros to linux-ptrace.h.
7586 Include linux-ptrace.h.
af96c192
YQ
7587 * Makefile.in (linux_ptrace_h): New.
7588 (linux-low.o): Depends on linux-ptrace.h.
7589
03f2bd59
JK
75902011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7591
7592 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7593 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7594 (remote_prepare): New function with most of the TCP code from ...
7595 (remote_open): ... here. Detect PORT here unconditionally. Move also
7596 setting transport_is_reliable.
7597 * server.c (run_once): New variable.
7598 (gdbserver_usage): Document it.
7599 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7600 the first run if RUN_ONCE.
7601 * server.h (run_once, remote_prepare): New declarations.
7602
7a9dd1b2
TT
76032011-04-19 Tom Tromey <tromey@redhat.com>
7604
7605 * win32-low.c (handle_load_dll): Remove duplicate "the".
7606
81239425
PM
76072011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7608
7609 Remove support for old Cygwin 1.5 versions.
7610 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7611 function to avoid warning.
7612 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7613 warning.
7614
9e0627f1
PM
76152011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7616
7617 * gdbserver/server.h (Macro _): Define it if not available.
7618
588eebee
MS
76192011-03-14 Michael Snyder <msnyder@vmware.com>
7620
348af9f7 7621 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7622
43f70d4c
JB
76232011-03-10 Joel Brobecker <brobecker@adacore.com>
7624
7625 * Makefile.in (maintainer-clean realclean distclean): Remove
7626 "make ... subdir_do" command.
7627
348af9f7
MS
76282011-03-10 Michael Snyder <msnyder@vmware.com>
7629
7630 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7631
7632 * server.c (handle_v_run): Free alloced buffer on early return.
7633
e637a4f5
YQ
76342011-03-09 Yao Qi <yao@codesourcery.com>
7635
7636 Revert:
7637 2011-03-04 Yao Qi <yao@codesourcery.com>
7638
7639 * Makefile.in: Remove GNU make feature --directory.
7640
7641 2011-03-05 Yao Qi <yao@codesourcery.com>
7642
7643 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7644 (subdir_do): New make target. Copied from gdb/Makefile.
7645 (maintainer-clean, realclean, distclean, clean): Call corresponding
7646 make targets in common/Makefile.
7647
7648 2011-02-11 Yao Qi <yao@codesourcery.com>
7649
7650 * configure.ac: Call AC_PROG_RANLIB.
7651 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7652 * configure: Regenerate.
7653
e6edda56
JK
76542011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7655
7656 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7657
e5141119
JB
76582011-03-06 Yao Qi <yao@codesourcery.com>
7659
7660 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7661
64794aa4
JB
76622011-03-05 Yao Qi <yao@codesourcery.com>
7663
7664 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7665 (subdir_do): New make target. Copied from gdb/Makefile.
7666 (maintainer-clean, realclean, distclean, clean): Call corresponding
7667 make targets in common/Makefile.
7668
7a762829
YQ
76692011-03-04 Yao Qi <yao@codesourcery.com>
7670
7671 * Makefile.in: Remove GNU make feature --directory.
7672
348af9f7
MS
76732011-03-04 Michael Snyder <msnyder@vmware.com>
7674
7675 * server.c (queue_stop_reply): Call xmalloc not malloc.
7676
76772011-03-02 Michael Snyder <msnyder@vmware.com>
7678
7679 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7680
9f72fee2
MS
76812011-02-28 Michael Snyder <msnyder@vmware.com>
7682
588eebee
MS
7683 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7684 (cmd_qtframe): Ditto.
7685 (cmd_qtbuffer): Ditto.
7686 (cmd_bigqtbuffer): Ditto.
7687
9f72fee2
MS
7688 * utils.c (decimal2str): Initialize 'width' to nine, then
7689 don't mess with it.
7690
8040bd49
UW
76912011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7692
7693 * hostio.c (require_data): Free *data, not data.
7694
7e52cbd0
JK
76952011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7696
7697 * hostio.c (require_data): Use free, not xfree.
7698
9130f83e
MS
76992011-02-27 Michael Snyder <msnyder@vmware.com>
7700
4b812f4e
MS
7701 * server.c (handle_query): Discard unused value.
7702
9130f83e
MS
7703 * hostio.c (require_data): Free malloc memory before returning
7704 error.
7705
69d37113
MS
77062011-02-26 Michael Snyder <msnyder@vmware.com>
7707
7708 * linux-low.c (list_threads): Call closedir for dirent.
7709
35f5825a
MS
77102011-02-27 Michael Snyder <msnyder@vmware.com>
7711
2a589cef
MS
7712 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7713 a case statement falls through.
7714
0adea5f7
MS
7715 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7716
35f5825a
MS
7717 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7718 in comparison.
7719
238f1c74
MS
77202011-02-26 Michael Snyder <msnyder@vmware.com>
7721
7722 * utils.c (decimal2str): Eliminate dead code and dead param.
7723 (pulongest): Drop dead param from call to decimal2str.
7724 (plongest): Ditto.
7725
633ff500
JB
77262011-02-24 Joel Brobecker <brobecker@adacore.com>
7727
7728 Revert the following patch (not approved yet):
7729 2011-02-21 Hui Zhu <teawater@gmail.com>
7730 * tracepoint.c (tp_printf): New function.
7731 (eval_agent_expr): Handle gdb_agent_op_printf.
7732
f9c6ff72
HZ
77332011-02-21 Hui Zhu <teawater@gmail.com>
7734
7735 * tracepoint.c (tp_printf): New function.
7736 (eval_agent_expr): Handle gdb_agent_op_printf.
7737
94d5e490
TT
77382011-02-18 Tom Tromey <tromey@redhat.com>
7739
7740 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7741 (tracepoint.o): Likewise.
7742 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7743 (gdb_agent_op_names): Likewise.
7744
c7f96d2b
TT
77452011-02-18 Tom Tromey <tromey@redhat.com>
7746
7747 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7748 gdb_agent_op_rot>: New constants.
7749 (gdb_agent_op_names): Add pick and roll.
7750 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7751 cases.
7752
0feedb2c
JK
77532011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7754
7755 * aclocal.m4: Regenerated with aclocal-1.11.1.
7756
b3b9301e
PA
77572011-02-14 Pedro Alves <pedro@codesourcery.com>
7758
7759 * server.c (handle_qxfer_traceframe_info): New.
7760 (qxfer_packets): Register "traceframe-info".
7761 (handle_query): Report support for qXfer:traceframe-info:read+.
7762 * tracepoint.c (match_blocktype): New.
7763 (traceframe_find_block_type): Rename to ...
7764 (traceframe_walk_blocks): ... this. Add callback filter argument,
7765 and use it.
7766 (traceframe_find_block_type): New, reimplemented on top of
7767 traceframe_walk_blocks.
7768 (build_traceframe_info_xml): New.
7769 (traceframe_read_info): New.
7770 * server.h (traceframe_read_info): Declare.
7771
4f3e6fb7
YQ
77722011-02-11 Yao Qi <yao@codesourcery.com>
7773
7774 * configure.ac: Call AC_PROG_RANLIB.
7775 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7776 * configure: Regenerate.
7777
764880b7
PA
77782011-02-07 Pedro Alves <pedro@codesourcery.com>
7779
7780 * server.c (gdb_read_memory): Change return semantics to allow
7781 partial transfers.
7782 (handle_search_memory_1): Adjust.
7783 (process_serial_event) <'m' packet>: Handle partial transfers.
7784 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7785
1c79eb8a
PA
77862011-01-28 Pedro Alves <pedro@codesourcery.com>
7787
7788 * regcache.c (init_register_cache): Initialize
7789 regcache->register_status.
7790 (free_register_cache): Release regcache->register_status.
7791 (regcache_cpy): Copy register_status.
7792 (registers_to_string): Print 'x's for unavailable registers.
7793 (supply_register): Mark the register's status valid or
7794 unavailable, depending on whether a buffer was passed in or not.
7795 (supply_register_zeroed): New.
7796 (supply_regblock): Mark the registers' status valid or
7797 unavailable, depending on whether a buffer was passed in or not.
7798 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7799 (struct regcache): New `register_status' field.
7800 (supply_register_zeroed): Declare.
7801 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7802 supply_register_zeroed, rather than passing a NULL buffer to
7803 supply_register.
7804 * tracepoint.c (fetch_traceframe_registers): Update comment.
7805
85724a0e
PA
78062011-01-28 Pedro Alves <pedro@codesourcery.com>
7807
7808 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7809 buffer explicit.
7810
d08aafef
PA
78112011-01-25 Pedro Alves <pedro@codesourcery.com>
7812
7813 * server.h (decode_xfer_write): Change prototype.
7814 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7815 and don't extract the annex here.
7816 * server.c (decode_xfer_read): Remove `annex' parameter,
7817 and don't extract the annex here.
7818 (decode_xfer): New.
7819 (struct qxfer): New.
7820 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7821 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7822 (handle_qxfer_statictrace): New functions, abstracted out from
7823 handle_query, and made to use the struct qxfer interface.
7824 (handle_threads_qxfer_proper): Rename to ...
7825 (handle_qxfer_threads_proper): ... this.
7826 (handle_threads_qxfer): Rename to ...
7827 (handle_qxfer_threads): ... this. Adjust.
7828 (qxfer_packets): New array.
7829 (handle_qxfer): New function.
7830 (handle_query): Use handle_qxfer.
7831
493e2a69
MS
78322011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7833
7834 * gdbreplay.c: Shorten lines of >= 80 columns.
7835 * linux-low.c: Ditto.
7836 * linux-ppc-low.c: Ditto.
7837 * linux-s390-low.c: Ditto.
7838 * linux-sparc-low.c: Ditto.
7839 * linux-x86-low.c: Ditto.
7840 * linux-xtensa-low.c: Ditto.
7841 * mem-break.c: Ditto.
7842 * nto-low.c: Ditto.
7843 * regcache.h: Ditto.
7844 * remote-utils.c: Ditto.
7845 * server.c: Ditto.
7846 * server.h: Ditto.
7847 * thread-db.c: Ditto.
7848 * tracepoint.c: Ditto.
7849 * utils.c: Ditto.
7850 * win32-low.h: Ditto.
7851
44944448
JB
78522011-01-05 Joel Brobecker <brobecker@adacore.com>
7853
7854 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7855 update.
7856
71ce852c
JB
78572011-01-01 Joel Brobecker <brobecker@adacore.com>
7858
7859 * server.c (gdbserver_version): Update copyright year in version
7860 output.
7861 * gdbreplay.c (gdbreplay_version): Ditto.
7862
eb826dc6
MF
78632010-12-29 Jie Zhang <jie.zhang@analog.com>
7864
7865 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7866 * linux-bfin-low.c: New file.
7867 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7868 PT_DATA_ADDR for BFIN targets.
7869 * Makefile.in (SFILES): Add linux-bfin-low.c.
7870 (clean): Remove reg-bfin.c.
7871 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7872 * README: Mention supported Blackfin targets.
7873
39ab222a
MF
78742010-12-23 Mike Frysinger <vapier@gentoo.org>
7875
7876 * .gitignore: New file.
7877
a1f2ce7d
MF
78782010-11-16 Mike Frysinger <vapier@gentoo.org>
7879
7880 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7881
f474844c
JZ
78822010-10-22 Jie Zhang <jie@codesourcery.com>
7883
7884 * Makefile.in: Add FLAGS_TO_PASS variable.
7885 (install): Remove dependency of install-only and recursively
7886 invoke make for install-only.
7887
f1048712
DE
78882010-10-04 Doug Evans <dje@google.com>
7889
7890 * Makefile.in (uninstall): Use $(DESTDIR).
7891
b53a1623
PA
78922010-09-24 Pedro Alves <pedro@codesourcery.com>
7893
e6ee044d
PA
7894 PR gdb/11842
7895
b53a1623
PA
7896 * linux-x86-low.c (compat_siginfo_from_siginfo)
7897 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7898 si_code is < 0. Check for si_code == SI_TIMER before checking for
7899 si_code < 0.
7900
fa1bd1e4
JB
79012010-09-13 Joel Brobecker <brobecker@adacore.com>
7902
7903 * lynx-i386-low.c: New file.
7904 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7905
47fac8f8
JB
79062010-09-13 Joel Brobecker <brobecker@adacore.com>
7907
7908 * lynx-low.c (ptrace_request_to_str): Remove handling for
7909 request values that have been removed in LynxOS 5.x.
7910
1adfc54d
JB
79112010-09-13 Joel Brobecker <brobecker@adacore.com>
7912
7913 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7914 <ptrace.h>
7915
c2a66c29
NS
79162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7917
7918 * configure.ac: Add --enable-inprocess-agent option.
7919 * configure: Rebuilt.
7920
32fcada3
YQ
79212010-09-06 Yao Qi <yao@codesourcery.com>
7922
7923 * linux-low.c (linux_kill): Remove unused variable.
7924 (linux_stabilize_threads): Likewise.
7925 * server.c (start_inferior): Likewise.
7926 (queue_stop_reply_callback): Likewise.
7927 * tracepoint.c (do_action_at_tracepoint): Likewise.
7928
0cccb683
YQ
79292010-09-06 Yao Qi <yao@codesourcery.com>
7930
7931 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7932 on return.
7933
423ec54c
JK
79342010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7935
7936 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7937
12ac6819
PA
79382010-09-06 Pedro Alves <pedro@codesourcery.com>
7939
7940 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7941 "$(IPA_DEPFILES)".
7942
8ed54b31
JB
79432010-09-01 Joel Brobecker <brobecker@adacore.com>
7944
7945 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7946 gdbserver/lynx-ppc-low.c: New files.
7947 * Makefile.in (lynx_low_h): New variable.
7948 (lynx-low.o, lynx-ppc-low.o): New rules.
7949 * configure.ac: On LynxOS, link with -lnetinet.
7950 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7951 * configure: regenerate.
7952
bb0116a4
JB
79532010-09-01 Joel Brobecker <brobecker@adacore.com>
7954
7955 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7956 * configure.ac: Add check for vasprintf and vsnprintf.
7957 * configure, config.in: Regenerate.
7958 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7959
a778ab81 79602010-09-01 Joel Brobecker <brobecker@adacore.com>
7961
7962 * gdbreplay.c: Move include of alloca.h up, next to include of
7963 malloc.h.
7964 * server.h: Add include of malloc.h.
7965 * mem-break.c: Remove include of malloc.h.
7966 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7967
8b034a19 79682010-09-01 Joel Brobecker <brobecker@adacore.com>
7969
7970 * Makefile.in (memmem.o): Build with -Wno-error.
7971
79722010-09-01 Joel Brobecker <brobecker@adacore.com>
7973
7974 * utils.c (xsnprintf): Make non-static.
7975 * server.h: Add xsnprintf declaration.
7976 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7977 replace calls to snprintf by calls to xsnprintf throughout.
7978
79792010-09-01 Joel Brobecker <brobecker@adacore.com>
7980
7981 * configure.ac: Add configure check for alloca.
7982 * configure, config.in: Regenerate.
7983 * server.h: Include alloca.h if it exists.
7984 * gdbreplay.c: Include alloca.h if it exists.
7985
1a981360
PA
79862010-08-28 Pedro Alves <pedro@codesourcery.com>
7987
7988 * linux-low.c (__SIGRTMIN): Define if not already defined.
7989 (linux_create_inferior): Check for __ANDROID__ rather than
7990 __SIGRTMIN.
7991 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7992 are already deferred.
7993 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7994 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7995 stopped and already has a pending signal to report.
7996 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7997 a pending signal to report or is moving out of a jump pad.
7998 (linux_init_signals): Check for __ANDROID__ rather than
7999 __SIGRTMIN.
8000
b4d51a55
PA
80012010-08-28 Pedro Alves <pedro@codesourcery.com>
8002
8003 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8004 debug_threads check. Avoid a linear search when not doing debug
8005 output.
8006
ec48365d
PA
80072010-08-27 Pedro Alves <pedro@codesourcery.com>
8008
8009 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8010 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8011 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8012 (process_event): Change local fd's type to gdb_fildes_t.
8013 (create_file_handler): Adjust prototype.
8014 (delete_file_handler): Adjust prototype.
8015 (handle_file_event): Adjust prototype. Use pfildes.
8016 (create_file_event): Adjsut prototype.
8017 * remote-utils.c (remote_desc, listen_desc): Change type to
8018 gdb_fildes_t.
8019 * server.h: New gdb_fildes_t typedef.
8020 [USE_WIN32API]: Include winsock2.h.
8021 (delete_file_handler, add_file_handler): Adjust prototypes.
8022 (pfildes): Declare.
8023 * utils.c (pfildes): New.
8024
854d88f0
PA
80252010-08-27 Pedro Alves <pedro@codesourcery.com>
8026
8027 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8028 * configure: Regenerate.
8029
0146f85b
PA
80302010-08-27 Pedro Alves <pedro@codesourcery.com>
8031
8032 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8033 (linux_done_accessing_memory): ... this.
8034 (linux_target_ops): Adjust.
8035 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8036 * nto-low.c (nto_target_ops): Adjust comment.
8037 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8038 * spu-low.c (spu_target_ops): Adjust comment.
8039 * target.h (target_ops): Rename unprepare_to_access_memory field
8040 to done_accessing_memory.
8041 (unprepare_to_access_memory): Rename to ...
8042 (done_accessing_memory): ... this.
8043
90d74c30
PA
80442010-08-26 Pedro Alves <pedro@codesourcery.com>
8045
8046 * linux-low.c (linux_prepare_to_access_memory): New.
8047 (linux_unprepare_to_access_memory): New.
8048 (linux_target_ops): Install them.
8049 * server.c (read_memory): Rename to ...
8050 (gdb_read_memory): ... this. Use
8051 prepare_to_access_memory/prepare_to_access_memory.
8052 (write_memory): Rename to ...
8053 (gdb_write_memory): ... this. Use
8054 prepare_to_access_memory/prepare_to_access_memory.
8055 (handle_search_memory_1): Adjust.
8056 (process_serial_event): Adjust.
8057 * target.h (struct target_ops): New fields
8058 prepare_to_access_memory and unprepare_to_access_memory.
8059 (prepare_to_access_memory, unprepare_to_access_memory): New.
8060 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8061 prepare_to_access_memory/prepare_to_access_memory.
8062 * nto-low.c (nto_target_ops): Adjust.
8063 * spu-low.c (spu_target_ops): Adjust.
8064 * win32-low.c (win32_target_ops): Adjust.
8065
fd467969
PA
80662010-08-26 Pedro Alves <pedro@codesourcery.com>
8067
8068 * Makefile.in (WARN_CFLAGS): Get it from configure.
8069 (WERROR_CFLAGS): New.
8070 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8071 * configure.ac: Introduce --enable-werror, which adds -Werror to
8072 the compiler command line. Enabled by default. Disable with
8073 --disable-werror. Add -Wdeclaration-after-statement
8074 Wpointer-arith and -Wformat-nonliteral to warning flags.
8075 * configure: Regenerate.
8076
331e2f5f
PA
80772010-08-26 Pedro Alves <pedro@codesourcery.com>
8078
8079 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8080
e581f2b4
PA
80812010-08-26 Pedro Alves <pedro@codesourcery.com>
8082
8083 * gdbreplay.c (remote_error): New.
8084 (gdbchar): New.
8085 (expect): Use gdbchar. Check for error reading from GDB.
8086 Clarify sync error output.
8087 (play): Check for errors writing to GDB.
8088 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8089 * remote-utils.c (getpkt): Check for errors writing to the remote
8090 descriptor.
8091
3c11dd79
PA
80922010-08-25 Pedro Alves <pedro@codesourcery.com>
8093
8094 * linux-low.c (linux_wait_1): Move non-debugging code out of
8095 `debug_threads' control.
8096
d20a8ad9
PA
80972010-08-25 Pedro Alves <pedro@codesourcery.com>
8098
8099 * linux-low.c (linux_wait_1): Don't set last_status here.
8100 * server.c (push_event, queue_stop_reply_callback): Assert we're
8101 not pushing a TARGET_WAITKIND_IGNORE event.
8102 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8103 (myresume, handle_target_event): Set the thread's last_resume_kind
8104 and last_status from the target returned status.
8105
964e4306
PA
81062010-08-25 Pedro Alves <pedro@codesourcery.com>
8107
8108 PR threads/10729
8109
8110 * linux-x86-low.c (update_debug_registers_callback): New.
8111 (i386_dr_low_set_addr): Use it.
8112 (i386_dr_low_get_addr): New.
8113 (i386_dr_low_set_control): Use update_debug_registers_callback.
8114 (i386_dr_low_get_control): New.
8115 (i386_dr_low_get_status): Adjust.
8116 * linux-low.c (linux_stop_lwp): New.
8117 * linux-low.h (linux_stop_lwp): Declare.
8118
8119 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8120 argument instead of a i386_debug_reg_state.
8121 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8122 a i386_debug_reg_state.
8123 (i386_insert_aligned_watchpoint): Adjust.
8124 (i386_remove_aligned_watchpoint): Adjust.
8125 (i386_low_stopped_data_address): Read the debug registers from the
8126 inferior instead of from the mirrors.
8127 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8128 (i386_dr_low_get_addr): Declare.
8129 (i386_dr_low_get_control): Declare.
8130 (i386_dr_low_get_status): Change prototype.
8131
8132 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8133 (i386_dr_low_get_addr): New.
8134 (i386_dr_low_get_control): New.
8135 (i386_dr_low_get_status): Adjust prototype. Return
8136 dr_status_mirror.
8137 (i386_initial_stuff): Clear dr_status_mirror and
8138 dr_control_mirror.
8139 (i386_get_thread_context): Adjust.
8140 (i386_set_thread_context): Adjust.
8141 (i386_thread_added): Adjust.
8142
5f21a75b
PA
81432010-08-24 Pedro Alves <pedro@codesourcery.com>
8144
8145 * linux-low.h (linux_thread_area): Delete declaration.
8146
3e4c1235
TS
81472010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8148
8149 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8150 after its termination.
8151
1971b033
PA
81522010-08-09 Pedro Alves <pedro@codesourcery.com>
8153
8154 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8155 (gdb_wants_all_stopped): Delete.
8156 (linux_wait_1): Don't call them.
8157 * server.c (handle_v_cont): Tag all threads as want-stopped.
8158 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8159 stopped as "client-wants-stopped".
8160
310444ac
PA
81612010-07-31 Pedro Alves <pedro@codesourcery.com>
8162
8163 * Makefile.in (signals_h): New.
8164 (server_h): Depend on it.
8165 (server.o): Don't depend on $(signals_def).
8166 (signals.o): Depend on $(signals_def).
8167
a19cae16
JK
81682010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8169
8170 * Makefile.in (signals_def): New.
8171 (server_h): Append include/gdb/signals.h and signals_def.
8172 (server.o): Append signals_def.
8173
30d50328
JK
81742010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8175
8176 * server.c (handle_target_event): Use target_signal_to_host for
8177 resume_info.sig initialization.
8178 * target.h (struct thread_resume) <sig>: New comment.
8179
5c3216e2
OS
81802010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8181
c6f46ca0
OS
8182 * server.c (handle_query): strcpy() the returned string from paddress()
8183 instead of sprintf().
5c3216e2
OS
8184 * utils.c (paddress): Return phex_nz().
8185
6bd31874
JB
81862010-07-07 Joel Brobecker <brobecker@adacore.com>
8187
8188 * server.c (handle_v_cont): Call mourn_inferior if process
8189 just exited.
8190 (myresume): Likewise.
8191
0fb4aa4b
PA
81922010-07-01 Pedro Alves <pedro@codesourcery.com>
8193
8194 Static tracepoints, and integration with UST.
8195
8196 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8197 * mem-break.c (uninsert_all_breakpoints)
8198 (reinsert_all_breakpoints): New.
8199 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8200 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8201 (gdb_agent_ust_loaded, helper_thread_id)
8202 (gdb_agent_helper_thread_id): New macros.
8203 (struct ipa_sym_addresses): Add addr_ust_loaded,
8204 addr_helper_thread_id, addr_cmd_buf.
8205 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8206 (in_process_agent_loaded_ust): New.
8207 (write_e_ust_not_loaded): New.
8208 (maybe_write_ipa_ust_not_loaded): New.
8209 (struct collect_static_trace_data_action): New.
8210 (enum tracepoint_type) <static_tracepoint>: New.
8211 (struct tracepoint) <handle>: Mention static tracepoints.
8212 (struct static_tracepoint_ctx): New.
8213 (CMD_BUF_SIZE): New.
8214 (add_tracepoint_action): Handle static tracepoint actions.
8215 (unprobe_marker_at): New.
8216 (clear_installed_tracepoints): Handle static tracepoints.
8217 (cmd_qtdp): Handle static tracepoints.
8218 (probe_marker_at): New.
8219 (cmd_qtstart): Handle static tracepoints.
8220 (response_tracepoint): Handle static tracepoints.
8221 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8222 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8223 (get_context_regcache): Handle static tracepoints.
8224 (do_action_at_tracepoint): Handle static tracepoint actions.
8225 (traceframe_find_block_type): Handle static trace data blocks.
8226 (traceframe_read_sdata): New.
8227 (download_tracepoints): Download static tracepoint actions.
8228 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8229 (GDB_PROBE_NAME): New.
8230 (ust_ops): New.
8231 (GET_UST_SYM): New.
8232 (USTF): New.
8233 (dlsym_ust): New.
8234 (ust_marker_to_static_tracepoint): New.
8235 (gdb_probe): New.
8236 (collect_ust_data_at_tracepoint): New.
8237 (gdb_ust_probe): New.
8238 (UNIX_PATH_MAX, SOCK_DIR): New.
8239 (gdb_ust_connect_sync_socket): New.
8240 (resume_thread, stop_thread): New.
8241 (run_inferior_command): New.
8242 (init_named_socket): New.
8243 (gdb_ust_socket_init): New.
8244 (cstr_to_hexstr): New.
8245 (next_st): New.
8246 (first_marker, next_marker): New.
8247 (response_ust_marker): New.
8248 (cmd_qtfstm, cmd_qtsstm): New.
8249 (unprobe_marker_at, probe_marker_at): New.
8250 (cmd_qtstmat, gdb_ust_thread): New.
8251 (gdb_ust_init): New.
8252 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8253 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8254 (ST_REGENTRY): New.
8255 (x86_64_st_collect_regmap): New.
8256 (X86_64_NUM_ST_COLLECT_GREGS): New.
8257 (AMD64_RIP_REGNUM): New.
8258 (supply_static_tracepoint_registers): New.
8259 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8260 (ST_REGENTRY): New.
8261 (i386_st_collect_regmap): New.
8262 (i386_NUM_ST_COLLECT_GREGS): New.
8263 (supply_static_tracepoint_registers): New.
8264 * server.c (handle_query): Handle qXfer:statictrace:read.
8265 <qSupported>: Report support for StaticTracepoints, and
8266 qXfer:statictrace:read features.
8267 * server.h (traceframe_read_sdata)
8268 (supply_static_tracepoint_registers): Declare.
8269 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8270 (unpack_varlen_hex): Include in IPA build.
8271 * Makefile.in (ustlibs, ustinc): New.
8272 (IPA_OBJS): Add remote-utils-ipa.o.
8273 ($(IPA_LIB)): Link -ldl and -lpthread.
8274 (UST_CFLAGS): New.
8275 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8276 * config.in, configure: Regenerate.
8277
9e4344e5
PA
82782010-06-20 Ian Lance Taylor <iant@google.com>
8279 Pedro Alves <pedro@codesourcery.com>
8280
8281 * linux-x86-low.c (always_true): Delete.
8282 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8283 trying to fool the compiler with always_true.
8284
c6beb2cb
PA
82852010-06-20 Pedro Alves <pedro@codesourcery.com>
8286
8287 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8288 conditions in gdbserver.
8289
d2ed6730
UW
82902010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8291
8292 * spu-low.c (spu_read_memory): Wrap around local store limit.
8293 (spu_write_memory): Likewise.
8294
4e29fb54
PA
82952010-06-15 Pedro Alves <pedro@codesourcery.com>
8296
8297 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8298 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8299 LONGEST uses.
8300 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8301 uses.
8302 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8303 uses with LONGEST uses.
8304
6a271cae
PA
83052010-06-14 Stan Shebs <stan@codesourcery.com>
8306 Pedro Alves <pedro@codesourcery.com>
8307
8308 Bytecode compiler.
8309
8310 * linux-x86-low.c: Include limits.h.
8311 (add_insns): New.
8312 (always_true): New.
8313 (EMIT_ASM): New.
8314 (EMIT_ASM32): New.
8315 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8316 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8317 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8318 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8319 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8320 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8321 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8322 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8323 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8324 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8325 (amd64_emit_void_call_2): New.
8326 (amd64_emit_ops): New.
8327 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8328 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8329 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8330 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8331 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8332 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8333 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8334 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8335 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8336 (i386_emit_stack_adjust, i386_emit_int_call_1)
8337 (i386_emit_void_call_2): New.
8338 (i386_emit_ops): New.
8339 (x86_emit_ops): New.
8340 (the_low_target): Install x86_emit_ops.
8341 * server.h (struct emit_ops): New.
8342 (get_raw_reg_func_addr): Declare.
8343 (current_insn_ptr, emit_error): Declare.
8344 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8345 (set_trace_state_variable_value): New defines.
8346 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8347 addr_get_trace_state_variable_value and
8348 addr_set_trace_state_variable_value.
8349 (symbol_list): New fields for get_raw_reg,
8350 get_trace_state_variable_value and set_trace_state_variable_value.
8351 (condfn): New typedef.
8352 (struct tracepoint): New field `compiled_cond'.
8353 (do_action_at_tracepoint): Clear compiled_cond.
8354 (get_trace_state_variable_value, set_trace_state_variable_value):
8355 Export in the IPA.
8356 (condition_true_at_tracepoint): If there's a compiled condition,
8357 run that.
8358 (current_insn_ptr, emit_error): New globals.
8359 (struct bytecode_address): New.
8360 (get_raw_reg_func_addr): New.
8361 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8362 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8363 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8364 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8365 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8366 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8367 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8368 (compile_tracepoint_condition, compile_bytecodes): New.
8369 * target.h (emit_ops): Forward declare.
8370 (struct target_ops): New field emit_ops.
8371 (target_emit_ops): New.
8372 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8373 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8374 * linux-low.c (linux_emit_ops): New.
8375 (linux_target_ops): Install it.
8376 * linux-low.h (struct linux_target_ops): New field emit_ops.
8377
92b72907
UW
83782010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8379
8380 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8381 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8382
fa593d66
PA
83832010-06-01 Pedro Alves <pedro@codesourcery.com>
8384 Stan Shebs <stan@codesourcery.com>
8385
8386 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8387 (all): Depend on $(extra_libraries).
8388 (install-only): Install the IPA.
8389 (IPA_OBJS, IPA_LIB): New.
8390 (clean): Remove the IPA lib.
8391 (IPAGENT_CFLAGS): New.
8392 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8393 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8394 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8395 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8396 * configure.ac: Check for atomic builtins support in the compiler.
8397 (IPA_DEPFILES, extra_libraries): Define.
8398 * configure.srv (ipa_obj): Add description.
8399 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8400 (i[34567]86-*-linux*): Set ipa_obj.
8401 (x86_64-*-linux*): Set ipa_obj.
8402 * linux-low.c (stabilizing_threads): New.
8403 (supports_fast_tracepoints): New.
8404 (linux_detach): Stabilize threads before detaching.
8405 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8406 the lwp is either not stabilizing, or is moving out of a jump pad.
8407 (linux_fast_tracepoint_collecting): New.
8408 (maybe_move_out_of_jump_pad): New.
8409 (enqueue_one_deferred_signal): New.
8410 (dequeue_one_deferred_signal): New.
8411 (linux_wait_for_event_1): If moving out of a jump pad, defer
8412 pending signals to later.
8413 (linux_stabilize_threads): New.
8414 (linux_wait_1): Check if threads need moving out of jump pads, and
8415 do it if so.
8416 (stuck_in_jump_pad_callback): New.
8417 (move_out_of_jump_pad_callback): New.
8418 (lwp_running): New.
8419 (linux_resume_one_lwp): Handle moving out of jump pads.
8420 (linux_set_resume_request): Dequeue deferred signals.
8421 (need_step_over_p): Also step over fast tracepoint jumps.
8422 (start_step_over): Also uninsert fast tracepoint jumps.
8423 (finish_step_over): Also reinsert fast tracepoint jumps.
8424 (linux_install_fast_tracepoint_jump): New.
8425 (linux_target_ops): Install linux_stabilize_threads and
8426 linux_install_fast_tracepoint_jump_pad.
8427 * linux-low.h (linux_target_ops) <get_thread_area,
8428 install_fast_tracepoint_jump_pad>: New fields.
8429 (struct lwp_info) <collecting_fast_tracepoint,
8430 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8431 (linux_get_thread_area): Declare.
8432 * linux-x86-low.c (jump_insn): New.
8433 (x86_get_thread_area): New.
8434 (append_insns): New.
8435 (push_opcode): New.
8436 (amd64_install_fast_tracepoint_jump_pad): New.
8437 (i386_install_fast_tracepoint_jump_pad): New.
8438 (x86_install_fast_tracepoint_jump_pad): New.
8439 (the_low_target): Install x86_get_thread_area and
8440 x86_install_fast_tracepoint_jump_pad.
8441 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8442 (struct fast_tracepoint_jump): New.
8443 (fast_tracepoint_jump_insn): New.
8444 (fast_tracepoint_jump_shadow): New.
8445 (find_fast_tracepoint_jump_at): New.
8446 (fast_tracepoint_jump_here): New.
8447 (delete_fast_tracepoint_jump): New.
8448 (set_fast_tracepoint_jump): New.
8449 (uninsert_fast_tracepoint_jumps_at): New.
8450 (reinsert_fast_tracepoint_jumps_at): New.
8451 (set_breakpoint_at): Use write_inferior_memory.
8452 (uninsert_raw_breakpoint): Use write_inferior_memory.
8453 (check_mem_read): Mask out fast tracepoint jumps.
8454 (check_mem_write): Mask out fast tracepoint jumps.
8455 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8456 (set_fast_tracepoint_jump): Declare.
8457 (delete_fast_tracepoint_jump)
8458 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8459 (reinsert_fast_tracepoint_jumps_at): Declare.
8460 * regcache.c: Don't compile many functions when building the
8461 in-process agent library.
8462 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8463 the register buffer in the heap.
8464 (free_register_cache): If the register buffer isn't owned by the
8465 regcache, don't free it.
8466 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8467 pre-existing register caches.
8468 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8469 type.
8470 (convert_ascii_to_int): : Constify `from' parameter type.
8471 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8472 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8473 the needed buffer in-place.
8474 (relocate_instruction): New.
8475 * server.c (handle_query) <qSymbols>: If the target supports
8476 tracepoints, give it a chance of looking up symbols. Report
8477 support for fast tracepoints.
8478 (handle_status): Stabilize threads.
8479 (process_serial_event): Adjust.
8480 * server.h (struct fast_tracepoint_jump): Forward declare.
8481 (struct process_info) <fast_tracepoint_jumps>: New field.
8482 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8483 (decode_X_packet, decode_M_packet): Adjust.
8484 (relocate_instruction): Declare.
8485 (in_process_agent_loaded): Declare.
8486 (tracepoint_look_up_symbols): Declare.
8487 (struct fast_tpoint_collect_status): Declare.
8488 (fast_tracepoint_collecting): Declare.
8489 (force_unlock_trace_buffer): Declare.
8490 (handle_tracepoint_bkpts): Declare.
8491 (initialize_low_tracepoint)
8492 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8493 * target.h (struct target_ops) <stabilize_threads,
8494 install_fast_tracepoint_jump_pad>: New fields.
8495 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8496 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8497 [HAVE_STDINT_H]: Include stdint.h.
8498 (trace_debug_1): Rename to ...
8499 (trace_vdebug): ... this.
8500 (trace_debug): Rename to ...
8501 (trace_debug_1): ... this. Add `level' parameter.
8502 (trace_debug): New.
8503 (ATTR_USED, ATTR_NOINLINE): New.
8504 (IP_AGENT_EXPORT): New.
8505 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8506 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8507 (about_to_request_buffer_space, trace_buffer_is_full)
8508 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8509 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8510 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8511 (traceframe_write_count, traceframes_created)
8512 (trace_state_variables)
8513 New renaming defines.
8514 (struct ipa_sym_addresses): New.
8515 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8516 (symbol_list): New.
8517 (ipa_sym_addrs): New.
8518 (all_tracepoint_symbols_looked_up): New.
8519 (in_process_agent_loaded): New.
8520 (write_e_ipa_not_loaded): New.
8521 (maybe_write_ipa_not_loaded): New.
8522 (tracepoint_look_up_symbols): New.
8523 (debug_threads) [IN_PROCESS_AGENT]: New.
8524 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8525 (UNKNOWN_SIDE_EFFECTS): New.
8526 (stop_tracing): New.
8527 (flush_trace_buffer): New.
8528 (stop_tracing_bkpt): New.
8529 (flush_trace_buffer_bkpt): New.
8530 (read_inferior_integer): New.
8531 (read_inferior_uinteger): New.
8532 (read_inferior_data_pointer): New.
8533 (write_inferior_data_pointer): New.
8534 (write_inferior_integer): New.
8535 (write_inferior_uinteger): New.
8536 (struct collect_static_trace_data_action): Delete.
8537 (enum tracepoint_type): New.
8538 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8539 <actions_str, step_actions, step_actions_str>: Only include in
8540 GDBserver.
fa593d66
PA
8541 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8542 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8543 (tracepoints): Use IP_AGENT_EXPORT.
8544 (last_tracepoint): Don't include in the IPA.
8545 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8546 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8547 (alloced_trace_state_variables): New.
8548 (trace_state_variables): Use IP_AGENT_EXPORT.
8549 (traceframe_t): Delete unused variable.
8550 (circular_trace_buffer): Don't include in the IPA.
8551 (trace_buffer_start): Delete.
8552 (struct trace_buffer_control): New.
8553 (trace_buffer_free): Delete.
8554 (struct ipa_trace_buffer_control): New.
8555 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8556 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8557 New.
8558 (trace_buffer_ctrl): New.
8559 (TRACE_BUFFER_CTRL_CURR): New.
8560 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8561 Reimplement as macros.
8562 (trace_buffer_wrap): Delete.
8563 (traceframe_write_count, traceframe_read_count)
8564 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8565 (struct tracepoint_hit_ctx) <type>: New field.
8566 (struct fast_tracepoint_ctx): New.
8567 (memory_barrier): New.
8568 (cmpxchg): New.
8569 (record_tracepoint_error): Update atomically in the IPA.
8570 (clear_inferior_trace_buffer): New.
8571 (about_to_request_buffer_space): New.
8572 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8573 updating the same buffer.
8574 (add_tracepoint): Default the tracepoint's type to trap
8575 tracepoint, and orig_size to -1.
8576 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8577 internal variables.
8578 (create_trace_state_variable): New parameter `gdb'. Handle it.
8579 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8580 (cmd_qtdp): Handle fast tracepoints.
8581 (cmd_qtdv): Adjust.
8582 (max_jump_pad_size): New.
8583 (gdb_jump_pad_head): New.
8584 (get_jump_space_head): New.
8585 (claim_jump_space): New.
8586 (sort_tracepoints): New.
8587 (MAX_JUMP_SIZE): New.
8588 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8589 IPA.
8590 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8591 support. Upload fast traceframes, and delete internal IPA
8592 breakpoints.
8593 (stop_tracing_handler): New.
8594 (flush_trace_buffer_handler): New.
8595 (cmd_qtstop): Upload fast tracepoints.
8596 (response_tracepoint): Handle fast tracepoints.
8597 (tracepoint_finished_step): Upload fast traceframes. Set the
8598 tracepoint hit context's tracepoint type.
8599 (handle_tracepoint_bkpts): New.
8600 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8601 type. Add comment about fast tracepoints.
8602 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8603 non-existing action_str field.
8604 (get_context_regcache): Handle fast tracepoints.
8605 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8606 to the regcache.
8607 (fast_tracepoint_from_jump_pad_address): New.
8608 (fast_tracepoint_from_ipa_tpoint_address): New.
8609 (collecting_t): New.
8610 (force_unlock_trace_buffer): New.
8611 (fast_tracepoint_collecting): New.
8612 (collecting): New.
8613 (gdb_collect): New.
8614 (write_inferior_data_ptr): New.
8615 (target_tp_heap): New.
8616 (target_malloc): New.
8617 (download_agent_expr): New.
8618 (UALIGN): New.
8619 (download_tracepoints): New.
8620 (download_trace_state_variables): New.
8621 (upload_fast_traceframes): New.
8622 (IPA_FIRST_TRACEFRAME): New.
8623 (IPA_NEXT_TRACEFRAME_1): New.
8624 (IPA_NEXT_TRACEFRAME): New.
8625 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8626 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8627 (gdb_jump_pad_buffer_end): New.
8628 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8629 (initialize_tracepoint): Adjust.
8630 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8631 buffer. Initialize the low module.
8632 * utils.c (PREFIX, TOOLNAME): New.
8633 (malloc_failure): Use PREFIX.
8634 (error): In the IPA, an error causes an exit.
8635 (fatal, warning): Use PREFIX.
8636 (internal_error): Use TOOLNAME.
8637 (NUMCELLS): Increase to 10.
8638 * configure, config.in: Regenerate.
8639
d149dd1d
PA
86402010-06-01 Pedro Alves <pedro@codesourcery.com>
8641
8642 * server.c (handle_query) <qSupported>: Do two passes over the
8643 qSupported string to avoid nesting strtok.
8644
f6528abd
JK
86452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8646
8647 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8648 (CDEPS): New.
8649 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8650 -Wl,--dynamic-list.
8651 * configure: Regenerate.
8652 * proc-service.list: New.
8653
ca2a87a0
JK
86542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8655
8656 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8657 New comment.
8658
363a6e9f
OS
86592010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8660
8661 * gdbreplay.c (remote_open): Check error return from socket() call by
8662 its equality to -1 not by it being negative.
8663 * remote-utils.c (remote_open): Likewise.
8664
d23b6cb1
PA
86652010-05-23 Pedro Alves <pedro@codesourcery.com>
8666
8667 * config.h: Regenerate.
8668
28d3cf85
MK
86692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8670
8671 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8672 doesn't provide PTRACE_GET_THREAD_AREA.
8673
fea36a59
MK
86742010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8675
8676 * linux-m68k-low.c: Include <asm/ptrace.h>
8677 (ps_get_thread_area): Implement.
8678
24b066ba
DE
86792010-05-03 Doug Evans <dje@google.com>
8680
8681 * event-loop.c (struct callback_event): New struct.
8682 (callback_list): New global.
8683 (append_callback_event, delete_callback_event): New functions.
8684 (process_callback): New function.
8685 (start_event_loop): Call it.
8686 * remote-utils.c (NOT_SCHEDULED): Define.
8687 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8688 moved out of readchar.
8689 (readchar): Rewrite. Call reschedule before returning.
8690 (reset_readchar): New function.
8691 (remote_close): Call it.
8692 (process_remaining, reschedule): New functions.
8693 * server.h (callback_handler_func): New typedef.
8694 (append_callback_event, delete_callback_event): Declare.
8695
9836d6ea
PA
86962010-05-03 Pedro Alves <pedro@codesourcery.com>
8697
8698 * proc-service.c (ps_pglobal_lookup): Use
8699 thread_db_look_up_one_symbol.
8700 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8701 parameter. Use it instead of all_symbols_looked_up.
8702 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8703 field.
8704 (all_symbols_looked_up): Don't declare.
8705 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8706 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8707 field.
8708 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8709 Set all_symbols_looked_up here.
8710 (thread_db_look_up_one_symbol): New.
8711 (thread_db_get_tls_address): Adjust.
8712 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8713 thread_db object on the heap, and tentatively set it in the
8714 process structure.
8715 (thread_db_init): Don't set all_symbols_looked_up here.
8716 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8717
7984d532
PA
87182010-05-03 Pedro Alves <pedro@codesourcery.com>
8719
8720 * linux-low.c (linux_kill, linux_detach): Adjust.
8721 (status_pending_p_callback): Remove redundant statement. Check
8722 for !TARGET_WAITIKIND_IGNORE, instead of
8723 TARGET_WAITKIND_STOPPED.
8724 (handle_tracepoints): Make sure LWP is locked. Adjust.
8725 (linux_wait_for_event_1): Adjust.
8726 (linux_cancel_breakpoints): New.
8727 (unsuspend_one_lwp): New.
8728 (unsuspend_all_lwps): New.
8729 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8730 (send_sigstop_callback): Change return type to int, add new
8731 `except' parameter and handle it.
8732 (suspend_and_send_sigstop_callback): New.
8733 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8734 pass them down. If SUSPEND, also increment the lwp's suspend
8735 count.
8736 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8737 (need_step_over_p): Don't consider suspended LWPs.
8738 (start_step_over): Adjust.
8739 (proceed_one_lwp): Change return type to int, add new `except'
8740 parameter and handle it.
8741 (unsuspend_and_proceed_one_lwp): New.
8742 (proceed_all_lwps): Use find_inferior instead of
8743 for_each_inferior.
8744 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8745 also decrement the suspend count of LWPs. Pass `except' down,
8746 instead of hacking its suspend count.
8747 (linux_pause_all): Add `freeze' parameter. Adjust.
8748 (linux_unpause_all): New.
8749 (linux_target_ops): Install linux_unpause_all.
8750 * server.c (handle_status): Adjust.
8751 * target.h (struct target_ops): New fields `unpause_all' and
8752 `cancel_breakpoints'. Add new parameter to `pause_all'.
8753 (pause_all): Add new `freeze' parameter.
8754 (unpause_all): New.
8755 (cancel_breakpoints): New.
8756 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8757 cancel breakpoints.
8758 (cmd_qtstart): Pause threads.
8759 (stop_tracing): Pause threads, and cancel breakpoints.
8760 * win32-low.c (win32_target_ops): Adjust.
8761
e471f25b
PA
87622010-05-03 Pedro Alves <pedro@codesourcery.com>
8763
8764 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8765 the inferior right away from here...
8766 (linux_wait_1): ... to here, and adjust to check the thread's
8767 last_resume_kind instead of the lwp's step or stop_expected flags.
8768
1915ef4f
PA
87692010-05-02 Pedro Alves <pedro@codesourcery.com>
8770
8771 * README: Use consistent `GDB' and `GDBserver' spellings.
8772
f9e39928
PA
87732010-05-02 Pedro Alves <pedro@codesourcery.com>
8774
8775 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8776 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8777 (linux_detach_one_lwp): Assume the lwp is stopped.
8778 (any_thread_of): Delete.
8779 (linux_detach): Stop all lwps here. Don't blindly delete all
8780 breakpoints.
8781 (delete_lwp_callback): New.
8782 (linux_mourn): Delete all lwps of the process that is gone.
8783 (linux_wait_1): Don't delete the last lwp of the process here.
8784 * mem-break.h (mark_breakpoints_out): Declare.
8785 * mem-break.c (mark_breakpoints_out): New.
8786 (free_all_breakpoints): Use it.
8787 * server.c (handle_target_event): If the process is gone, mark
8788 breakpoints out.
8789 * thread-db.c (struct thread_db) <create_bp>: New field.
8790 (thread_db_enable_reporting): Fix prototype. Store a thread event
8791 breakpoint reference in the thread_db struct.
8792 (thread_db_load_search): Clear the thread_db object.
8793 (try_thread_db_load_1): Ditto.
8794 (switch_to_process): New.
8795 (disable_thread_event_reporting): Use it.
8796 (remove_thread_event_breakpoints): New.
8797 (thread_db_detach, thread_db_mourn): Use it.
8798
1e7fc18c
PA
87992010-05-01 Pedro Alves <pedro@codesourcery.com>
8800
8801 * linux-low.c (linux_enable_event_reporting): New.
8802 (linux_wait_for_event_1, handle_extended_wait): Use it.
8803
02fc4de7
PA
88042010-04-30 Pedro Alves <pedro@codesourcery.com>
8805
8806 * linux-low.c (linux_kill_one_lwp, linux_kill)
8807 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8808 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8809 SIGSTOP even if the LWP is stopped.
8810 (send_sigstop_callback): New.
8811 (stop_all_lwps): Use send_sigstop_callback instead.
8812 (linux_resume_one_thread): Adjust.
8813 (proceed_one_lwp): Still proceed an LWP that the client has
8814 requested to stop, if we haven't reported it as stopped yet. Make
8815 sure that LWPs the client want stopped, have a pending SIGSTOP.
8816
bc3b5632
DE
88172010-04-26 Doug Evans <dje@google.com>
8818
ae1ada35
DE
8819 * server.c (handle_general_set): Make static.
8820
bc3b5632
DE
8821 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8822 Print received char after testing for error/eof instead of before.
8823 (input_interrupt): Tweak comment.
8824
65730243
DE
88252010-04-23 Doug Evans <dje@google.com>
8826
8827 * server.c (start_inferior): Print inferior argv if --debug.
8828
a8ae7dc0
AR
88292010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8830
8831 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8832 * nto-x86-low.c: Include server.h
8833
1c07cc19
PM
88342010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8835
8836 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8837 be consistent with other sources of this directory.
8838 (init_registers_amd64): Correct name of source file of this function
8839 in the comment.
8840
e0a61e09
PM
88412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8842
8843 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8844 64-bit executables.
8845
54709339
PM
88462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8847
8848 * win32-i386-low.c: Add 64-bit support.
8849 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8850 (init_registers_amd64): Declare.
8851 (mappings): Add 64-bit version of array.
8852 (init_windows_x86): New function.
8853 (the_low_target): Change init_arch field to init_windows_x86.
8854
e8f0053d
PM
88552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8856
8857 * win32-low.c: Adapt to support also 64-bit architecture.
8858 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8859 (get_image_name): Use SIZE_T type for local variable `done'.
8860 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8861 (toolhelp_get_dll_name): Idem.
8862 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8863 Use uintptr_t typecast to avoid warning.
8864 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8865 (handle_exception): Use phex_nz to avoid warning.
8866 (win32_wait): Remove unused local variable `process'.
8867
c481e77e
PM
88682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8869
8870 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8871 `amd64-avx.o'.
8872
12ea4b69
PM
88732010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8874
8875 * configure.ac: Use `ws2_32' library for srv_mingw.
8876 * configure: Regenerate.
8877 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8878 * remote-utils.c: Likewise.
8879
f6d1620c
L
88802010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8881
8882 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8883 if __x86_64__ is defined.
8884
8e642873
PM
88852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8886
8887 * configure: Regenerate.
8888
711e434b
PM
88892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8890
8891 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8892 * target.h (target_ops): New get_tib_address field.
8893 * win32-low.h (win32_thread_info): Add thread_local_base field.
8894 * win32-low.c (child_add_thread): Add tlb argument.
8895 Set thread_local_base field to TLB.
8896 (get_child_debug_event): Adapt to child_add_thread change.
8897 (win32_get_tib_address): New function.
8898 (win32_target_ops): Set get_tib_address field to
8899 win32_get_tib_address.
8900 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8901
505106cd
PA
89022010-04-12 Pedro Alves <pedro@codesourcery.com>
8903
505106cd
PA
8904 * linux-low.c (linux_mourn): Also remove the process.
8905 * server.c (handle_target_event): Don't remove the process here.
8906 * nto-low.c (nto_mourn): New.
8907 (nto_target_ops): Install it.
8908 * spu-low.c (spu_mourn): New.
8909 (spu_target_ops): Install it.
8910 * win32-low.c (win32_mourn): New.
8911 (win32_target_ops): Install it.
8912
e8470a06
PA
89132010-04-12 Pedro Alves <pedro@codesourcery.com>
8914
8915 * server.h (buffer_xml_printf): Remove redundant `;'.
8916
45ba0d02
PA
89172010-04-12 Pedro Alves <pedro@codesourcery.com>
8918
8919 * regcache.c (set_register_cache): Invalidate regcaches before
8920 changing the register cache layout.
8921 (regcache_invalidate_one): Allow a NULL regcache.
8922 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8923 regcaches before changing the register cache layout or the target
8924 regsets.
8925
59e04013
L
89262010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8927
8928 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8929 variable warning on Linux/x86-64.
8930
8336d594
PA
89312010-04-11 Pedro Alves <pedro@codesourcery.com>
8932
8933 GDBserver disconnected tracing support.
8934
8935 * linux-low.c (linux_remove_process): Delete.
8936 (add_lwp): Don't set last_resume_kind here.
8937 (linux_kill): Use `mourn'.
8938 (linux_detach): Use `thread_db_detach', and `mourn'.
8939 (linux_mourn): New.
8940 (linux_attach_lwp_1): Adjust comment.
8941 (linux_attach): last_resume_kind moved the thread_info; adjust.
8942 (status_pending_p_callback): Adjust.
8943 (linux_wait_for_event_1): Adjust.
8944 (count_events_callback, select_singlestep_lwp_callback)
8945 (select_event_lwp_callback, cancel_breakpoints_callback)
8946 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8947 (proceed_one_lwp): Adjust.
8948 (linux_async): Add debug output.
8949 (linux_thread_stopped): New.
8950 (linux_pause_all): New.
8951 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8952 linux_pause_all.
8953 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8954 (thread_db_free): Delete declaration.
8955 (thread_db_detach, thread_db_mourn): Declare.
8956 * thread-db.c (thread_db_init): Use thread_db_mourn.
8957 (thread_db_free): Delete, split in two.
8958 (disable_thread_event_reporting): New.
8959 (thread_db_detach): New.
8960 (thread_db_mourn): New.
8961
8962 * server.h (struct thread_info) <last_resume_kind>: New field.
8963 <attached>: Add comment.
8964 <gdb_detached>: New field.
8965 (handler_func): Change return type to int.
8966 (handle_serial_event, handle_target_event): Ditto.
8967 (gdb_connected): Declare.
8968 (tracing): Delete.
8969 (disconnected_tracing): Declare.
8970 (stop_tracing): Declare.
8971
8972 * server.c (handle_query) <qSupported>: Report support for
8973 disconnected tracing.
8974 (queue_stop_reply_callback): Account for running threads.
8975 (gdb_wants_thread_stopped): New.
8976 (gdb_wants_all_threads_stopped): New.
8977 (gdb_reattached_process): New.
8978 (handle_status): Clear the `gdb_detached' flag of all processes.
8979 In all-stop, stop all threads.
8980 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8981 (process_serial_event): If the remote connection breaks, or if an
8982 exit was forced with "monitor exit", force an event loop exit.
8983 Handle disconnected tracing on detach.
8984 (handle_serial_event): Adjust.
8985 (handle_target_event): If GDB isn't connected, forward events back
8986 to the inferior, unless the last process exited, in which case,
8987 exit gdbserver. Adjust interface.
8988
8989 * remote-utils.c (remote_open): Don't block in accept. Instead
8990 register an event loop source on the listen socket file
8991 descriptor. Refactor bits into ...
8992 (listen_desc): ... this new global.
8993 (gdb_connected): ... this new function.
8994 (enable_async_notification): ... this new function.
8995 (handle_accept_event): ... this new function.
8996 (remote_close): Clear remote_desc.
8997
8998 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8999
9000 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9001 New fields.
9002 (mourn_inferior): Define.
9003 (target_process_qsupported): Avoid the dangling else problem.
9004 (thread_stopped): Define.
9005 (pause_all): Define.
9006 (target_waitstatus_to_string): Declare.
9007 * target.c (target_waitstatus_to_string): New.
9008
9009 * tracepoint.c (tracing): Make extern.
9010 (disconnected_tracing): New.
9011 (stop_tracing): Make extern. Handle tracing stops due to GDB
9012 disconnecting.
9013 (cmd_qtdisconnected): New.
9014 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9015 (handle_tracepoint_general_set): Handle QTDisconnected.
9016
9017 * event-loop.c (event_handler_func): Change return type to int.
9018 (process_event): Bail out if the event handler wants the event
9019 loop to stop.
9020 (handle_file_event): Ditto.
9021 (start_event_loop): Bail out if the event handler wants the event
9022 loop to stop.
9023
9024 * nto-low.c (nto_target_ops): Adjust.
9025 * spu-low.c (spu_wait): Don't remove the process here.
9026 (spu_target_ops): Adjust.
9027 * win32-low.c (win32_wait): Don't remove the process here.
9028 (win32_target_ops): Adjust.
9029
5d267c4c
PA
90302010-04-11 Pedro Alves <pedro@codesourcery.com>
9031
9032 * regcache.c (realloc_register_cache): Invalidate inferior's
9033 regcache before recreating it.
9034
623ccd72
PA
90352010-04-09 Pedro Alves <pedro@codesourcery.com>
9036
9037 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9038
219f2f23
PA
90392010-04-09 Stan Shebs <stan@codesourcery.com>
9040 Pedro Alves <pedro@codesourcery.com>
9041
9042 * server.h (LONGEST): New.
9043 (struct thread_info) <while_stepping>: New field.
9044 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9045 Declare.
9046 (initialize_tracepoint, handle_tracepoint_general_set)
9047 (handle_tracepoint_query, tracepoint_finished_step)
9048 (tracepoint_was_hit, release_while_stepping_state_list):
9049 (current_traceframe): Declare.
9050 * server.c (handle_general_set): Handle tracepoint packets.
9051 (read_memory): New.
9052 (write_memory): New.
9053 (handle_search_memory_1): Use read_memory.
9054 (handle_query): Report support for conditional tracepoints, trace
9055 state variables, and tracepoint sources. Handle tracepoint
9056 queries.
9057 (main): Initialize the tracepoints module.
9058 (process_serial_event): Handle traceframe reads/writes.
9059
9060 * linux-low.c (handle_tracepoints): New.
9061 (linux_wait_1): Call it.
9062 (linux_resume_one_lwp): Handle while-stepping.
9063 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9064 (linux_target_ops): Install them.
9065 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9066 New field.
9067 * linux-x86-low.c (x86_supports_tracepoints): New.
9068 (the_low_target). Install it.
9069
9070 * mem-break.h (delete_breakpoint): Declare.
9071 * mem-break.c (delete_breakpoint): Make external.
9072
9073 * target.h (struct target_ops): Add `supports_tracepoints',
9074 `read_pc', and `write_pc' fields.
9075 (target_supports_tracepoints): Define.
9076 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9077 (phex_nz): New.
9078
9079 * regcache.h (struct regcache) <registers_owned>: New field.
9080 (init_register_cache, regcache_cpy): Declare.
9081 (regcache_read_pc, regcache_write_pc): Declare.
9082 (register_cache_size): Declare.
9083 (supply_regblock): Declare.
9084 * regcache.c (init_register_cache): New.
9085 (new_register_cache): Use it.
9086 (regcache_cpy): New.
9087 (register_cache_size): New.
9088 (supply_regblock): New.
9089 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9090
219f2f23
PA
9091 * tracepoint.c: New.
9092
9093 * Makefile.in (OBS): Add tracepoint.o.
9094 (tracepoint.o): New rule.
9095
3a13a53b
L
90962010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9097
9098 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9099 (i386-mmx.o): New.
9100 (i386-mmx.c): Likewise.
9101 (i386-mmx-linux.o): Likewise.
9102 (i386-mmx-linux.c): Likewise.
9103
9104 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9105 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9106 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9107 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9108
9109 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9110 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9111 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9112
1570b33e
L
91132010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9114
9115 * Makefile.in (clean): Updated.
9116 (i386-avx.o): New.
9117 (i386-avx.c): Likewise.
9118 (i386-avx-linux.o): Likewise.
9119 (i386-avx-linux.c): Likewise.
9120 (amd64-avx.o): Likewise.
9121 (amd64-avx.c): Likewise.
9122 (amd64-avx-linux.o): Likewise.
9123 (amd64-avx-linux.c): Likewise.
9124
9125 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9126 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9127 (srv_amd64_regobj): Add amd64-avx.o.
9128 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9129 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9130 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9131 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9132 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9133 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9134 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9135
9136 * i387-fp.c: Include "i386-xstate.h".
9137 (i387_xsave): New.
9138 (i387_cache_to_xsave): Likewise.
9139 (i387_xsave_to_cache): Likewise.
9140 (x86_xcr0): Likewise.
9141
9142 * i387-fp.h (i387_cache_to_xsave): Likewise.
9143 (i387_xsave_to_cache): Likewise.
9144 (x86_xcr0): Likewise.
9145
9146 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9147 * linux-crisv32-low.c (target_regsets): Likewise.
9148 * linux-m68k-low.c (target_regsets): Likewise.
9149 * linux-mips-low.c (target_regsets): Likewise.
9150 * linux-ppc-low.c (target_regsets): Likewise.
9151 * linux-s390-low.c (target_regsets): Likewise.
9152 * linux-sh-low.c (target_regsets): Likewise.
9153 * linux-sparc-low.c (target_regsets): Likewise.
9154 * linux-xtensa-low.c (target_regsets): Likewise.
9155
9156 * linux-low.c: Include <sys/uio.h>.
9157 (regsets_fetch_inferior_registers): Support nt_type.
9158 (regsets_store_inferior_registers): Likewise.
9159 (linux_process_qsupported): New.
9160 (linux_target_ops): Add linux_process_qsupported.
9161
9162 * linux-low.h (regset_info): Add nt_type.
9163 (linux_target_ops): Add process_qsupported.
9164
9165 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9166 and <sys/uio.h>.
9167 (init_registers_i386_avx_linux): New.
9168 (init_registers_amd64_avx_linux): Likewise.
9169 (xmltarget_i386_linux_no_xml): Likewise.
9170 (xmltarget_amd64_linux_no_xml): Likewise.
9171 (PTRACE_GETREGSET): Likewise.
9172 (PTRACE_SETREGSET): Likewise.
9173 (x86_fill_xstateregset): Likewise.
9174 (x86_store_xstateregset): Likewise.
9175 (use_xml): Likewise.
9176 (x86_linux_update_xmltarget): Likewise.
9177 (x86_linux_process_qsupported): Likewise.
9178 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9179 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9180 init_registers_i386_linux here. Call
9181 x86_linux_update_xmltarget.
9182 (the_low_target): Add x86_linux_process_qsupported.
9183
9184 * server.c (handle_query): Call target_process_qsupported.
9185
9186 * target.h (target_ops): Add process_qsupported.
9187 (target_process_qsupported): New.
9188
fc7238bb
PA
91892010-04-03 Pedro Alves <pedro@codesourcery.com>
9190
9191 * inferiors.c (add_thread): Set last_status kind to
9192 TARGET_WAITKIND_IGNORE.
9193 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9194 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9195 (linux_wait_1): Move `thread' local definition to block that uses
9196 it. Don't NULL initialize `event_child'.
9197 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9198 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9199 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9200
bdabb078
PA
92012010-04-01 Pedro Alves <pedro@codesourcery.com>
9202
9203 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9204 an extended waitstatus, or by a watchpoint.
9205 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9206 thread was stepping or has been stopped by a watchpoint.
9207
d3bbe7a0
PA
92082010-04-01 Pedro Alves <pedro@codesourcery.com>
9209
9210 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9211 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9212 of another, then delete the previous, and validate all
9213 breakpoints.
9214 (validate_inserted_breakpoint): New.
9215 (delete_disabled_breakpoints): New.
9216 (validate_breakpoints): New.
9217 (check_mem_read): Validate breakpoints before trusting their
9218 shadow. Delete disabled breakpoints.
9219 (check_mem_write): Validate breakpoints before trusting they
9220 should be inserted. Delete disabled breakpoints.
9221 * mem-break.h (validate_breakpoints):
9222 * server.c (handle_query): Validate breakpoints when we see a
9223 qSymbol query.
9224
8b07ae33
PA
92252010-04-01 Pedro Alves <pedro@codesourcery.com>
9226
9227 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9228 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9229 if we could tell there's a GDB breakpoint at stop_pc.
9230 (need_step_over_p): Don't do a step over if we find a GDB
9231 breakpoint at the resume PC.
9232
9233 * mem-break.c (struct raw_breakpoint): New.
9234 (enum bkpt_type): New type `gdb_breakpoint'.
9235 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9236 fields. New field `raw'.
9237 (find_raw_breakpoint_at): New.
9238 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9239 breakpoint instead.
9240 (set_breakpoint_at): Adjust.
9241 (delete_raw_breakpoint): New.
9242 (release_breakpoint): New.
9243 (delete_breakpoint): Rename to...
9244 (delete_breakpoint_1): ... this. Add proc parameter. Use
9245 release_breakpoint. Return ENOENT.
9246 (delete_breakpoint): Reimplement.
9247 (find_breakpoint_at): Delete.
9248 (find_gdb_breakpoint_at): New.
9249 (delete_breakpoint_at): Delete.
9250 (set_gdb_breakpoint_at): New.
9251 (delete_gdb_breakpoint_at): New.
9252 (gdb_breakpoint_here): New.
9253 (set_reinsert_breakpoint): Use release_breakpoint.
9254 (uninsert_breakpoint): Rename to ...
9255 (uninsert_raw_breakpoint): ... this.
9256 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9257 (reinsert_raw_breakpoint): Change parameter type to
9258 raw_breakpoint.
9259 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9260 instead.
9261 (check_breakpoints): Adjust. Use release_breakpoint.
9262 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9263 (breakpoint_inserted_here): Ditto.
9264 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9265 Don't trust the breakpoint's shadow if it is not inserted.
9266 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9267 (delete_all_breakpoints): Adjust.
9268 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9269 use delete_breakpoint_1.
9270
9271 * mem-break.h (breakpoints_supported): Delete declaration.
9272 (set_gdb_breakpoint_at): Declare.
9273 (gdb_breakpoint_here): Declare.
9274 (delete_breakpoint_at): Delete.
9275 (delete_gdb_breakpoint_at): Declare.
9276
9277 * server.h (struct raw_breakpoint): Forward declare.
9278 (struct process_info): New field `raw_breakpoints'.
9279
9280 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9281 breakpoints.
9282
6bf5e0ba
PA
92832010-03-24 Pedro Alves <pedro@codesourcery.com>
9284
9285 * linux-low.c (status_pending_p_callback): Fix comment.
9286 (linux_wait_for_event_1): Move most of the internal breakpoint
9287 handling from here...
9288 (linux_wait_1): ... to here.
9289 (count_events_callback): New.
9290 (select_singlestep_lwp_callback): New.
9291 (select_event_lwp_callback): New.
9292 (cancel_breakpoints_callback): New.
9293 (select_event_lwp): New.
9294 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9295 priority to all LWPs that have had events that should be reported
9296 to the client. Cancel breakpoints when about to reporting the
9297 event to the client, not while stopping lwps. No longer cancel
9298 finished single-steps here.
9299 (cancel_finished_single_step): Delete.
9300 (cancel_finished_single_steps): Delete.
9301
414a389f
PA
93022010-03-24 Pedro Alves <pedro@codesourcery.com>
9303
9304 * mem-break.c (enum bkpt_type): New.
9305 (struct breakpoint): New field `type'.
9306 (set_breakpoint_at): Change return type to struct breakpoint
9307 pointer. Set type to `other_breakpoint' by default.
9308 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9309 in the breakpoint list.
9310 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9311 (reinsert_breakpoint): Rename to ...
9312 (reinsert_raw_breakpoint): ... this.
9313 (reinsert_breakpoints_at): Adjust.
9314 * mem-break.h (struct breakpoint): Declare.
9315 (set_breakpoint_at): Change return type to struct breakpoint
9316 pointer.
9317
2280c721
PA
93182010-03-24 Pedro Alves <pedro@codesourcery.com>
9319
9320 * server.c (handle_query): Assign, not compare.
9321
d50171e4
PA
93222010-03-24 Pedro Alves <pedro@codesourcery.com>
9323
9324 Teach linux gdbserver to step-over-breakpoints.
9325
9326 * linux-low.c (can_hardware_single_step): New.
9327 (supports_breakpoints): New.
9328 (handle_extended_wait): If stopping threads, read the stop pc of
9329 the new cloned LWP.
9330 (get_pc): New.
9331 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9332 low target doesn't support retrieving the PC.
9333 (add_lwp): Set last_resume_kind to resume_continue.
9334 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9335 (linux_attach): Don't clear stop_expected. Set the lwp's
9336 last_resume_kind to resume_stop.
9337 (linux_detach_one_lwp): Don't check for removed breakpoints.
9338 (check_removed_breakpoint): Delete.
9339 (status_pending_p): Rename to ...
9340 (status_pending_p_callback): ... this. Don't check for removed
9341 breakpoints. Don't consider threads that are stopped from GDB's
9342 perspective.
9343 (linux_wait_for_lwp): Always read the stop_pc here.
9344 (cancel_breakpoint): New.
9345 (step_over_bkpt): New global.
9346 (linux_wait_for_event_1): Implement stepping over breakpoints.
9347 (gdb_wants_lwp_stopped): New.
9348 (gdb_wants_all_stopped): New.
9349 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9350 single-step traps here. Store the thread's last reported target
9351 wait status.
9352 (send_sigstop): Don't clear stop_expected. Always set it,
9353 instead.
9354 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9355 (cancel_finished_single_step): New.
9356 (cancel_finished_single_steps): New.
9357 (wait_for_sigstop): Don't cancel finished single-step traps here.
9358 (linux_resume_one_lwp): Don't check for removed breakpoints.
9359 Don't set `step' on non-hardware step archs.
9360 (linux_set_resume_request): Ignore resume_stop requests if already
9361 stopping or stopped. Set the lwp's last_resume_kind.
9362 (resume_status_pending_p): Don't check for removed breakpoints.
9363 (need_step_over_p): New.
9364 (start_step_over): New.
9365 (finish_step_over): New.
9366 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9367 requests. Clear the thread's last reported target waitstatus.
9368 Don't use the `suspended' flag. Don't consider pending breakpoints.
9369 (linux_resume): Start a step-over if necessary.
9370 (proceed_one_lwp): New.
9371 (proceed_all_lwps): New.
9372 (unstop_all_lwps): New.
9373 * linux-low.h (struct lwp_info): Rewrite comment for the
9374 `suspended' flag. Add the `stop_pc' field. Delete the
9375 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9376 Add `'last_resume_kind' and `need_step_over' fields.
9377 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9378 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9379 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9380 (set_raw_breakpoint_at): New.
9381 (set_breakpoint_at): Rewrite to use it.
9382 (reinsert_breakpoint_handler): Delete.
9383 (set_reinsert_breakpoint): New.
9384 (reinsert_breakpoint_by_bp): Delete.
9385 (delete_reinsert_breakpoints): New.
9386 (uninsert_breakpoint): Rewrite.
9387 (uninsert_breakpoints_at): New.
9388 (reinsert_breakpoint): Rewrite.
9389 (reinsert_breakpoints_at): New.
9390 (check_breakpoints): Rewrite.
9391 (breakpoint_here): New.
9392 (breakpoint_inserted_here): New.
9393 (check_mem_read): Adjust.
9394 * mem-break.h (breakpoints_supported, breakpoint_here)
9395 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9396 (reinsert_breakpoint_by_bp): Delete declaration.
9397 (delete_reinsert_breakpoints): Declare.
9398 (reinsert_breakpoint): Delete declaration.
9399 (reinsert_breakpoints_at): Declare.
9400 (uninsert_breakpoint): Delete declaration.
9401 (uninsert_breakpoints_at): Declare.
9402 (check_breakpoints): Adjust prototype.
9403 * server.h: Adjust include order.
9404 (struct thread_info): Declare here. Add a `last_status' field.
9405
30ba68cb
MS
94062010-03-23 Michael Snyder <msnyder@vmware.com>
9407
9408 * server.c (crc32): New function.
9409 (handle_query): Add handling for 'qCRC:' request.
9410
b9a881c2
PA
94112010-03-23 Pedro Alves <pedro@codesourcery.com>
9412
9413 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9414 lwp had been stopped by a watchpoint.
9415
e92d13d5
PA
94162010-03-16 Pedro Alves <pedro@codesourcery.com>
9417
9418 * server.h (internal_error): Declare.
9419 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9420 * utils.c (internal_error): New function.
9421
64daa791
AS
94222010-03-15 Andreas Schwab <schwab@redhat.com>
9423
9424 * configure.srv: Fix typo setting srv_regobj.
9425
f52cd8cd
PA
94262010-03-15 Pedro Alves <pedro@codesourcery.com>
9427
9428 * linux-low.c (fetch_register): Avoid passing a non string literal
9429 format to `error'.
9430 (usr_store_inferior_registers): Ditto.
9431
93ae6fdc
PA
94322010-03-14 Pedro Alves <pedro@codesourcery.com>
9433
9434 * linux-low.c (linux_write_memory): Bail out early if peeking
9435 memory failed.
9436
c3adc08c
PA
94372010-03-14 Pedro Alves <pedro@codesourcery.com>
9438
9439 * linux-low.h (struct lwp_info): New fields
9440 `stopped_by_watchpoint' and `stopped_data_address'.
9441 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9442 here, and cache them in the lwp object.
9443 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9444 directly.
9445 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9446 field.
9447 (linux_stopped_by_watchpoint): Rewrite.
9448 (linux_stopped_data_address): Rewrite.
9449
bce522a2
PA
94502010-03-06 Simo Melenius <simo.melenius@iki.fi>
9451
9452 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9453 switching the current inferior, not before.
9454
90884b2b
L
94552010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9456
9457 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9458 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9459 i386-linux.c and amd64-linux.c.
9460 (reg-i386.o): Removed.
9461 (reg-i386.c): Likewise.
9462 (reg-i386-linux.o): Likewise.
9463 (reg-i386-linux.c): Likewise.
9464 (reg-x86-64.o): Likewise.
9465 (reg-x86-64.c): Likewise.
9466 (reg-x86-64-linux.o): Likewise.
9467 (reg-x86-64-linux.c): Likewise.
9468 (i386.o): New.
9469 (i386.c): Likewise.
9470 (i386-linux.o): Likewise.
9471 (i386-linux.c): Likewise.
9472 (amd64.o): Likewise.
9473 (amd64.c): Likewise.
9474 (amd64-linux.o): Likewise.
9475 (amd64-linux.c): Likewise.
9476
9477 * configure.srv (srv_i386_regobj): New.
9478 (srv_i386_linux_regobj): Likewise.
9479 (srv_amd64_regobj): Likewise.
9480 (srv_amd64_linux_regobj): Likewise.
9481 (srv_i386_32bit_xmlfiles): Likewise.
9482 (srv_i386_64bit_xmlfiles): Likewise.
9483 (srv_i386_xmlfiles): Likewise.
9484 (srv_amd64_xmlfiles): Likewise.
9485 (srv_i386_linux_xmlfiles): Likewise.
9486 (srv_amd64_linux_xmlfiles): Likewise.
9487 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9488 srv_xmlfiles to $srv_i386_xmlfiles.
9489 (i[34567]86-*-mingw32ce*): Likewise.
9490 (i[34567]86-*-mingw*): Likewise.
9491 (i[34567]86-*-nto*): Likewise.
9492 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9493 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9494 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9495 (x86_64-*-linux*): Likewise.
9496
9497 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9498 (init_registers_amd64_linux): New.
9499 (x86_arch_setup): Replace init_registers_x86_64_linux with
9500 init_registers_amd64_linux.
9501
193f13e6
MK
95022010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9503
9504 * configure.ac: Check for libdl. If it is not available link against
9505 static libthread_db.
9506 * configure: Regenerate.
9507
85d721b8
PA
95082010-02-22 Pedro Alves <pedro@codesourcery.com>
9509
9510 PR9605
9511
9512 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9513 handing a read watchpoint.
9514 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9515
6076632b
DE
95162010-02-12 Doug Evans <dje@google.com>
9517
9518 * linux-low.c (linux_supports_tracefork_flag): Document.
9519 (linux_look_up_symbols): Add comment.
9520
3327ccf7
L
95212010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9522
9523 * regcache.c (supply_register): Clear regcache if buf is NULL.
9524
0718675c 95252010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9526 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9527
9528 * inferiors.c (find_inferior): Add function documentation.
9529 (unloaded_dll): Handle the case where the unloaded dll has not
9530 been previously registered in the dll list.
9531
177321bd
DJ
95322010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9533
9534 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9535 (thumb2_breakpoint): New.
9536 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9537
2b009048
DJ
95382010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9539
9540 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9541 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9542 breakpoints.
9543
3be029c7
PA
95442010-01-21 Pedro Alves <pedro@codesourcery.com>
9545
9546 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9547
18f5de3b
JK
95482010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9549
9550 * linux-s390-low.c (s390_collect_ptrace_register)
9551 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9552
3743bb4f
DE
95532010-01-21 Doug Evans <dje@google.com>
9554
14ce3065
DE
9555 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9556 (PTRACE_ARG4_TYPE): New macro.
9557 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9558 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9559 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9560 (usr_store_inferior_registers): Ditto.
9561 (linux_read_memory, linux_write_memory): Ditto.
9562 (linux_test_for_tracefork): Ditto.
9563
3743bb4f
DE
9564 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9565 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9566
8b315be5
PA
95672010-01-21 Pedro Alves <pedro@codesourcery.com>
9568
9569 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9570 target.
9571
85492558
PA
95722010-01-21 Pedro Alves <pedro@codesourcery.com>
9573
9574 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9575 prototype to take a regcache. Adjust.
9576
442ea881
PA
95772010-01-20 Pedro Alves <pedro@codesourcery.com>
9578
9579 * regcache.h (struct thread_info): Forward declare.
9580 (struct regcache): New.
9581 (new_register_cache): Adjust prototype.
9582 (get_thread_regcache): Declare.
9583 (free_register_cache): Adjust prototype.
9584 (registers_to_string, registers_from_string): Ditto.
9585 (supply_register, supply_register_by_name, collect_register)
9586 (collect_register_as_string, collect_register_by_name): Ditto.
9587 * regcache.c (struct inferior_regcache_data): Delete.
9588 (get_regcache): Rename to ...
9589 (get_thread_regcache): ... this. Adjust. Switch inferior before
9590 fetching registers.
9591 (regcache_invalidate_one): Adjust.
9592 (regcache_invalidate): Fix prototype.
9593 (new_register_cache): Return the new register cache.
9594 (free_register_cache): Change prototype.
9595 (realloc_register_cache): Adjust.
9596 (registers_to_string): Change prototype to take a regcache. Adjust.
9597 (registers_from_string): Ditto.
9598 (register_data): Ditto.
9599 (supply_register): Ditto.
9600 (supply_register_by_name): Ditto.
9601 (collect_register): Ditto.
9602 (collect_register_as_string): Ditto.
9603 (collect_register_by_name): Ditto.
9604 * server.c (process_serial_event): Adjust.
9605 * linux-low.h (regset_fill_func, regset_store_func): Change
9606 prototype.
9607 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9608 Change prototype.
9609 * linux-low.c (get_stop_pc): Adjust.
9610 (check_removed_breakpoint): Adjust.
9611 (linux_wait_for_event): Adjust.
9612 (linux_resume_one_lwp): Adjust.
9613 (fetch_register): Add regcache parameter. Adjust.
9614 (usr_store_inferior_registers): Ditto.
9615 (regsets_fetch_inferior_registers): Ditto.
9616 (regsets_store_inferior_registers): Ditto.
9617 (linux_fetch_registers, linux_store_registers): Ditto.
9618 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9619 regcache. Adjust.
43aaf8b6
PA
9620 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9621 Ditto.
442ea881
PA
9622 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9623 prototype to take a regcache.
9624 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9625 * remote-utils.c (convert_ascii_to_int, outreg)
9626 (prepare_resume_reply): Change prototype to take a regcache.
9627 Adjust.
9628 * target.h (struct target_ops) <fetch_registers, store_registers>:
9629 Change prototype to take a regcache.
9630 (fetch_inferior_registers, store_inferior_registers): Change
9631 prototype to take a regcache. Adjust.
9632 * proc-service.c (ps_lgetregs): Adjust.
9633 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9634 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9635 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9636 take a regcache. Adjust.
9637 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9638 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9639 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9640 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9641 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9642 (cris_cannot_fetch_register):
9643 (cris_breakpoint_at): Change prototype to take a regcache.
9644 Adjust.
9645 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9646 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9647 to take a regcache. Adjust.
9648 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9649 Adjust.
9650 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9651 take a regcache. Adjust.
9652 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9653 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9654 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9655 * linux-mips-low.c (mips_get_pc):
9656 (mips_set_pc): Change prototype to take a regcache. Adjust.
9657 (mips_reinsert_addr): Adjust.
9658 (mips_collect_register): Change prototype to take a regcache.
9659 Adjust.
9660 (mips_supply_register):
9661 (mips_collect_register_32bit, mips_supply_register_32bit)
9662 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9663 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9664 * linux-ppc-low.c (ppc_supply_ptrace_register)
9665 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9666 (parse_spufs_run): Adjust.
9667 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9668 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9669 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9670 take a regcache. Adjust.
9671 * linux-s390-low.c (s390_collect_ptrace_register)
9672 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9673 (s390_set_pc): Change prototype to take a regcache. Adjust.
9674 (s390_arch_setup): Adjust.
9675 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9676 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9677 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9678 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9679 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9680 regcache. Adjust.
9681 (sparc_breakpoint_at): Adjust.
9682 * linux-xtensa-low.c (xtensa_fill_gregset):
9683 (xtensa_store_gregset):
9684 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9685 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9686 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9687 prototype to take a regcache. Adjust.
9688 * win32-arm-low.c (arm_fetch_inferior_register)
9689 (arm_store_inferior_register): Change prototype to take a
9690 regcache. Adjust.
9691 * win32-i386-low.c (i386_fetch_inferior_register)
9692 (i386_store_inferior_register): Change prototype to take a
9693 regcache. Adjust.
9694 * win32-low.c (child_fetch_inferior_registers)
9695 (child_store_inferior_registers): Change prototype to take a
9696 regcache. Adjust.
9697 (win32_wait): Adjust.
9698 (win32_fetch_inferior_registers): Change prototype to take a
9699 regcache. Adjust.
9700 (win32_store_inferior_registers): Adjust.
9701 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9702 store_inferior_register>: Change prototype to take a regcache.
9703
60c3d7b0
DE
97042010-01-20 Doug Evans <dje@google.com>
9705
9706 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9707 #ifdef.
9708 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9709 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9710
dc146f7c
VP
97112010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9712
9713 * linux-low.c (linux_core_of_thread): New.
9714 (compare_ints, show_process, list_threads): New.
9715 (linux_qxfer_osdata): Report threads and cores.
9716 (linux_target_op): Register linux_core_of_thread.
9717 * remote-utils.c (prepare_resume_reply): Report the core.
9718 (buffer_xml_printf): Support %d specifier.
9719 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9720 New.
9721 (handle_query): Handle qXfer:threads. Announce availability
9722 thereof.
9723 * target.h (struct target_ops): New field core_of_thread.
9724
7803799a
UW
97252010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9726
9727 * Makefile.in (clean): Remove new generated files.
9728 (reg-s390.o, reg-s390.c): Remove rules.
9729 (reg-s390x.o, reg-s390x.c): Likewise.
9730 (s390-linux32.o, s390-linux32.c): Add rules.
9731 (s390-linux64.o, s390-linux64.c): Likewise.
9732 (s390x-linux64.o, s390x-linux64.c): Likewise.
9733 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9734 * linux-s390-low.c: Include <elf.h>.
9735 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9736 (init_registers_s390): Remove prototype.
9737 (init_registers_s390x): Likewise.
9738 (init_registers_s390_linux32): Add prototype.
9739 (init_registers_s390_linux64): Likewise.
9740 (init_registers_s390x_linux64): Likewise.
9741 (s390_num_regs_3264): New define.
9742 (s390_regmap_3264): New global variable.
9743 (s390_cannot_fetch_register): Remove obsolete check.
9744 (s390_cannot_store_register): Likewise.
9745 (s390_collect_ptrace_register): Handle upper/lower register halves.
9746 (s390_supply_ptrace_register): Likewise.
9747 (s390_fill_gregset): Update to register number changes.
9748 (s390_get_hwcap): New routine.
9749 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9750 Install appropriate regmap and register set.
9751
6e7ffa39
JB
97522010-01-01 Joel Brobecker <brobecker@adacore.com>
9753
9754 * server.c (gdbserver_version): Update copyright year to 2010.
9755 * gdbreplay.c (gdbreplay_version): Likewise.
9756
957f3f49
DE
97572009-12-28 Doug Evans <dje@google.com>
9758
9759 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9760 elf/external.h. Include <elf.h> instead but only if necessary.
9761
ca5c370d
PA
97622009-12-28 Pedro Alves <pedro@codesourcery.com>
9763
9764 * linux-low.c (linux_remove_process): Remove `detaching'
9765 parameter. Don't release/detach from thread_db here.
9766 (linux_kill): Release/detach from thread_db here, ...
9767 (linux_detach): ... and here, before actually detaching.
9768 (linux_wait_1): ... and here, when a process exits.
9769 * thread-db.c (any_thread_of): New.
9770 (thread_db_free): Switch the current inferior to a thread of the
9771 passed in process.
9772
4ee62156
DE
97732009-12-21 Doug Evans <dje@google.com>
9774
d90e6a88
DE
9775 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9776
c5f62d5f
DE
9777 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9778 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9779 warning ifndef __NR_tkill. Move setting of errno there too.
9780 Delete unnecessary resetting of errno after syscall.
9781 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9782
10e86dd7
DE
9783 * configure.ac: Check for dladdr.
9784 * config.in: Regenerate.
9785 * configure: Regenerate.
9786 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9787 (try_thread_db_load): Update.
9788
4ee62156
DE
9789 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9790
00f515da
DE
97912009-12-18 Doug Evans <dje@google.com>
9792
e9464885
DE
9793 * event-loop.c: Include unistd.h if it exists.
9794
07d4f67e
DE
9795 * linux-low.c (my_waitpid): Move definition away from being in
9796 between linux_tracefork_child/linux_test_for_tracefork.
9797
00f515da
DE
9798 * gdb_proc_service.h (psaddr_t): Fix type.
9799 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9800 signature to match glibc.
9801
1de1badb
DE
98022009-12-16 Doug Evans <dje@google.com>
9803
9804 * linux-low.c (linux_read_memory): Fix argument to read.
9805
aeeb81d1
PA
98062009-11-26 Pedro Alves <pedro@codesourcery.com>
9807
9808 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9809 events, don't leave current_inferior pointing at null.
9810
10357975
PA
98112009-11-26 Pedro Alves <pedro@codesourcery.com>
9812
9813 * win32-low.c (LOG): Delete.
9814 (OUTMSG): Output to stderr.
9815 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9816 on compile time LOG macro.
9817 (win32_wait): Fix debug output.
9818
cf6e3471
PA
98192009-11-26 Pedro Alves <pedro@codesourcery.com>
9820
9821 * win32-low.c (win32_add_one_solib): If the dll name is
9822 "ntdll.dll", prepend the system directory to the dll path.
9823
0c85e18e
MK
98242009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9825
9826 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9827
9ac544ce 98282009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9829 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9830
9831 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9832 * configure.ac: Check for __mcoldfire__ and set
9833 gdb_cv_m68k_is_coldfire.
9834 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9835 reg-cf.o and reg-m68k.o.
9836 * configure: Regenerated.
9837
fd7dd3e6
PA
98382009-11-16 Pedro Alves <pedro@codesourcery.com>
9839
9840 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9841 Pass it to thread_db_free.
9842 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9843 proper `detaching' argument to linux_remove_process.
9844 * linux-low.h (thread_db_free): Add `detaching' parameter.
9845 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9846 to thread_db_free.
9847 (thread_db_free): Add `detaching' parameter. Only
9848 call td_ta_clear_event if detaching from process.
9849
75aa492e
MK
98502009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9851
9852 * thread-db.c (thread_db_free): Fix typo.
9853
21e1bee4
PP
98542009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9855
9856 PR gdb/10838
9857 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9858
8838b45e
NS
98592009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9860
9861 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9862 with an i686 compiler.
9863 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9864 needed.
9865 * configure: Rebuilt.
9866
8a35fb51
SL
98672009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9868
9869 PR gdb/10783
9870
9871 * server.c (handle_search_memory_1): Correct read_addr initialization
9872 in loop for searching subsequent chunks.
9873
96f15937
PP
98742009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9875
9876 * configure.ac: New --with-libthread-db option.
9877 * thread-db.c: Allow direct dependence on libthread_db.
9878 (thread_db_free): Adjust.
9879 * config.in: Regenerate.
9880 * configure: Likewise.
889bf7c5 9881
5f7d1694
PP
98822009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9883
9884 PR gdb/10757
9885 * thread-db.c (attach_thread): New function.
9886 (maybe_attach_thread): Return success/failure.
9887 (find_new_threads_callback): Adjust.
889bf7c5
PA
9888 (thread_db_find_new_threads): Loop until no new threads.
9889
88e3b899
PA
98902009-10-13 Pedro Alves <pedro@codesourcery.com>
9891
9892 * proc-service.c (ps_lgetregs): Formatting.
9893
cdbfd419
PP
98942009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9895
9896 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9897 * configure.ac: Adjust.
9898 * linux-low.h (struct process_info_private): Move members to struct
9899 thread_db.
9900 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9901 * linux-low.c (linux_remove_process): Adjust.
9902 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9903 * server.c (handle_query): Move code ...
9904 (handle_monitor_command): ... here. New function.
9905 * target.h (struct target_ops): New member.
9906 * thread-db.c (struct thread_db): New.
9907 (libthread_db_search_path): New variable.
9908 (thread_db_create_event, thread_db_enable_reporting)
9909 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9910 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9911 (try_thread_db_load_1, dladdr_to_soname): New functions.
9912 (try_thread_db_load, thread_db_load_search): New functions.
9913 (thread_db_init): Search for libthread_db.
9914 (thread_db_free): New function.
9915 (thread_db_handle_monitor_command): Likewise.
9916 * config.in: Regenerate.
9917 * configure: Regenerate.
889bf7c5 9918
4168d2d6
UW
99192009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9920
9921 * spu-low.c (spu_kill): Wait for inferior to terminate.
9922 Call clear_inferiors.
9923 (spu_detach): Call clear_inferiors.
9924
81ecdfbb
RW
99252009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9926
9927 * aclocal.m4: Regenerate.
9928 * config.in: Likewise.
9929 * configure: Likewise.
9930
0b9ff2c0
UW
99312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9932
9933 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9934 (parse_spufs_run): New function.
9935 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9936 (ppc_breakpoint_at): Handle SPU breakpoints.
9937
efcbbd14
UW
99382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9939
9940 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9941 (SPUFS_MAGIC): Define.
9942 (spu_enumerate_spu_ids): New function.
9943 (linux_qxfer_spu): New function.
9944 (linux_target_ops): Install linux_qxfer_spu.
9945
f4d9bade
UW
99462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9947
9948 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9949 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9950 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9951 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9952 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9953 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9954 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9955 (init_registers_powerpc_cell32l): Add prototype.
9956 (init_registers_powerpc_cell64l): Likewise.
9957 (ppc_arch_setup): Detect Cell/B.E. architecture.
9958
96e946ca
RW
99592009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9960
9961 * Makefile.in (datarootdir): New variable.
9962
58d6951d
DJ
99632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9964
9965 * linux-low.c (linux_write_memory): Update debugging output.
9966 * Makefile.in (clean): Add new descriptions.
9967 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9968 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9969 * configure.srv: Add new files for arm*-*-linux*.
9970 * linux-arm-low.c: Add new declarations.
9971 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9972 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9973 (HWCAP_VFPv3D16): New.
9974 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9975 instead of __IWMMXT__.
9976 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9977 (arm_arch_setup): New.
9978 (target_regsets): Remove #ifdef. Add VFP regset.
9979 (the_low_target): Use arm_arch_setup.
9980
12b42a12
DJ
99812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9982
9983 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9984 the main thread again.
9985
ac8c974e
AR
99862009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9987
9988 Adding Neutrino gdbserver.
9989 * configure: Regenerated.
9990 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9991 * configure.srv (i[34567]86-*-nto*): New target.
9992 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9993 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9994 (nto_comctrl) [__QNX__]: New function.
9995 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9996
4424e0c3 99972009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9998
9999 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10000 srv_tgtobj.
10001
912cf4ba
PA
100022009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10003 Pedro Alves <pedro@codesourcery.com>
10004
10005 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10006 don't support CONTEXT_EXTENDED_REGISTERS.
10007 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10008 (the_low_target): Install them.
10009 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10010 failing with ERROR_PIPE_NOT_CONNECTED.
10011
aa5ca48f
DE
100122009-06-30 Doug Evans <dje@google.com>
10013 Pierre Muller <muller@ics.u-strasbg.fr>
10014
10015 Add h/w watchpoint support to x86-linux, win32-i386.
10016 * Makefile.in (SFILES): Add i386-low.c
10017 (i386_low_h): Define.
10018 (i386-low.o): Add dependencies.
10019 (linux-x86-low.o): Add i386-low.h dependency.
10020 (win32-i386-low.o): Ditto.
10021 * i386-low.c: New file.
10022 * i386-low.h: New file.
10023 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10024 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10025 * linux-low.c (linux_add_process): Initialize arch_private.
10026 (linux_remove_process): Free arch_private.
10027 (add_lwp): Initialize arch_private.
10028 (delete_lwp): Free arch_private.
10029 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10030 provided.
10031 * linux-low.h (process_info_private): New member arch_private.
10032 (lwp_info): New member arch_private.
10033 (linux_target_ops): New members new_process, new_thread,
10034 prepare_to_resume.
10035 (ptid_of): New macro.
10036 * linux-x86-low.c: Include stddef.h, i386-low.h.
10037 (arch_process_info): New struct.
10038 (arch_lwp_info): New struct.
10039 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10040 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10041 (i386_dr_low_get_status): New function.
10042 (x86_insert_point, x86_remove_point): New functions.
10043 (x86_stopped_by_watchpoint): New function.
10044 (x86_stopped_data_address): New function.
10045 (x86_linux_new_process, x86_linux_new_thread): New functions.
10046 (x86_linux_prepare_to_resume): New function.
10047 (the_low_target): Add entries for insert_point, remove_point,
10048 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10049 prepare_to_resume.
10050 * server.c (debug_hw_points): New global.
10051 (monitor_show_help): Document set debug-hw-points.
10052 (handle_query): Process "set debug-hw-points".
10053 * server.h (debug_hw_points): Declare.
10054 (paddress): Declare.
10055 * utils.c (NUMCELLS, CELLSIZE): New macros.
10056 (get_sell, xsnprintf, paddress): New functions.
10057 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10058 remove_point, stopped_by_watchpoint, stopped_data_address.
10059 * win32-i386-low.c: Include i386-low.h.
10060 (debug_reg_state): Replaces dr.
10061 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10062 (i386_dr_low_get_status): New function.
10063 (i386_insert_point, i386_remove_point): New functions.
10064 (i386_stopped_by_watchpoint): New function.
10065 (i386_stopped_data_address): New function.
10066 (i386_initial_stuff): Update.
10067 (get_thread_context,set_thread_context,i386_thread_added): Update.
10068 (the_low_target): Add entries for insert_point,
10069 remove_point, stopped_by_watchpoint, stopped_data_address.
10070 * win32-low.c (win32_insert_watchpoint): New function.
10071 (win32_remove_watchpoint): New function.
10072 (win32_stopped_by_watchpoint): New function.
10073 (win32_stopped_data_address): New function.
10074 (win32_target_ops): Add entries for insert_watchpoint,
10075 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10076 * win32-low.h (win32_target_ops): New members insert_point,
10077 remove_point, stopped_by_watchpoint, stopped_data_address.
10078
d993e290
PA
100792009-06-25 Pedro Alves <pedro@codesourcery.com>
10080
10081 * server.c (process_serial_event): Re-return unsupported, not
10082 error, if the type isn't recognized. Re-allow supporting only
10083 insert or remove packets. Also call require_running for
10084 breakpoints. Add missing break statement to default case. Tidy.
10085 * target.h (struct target_ops): Rename insert_watchpoint to
10086 insert_point, and remove_watchpoint to remove_point.
10087
10088 * linux-low.h (struct linux_target_ops): Likewise.
10089 * linux-low.c (linux_insert_watchpoint): Rename to ...
10090 (linux_insert_point): ... this. Adjust.
10091 (linux_remove_watchpoint): Rename to ...
10092 (linux_remove_point): ... this. Adjust.
10093 (linux_target_ops): Adjust.
10094 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10095 (cris_insert_point): ... this.
10096 (cris_remove_watchpoint): Rename to ...
10097 (cris_remove_point): ... this.
10098 (the_low_target): Adjust.
10099
0f54c268
PM
101002009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10101
10102 * server.c (handle_v_kill): Pass signal_pid to
10103 kill_inferior if multi_process is zero.
10104
c6314022
AR
101052009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10106
10107 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10108 * target.h (target_ops): Comment for *_watchpoint to make it clear
10109 the functions can get types '0' and '1'.
10110
4463ce24
AR
101112009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10112
10113 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10114 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10115 * regcache.c (get_regcache): Likewise.
10116 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10117 * win32-low.c (child_fetch_inferior_registers): Remove check for
10118 regno 0.
10119
cf8fd78b
PA
101202009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10121 Pedro Alves <pedro@codesourcery.com>
10122
10123 * target.h (struct target_ops) <supports_multi_process>: New
10124 callback.
10125 (target_supports_multi_process): New.
10126 * server.c (handle_query): Even if GDB reports support, only
10127 enable multi-process if the target also supports it. Report
10128 multi-process support only if the target backend supports it.
10129 * linux-low.c (linux_supports_multi_process): New function.
10130 (linux_target_ops): Install it as target_supports_multi_process
10131 callback.
10132
47c0c975
DE
101332009-05-24 Doug Evans <dje@google.com>
10134
e09875d4
DE
10135 Global renaming of find_thread_pid to find_thread_ptid.
10136 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10137 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10138 All callers updated.
10139
e27d73f6
DE
10140 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10141 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10142 directly.
10143
47c0c975
DE
10144 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10145 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10146 (linux_resume_one_lwp): Ditto.
10147
2acc282a
DE
101482009-05-23 Doug Evans <dje@google.com>
10149
10150 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10151 from struct inferior_list_entry * to struct lwp_info *.
10152 All callers updated.
10153
9f1036c1
DE
101542009-05-13 Doug Evans <dje@google.com>
10155
10156 * linux-x86-low.c: Don't include assert.h.
10157 (x86_siginfo_fixup): Use fatal, not assert.
10158 (x86_arch_setup): Fix comment.
10159
d0722149
DE
101602009-05-12 Doug Evans <dje@google.com>
10161
10162 Biarch support for i386/amd64 gdbserver.
10163 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10164 Add linux-x86-low.c.
10165 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10166 (linux-x86-low.o): Add.
10167 * linux-x86-64-low.c: Delete.
10168 * linux-i386-low.c: Delete.
10169 * linux-x86-low.c: New file.
10170 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10171 linux-x86-low.o.
10172 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10173 linux-x86-low.o.
10174 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10175 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10176 (linux_child_pid_to_exec_file): New function.
10177 (elf_64_header_p, elf_64_file_p): New functions.
10178 (siginfo_fixup): New function.
10179 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10180 give target a chance to convert layout.
10181 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10182 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10183
fdeb2a12
DE
101842009-05-07 Doug Evans <dje@google.com>
10185
10186 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10187 (regsets_store_inferior_registers): Ditto.
10188
a6dbe5df
PA
101892009-05-06 Pedro Alves <pedro@codesourcery.com>
10190
10191 PR server/10048
10192
10193 * linux-low.c (must_set_ptrace_flags): Delete.
10194 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10195 of the global.
10196 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10197 `lwp->must_set_ptrace_flags' instead.
ba42693b 10198 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10199 (linux_wait_1): ... not here.
10200
5091eb23
DE
102012009-04-30 Doug Evans <dje@google.com>
10202
9f767825
DE
10203 * inferiors.c (started_inferior_callback): New function.
10204 (attached_inferior_callback): New function.
10205 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10206 * server.c (print_started_pid, print_attached_pid): New functions.
10207 (detach_or_kill_for_exit): New function.
10208 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10209 * server.h (have_started_inferiors_p): Declare.
10210 (have_attached_inferiors_p): Declare.
10211
5091eb23
DE
10212 * inferiors.c (remove_process): Fix memory leak, free process.
10213 * linux-low.c (linux_remove_process): New function.
10214 (linux_kill): Call it instead of remove_process.
10215 (linux_detach, linux_wait_1): Ditto.
10216
155c8968
PA
102172009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10218
10219 * configure.srv: Add x86 Windows CE target.
10220
7fe519cb
UW
102212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10222
10223 * inferiors.c (get_thread_process): Make global.
10224 * server.h (get_thread_process): Add prototype.
10225 * thread-db.c (find_one_thread): Use get_thread_process
10226 instead of current_process.
10227 (thread_db_get_tls_address): Do not crash if called when
10228 thread layer is not yet initialized.
10229
5472f405
UW
102302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10231
10232 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10233 * spu-low.c (current_tid): Rename to ...
10234 (current_ptid): ... this.
10235 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10236 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10237 ptid_get_lwp (current_ptid) instead of current_tid.
10238 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10239 instead of current_tid. Use find_process_pid to verify pid
10240 argument is valid. Pass proper argument to remove_process.
10241 (spu_thread_alive): Compare current_ptid instead of current_tid.
10242 (spu_resume): Likewise.
10243
55ac2b99
PA
102442009-04-02 Pedro Alves <pedro@codesourcery.com>
10245
10246 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10247 variable.
10248
95954743
PA
102492009-04-01 Pedro Alves <pedro@codesourcery.com>
10250
10251 Implement the multiprocess extensions, and add linux multiprocess
10252 support.
10253
10254 * server.h (ULONGEST): Declare.
10255 (struct ptid, ptid_t): New.
10256 (minus_one_ptid, null_ptid): Declare.
10257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10258 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10259 (struct inferior_list_entry): Change `id' type from unsigned from
10260 to ptid_t.
10261 (struct sym_cache, struct breakpoint, struct
10262 process_info_private): Forward declare.
10263 (struct process_info): Declare.
10264 (current_process): Declare.
10265 (all_processes): Declare.
10266 (initialize_inferiors): Declare.
10267 (add_thread): Adjust to use ptid_t.
10268 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10269 (add_process, remove_process, find_thread_pid): Declare.
10270 (find_inferior_id): Adjust to use ptid_t.
10271 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10272 (multi_process): Declare.
10273 (push_event): Adjust to use ptid_t.
10274 (read_ptid, write_ptid): Declare.
10275 (prepare_resume_reply): Adjust to use ptid_t.
10276 (clear_symbol_cache): Declare.
10277 * inferiors.c (all_processes): New.
10278 (null_ptid, minus_one_ptid): New.
10279 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10280 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10281 (add_thread): Change unsigned long to ptid. Remove gdb_id
10282 parameter. Adjust.
10283 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10284 (gdb_id_to_thread): Rename to ...
10285 (find_thread_pid): ... this. Change unsigned long to ptid.
10286 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10287 (loaded_dll, pull_pid_from_list): Adjust.
10288 (add_process, remove_process, find_process_pid)
10289 (get_thread_process, current_process, initialize_inferiors): New.
10290 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10291 (struct target_waitstatus) <related_pid>: Ditto.
10292 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10293 return type to int.
10294 (struct target_ops) <join>: Add `pid' argument.
10295 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10296 (struct target_ops) <wait>: Add `ptid' field. Change return type
10297 to ptid.
10298 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10299 (mywait): Add `ptid' argument. Change return type to ptid_t.
10300 (target_pid_to_str): Declare.
10301 * target.c (set_desired_inferior): Adjust to use ptids.
10302 (mywait): Add new `ptid' argument. Adjust.
10303 (target_pid_to_str): New.
10304 * mem-break.h (free_all_breakpoints): Declare.
10305 * mem-break.c (breakpoints): Delelete.
10306 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10307 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10308 to use per-process breakpoint list.
10309 (free_all_breakpoints): New.
10310 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10311 (symbol_cache, all_symbols_looked_up): Delete.
10312 (hexchars): New.
10313 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10314 read_ptid): New.
10315 (prepare_resume_reply): Change ptid argument's type from unsigned
10316 long to ptid_t. Adjust. Implement W;process and X;process.
10317 (free_sym_cache, clear_symbol_cache): New.
10318 (look_up_one_symbol): Adjust to per-process symbol cache. *
10319 * server.c (cont_thread, general_thread, step_thread): Change type
10320 to ptid_t.
10321 (attached): Delete.
10322 (multi_process): New.
10323 (last_ptid): Change type to ptid_t.
10324 (struct vstop_notif) <ptid>: Change type to ptid_t.
10325 (queue_stop_reply, push_event): Change `ptid' argument's type to
10326 ptid_t.
10327 (discard_queued_stop_replies): Add `pid' argument.
10328 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10329 changes. Don't reference the `attached' global.
10330 (attach_inferior): Adjust to mywait interface changes.
10331 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10332 features. Handle and report "multiprocess+". Handle
10333 "qAttached:PID".
10334 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10335 changes.
10336 (handle_v_kill): New.
10337 (handle_v_stopped): Adjust to use target_pid_to_str.
10338 (handle_v_requests): Allow multiple attaches and runs when
10339 multiprocess extensions are in effect. Handle "vKill".
10340 (myresume): Adjust to use ptids.
10341 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10342 (handle_status): Adjust to discard_queued_stop_replies interface
10343 change.
10344 (first_thread_of, kill_inferior_callback)
10345 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10346 (main): Call initialize_inferiors. Adjust to use ptids, killing
10347 and detaching from all inferiors. Handle multiprocess packet
10348 variants.
10349 * linux-low.h: Include gdb_proc_service.h.
10350 (struct process_info_private): New.
10351 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10352 <lwpid_of>: Use ptid_get_lwp.
10353 (get_lwp_thread): Adjust.
10354 (struct lwp_info): Add `dead' member.
10355 (find_lwp_pid): Declare.
10356 * linux-low.c (thread_db_active): Delete.
10357 (new_inferior): Adjust comment.
10358 (inferior_pid): Delete.
10359 (linux_add_process): New.
10360 (handle_extended_wait): Adjust.
10361 (add_lwp): Change unsigned long to ptid.
10362 (linux_create_inferior): Add process to processes table. Adjust
10363 to use ptids. Don't set new_inferior here.
10364 (linux_attach_lwp): Rename to ...
10365 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10366 it. Adjust to use ptids.
10367 (linux_attach_lwp): New.
10368 (linux_attach): Add process to processes table. Don't set
10369 new_inferior here.
10370 (struct counter): New.
10371 (second_thread_of_pid_p, last_thread_of_process_p): New.
10372 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10373 multiple processes.
10374 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10375 processes. Remove process from process table.
10376 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10377 to multiple processes.
10378 (any_thread_of): New.
10379 (linux_detach): Add `pid' argument, and handle it. Remove process
10380 from processes table.
10381 (linux_join): Add `pid' argument. Handle it.
10382 (linux_thread_alive): Change unsighed long argument to ptid_t.
10383 Consider dead lwps as not being alive.
10384 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10385 threads we're not interested in.
10386 (same_lwp, find_lwp_pid): New.
10387 (linux_wait_for_lwp): Change `pid' argument's type from int to
10388 ptid_t. Adjust.
10389 (linux_wait_for_event): Rename to ...
10390 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10391 from int to ptid_t. Adjust.
10392 (linux_wait_for_event): New.
10393 (linux_wait_1): Add `ptid' argument. Change return type to
10394 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10395 that exit from the process table.
10396 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10397 Adjust.
10398 (mark_lwp_dead): New.
10399 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10400 stopping all threads, mark its main lwp as dead.
10401 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10402 ptids.
10403 (fetch_register, usr_store_inferior_registers)
10404 (regsets_fetch_inferior_registers)
10405 (regsets_store_inferior_registers, linux_read_memory)
10406 (linux_write_memory): Inline `inferior_pid'.
10407 (linux_look_up_symbols): Adjust to use per-process
10408 `thread_db_active'.
10409 (linux_request_interrupt): Adjust to use ptids.
10410 (linux_read_auxv): Inline `inferior_pid'.
10411 (initialize_low): Don't reference thread_db_active.
10412 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10413 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10414 (ps_getpid): Return the pid of the current inferior.
10415 * thread-db.c (proc_handle, thread_agent): Delete.
10416 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10417 per-process data.
10418 (find_one_thread): Change argument type to ptid_t. Adjust to
10419 per-process data.
10420 (maybe_attach_thread): Adjust to per-process data and ptids.
10421 (thread_db_find_new_threads): Ditto.
10422 (thread_db_init): Ditto.
10423 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10424 processes table. Adjust to use ptids.
10425 (spu_kill, spu_detach): Adjust interface. Remove process from
10426 processes table.
10427 (spu_join, spu_thread_alive): Adjust interface.
10428 (spu_wait): Adjust interface. Remove process from processes
10429 table. Adjust to use ptids.
10430 * win32-low.c (current_inferior_tid): Delete.
10431 (current_inferior_ptid): New.
10432 (debug_event_ptid): New.
10433 (thread_rec): Take a ptid. Adjust.
10434 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10435 (child_delete_thread): Ditto.
10436 (do_initial_child_stuff): Add `attached' argument. Add process to
10437 processes table.
10438 (child_fetch_inferior_registers, child_store_inferior_registers):
10439 Adjust.
10440 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10441 (win32_attach): Pass 1 to do_initial_child_stuff.
10442 (win32_kill): Adjust interface. Remove process from processes
10443 table.
10444 (win32_detach): Ditto.
10445 (win32_join): Adjust interface.
10446 (win32_thread_alive): Take a ptid.
10447 (win32_resume): Adjust to use ptids.
10448 (get_child_debug_event): Ditto.
10449 (win32_wait): Adjust interface. Remove exiting process from
10450 processes table.
10451
bd99dc85
PA
104522009-04-01 Pedro Alves <pedro@codesourcery.com>
10453
10454 Non-stop mode support.
10455
10456 * server.h (non_stop): Declare.
10457 (gdb_client_data, handler_func): Declare.
10458 (delete_file_handler, add_file_handler, start_event_loop):
10459 Declare.
10460 (handle_serial_event, handle_target_event, push_event)
10461 (putpkt_notif): Declare.
10462 * target.h (enum resume_kind): New.
10463 (struct thread_resume): Replace `step' field by `kind' field.
10464 (TARGET_WNOHANG): Define.
10465 (struct target_ops) <wait>: Add `options' argument.
10466 <supports_non_stop, async, start_non_stop>: New fields.
10467 (target_supports_non_stop, target_async): New.
10468 (start_non_stop): Declare.
10469 (mywait): Add `options' argument.
10470 * target.c (mywait): Add `options' argument. Print child exit
10471 notifications here.
10472 (start_non_stop): New.
10473 * server.c (non_stop, own_buf, mem_buf): New globals.
10474 (struct vstop_notif): New.
10475 (notif_queue): New global.
10476 (queue_stop_reply, push_event, discard_queued_stop_replies)
10477 (send_next_stop_reply): New.
10478 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10479 interface changes.
10480 (attach_inferior): In non-stop mode, don't wait for the target
10481 here.
10482 (handle_general_set): Handle QNonStop.
10483 (handle_query): When handling qC, return the current general
10484 thread, instead of the first thread of the list.
10485 (handle_query): If the backend supports non-stop mode, include
10486 QNonStop+ in the qSupported query response.
10487 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10488 and non-stop mode.
10489 (handle_v_attach, handle_v_run): Handle non-stop mode.
10490 (handle_v_stopped): New.
10491 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10492 (myresume): Adjust to use resume_kind. Handle non-stop.
10493 (queue_stop_reply_callback): New.
10494 (handle_status): Handle non-stop mode.
10495 (main): Clear non_stop flag on reconnection. Use the event-loop.
10496 Refactor serial protocol handling from here ...
10497 (process_serial_event): ... to this new function. When GDB
10498 selects any thread, select one here. In non-stop mode, wait until
10499 GDB acks all pending events before exiting.
10500 (handle_serial_event, handle_target_event): New.
10501 * remote-utils.c (remote_open): Install remote_desc in the event
10502 loop.
10503 (remote_close): Remove remote_desc from the event loop.
10504 (putpkt_binary): Rename to...
10505 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10506 (putpkt_binary): New as wrapper around putpkt_binary_1.
10507 (putpkt_notif): New.
10508 (prepare_resume_reply): In non-stop mode, don't change the
10509 general_thread.
10510 * event-loop.c: New.
10511 * Makefile.in (OBJ): Add event-loop.o.
10512 (event-loop.o): New rule.
10513
10514 * linux-low.h (pid_of): Moved here.
10515 (lwpid_of): New.
10516 (get_lwp_thread): Use lwpid_of.
10517 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10518 * linux-low.c (pid_of): Delete.
10519 (inferior_pid): Use lwpid_of.
10520 (linux_event_pipe): New.
10521 (target_is_async_p): New.
10522 (delete_lwp): New.
10523 (handle_extended_wait): Use lwpid_of.
10524 (add_lwp): Don't set lwpid field.
10525 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10526 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10527 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10528 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10529 first. Adjust to linux_wait_for_event interface changes. Use
10530 lwpid_of.
10531 (linux_detach): Don't delete the main lwp here.
10532 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10533 (status_pending_p): Don't consider explicitly suspended lwps.
10534 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10535 pointer. Add OPTIONS argument. Change return type to int. Use
10536 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10537 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10538 pointer. Add status pointer argument. Return a pid instead of a
10539 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10540 changes. In non-stop mode, don't switch to a random thread.
10541 (linux_wait): Rename to...
10542 (linux_wait_1): ... this. Add target_options argument, and handle
10543 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10544 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10545 clean exit and signal exit code. Don't stop all threads in
10546 non-stop mode. In all-stop mode, only stop all threads when
10547 reporting a stop to GDB. Handle explicit thread stop requests.
10548 (async_file_flush, async_file_mark): New.
10549 (linux_wait): New.
10550 (send_sigstop): Use lwpid_of.
10551 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10552 interface changes. In non-stop mode, don't switch to a random
10553 thread.
10554 (linux_resume_one_lwp): Use lwpid_of.
10555 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10556 (linux_resume_one_thread): ... this. Handle resume_stop. In
10557 non-stop mode, don't look for pending flag in all threads.
10558 (resume_status_pending_p): Don't consider explicitly suspended
10559 threads.
10560 (my_waitpid): Reimplement. Emulate __WALL.
10561 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10562 Use lwpid_of.
10563 (sigchld_handler, linux_supports_non_stop, linux_async)
10564 (linux_start_non_stop): New.
10565 (linux_target_ops): Register linux_supports_non_stop, linux_async
10566 and linux_start_non_stop.
10567 (initialize_low): Install SIGCHLD handler.
10568 * thread-db.c (thread_db_create_event, find_one_thread)
10569 (thread_db_get_tls_address): Use lwpid_of.
10570 * win32-low.c (win32_detach): Adjust to use resume_kind.
10571 (win32_wait): Add `options' argument.
10572 * spu-low.c (spu_resume): Adjust to use resume_kind.
10573 (spu_wait): Add `options' argument.
10574
5b1c542e
PA
105752009-04-01 Pedro Alves <pedro@codesourcery.com>
10576
10577 Decouple target code from remote protocol.
10578
10579 * target.h (enum target_waitkind): New.
10580 (struct target_waitstatus): New.
10581 (struct target_ops) <wait>: Return an unsigned long. Take a
10582 target_waitstatus pointer instead of a char pointer.
10583 (mywait): Likewise.
10584 * target.c (mywait): Change prototype to return an unsigned long.
10585 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10586 * server.h (thread_from_wait, old_thread_from_wait): Delete
10587 declarations.
10588 (prepare_resume_reply): Change prototype to take a
10589 target_waitstatus.
10590 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10591 (last_status, last_ptid): New.
10592 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10593 pid instead of a signal.
10594 (attach_inferior): Remove "status" and "signal" parameters.
10595 Adjust.
10596 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10597 not as an address.
10598 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10599 (handle_v_requests, myresume): Remove "status" and "signal"
10600 parameters. Adjust.
10601 (handle_status): New.
10602 (main): Delete local `status'. Adjust.
10603 * remote-utils.c: Include target.h.
10604 (prepare_resume_reply): Change prototype to take a
10605 target_waitstatus. Adjust.
10606
10607 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10608 interface.
10609 * spu-low.c (spu_wait): Adjust.
10610 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10611 Delete.
10612 (win32_wait): Adjust.
10613
2bd7c093
PA
106142009-04-01 Pedro Alves <pedro@codesourcery.com>
10615
10616 * target.h (struct thread_resume): Delete leave_stopped member.
10617 (struct target_ops): Add a `n' argument to the `resume' callback.
10618 * server.c (start_inferior): Adjust.
10619 (handle_v_cont, myresume): Adjust.
10620 * linux-low.c (check_removed_breakpoint): Adjust to resume
10621 interface change, and to removed leave_stopped field.
10622 (resume_ptr): Delete.
10623 (struct thread_resume_array): New.
10624 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10625 resume interface change.
10626 (linux_continue_one_thread, linux_queue_one_thread)
10627 (resume_status_pending_p): Check if the resume field is NULL
10628 instead of checking the leave_stopped member.
10629 (linux_resume): Adjust to the target resume interface change.
10630 * spu-low.c (spu_resume): Adjust to the target resume interface
10631 change.
10632 * win32-low.c (win32_detach, win32_resume): Ditto.
10633
c35fafde
PA
106342009-04-01 Pedro Alves <pedro@codesourcery.com>
10635
10636 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10637 flag.
10638 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10639 pending.
10640 (linux_continue_one_thread): Only preserve the stepping flag if
10641 there's a pending breakpoint.
10642
0a59d50b
PA
106432009-03-31 Pedro Alves <pedro@codesourcery.com>
10644
10645 * server.c (main): After the inferior having exited, call
10646 remote_close before exiting gdbserver.
10647
f04c6d38
TJB
106482009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10649
10650 Fix size of FPSCR in Power 7 processors.
10651 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10652 (PPC_FEATURE_HAS_DFP): New #define.
10653 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10654 size of the FPSCR.
10655
78e5cee6
PA
106562009-03-23 Pedro Alves <pedro@codesourcery.com>
10657
10658 * server.c (handle_query) Whitespace and formatting.
10659
1b3f6016
PA
106602009-03-22 Pedro Alves <pedro@codesourcery.com>
10661
10662 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10663 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10664 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10665 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10666 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10667 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10668 Makefile.in, configure.ac: Fix whitespace throughout.
10669 * configure: Regenerate.
10670
a07b2135
PA
106712009-03-22 Pedro Alves <pedro@codesourcery.com>
10672
10673 * inferiors.c (find_inferior): Make it safe for the callback
10674 function to delete the currently iterated inferior.
10675
67cc2626
PA
106762009-03-22 Pedro Alves <pedro@codesourcery.com>
10677
10678 * Makefile.in (linuw_low_h): Move higher.
10679 (thread-db.o): Depend on $(linux_low_h).
10680
54a0b537
PA
106812009-03-17 Pedro Alves <pedro@codesourcery.com>
10682
10683 Rename "process" to "lwp" throughout.
10684
10685 * linux-low.c (all_processes): Rename to...
10686 (all_lwps): ... this.
10687 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10688 (add_process): Rename to ...
10689 (add_lwp): ... this. Adjust.
10690 (linux_create_inferior): Adjust.
10691 (linux_attach_lwp): Adjust.
10692 (linux_attach): Adjust.
10693 (linux_kill_one_process): Rename to ...
10694 (linux_kill_one_lwp): ... this. Adjust.
10695 (linux_kill): Adjust.
10696 (linux_detach_one_process): Rename to ...
10697 (linux_detach_one_lwp): ... this. Adjust.
10698 (linux_detach): Adjust.
10699 (check_removed_breakpoint): Adjust.
10700 (status_pending_p): Adjust.
10701 (linux_wait_for_process): Rename to ...
10702 (linux_wait_for_lwp): ... this. Adjust.
10703 (linux_wait_for_event): Adjust.
10704 (send_sigstop): Adjust.
10705 (wait_for_sigstop): Adjust.
10706 (stop_all_processes): Rename to ...
10707 (stop_all_lwps): ... this.
10708 (linux_resume_one_process): Rename to ...
10709 (linux_resume_one_lwp): ... this. Adjust.
10710 (linux_set_resume_request, linux_continue_one_thread)
10711 (linux_queue_one_thread, resume_status_pending_p)
10712 (usr_store_inferior_registers, regsets_store_inferior_registers)
10713 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10714 Adjust.
10715 * linux-low.h (get_process): Rename to ...
10716 (get_lwp): ... this. Adjust.
10717 (get_thread_process): Rename to ...
10718 (get_thread_lwp): ... this. Adjust.
10719 (get_process_thread): Rename to ...
10720 (get_lwp_thread): ... this. Adjust.
10721 (struct process_info): Rename to ...
10722 (struct lwp_info): ... this.
10723 (all_processes): Rename to ...
10724 (all_lwps): ... this.
10725 * proc-service.c (ps_lgetregs): Adjust.
10726 * thread-db.c (thread_db_create_event, find_one_thread)
10727 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10728
0b16c5cf
PA
107292009-03-14 Pedro Alves <pedro@codesourcery.com>
10730
10731 * server.c (handle_query): Handle "qAttached".
10732
32de4b9d
NS
107332009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10734
10735 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10736 GPLv3, update license URL.
10737
2aecd87f
DE
107382009-03-01 Doug Evans <dje@google.com>
10739
93efd302 10740 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10741 (server_h): Add gdb_signals.h.
10742 (signals.o): Update.
10743 * server.h (target_signal_from_host,target_signal_to_host_p)
10744 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10745
86b1f9c5
PM
107462009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10747
10748 * remote-utils.c (getpkt): Also generate remote-debug
10749 information if noack_mode is set.
10750
4aa995e1
PA
107512009-02-06 Pedro Alves <pedro@codesourcery.com>
10752
10753 * server.c (handle_query): Report qXfer:siginfo:read and
10754 qXfer:siginfo:write as supported and handle them.
10755 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10756 * linux-low.c (linux_xfer_siginfo): New.
10757 (linux_target_ops): Set it.
10758
62709adf
PA
107592009-01-26 Pedro Alves <pedro@codesourcery.com>
10760
10761 * server.c (gdbserver_usage): Mention --remote-debug.
10762 (main): Accept '--remote-debug' switch.
10763
aef93bd7
DE
107642009-01-18 Doug Evans <dje@google.com>
10765
10766 * regcache.c (new_register_cache): No need to check result of xcalloc.
10767 * server.c (handle_search_memory): Back out calls to xmalloc,
10768 result is checked and error is returned to user upon failure.
10769 (handle_query): Ditto. Add more checks for result of malloc.
10770 (handle_v_cont): Check result of malloc, report error back to
10771 user upon failure.
10772 (handle_v_run): Ditto. Call freeargv.
10773 * server.h (freeargv): Declare.
10774 * utils.c (freeargv): New fn.
10775
54363045
DE
107762009-01-15 Doug Evans <dje@google.com>
10777
f626972c
DE
10778 * gdbreplay.c (perror_with_name): Make arg const char *.
10779 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10780 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10781 * utils.c (perror_with_name): Make arg const char *.
54363045 10782
18aae699
PA
107832009-01-14 Pedro Alves <pedro@codesourcery.com>
10784
10785 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10786 when handling a EXIT_PROCESS_DEBUG_EVENT.
10787
ff703abe
JB
107882009-01-06 Joel Brobecker <brobecker@adacore.com>
10789
10790 * gdbreplay.c (gdbreplay_version): Update copyright year.
10791 * server.c (gdbserver_version): Likewise.
10792
f21cc1a2 107932009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10794
10795 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10796 (handle_extended_wait): Improve comment.
0e21c1ec 10797
bca929d3
DE
107982008-12-13 Doug Evans <dje@google.com>
10799
10800 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10801 * server.h (ATTR_MALLOC): New macro.
10802 (xmalloc,xcalloc,xstrdup): Declare.
10803 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10804 * inferiors.c: Ditto.
10805 * linux-low.c: Ditto.
10806 * mem-break.c: Ditto.
10807 * regcache.c: Ditto.
10808 * remote-utils.c: Ditto.
10809 * server.c: Ditto.
10810 * target.c: Ditto.
10811 * win32-low.c: Ditto.
10812
97438e3f
DE
108132008-12-12 Doug Evans <dje@google.com>
10814
896c7fbb
DE
10815 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10816 in debugging printf.
10817
97438e3f
DE
10818 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10819
e3b886f8
DE
108202008-12-09 Doug Evans <dje@google.com>
10821
10822 * linux-low.h (struct process_info): Delete member tid, unused.
10823 * thread-db.c (find_one_thread): Update.
10824 (maybe_attach_thread): Update.
10825
07e059b5
VP
108262008-12-02 Pedro Alves <pedro@codesourcery.com>
10827
889bf7c5
PA
10828 * target.h (struct target_ops): Add qxfer_osdata member.
10829 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10830 and dirent.h.
10831 (linux_qxfer_osdata): New functions.
10832 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10833 callback.
10834 * server.c (handle_query): Handle "qXfer:osdata:read:".
10835 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10836 (buffer_xml_printf): New functions.
10837 * server.h (struct buffer): New.
10838 (buffer_grow_str, buffer_grow_str0): New macros.
10839 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10840 (buffer_xml_printf): Declare.
07e059b5 10841
4cab47ab
DE
108422008-11-24 Doug Evans <dje@google.com>
10843
10844 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10845
f142445f
DJ
108462008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10847
10848 * server.c (handle_v_run): Always use the supplied argument list.
10849
d0107bb6 108502008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10851
d0107bb6
BW
10852 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10853 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10854
2c4ad781
TJB
108552008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10856
10857 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10858 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10859 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10860 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10861 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10862 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10863 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10864 XML target descriptions.
10865 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10866 when inferior is running on an ISA 2.05 or later processor. Add
10867 special case to return offset for full 64-bit slot of FPSCR when
10868 in 32-bits.
10869
dfb64f85
DJ
108702008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10871
10872 * Makefile.in (SFILES, clean): Added sparc64 files.
10873 (reg-sparc64.o, reg-sparc64.c): New.
10874 * configure.srv (sparc*-*-linux*): New configuration.
10875 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10876 syscall arguments for SPARC.
10877 (regsets_store_inferior_registers): Likewise.
10878 * linux-sparc-low.c: New file.
10879
66b6e1dd
DE
108802008-10-21 Doug Evans <dje@google.com>
10881
10882 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10883 (READLINE_DIR,READLINE_DEP): Delete.
10884 (INTERNAL_CFLAGS): Update.
10885 (LINTFLAGS): Update.
10886
9b710a42
PA
108872008-10-10 Pedro Alves <pedro@codesourcery.com>
10888
10889 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10890 whole argv from the last run, not just argv[0].
10891
5822d809
PA
108922008-09-08 Pedro Alves <pedro@codesourcery.com>
10893
10894 * regcache.c (new_register_cache): Return NULL if the register
10895 cache size isn't known yet.
10896 (free_register_cache): Avoid dereferencing a NULL regcache.
10897
74aac56f
DJ
108982008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * configure.srv: Merge MIPS and MIPS64.
10901
400b20f5
MR
109022008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10903
10904 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10905
677c5bb1
LM
109062008-08-18 Luis Machado <luisgpm@br.ibm.com>
10907
10908 * Makefile.in: Add required vsx dependencies.
10909
10910 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10911 Declare init_registers_powerpc_vsx32l.
10912 Declare init_registers_powerpc_vsx64l.
10913 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10914 (ppc_arch_setup): Check for VSX in hwcap.
10915 (ppc_fill_vsxregset): New function.
10916 (ppc_store_vsxregset): New function.
10917 Add new VSX entry in regset_info target_regsets.
10918
10919 * configure.srv: Add new VSX dependencies.
10920
a6f3e723
SL
109212008-08-12 Pedro Alves <pedro@codesourcery.com>
10922
10923 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10924 (remote_open): Set or clear transport_is_reliable.
10925 (putpkt_binary): Don't expect acks in noack mode.
10926 (getpkt): Don't send ack/nac in noack mode.
10927 * server.c (handle_general_set): Handle QStartNoAckMode.
10928 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10929 qSupported.
10930 (main): Reset noack_mode on every connection.
10931 * server.h (noack_mode): Declare.
10932
a417dc56
RW
109332008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10934
10935 * Makefile.in (GDBREPLAY_OBS): New variable.
10936 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10937
3221518c
UW
109382008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10939 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10942 (usr_store_inferior_registers): Likewise.
10943 (regsets_store_inferior_registers): Likewise.
10944
ec56be1b
PA
109452008-07-31 Rolf Jansen <rj@surtec.com>
10946 Pedro Alves <pedro@codesourcery.com>
10947
10948 * configure.ac: Check for memmem declaration.
10949 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10950 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10951 (disable_packet_qfThreadInfo): Unconditionally compile.
10952 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10953 * configure, config.in: Regenerate.
10954
2fe5e3ff
DE
109552008-07-28 Doug Kwan <dougkwan@google.com>
10956
10957 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10958 (linux_write_memory): Remove declaration of errno.
10959
836acd6d
UW
109602008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10961
10962 * linux-low.c (handle_extended_wait): Do not use "status"
10963 variable uninitialized.
10964
aeba519e
PA
109652008-07-07 Pedro Alves <pedro@codesourcery.com>
10966
10967 * server.c (handle_v_attach): Inhibit reporting dll changes.
10968
db42f210
PA
109692008-06-27 Pedro Alves <pedro@codesourcery.com>
10970
10971 * remote-utils.c (prepare_resume_reply): If requested, don't
10972 output "thread:TID" in the T stop reply.
10973
10974 * server.c (disable_packet_vCont, disable_packet_Tthread)
10975 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10976 (handle_query): If requested, disable support for qC, qfThreadInfo
10977 and qsThreadInfo.
10978 (handle_v_requests): If requested, disable support for vCont.
10979 (gdbserver_show_disableable): New.
10980 (main): Handle --disable-packet and --disable-packet=LIST.
10981
10982 * server.h (disable_packet_vCont, disable_packet_Tthread)
10983 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10984
8e4c5421
CD
109852008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10986
10987 * server.c (gdbserver_usage): Mention --version.
10988
6e23a804
DJ
109892008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10990
10991 * Makefile.in (gdbreplay.o): New rule.
10992
90aa6a40
JM
109932008-06-06 Joseph Myers <joseph@codesourcery.com>
10994
10995 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10996 message, not gdbserver.
10997
c16158bc 109982008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10999 Nathan Sidwell <nathan@codesourcery.com>
11000 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11001
11002 * acinclude.m4: Include ../../config/acx.m4.
11003 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11004 * configure, config.in: Regenerate.
11005 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11006 * server.c (gdbserver_version): Print PKGVERSION.
11007 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11008 (main): Adjust gdbserver_usage calls.
11009 * gdbreplay.c (version, host_name): Add declarations.
11010 (gdbreplay_version, gdbreplay_usage): New.
11011 (main): Accept --version and --help options.
11012
aeb75bf5
DJ
110132008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11014
11015 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11016 (arm_breakpoint_at): Handle Thumb.
11017 (the_low_target): Add comment.
11018
76b233dd
UW
110192008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11020
11021 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11022
08388c79
DE
110232008-05-09 Doug Evans <dje@google.com>
11024
a3c83fae
DE
11025 * server.h (decode_search_memory_packet): Declare.
11026 * remote-utils.c (decode_search_memory_packet): New fn.
11027 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11028 (handle_search_memory): New fn.
11029 (handle_query): Process qSearch:memory packets.
11030
bb9c3d36
UW
110312008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11032
11033 * regcache.c (registers_length): Remove.
11034 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11035 full register packet.
11036 * regcache.h (registers_length): Remove prototype.
11037 * server.h (PBUFSIZ): Define to 16384.
11038
7284e1be
UW
110392008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11040
11041 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11042 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11043 powerpc-64l.o, and powerpc-altivec64l.o.
11044 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11045 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11046 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11047 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11048 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11049 to srv_xmlfiles.
11050
11051 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11052 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11053 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11054 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11055 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11056 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11057 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11058 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11059 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11060 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11061 (clean): Update.
11062
11063 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11064 (init_registers_powerpc_32l): ... this new prototype.
11065 (init_registers_powerpc_32): Remove, replace by ...
11066 (init_registers_powerpc_altivec32l): ... this new prototype.
11067 (init_registers_powerpc_e500): Remove, replace by ...
11068 (init_registers_powerpc_e500l): ... this new prototype.
11069 (init_registers_ppc64): Remove, replace by ...
11070 (init_registers_powerpc_64l): ... this new prototype.
11071 (init_registers_powerpc_64): Remove, replace by ...
11072 (init_registers_powerpc_altivec64l): ... this new prototype.
11073 (ppc_num_regs): Set to 73.
11074 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11075 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11076 (ppc_cannot_store_register): Handle orig_r3 and trap.
11077 (ppc_arch_setup): Update init_registers_... calls.
11078 (ppc_fill_gregset): Handle orig_r3 and trap.
11079
11080 * inferiors.c (clear_inferiors): Reset current_inferior.
11081
fdc59709
PB
110822008-04-23 Paolo Bonzini <bonzini@gnu.org>
11083
889bf7c5
PA
11084 * acinclude.m4: Add override.m4.
11085 * configure: Regenerate.
fdc59709 11086
c9b2f845
UW
110872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11088
11089 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11090 initial call to init_register_ppc64.
11091
550512b8
UW
110922008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11093
43aaf8b6
PA
11094 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11095 single powerpc*-*-linux* case.
550512b8
UW
11096 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11097
b6430ec3
UW
110982008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11099
11100 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11101 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11102 from reg_xmlfiles.
11103 * linux-ppc-low.c: Include <elf.h>.
11104 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11105 (ppc_hwcap): New global variable.
11106 (ppc_regmap): Remove __SPE__ #ifdef sections.
11107 (ppc_regmap_e500): New global variable.
11108 (ppc_cannot_store_register): Update __SPE__ special case.
11109 (ppc_get_hwcap): New function.
11110 (ppc_arch_setup): Use it to determine whether inferior supports
11111 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11112 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11113 Do not access registers if target does not support AltiVec.
11114 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11115 Do not access registers if target does not support SPE.
11116 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11117
52fa2412
UW
111182008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11119
11120 * linux-low.c (disabled_regsets, num_regsets): New.
11121 (use_regsets_p): Delete.
11122 (linux_wait_for_process): Clear disabled_regsets.
11123 (regsets_fetch_inferior_registers): Check and set it.
11124 (regsets_store_inferior_registers): Likewise.
11125 (linux_fetch_registers, linux_store_registers): Do not use
11126 use_regsets_p.
11127 (initialize_low): Allocate disabled_regsets.
11128
e28b3332
DJ
111292008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11130
11131 * Makefile.in (LIBOBJS): New.
11132 (OBS): Use LIBOBJS.
11133 (memmem.o): New rule.
11134 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11135 * configure: Regenerated.
11136
4536995d
UW
111372008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11138
11139 * server.c (handle_query): Never return "unsupported" for
11140 qXfer:features:read queries.
11141
221c031f
UW
111422008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11143
11144 * server.c (get_features_xml): Fix inverted condition.
11145 (handle_query): Always support qXfer:feature:read.
11146
ccd213ac
DJ
111472008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11148
11149 * server.c (wrapper_argv): New.
11150 (start_inferior): Handle wrapper_argv. If set, expect an extra
11151 trap.
11152 (gdbserver_usage): Document --wrapper.
11153 (main): Parse --wrapper.
11154
6fe305f7
UW
111552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11156
11157 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11158 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11159 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11160 (ppc_set_pc): Likewise.
11161 (ppc_arch_setup): New function.
11162 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11163 of collect_register.
889bf7c5 11164 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11165
5b0a002e
UW
111662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11167
11168 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11169 instead of linux-ppc64-low.o.
11170 * linux-ppc64-low.c: Remove file.
11171 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11172 (linux-ppc64-low.o): Remove rule.
11173
11174 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11175 (init_registers_powerpc_64): Likewise.
11176 (ppc_regmap): Conditionally define depending on __powerpc64__.
11177 (ppc_cannot_store_register): Do not special-case "fpscr" when
11178 compiled on __powerpc64__.
11179 (ppc_collect_ptrace_register): New function.
11180 (ppc_supply_ptrace_register): New function.
11181 (ppc_breakpoint): Change type to "unsigned int".
11182 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11183 (the_low_target): Conditionally provide initializers for the
889bf7c5 11184 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11185 collect_ptrace_register and supply_ptrace_register members.
11186
9b4b61c8
UW
111872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11188
11189 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11190 * server.c (gdbserver_xmltarget): Define.
11191 (get_features_xml): Use it to replace "target.xml" and arch_string.
11192
11193 * configure.srv: Remove srv_xmltarget. Add XML files that were
11194 mentioned there to srv_xmlfiles instead. Remove conditional tests
11195 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11196 srv_xmlfiles and srv_regobj to include all possible choices.
11197 * configure.ac (srv_xmltarget): Remove.
11198 (srv_xmlfiles): Do not add "target.xml".
11199 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11200 checks for supplementary target information.
11201 * configure: Regenerate.
11202 * Makefile.in (XML_TARGET): Remove.
11203 (target.xml): Remove rule.
11204 (clean): Do not clean up target.xml.
11205 (.PRECIOUS): Do not mention target.xml.
11206
11207 * target.h (struct target_ops): Remove arch_string member.
11208 * linux-low.c (linux_arch_string): Remove.
11209 (linux_target_ops): Remove arch_string initializer.
11210 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11211 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11212 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11213 * spu-low.c (spu_arch_string): Remove.
11214 (spu_target_ops): Remove arch_string initializer.
11215 * win32-low.c (win32_arch_string): Remove.
11216 (win32_target_ops): Remove arch_string initializer.
11217 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11218 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11219 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11220
ee1a7ae4
UW
112212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11222
11223 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11224 by collect_ptrace_register and supply_ptrace_register hooks.
11225 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11226 instead of checking for the_low_target.left_pad_xfer.
11227 (usr_store_inferior_registers): Use collect_ptrace_register callback
11228 instead of checking for the_low_target.left_pad_xfer.
11229
11230 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11231 (s390_supply_ptrace_register): Likewise.
11232 (s390_fill_gregset): Call s390_collect_ptrace_register.
11233 (the_low_target): Update.
11234
11235 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11236 (ppc_supply_ptrace_register): Likewise.
11237 (the_low_target): Update.
11238
11239 * linux-i386-low.c (the_low_target): Update.
11240 * linux-x86-64-low.c (the_low_target): Update.
11241
d61ddec4
UW
112422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11243
11244 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11245 reg-s390.o and reg-s390x.o.
11246
11247 * linux-low.c (new_inferior): New global variable.
11248 (linux_create_inferior, linux_attach): Set it.
11249 (linux_wait_for_process): Call the_low_target.arch_setup after the
11250 target has stopped for the first time.
11251 (initialize_low): Do not call the_low_target.arch_setup.
11252
11253 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11254 (s390_set_pc): Likewise.
11255 (s390_arch_setup): New function.
11256 (the_low_target): Use s390_arch_setup as arch_setup routine.
11257
11258 * regcache.c (realloc_register_cache): New function.
11259 (set_register_cache): Call it for each existing regcache.
11260
d05b4ac3
UW
112612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11262
11263 * server.h (init_registers): Remove prototype.
11264
11265 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11266 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11267 instead of init_registers ().
11268 * linux-arm-low.c (init_registers_arm): Add prototype.
11269 (init_registers_arm_with_iwmmxt): Likewise.
11270 (the_low_target): Add initializer for arch_setup field.
11271 * linux-cris-low.c (init_registers_cris): Add prototype.
11272 (the_low_target): Add initializer for arch_setup field.
11273 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11274 (the_low_target): Add initializer for arch_setup field.
11275 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11276 (the_low_target): Add initializer for arch_setup field.
11277 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11282 (the_low_target): Add initializer for arch_setup field.
11283 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11284 (init_registers_mips64_linux): Likewise.
11285 (the_low_target): Add initializer for arch_setup field.
11286 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11287 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11288 (the_low_target): Add initializer for arch_setup field.
11289 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11290 (init_registers_powerpc_64): Likewise.
11291 (the_low_target): Add initializer for arch_setup field.
11292 * linux-s390-low.c (init_registers_s390): Add prototype.
11293 (init_registers_s390x): Likewise.
11294 (the_low_target): Add initializer for arch_setup field.
11295 * linux-sh-low.c (init_registers_sh): Add prototype.
11296 (the_low_target): Add initializer for arch_setup field.
11297 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11298 (the_low_target): Add initializer for arch_setup field.
11299 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11300 (the_low_target): Add initializer for arch_setup field.
11301
11302 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11303 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11304 instead of init_registers ().
11305 * win32-arm-low.c (init_registers_arm): Add prototype.
11306 (the_low_target): Add initializer for arch_setup field.
11307 * win32-i386-low.c (init_registers_i386): Add prototype.
11308 (the_low_target): Add initializer for arch_setup field.
11309
11310 * spu-low.c (init_registers_spu): Add prototype.
11311 (initialize_low): Call initialie_registers_spu () instead of
11312 initialize_registers ().
11313
fd96d250
PA
113142008-02-19 Pedro Alves <pedro@codesourcery.com>
11315
11316 * server.c (handle_v_requests): When handling the vRun and vAttach
11317 packets, if already debugging a process, don't kill it. Return an
11318 error instead.
11319
d41b6bb4
DJ
113202008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11321
11322 * server.c (handle_query): Correct length check.
11323
5ac588cf
PA
113242008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11325
11326 * win32-low.c (do_initial_child_stuff): Add process handle
11327 parameter. Set current_process_handle and current_process_id from the
11328 parameters. Clear globals.
11329 (win32_create_inferior): Don't set current_process_handle and
11330 current_process_id here. Instead pass them on the call to
11331 do_initial_child_stuff.
11332 (win32_attach): Likewise.
11333 (win32_clear_inferiors): New.
11334 (win32_kill): Don't close the current process handle or the
11335 current thread handle here. Instead call win32_clear_inferiors.
11336 (win32_detach): Don't open a new handle to the process. Call
11337 win32_clear_inferiors.
11338 (win32_join): Don't rely on current_process_handle; open a new
11339 handle using the process id.
11340 (win32_wait): Call win32_clear_inferiors when the inferior process
11341 has exited.
11342
ecd7ecbc
DJ
113432008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11344
11345 * server.c (monitor_show_help): Add "exit".
11346
1525d545
MG
113472008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11348
ecd7ecbc 11349 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11350 (clean): Add reg-xtensa.c.
11351 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11352 * configure.srv (xtensa*-*-linux*) New target.
11353 * linux-xtensa-low.c: New.
11354 * xtensa-xtregs.c: New.
1525d545 11355
59a016f0
PA
113562008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11357
11358 * hostio.c: Don't include errno.h.
11359 (errno_to_fileio_errno): Move to hostio-errno.
11360 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11361 error number outputting to the target->hostio_last_error callback.
11362 (hostio_packet_error): Use FILEIO_EINVAL directly.
11363 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11364 calls to hostio_error.
11365 * hostio-errno.c: New.
11366 * server.h (hostio_last_error_from_errno): Declare.
11367 * target.h (target_ops): Add hostio_last_error member.
11368 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11369 as hostio_last_error handler.
889bf7c5 11370 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11371 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11372 (wince_hostio_last_error): New functions.
11373 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11374 as hostio_last_error handler.
11375 (win32_target_ops) [!_WIN32_WCE]: Register
11376 hostio_last_error_from_errno as hostio_last_error handler.
11377 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11378 (hostio-errno.o): New rule.
11379 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11380 * configure.srv (srv_hostio_err_objs): New variable. Default to
11381 hostio-errno.o.
11382 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11383 * configure: Regenerate.
11384
2d717e4f
DJ
113852008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11386
11387 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11388 (linux_kill, linux_detach): Clean up the process list.
11389 * remote-utils.c (remote_open): Improve port number parsing.
11390 (putpkt_binary, input_interrupt): Only send interrupts if the target
11391 is running.
11392 * server.c (extended_protocol): Make static.
11393 (attached): Define earlier.
11394 (exit_requested, response_needed, program_argv): New variables.
11395 (target_running): New.
11396 (start_inferior): Clear attached here.
11397 (attach_inferior): Set attached here.
11398 (require_running): Define.
11399 (handle_query): Use require_running and target_running. Implement
11400 "monitor exit".
11401 (handle_v_attach, handle_v_run): New.
11402 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11403 (gdbserver_usage): Update.
11404 (main): Redo argument parsing. Handle --debug and --multi. Handle
11405 --attach along with other options or after the port. Save
11406 program_argv. Support no initial program. Resynchronize
11407 communication with GDB after an error. Handle "monitor exit".
11408 Use require_running and target_running. Always allow the extended
11409 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11410 restart in extended mode.
11411 * README: Refer to the GDB manual. Update --attach usage.
11412
7407e2de
AS
114132007-12-20 Andreas Schwab <schwab@suse.de>
11414
11415 * linux-low.c (STACK_SIZE): Define.
11416 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11417 (linux_test_for_tracefork): Likewise.
11418
b65d95c5
DJ
114192007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11420
11421 * linux-low.c (linux_wait_for_event): Update messages. Do not
11422 reinsert auto-delete breakpoints.
11423 * mem-break.c (struct breakpoint): Change return type of handler to
11424 int.
11425 (set_breakpoint_at): Update handler type.
11426 (reinsert_breakpoint_handler): Return 1 instead of calling
11427 delete_breakpoint.
11428 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11429 setting a new one.
11430 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11431 * mem-break.h (set_breakpoint_at): Update handler type.
11432 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11433 * win32-low.c (auto_delete_breakpoint): New.
11434 (get_child_debug_event): Use it.
11435
4e799345
DJ
114362007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11437
11438 * configure.ac: Check for pread and pwrite.
11439 * hostio.c (handle_pread): Fall back to lseek and read.
11440 (handle_pwrite): Fall back to lseek and write.
11441 * config.in, configure: Regenerated.
11442
27524b67
DJ
114432007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11444
11445 * server.c (myresume): Add own_buf argument.
11446 (main): Update calls.
11447
a20d5e98
DJ
114482007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11449
11450 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11451 * remote-utils.c (remote_open): Do not call disable_async_io.
11452 (block_async_io): Delete.
11453 (unblock_async_io): Make static.
11454 (initialize_async_io): New.
11455 * server.c (handle_v_cont): Handle async I/O here.
11456 (myresume): Likewise. Move other common resume tasks here...
11457 (main): ... from here. Call initialize_async_io. Disable async
11458 I/O before the main loop.
11459 * server.h (initialize_async_io): Declare.
11460 (block_async_io, unblock_async_io): Delete prototypes.
11461 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11462
b79d787e
DJ
114632007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11464
11465 * remote-utils.c (readchar): Allow binary data in received messages.
11466
d97903b2
PA
114672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11468
11469 * win32-low.c (attaching): New global.
11470 (win32_create_inferior): Clear the `attaching' global.
11471 (win32_attach): Set the `attaching' global.
11472 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11473 attaching. Only set a breakpoint at the entry point if not
11474 attaching.
11475
311de423
PA
114762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11477
11478 * server.c (main): Don't report dll events on the initial
11479 connection on attaches.
11480
6c2d16d2
PA
114812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11482
11483 * server.c (main): Relax numerical bases supported for the pid of
11484 the --attach command line argument.
11485
5ca906e6
PA
114862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11487
11488 * win32-low.c (win32_attach): Call OpenProcess before
11489 DebugActiveProcess, not after. Add last error output to error
11490 call.
11491
9c6c8194
PA
114922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11493
11494 * win32-low.c (win32_get_thread_context)
11495 (win32_set_thread_context): New functions.
11496 (thread_rec): Use win32_get_thread_context.
11497 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11498 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11499 field.
11500
4d5d1aaa
PA
115012007-12-03 Leo Zayas
11502 Pedro Alves <pedro_alves@portugalmail.pt>
11503
11504 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11505 global variables.
11506 (child_add_thread): Minor cleanup.
11507 (child_continue): Resume artificially suspended threads before
11508 calling ContinueDebugEvent.
11509 (suspend_one_thread): New.
11510 (fake_breakpoint_event): New.
11511 (get_child_debug_event): Change return type to int. Check here if
11512 gdb sent an interrupt request. If a soft interrupt was requested,
11513 fake a breakpoint event. Return 0 if there is no event to handle,
11514 and 1 otherwise.
11515 (win32_wait): Don't check here if gdb sent an interrupt request.
11516 Ensure there is a valid event to handle.
11517 (win32_request_interrupt): Add soft interruption method as last
11518 resort.
11519
c436e841
PA
115202007-12-03 Leo Zayas
11521 Pedro Alves <pedro_alves@portugalmail.pt>
11522
11523 * win32-low.h (win32_thread_info): Add descriptions to the
11524 structure members. Replace `suspend_count' counter by a
11525 `suspended' flag.
11526 * win32-low.c (thread_rec): Update condition of when to get the
11527 context from the inferior. Rely on ContextFlags being set if it
11528 has already been retrieved. Only suspend the inferior thread if
11529 we haven't already. Warn if that fails.
11530 (continue_one_thread): s/suspend_count/suspended/. Only call
11531 ResumeThread once. Warn if that fails.
11532
e7b5fa67
PA
115332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11534
11535 * win32-low.c (win32_wait): Don't read from the inferior when it
11536 has already exited.
11537
a385171d
PA
115382007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11539
11540 * Makefile.in (win32_low_h): New variable.
11541 (win32-low.o): Add dependency on $(win32_low_h).
11542 (win32-arm-low.o, win32-i386-low.o): New rules.
11543
f80c84b3
DJ
115442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * hostio.c: Correct copyright year.
11547
a6b151f1
DJ
115482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11549
11550 * Makefile.in (OBS): Add hostio.o.
11551 (hostio.o): New rule.
11552 * server.h (handle_vFile): Declare.
11553 * hostio.c: New file.
11554 * server.c (handle_v_requests): Take packet_len and new_packet_len
11555 for binary packets. Call handle_vFile.
11556 (main): Update call to handle_v_requests.
11557
f9387fc3
DJ
115582007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11559
11560 * linux-low.c: Include <sched.h>.
11561
51c2684e
DJ
115622007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * linux-low.c (linux_tracefork_grandchild): New.
11565 (linux_tracefork_child): Use clone.
11566 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11567
75f83163
JB
115682007-10-31 Joel Brobecker <brobecker@adacore.com>
11569
11570 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11571
da5898ce
DJ
115722007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11573
11574 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11575
24a09b5f
DJ
115762007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11577
11578 * inferiors.c (change_inferior_id): Delete.
11579 (add_pid_to_list, pull_pid_from_list): New.
11580 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11581 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11582 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11583 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11584 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11585 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11586 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11587 (using_threads): Always set to 1.
11588 (handle_extended_wait): New.
11589 (add_process): Do not set TID.
11590 (linux_create_inferior): Set must_set_ptrace_flags.
11591 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11592 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11593 (linux_thread_alive): Rename TID argument to LWPID.
11594 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11595 (linux_wait_for_event): Do not use TID or check using_threads. Update
11596 call to dead_thread_notify. Call handle_extended_wait.
11597 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11598 (send_sigstop): Delete sigstop_sent.
11599 (wait_for_sigstop): Avoid TID.
11600 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11601 (linux_test_for_tracefork): New.
11602 (linux_lookup_signals): Use thread_db_active and
11603 linux_supports_tracefork_flag.
11604 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11605 * linux-low.h (get_process_thread): Avoid TID.
11606 (struct process_ifo): Move thread_known and tid to the end. Remove
11607 sigstop_sent.
11608 (linux_attach_lwp, thread_db_init): Update prototypes.
11609 * server.h (change_inferior_id): Delete prototype.
11610 (add_pid_to_list, pull_pid_from_list): New prototypes.
11611 * thread-db.c (thread_db_use_events): New.
11612 (find_first_thread): Rename to...
11613 (find_one_thread): ...this. Update callers and messages. Do not
11614 call fatal. Check thread_db_use_events. Do not call
11615 change_inferior_id or new_thread_notify.
11616 (maybe_attach_thread): Update. Do not call new_thread_notify.
11617 (thread_db_init): Set thread_db_use_events. Check use_events.
11618 * utils.c (fatal, warning): Correct message prefix.
11619
30ed0a8f
DJ
116202007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * Makefile.in (clean): Remove new files.
11623 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11624 (powerpc-64.o, powerpc-64.c): New rules.
11625 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11626 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11627 with SPE.
11628 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11629 SPE targets.
11630 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11631 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11632 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11633 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11634 (target_regsets): Add AltiVec and SPE register sets.
11635 * configure.ac: Check for AltiVec and SPE.
11636 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11637 (ppc_fill_vrregset, ppc_store_vrregset): New.
11638 (target_regsets): Add AltiVec register set.
11639 * configure: Regenerated.
11640
fd462a61
DJ
116412007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11642
11643 * linux-low.c (O_LARGEFILE): Define.
11644 (linux_read_memory): Use /proc/PID/mem.
11645 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11646 * configure, config.in: Regenerated.
11647
69f223ed
DJ
116482007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * linux-low.c (linux_wait_for_event): Do not pass signals while
11651 single-stepping.
11652
aec18585
PA
116532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11654
11655 * win32-low.c (create_process): New.
11656 (win32_create_inferior): Use create_process instead of
11657 CreateProcess. If create_process failed retry appending an ".exe"
11658 suffix. Store the GetLastError result immediatelly after
11659 create_process calls and use it on the call to error.
11660
34d86ddd
PA
116612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11662
11663 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11664
5a0e3bd0
JB
116652007-08-23 Joel Brobecker <brobecker@adacore.com>
11666
11667 * configure.ac: Switch license to GPLv3.
11668
f88c79e6
MS
116692007-08-01 Michael Snyder <msnyder@access-company.com>
11670
11671 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11672
6b3d9b83
PA
116732007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11674
11675 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11676 typedef.
11677 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11678 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11679 CloseToolhelp32Snapshot.
11680 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11681 CloseToolhelp32Snapshot.
11682
c588c53c
MS
116832007-07-27 Michael Snyder <michael.snyder@access-company.com>
11684
11685 * server.c (main): Check for inferior exit before main loop.
11686
aa0403d9
PA
116872007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11688
11689 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11690 instead of on tmp_desc.
11691
255e7678
DJ
116922007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11693 Daniel Jacobowitz <dan@codesourcery.com>
11694
11695 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11696 (add_thread): Minor cleanups.
11697 (clear_inferiors): Move lower in the file. Clear the DLL
11698 list.
11699 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11700 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11701 (xml_escape_text): New.
11702 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11703 for qSupported.
11704 (handle_v_cont): Report errors.
11705 (gdbserver_version): Update.
11706 (main): Correct size of own_buf. Do not report initial DLL events.
11707 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11708 (unloaded_dll, xml_escape_text): New.
11709 * win32-low.c (enum target_waitkind): Update comments.
11710 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11711 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11712 (win32_EnumProcessModules, win32_GetModuleInformation)
11713 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11714 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11715 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11716 (win32_Module32First, win32_Module32Next, load_toolhelp)
11717 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11718 (get_child_debug_event): Handle DLL events.
11719 (win32_wait): Likewise.
11720
0d37add9
DJ
117212007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11722
11723 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11724 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11725
45e2715e
PA
117262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11727
11728 * win32-low.c (handle_output_debug_string): Ignore event if not
11729 waiting.
11730
c5674cf1
PA
117312007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11732
11733 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11734
2bbe3cc1
DJ
117352007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11738
ae13219e
DJ
117392007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11740
11741 * inferiors.c (change_inferior_id): Add comment.
11742 * linux-low.c (check_removed_breakpoint): Add an early
11743 prototype. Improve debug output.
11744 (linux_attach): Doc update.
11745 (linux_detach_one_process, linux_detach): Clean up before releasing
11746 each process.
11747 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11748 * linux-low.h (struct process_info): Doc improvement.
11749 * mem-break.c (delete_all_breakpoints): New.
11750 * mem-break.h (delete_all_breakpoints): New prototype.
11751 * thread-db.c (find_first_thread): New.
11752 (thread_db_create_event): Call it instead of
11753 thread_db_find_new_threads. Clean up unused variables.
11754 (maybe_attach_thread): Remove first thread handling.
11755 (thread_db_find_new_threads): Use find_first_thread.
11756 (thread_db_get_tls_address): Likewise.
11757
4105de34
DJ
117582007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11759
11760 * thread-db.c (thread_db_find_new_threads): Add prototype.
11761 (thread_db_create_event): Check for the main thread before adding
11762 a new thread.
11763 (maybe_attach_thread): Only enable event reporting if TID == 0.
11764 (thread_db_get_tls_address): Check for new threads.
11765
2b876972
DJ
117662007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11767
11768 * linux-low.c (linux_create_inferior): Try execv before execvp.
11769 * spu-low.c (spu_create_inferior): Likewise.
11770
7a245884
DJ
117712007-06-13 Mike Frysinger <vapier@gentoo.org>
11772
11773 * linux-low.c (linux_create_inferior): Change execv to execvp.
11774 * spu-low.c (spu_create_inferior): Likewies.
11775
117ce543
DJ
117762007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11777
11778 * Makefile.in (clean): Clean new files instead of deleted ones.
11779 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11780 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11781 rules.
11782 * configure.srv: Specify XML files and new regformats for MIPS and
11783 MIPS64 GNU/Linux.
11784 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11785 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11786 an entry for the restart register.
11787 (mips_cannot_fetch_register, mips_cannot_store_register)
11788 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11789 register names to match the XML descriptions.
11790 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11791 restart register instead of $0.
11792
0e7f50da
UW
117932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11794 Markus Deuling <deuling@de.ibm.com>
11795
11796 * remote-utils.c (decode_xfer_write): New function.
11797 * server.h (decode_xfer_write): Add prototype.
11798 * server.c (handle_query): Add PACKET_LEN argument. Support
11799 qXfer:spu:read and qXfer:spu:write packets.
11800 (main): Pass packet_len to handle_query.
11801 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11802 * target.h (target_ops): Add qxfer_spu.
11803
374c1d38
UW
118042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11805
11806 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11807 accessing non-seekable spufs files.
11808
bb63802a
UW
118092007-05-16 Markus Deuling <deuling@de.ibm.com>
11810
889bf7c5 11811 * server.c (handle_query): Add reply for qC packet.
bb63802a 11812
7390519e
PA
118132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11814 Leo Zayas <lerele@champenstudios@com>
11815
11816 * server.h (check_remote_input_interrupt_request): New function.
11817 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11818 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11819 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11820 (check_remote_input_interrupt_request): New function.
11821 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11822 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11823 winapi_GenerateConsoleCtrlEvent): New typedefs.
11824 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11825 to 250 ms.
11826 (win32_wait): Check for remote interrupt request
11827 with check_remote_input_interrupt_request.
11828 (win32_request_interrupt): New function.
11829 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11830
34b34921
PA
118312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11832
11833 * win32-low.c (debug_registers_changed,
11834 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11835 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11836 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11837 (thread_rec): Get context using the low target.
11838 (child_add_thread): Call thread_added on the low target,
11839 which does the same thing.
11840 (regptr): Delete.
11841 (do_initial_child_stuff): Remove debug registers references.
11842 Set context using the low target. Resume threads after
11843 setting the contexts.
11844 (child_continue): Remove dead variable. Remove debug
11845 registers references.
11846 (child_fetch_inferior_registers): Go through the low target.
11847 (do_child_store_inferior_registers): Remove.
11848 (child_store_inferior_registers): Go through the low target.
11849 (win32_resume): Remove debug registers references.
11850 Set context using the low target.
11851 (handle_exception): Change return type to void. Don't record
11852 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11853 first chance exception.
889bf7c5 11854 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11855 goto loop. Always return after waiting for debug event.
11856 (win32_wait): Convert to switch statement. Handle spurious
11857 events.
11858
11859 * win32-i386-low.c (debug_registers_changed,
11860 debug_registers_used): New.
11861 (initial_stuff): Rename to ...
11862 (i386_initial_stuff): ... this. Clear debug registers
11863 state variables.
11864 (store_debug_registers): Delete.
11865 (i386_get_thread_context): New.
11866 (load_debug_registers): Delete.
11867 (i386_set_thread_context): New.
11868 (i386_thread_added): New.
11869 (single_step): Rename to ...
11870 (i386_single_step): ... this.
11871 (do_fetch_inferior_registers): Rename to ...
11872 (i386_fetch_inferior_register): ... this.
11873 (i386_store_inferior_register): New.
11874 (the_low_target): Adapt to new interface.
11875
11876 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11877 (arm_get_thread_context): New.
11878 (arm_set_thread_context): New.
11879 (regptr): New.
11880 (do_fetch_inferior_registers): Rename to ...
11881 (arm_fetch_inferior_register): ... this.
11882 (arm_store_inferior_register): New.
11883 (arm_wince_breakpoint): Reimplement as unsigned long.
11884 (arm_wince_breakpoint_len): Define.
11885 (the_low_target): Adapt to new interface.
11886
11887 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11888 load_debug_registers. Add get_thread_context, set_thread_context,
11889 thread_added and store_inferior_register. Rename
11890 fetch_inferior_registers to fetch_inferior_register.
11891 (regptr): Remove declaration.
11892
dd6953e1
PA
118932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11894
11895 * linux-low.c (linux_detach): Change return type to int. Return 0.
11896 * spu-low.c (spu_detach): Likewise.
11897
444d6139
PA
118982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11899
11900 * target.h (target_ops): Change return type of detach to int.
11901 Add join.
11902 (join_inferior): New.
11903 * server.c (main): Don't skip detach support on mingw32.
11904 If the inferior doesn't support detaching return error.
11905 Call join_inferior instead of using waitpid.
11906 * linux-low.c (linux_join): New.
11907 (linux_target_op): Add linux_join.
11908 * spu-low.c (spu_join): New.
11909 (spu_target_ops): Add spu_join.
11910 * win32-low.c (win32_detach): Adapt to new interface.
11911 Reopen current_process_handle before detaching. Issue a child
11912 resume before detaching.
11913 (win32_join): New.
11914 (win32_target_op): Add win32_join.
11915
1d5315fe
PA
119162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11917
11918 * win32-low.c (win32-attach): Fix return value.
11919 * target.h (target_ops): Describe ATTACH return values.
11920
bf914831
PA
119212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11922
11923 * win32-low.c (GETPROCADDRESS): Define.
11924 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11925 (winapi_DebugSetProcessKillOnExit): Likewise.
11926 (win32_create_inferior): Force usage of ansi CreateProcessA.
11927 (win32_attach): Use GETPROCADDRESS.
11928 (win32_detach): Likewise.
11929
f72f3e60
PA
119302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11931
11932 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11933
ed50f18f
PA
119342007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11935
11936 * win32-low.c: Commit leftover changes from 2007-03-29.
11937
0c2ead7e
DJ
119382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11939
11940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11941 fields short instead of int. Add explicit padding.
11942 (i387_cache_to_fsave): Remove unnecessary casts.
11943 (i387_fsave_to_cache): Doc fix.
11944 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11945
73725ff3
DJ
119462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11947
11948 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11949 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11950
d99f33d8
PA
119512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11952
11953 * configure.srv (arm*-*-mingw32ce*): Move near the other
11954 arm targets.
11955
68070c10
PA
119562007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11957
2482afc6 11958 * configure.ac: Add errno checking.
68070c10
PA
11959 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11960 sys/file.h and malloc.h.
11961 (AC_CHECK_DECLS): Add perror.
11962 (srv_mingwce): Handle.
2482afc6 11963 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11964 win32-i386-low.o to srv_tgtobj.
11965 (i[34567]86-*-mingw*): Likewise.
11966 (arm*-*-mingw32ce*): Add case.
11967 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11968 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11969 [__MINGW32CE__] (strerror): New function.
11970 [__MINGW32CE__] (errno): Define to GetLastError.
11971 [__MINGW32CE__] (COUNTOF): New macro.
11972 (remote_open): Remove extra close call.
11973 * mem-break.c (delete_breakpoint_at): New function.
11974 * mem-break.h (delete_breakpoint_at): Declare.
11975 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11976 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11977 [USE_WIN32API] (read, write): Add char* casts.
11978 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11979 * server.h: Include wincecompat.h on Windows CE.
11980 [HAVE_ERRNO_H]: Check.
11981 (perror): Declare if not declared.
11982 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11983 (perror_with_name): Remove errno declaration.
11984 * wincecompat.h: New.
11985 * wincecompat.c: New.
11986 * win32-low.h: New.
11987 * win32-arm-low.c: New.
11988 * win32-i386-low.c: New.
11989 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11990 (OUTMSG2): Make it safe.
11991 (_T): New macro.
11992 (COUNTOF): New macro.
11993 (NUM_REGS): Get it from the low target.
11994 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11995 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11996 (thread_rec): Let low target handle debug registers.
11997 (child_add_thread): Likewise.
11998 (child_init_thread_list): Likewise.
11999 (continue_one_thread): Likewise.
12000 (regptr): New.
12001 (do_child_fetch_inferior_registers): Move to ...
12002 * win32-i386-low.c: ... here, and rename to ...
12003 (do_fetch_inferior_registers): ... this.
889bf7c5 12004 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12005 Go through the low target.
12006 (do_child_store_inferior_registers): Use regptr.
12007 (strwinerror): New function.
12008 (win32_create_inferior): Handle Windows CE.
12009 Use strwinerror instead of strerror on Windows error
12010 codes. Add program to the error output.
12011 Don't close the main thread handle on Windows CE.
12012 (win32_attach): Use coredll.dll on Windows CE.
12013 (win32_kill): Close current process and current
12014 thread handles.
12015 (win32_detach): Use coredll.dll on Windows CE.
12016 (win32_resume): Let low target handle debug registers, and
12017 step request.
12018 (handle_exception): Add/Remove initial breakpoint. Avoid
12019 non-existant WSTOPSIG on Windows CE.
12020 (win32_read_inferior_memory): Cast to remove warning.
12021 (win32_arch_string): Go through the low target.
12022 (initialize_low): Call set_breakpoint_data with the low
12023 target's breakpoint.
12024 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12025 FOP_REGNUM, mappings): Move to ...
12026 * win32-i386-low.c: ... here.
12027 * win32-low.c (win32_thread_info): Move to ...
12028 * win32-low.h: ... here.
12029 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12030 win32-arm-low.c and wincecompat.c.
12031 (all:): Add $EXEEXT.
12032 (install-only:): Likewise.
12033 (gdbserver:): Likewise.
12034 (gdbreplay:): Likewise.
12035 * config.in: Regenerate.
12036 * configure: Regenerate.
12037
41093d81
PA
120382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12039
12040 * win32-low.c: Rename typedef thread_info to
12041 win32_thread_info throughout.
12042
544afa54
PA
120432007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12044
12045 * win32-i386-low.c: Rename to ...
12046 * win32-low.c: ... this.
12047 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12048 * Makefile.in: Likewise.
12049
bce7165d
PA
120502007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12051
12052 * remote-utils.c (monitor_output): Constify msg parameter.
12053 * server.h (monitor_output): Likewise.
12054 * win32-i386-low.c (handle_output_debug_string): New.
12055 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12056 handle_output_debug_string.
12057 (get_child_debug_event): Likewise.
12058
506c7aa0
DJ
120592007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12060
12061 * server.c (main): Correct strtoul check.
12062
42c81e2a
DJ
120632007-03-27 Jon Ringle <jon@ringle.org>
12064
12065 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12066
9453113a
DJ
120672007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12068
12069 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12070
64a69107
DJ
120712007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12072
12073 * terminal.h: Check HAVE_SGTTY_H.
12074
120752007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12076
12077 * remote-utils.c (remote_open): Print out the assigned port number.
12078
c74d0ad8
DJ
120792007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12080
12081 * remote-utils.c (monitor_output): New function.
12082 * server.c (debug_threads): Define here.
12083 (monitor_show_help): New function.
12084 (handle_query): Handle qRcmd.
12085 (main): Do not handle 'd' packet.
12086 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12087 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12088 of debug_threads.
12089
de7c3b4a
PA
120902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12091
12092 * Makefile.in (EXEEXT): New.
12093 (clean): Use $(EXEEXT).
12094
ef57601b
PA
120952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12096
12097 * target.h (target_ops): Rename send_signal to request_interrupt,
12098 and remove enum target_signal parameter.
12099 * linux-low.c (linux_request_interrupt): Rename from
12100 linux_send_signal, and always send SIGINT.
12101 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12102 and always send SIGINT.
12103 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12104 of send_signal.
12105 (input_interrupt): Likewise.
12106
820f2bda
PA
121072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12108
12109 * server.c (get_features_xml): Check if target implemented
12110 arch_string.
12111 * win32-i386-low.c (win32_arch_string): New.
12112 (win32_target_ops): Add win32_arch_string as arch_string member.
12113
ab39bf24
UW
121142007-02-22 Markus Deuling <deuling@de.ibm.com>
12115
12116 * spu-low.c (spu_arch_string): New.
12117 (spu_target_ops): Add spu_arch_string.
12118
61ff6e04
DJ
121192007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12120
12121 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12122 * configure.ac: Do not check for terminal.h.
12123 * configure, config.in: Regenerated.
12124
fb1e4ffc
DJ
121252007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12126
12127 * Makefile.in (OBS): Add $(XML_BUILTIN).
12128 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12129 (clean): Update.
12130 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12131 (arm-with-iwmmxt.c): New.
12132 * config.in, configure: Regenerate.
12133 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12134 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12135 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12136 (arm*-*-linux*): Add iWMMXt and regset support.
12137 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12138 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12139 (arm_store_wmmxregset, target_regsets): New.
12140 * server.c (get_features_xml): Take annex argument. Check builtin
12141 XML documents.
12142 (handle_query): Handle multiple annexes.
12143
0f48aa01
DJ
121442007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12145
12146 * remote-utils.c [USE_WIN32API] (read, write): Define.
12147 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12148 write.
12149
23181151
DJ
121502007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12151
12152 * linux-i386-low.c (the_low_target): Set arch_string.
12153 * linux-x86-64-low.c (the_low_target): Likewise.
12154 * linux-low.c (linux_arch_string): New.
12155 (linux_target_ops): Add it.
12156 * linux-low.h (struct linux_target_ops): Add arch_string.
12157 * server.c (write_qxfer_response): Use const void * for DATA.
12158 (get_features_xml): New.
12159 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12160 * target.h (struct target_ops): Add arch_string method.
12161
9d606399
DJ
121622007-01-03 Denis Pilat <denis.pilat@st.com>
12163 Daniel Jacobowitz <dan@codesourcery.com>
12164
12165 * linux-low.c (linux_kill): Handle being called with no threads.
12166 * win32-i386-low.c (win32_kill): Likewise.
12167 (get_child_debug_event): Clear current_process_handle.
12168
121692006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12170 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * remote-utils.c (remote_open): Check the type of specified
12173 serial port devices before opening them.
12174 * server.c (main): Kill the inferior if an error occurs during
12175 the first remote_open.
12176
a5e13d24
DJ
121772006-12-05 Markus Deuling <deuling@de.ibm.com>
12178
12179 * README: Update supported targets.
12180
186947f7
DJ
121812006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12182
12183 * Makefile.in (clean): Remove reg-mips64.c.
12184 (reg-mips64.c, reg-mips64.o): New rules.
12185 * configure.srv: Handle mips64. Include regset support for mips.
12186 * linux-mips-low.c (union mips_register): New.
12187 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12188 (mips_breakpoint, mips_breakpoint_at): Use int.
12189 (mips_collect_register, mips_supply_register)
12190 (mips_collect_register_32bit, mips_supply_register_32bit)
12191 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12192 (mips_store_fpregset, target_regsets): New.
12193 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12194
a13e2c95
UW
121952006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12196
12197 * configure.srv: Add target "spu*-*-*".
12198 * Makefile.in (clean): Remove reg-spu.c.
12199 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12200 * spu-low.c: New file.
12201
cb7283db
DJ
122022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12203
12204 * configure.ac: Correct td_thr_tls_get_addr test.
12205 * configure: Regenerated.
12206
89be2091
DJ
122072006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12208
12209 * linux-low.c (linux_wait_for_event): Reformat. Use the
12210 pass_signals array.
12211 * remote-utils.c (decode_address_to_semicolon): New.
12212 * server.c (pass_signals, handle_general_set): New.
12213 (handle_query): Mention QPassSignals for qSupported.
12214 (main): Call handle_general_set.
12215 * server.h (pass_signals, decode_address_to_semicolon): New.
12216
000ef4f0
DJ
122172006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * server.c (handle_query): Correct error handling for read_auxv.
12220
b7149293
UW
122212005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12222
12223 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12224 and srv_linux_thread_db to yes.
12225 * linux-s390-low.c (s390_fill_gregset): New function.
12226 (target_regsets): Define data structure.
12227
dae5f5cf
DJ
122282006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12229
12230 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12231 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12232 * config.in, configure: Regenerated.
12233 * inferiors.c (gdb_id_to_thread): New function.
12234 (gdb_id_to_thread_id): Use it.
12235 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12236 * linux-low.h (struct process_info): Add th member.
12237 (thread_db_get_tls_address): New prototype.
12238 * remote-utils.c (decode_address): Make non-static.
12239 * server.c (handle_query): Handle qGetTLSAddr.
12240 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12241 * target.h (struct target_ops): Add get_tls_address.
12242 * thread-db.c (maybe_attach_thread): Save the thread handle.
12243 (thread_db_get_tls_address): New.
12244
32ca6d61
DJ
122452006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12246
12247 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12248 (linux_resume_one_process): Take a siginfo_t *. Update all
12249 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12250 (struct pending_signals): Add a siginfo_t.
12251 (linux_wait_for_process): Always set last_status.
12252 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12253 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12254 * linux-low.h (struct process_info): Add last_status.
12255
5ffff7c1
DJ
122562006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12257
12258 * remote-utils.c (try_rle): New function.
12259 (putpkt_binary): Use it.
12260
8695c747
DJ
122612006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12262
12263 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12264 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12265 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12266 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12267 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12268 point registers.
12269
290fadea
RS
122702006-08-08 Richard Sandiford <richard@codesourcery.com>
12271
12272 * server.c (terminal_fd): New variable.
12273 (old_foreground_pgrp): Likewise.
12274 (restore_old_foreground_pgrp): New function.
12275 (start_inferior): Record the terminal file descriptor in terminal_fd
12276 and its original foreground group in old_foreground_pgrp. Register
12277 restore_old_foreground_pgrp with atexit().
12278
9f2e1e63
DJ
122792006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12280
12281 * server.c (handle_query): Correct qPart to qXfer.
12282
b80864fb
DJ
122832006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12284
12285 * configure.ac: Check for more headers which are missing on
12286 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12287 * configure.srv: Add Cygwin and mingw32.
12288 * remote-utils.c: Don't include headers unconditionally which
12289 are missing on mingw32. Include <winsock.h> for mingw32.
12290 (remote_open): Adjust for mingw32 support. Flush
12291 standard error after writing to it.
12292 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12293 (unblock_async_io, enable_async_io, disable_async_io)
12294 (readchar, getpkt): Update for Winsock support.
12295 (prepare_resume_reply): Expect a protocol signal number.
12296 * server.c: Disable <sys/wait.h> on mingw32.
12297 (start_inferior): Adjust for mingw32 support. Flush
12298 standard error after writing to it.
12299 (attach_inferior): Likewise. Use protocol signal
12300 numbers.
12301 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12302 and names.
12303 * win32-i386-low.c: New file.
12304 * Makefile.in (XM_CLIBS): Set.
12305 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12306 (win32-i386-low.o): New dependency rule.
12307 * linux-low.c (linux_wait): Use target signal numbers.
12308 * target.h (struct target_ops): Doc fix.
12309 * server.h (target_signal_to_name): New prototype.
12310 * gdbreplay.c: Don't include headers unconditionally which
12311 are missing on mingw32. Include <winsock.h> for mingw32.
12312 (remote_close, remote_open): Adjust for Winsock support.
12313 * configure, config.in: Regenerated.
12314
0876f84a
DJ
123152006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12316
12317 * server.c (decode_xfer_read, write_qxfer_response): New.
12318 (handle_query): Take a packet length argument. Handle
12319 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12320 the qSupported response.
12321 (main): Update call to handle_query.
12322
01f9e8fa
DJ
123232006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12324
12325 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12326 (putpkt_binary): Renamed from putpkt and adjusted for binary
12327 data.
12328 (putpkt): New wrapper for putpkt_binary.
12329 (readchar): Don't mask off the high bit.
12330 (decode_X_packet): New function.
12331 * server.c (main): Call putpkt_binary if a handler sets the packet
12332 length. Save the length of the incoming packet. Handle 'X'.
12333 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12334
be2a5f71
DJ
123352006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * server.c (handle_query): Handle qSupported.
12338
ea025f5f
DJ
123392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12340
12341 * remote-utils.c (all_symbols_looked_up): New variable.
12342 (look_up_one_symbol): Check it.
12343 * server.h (look_up_one_symbol): New declaration.
12344 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12345
9308fc88
DJ
123462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12347
12348 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12349 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12350 (PTRACE_GET_THREAD_AREA): Define.
12351 (ps_get_thread_area): New function.
12352
52fb6437
NS
123532006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12354
12355 * configure.srv (m68k*-*-uclinux*): New target.
12356 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12357 (linux_resume_one_process): Remove extraneous cast.
12358 (linux_read_offsets): New.
12359 (linux_target_op): Add linux_read_offsets on mmuless systems.
12360 * server.c (handle_query): Add qOffsets logic.
12361 * target.h (struct target_ops): Add read_offsets.
12362
21b0f40c
DJ
123632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12364
12365 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12366 (PTRACE_GET_THREAD_AREA): Define.
12367 (ps_get_thread_area): New function.
12368 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12369 (linux-x86-64-low.o): Update.
12370
0050a760
DJ
123712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12372
12373 * configure.ac: Remove checks for prfpregset_t.
12374 * gdb_proc_service.h: New file.
12375 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12376 new "gdb_proc_service.h".
12377 * proc-service.c: Likewise.
12378 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12379 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12380 * Makefile.in (gdb_proc_service_h): Updated.
12381 * configure, config.in: Regenerated.
12382
b92a518e
DJ
123832006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12384
12385 * remote-utils.c (prepare_resume_reply): Move declaration
12386 of gdb_id_from_wait to the top of the block.
12387
545587ee
DJ
123882006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12389
12390 * linux-low.c (regsets_store_inferior_registers): Read the regset
12391 from the target before filling it.
12392
9db87ebd
DJ
123932006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12394
12395 * server.c (attach_inferior): Return SIGTRAP for a successful
12396 attach.
12397
dd24457d
DJ
123982006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12399
12400 * Makefile.in (OBS): Add version.o.
12401 (STAGESTUFF): Delete.
12402 (version.o): Add dependencies.
12403 (version.c): Replace rule.
12404 (clean): Remove version.c.
12405 * server.c (gdbserver_version): New.
12406 (gdbserver_usage): Use printf.
12407 (main): Handle --version and --help.
12408 * server.h (version, host_name): Add declarations.
12409
6f0f660e
EZ
124102005-12-23 Eli Zaretskii <eliz@gnu.org>
12411
889bf7c5
PA
12412 * linux-arm-low.c:
12413 * linux-arm-low.c:
12414 * inferiors.c:
12415 * i387-fp.h:
12416 * i387-fp.c:
12417 * gdbreplay.c:
12418 * regcache.c:
12419 * proc-service.c:
12420 * mem-break.h:
12421 * mem-break.c:
12422 * linux-x86-64-low.c:
12423 * linux-sh-low.c:
12424 * linux-s390-low.c:
12425 * linux-ppc64-low.c:
12426 * linux-ppc-low.c:
12427 * linux-mips-low.c:
12428 * linux-m68k-low.c:
12429 * linux-m32r-low.c:
12430 * linux-low.h:
12431 * linux-low.c:
12432 * linux-ia64-low.c:
12433 * linux-i386-low.c:
12434 * linux-crisv32-low.c:
12435 * thread-db.c:
12436 * terminal.h:
12437 * target.h:
12438 * target.c:
12439 * server.h:
12440 * server.c:
12441 * remote-utils.c:
12442 * regcache.h:
12443 * utils.c:
12444 * Makefile.in:
12445 * configure.ac:
6f0f660e
EZ
12446 * gdbserver.1: Add (C) after Copyright. Update the FSF
12447 address.
12448
9d1fb177
DJ
124492005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12450
12451 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12452 (arm_breakpoint_at): Recognize both breakpoints.
12453 (the_low_target): Use the correct breakpoint instruction.
12454
011a70c2
DJ
124552005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12456
12457 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12458 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12459 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12460 (the_low_target): Update.
12461
7fb85e41
AS
124622005-10-25 Andreas Schwab <schwab@suse.de>
12463
12464 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12465
12466 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12467 (ia64_num_regs): Reduce to 462.
12468
3db0444b
DJ
124692005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * acinclude.m4: Correct quoting.
12472 * aclocal.m4: Regenerated.
12473
12474 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12475 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12476 (thread_db_init): Call thread_db_err_str.
12477 * configure.ac: Check for TD_VERSION.
12478 * config.in, configure: Regenerated.
12479
bee0189a
DJ
124802005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12481
12482 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12483
e9d25b98
DJ
124842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12485
12486 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12487 is not available. Define HAVE_PTRACE_GETREGS if it is.
12488 * config.in, configure: Regenerated.
12489 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12490 * linux-i386-low.c, linux-m68k-low.c: Update to use
12491 HAVE_PTRACE_GETREGS.
12492 * linux-low.c (regsets_fetch_inferior_registers)
12493 (regsets_store_inferior_registers): Only return 0 if we processed
12494 GENERAL_REGS.
12495 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12496 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12497
a06660f7
DJ
124982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12499
12500 * inferiors.c (struct thread_info): Add gdb_id.
12501 (add_thread): Add gdb_id argument.
12502 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12503 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12504 calls to add_thread.
12505 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12506 * server.c (handle_query): Use thread_to_gdb_id.
12507 (handle_v_cont, main): Use gdb_id_to_thread_id.
12508 * server.h (add_thread): Update prototype.
12509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12510 prototypes.
12511
5a1f5858
DJ
125122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12513
12514 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12515 left-padded registers.
12516 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12517 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12518
e122f1f5
SE
125192005-07-01 Steve Ellcey <sje@cup.hp.com>
12520
12521 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12522 * configure: Regenerate.
12523 * config.in: Regenerate.
12524 * server.h (NEED_DECLARATION_STRERROR):
12525 Replace with !HAVE_DECL_STRERROR.
12526
d592fa2f
DJ
125272005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12528
12529 * linux-low.c (linux_wait, linux_send_signal): Don't test
12530 an unsigned long variable for > 0 if it could be MAX_ULONG.
12531 * server.c (myresume): Likewise.
12532 * target.c (set_desired_inferior): Likewise.
12533
ccbd4912
MK
125342005-06-13 Mark Kettenis <kettenis@gnu.org>
12535
12536 * configure.ac: Simplify and improve check for socklen_t.
12537 * configure, config.in: Regenerate.
12538
f450004a
DJ
125392005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12540
12541 * acconfig.h: Remove.
12542 * configure.ac: Add a test for socklen_t. Use three-argument
12543 AC_DEFINE throughout.
12544 * config.in: Regenerated using autoheader 2.59.
12545 * configure: Regenerated.
12546
12547 * gdbreplay.c (socklen_t): Provide a default.
12548 (remote_open): Use socklen_t.
12549 * remote-utils.c (socklen_t): Provide a default.
12550 (remote_open): Use socklen_t.
12551 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12552 unsigned char.
12553
12554 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12555 char for buffers.
12556 * linux-low.c (linux_read_memory, linux_write_memory)
12557 (linux_read_auxv): Likewise.
12558 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12559 (check_mem_write): Likewise.
12560 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12561 Likewise.
12562 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12563 (registers_from_string, register_data): Likewise.
12564 * server.c (handle_query, main): Likewise.
12565 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12566 (decode_M_packet): Likewise.
12567 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12568 * target.h (struct target_ops): Update read_memory, write_memory,
12569 and read_auxv.
12570 (read_inferior_memory, write_inferior_memory): Update.
12571 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12572 to unsigned char *.
12573 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12574 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12575 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12576 linux-s390-low.c, linux-sh-low.c: Update for changes in
12577 read_inferior_memory and the_low_target->breakpoint.
12578
eee84df1
DJ
125792005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12580
12581 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12582 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12583 * configure.srv: Add powerpc64-*-linux*.
12584 * linux-ppc64-low.c: New file.
12585
45b134e5
OF
125862005-05-23 Orjan Friberg <orjanf@axis.com>
12587
12588 * linux-cris-low.c: New file with support for CRIS.
12589 * linux-crisv32-low.c: Ditto for CRISv32.
12590 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12591 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12592 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12593 reg-crisv32.o, and reg-crisv32.c to make rules.
12594 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12595 recognized targets.
12596
48d93c75
UW
125972005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12598
12599 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12600 of sizeof (PTRACE_XFER_TYPE).
12601 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12602
e013ee27
OF
126032005-05-12 Orjan Friberg <orjanf@axis.com>
12604
889bf7c5 12605 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12606 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12607 pointers for hardware watchpoint support.
12608 * linux-low.h (struct linux_target_ops): Ditto.
12609 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12610 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12611 to linux_target_ops.
12612 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12613 reply packet.
12614 * server.c (main): Recognize 'Z' and 'z' packets.
12615
b0ded00b
UW
126162005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12619 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12620 (the_low_target): Add new members.
12621
8643e2ad
DJ
126222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12623
12624 * proc-service.c (ps_lgetregs): Search all_processes instead of
12625 all_threads.
12626
fc620387
DJ
126272005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12628
12629 * server.c (start_inferior): Change return type to int.
12630 (attach_inferior): Change sigptr to int *.
12631 (handle_v_cont, handle_v_requests): Change signal to int *.
12632 (main): Change signal to int.
12633
126342005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12635
12636 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12637 * configure.srv: Add m32r*-*-linux*.
12638 * linux-m32r-low.c: New file.
12639
e0e76420
DJ
126402005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12641
12642 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12643
a1928bad
DJ
126442005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12645
12646 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12647 Take unsigned long arguments for PIDs.
12648 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12649 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12650 (wait_for_sigstop, linux_resume_one_process)
12651 (regsets_fetch_inferior_registers, linux_send_signal)
12652 (linux_read_auxv): Likewise. Update the types of variables holding
12653 PIDs. Update format string specifiers.
12654 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12655 * remote-utils.c (prepare_resume_reply): Likewise.
12656 * server.c (cont_thread, general_thread, step_thread)
12657 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12658 unsigned long.
12659 (handle_query): Update format specifiers.
12660 (handle_v_cont, main): Use strtoul for thread IDs.
12661 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12662 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12663 (general_thread, step_thread, thread_from_wait)
12664 (old_thread_from_wait): Update.
12665 * target.h (struct thread_resume): Use unsigned long for THREAD.
12666 (struct target_ops): Use unsigned long for arguments to attach and
12667 thread_alive.
12668
dcdb98d2
DJ
126692005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12670
12671 * acinclude.m4: Include bfd/bfd.m4 directly.
12672 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12673 <agriffis@toolchain.org>.
12674 * aclocal.m4, configure: Regenerated.
12675
bec39cab
AC
126762005-01-07 Andrew Cagney <cagney@gnu.org>
12677
12678 * configure.ac: Rename configure.in, require autoconf 2.59.
12679 * configure: Re-generate.
12680
434c4c77
DJ
126812004-12-08 Daniel Jacobowitz <dan@debian.org>
12682
12683 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12684 LIBS when finished.
12685 * aclocal.m4: Regenerated.
12686 * configure: Regenerated.
12687
db1d3e1b
AS
126882004-11-21 Andreas Schwab <schwab@suse.de>
12689
12690 * linux-m68k-low.c (m68k_num_gregs): Define.
12691 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12692 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12693 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12694 (m68k_breakpoint_at): New. Add to the_low_target.
12695
12696 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12697 srv_linux_thread_db to yes.
12698
43360365
JB
126992004-10-20 Joel Brobecker <brobecker@gnat.com>
12700
12701 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12702 (ARCH_SET_FS): Likewise.
12703 (ARCH_GET_FS): Likewise.
12704 (ARCH_GET_GS): Likewise.
12705
fd500816
DJ
127062004-10-16 Daniel Jacobowitz <dan@debian.org>
12707
12708 * linux-i386-low.c (ps_get_thread_area): New.
12709 * linux-x86-64-low.c (ps_get_thread_area): New.
12710 * linux-low.c: Include <sys/syscall.h>.
12711 (linux_kill_one_process): Don't kill the first thread here.
12712 (linux_kill): Kill the first thread here.
12713 (kill_lwp): New function.
12714 (send_sigstop, linux_send_signal): Use it.
12715 * proc-service.c: Clean up #ifdefs.
12716 (fpregset_info): Delete.
12717 (ps_lgetregs): Update and enable implementation.
12718 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12719 implementations.
12720 * remote-utils.c (struct sym_cache, symbol_cache): New.
12721 (input_interrupt): Print a clearer message.
12722 (async_io_enabled): New variable.
12723 (enable_async_io, disable_async_io): Use it. Update comments.
12724 (look_up_one_symbol): Use the symbol cache.
12725 * thread-db.c (thread_db_look_up_symbols): New function.
12726 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12727
f6de3c42
DJ
127282004-10-16 Daniel Jacobowitz <dan@debian.org>
12729
12730 * configure.in: Test for -rdynamic.
12731 * configure: Regenerated.
12732 * Makefile (INTERNAL_LDFLAGS): New.
12733 (gdbserver, gdbreplay): Use it.
12734
2c0fc042
AC
127352004-09-02 Andrew Cagney <cagney@gnu.org>
12736
12737 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12738
075b3282
DJ
127392004-03-23 Daniel Jacobowitz <drow@mvista.com>
12740
12741 * linux-low.c (linux_wait): Clear all_processes list also.
12742
fa6a77dc
DJ
127432004-03-12 Daniel Jacobowitz <drow@mvista.com>
12744
12745 * linux-low.c: Include <errno.h>. Remove extern declaration of
12746 errno.
12747
6d782a97
DJ
127482004-03-12 Daniel Jacobowitz <drow@mvista.com>
12749
12750 * gdbreplay.c, server.h, utils.c: Update copyright years.
12751
3a7fb99b
DJ
127522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12753
12754 * server.c (main): Print child status or termination signal from
12755 variable 'signal', not 'sig'.
12756
c3e735a6
DJ
127572004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12758
12759 * linux-low.c (linux_read_memory): Change return type to
12760 int. Check for and return error from ptrace().
12761 * target.c (read_inferior_memory): Change return type to int. Pass
12762 back return status from the_target->read_memory().
12763 * target.h (struct target_ops): Adapt *read_memory() prototype.
12764 Update comment.
12765 (read_inferior_memory): Adapt prototype.
12766 * server.c (main): Return an error packet if
12767 read_inferior_memory() returns an error.
12768
a59d1c82
DJ
127692004-03-04 Daniel Jacobowitz <drow@mvista.com>
12770
12771 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12772 Unify with other clean targets.
12773
dc3f8883
DJ
127742004-02-29 Daniel Jacobowitz <drow@mvista.com>
12775
12776 * server.c (handle_v_cont): Call set_desired_inferior.
12777
89a208da
DJ
127782004-02-29 Daniel Jacobowitz <drow@mvista.com>
12779
12780 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12781
62ea82f5
DJ
127822004-02-29 Daniel Jacobowitz <drow@mvista.com>
12783
12784 * linux-low.c (linux_wait): Unblock async I/O.
12785 (linux_resume): Block and enable async I/O.
12786 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12787 * server.h (block_async_io, unblock_async_io): Add prototypes.
12788
6910d122
DJ
127892004-02-29 Daniel Jacobowitz <drow@mvista.com>
12790
12791 * remote-utils.c (remote_open): Print a status notice after
12792 opening a TCP port.
12793 * server.c (attach_inferior): Print a status notice after
12794 attaching.
12795
127962004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12797
12798 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12799
c89dc5d4
DJ
128002004-02-26 Daniel Jacobowitz <drow@mvista.com>
12801
12802 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12803 error packet.
12804 * server.c, target.h: Update copyright years.
12805
4b8dad4a
RM
128062004-02-25 Roland McGrath <roland@redhat.com>
12807
12808 * target.h (struct target_ops): New member `read_auxv'.
12809 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12810 * linux-low.c (linux_read_auxv): New function.
12811 (linux_target_ops): Initialize `read_auxv' member to that.
12812
d7446758
JB
128132004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12814
12815 Committed by Jim Blandy <jimb@redhat.com>.
12816
12817 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12818 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12819 instead of GPR_SIZE to distiguish s390 and s390x targets.
12820
5544ad89
DJ
128212004-01-31 Daniel Jacobowitz <drow@mvista.com>
12822
12823 * linux-low.c: Update copyright year.
12824 (check_removed_breakpoint): Clear pending_is_breakpoint.
12825 (linux_set_resume_request, linux_queue_one_thread)
12826 (resume_status_pending_p): New functions.
12827 (linux_continue_one_thread): Use process->resume.
12828 (linux_resume): Only resume threads if there are no pending events.
12829 * linux-low.h (struct process_info): Add resume request
12830 pointer.
12831
2a68b70e
DJ
128322004-01-30 Daniel Jacobowitz <drow@mvista.com>
12833
12834 * regcache.c (new_register_cache): Clear the allocated register
12835 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12836
64386c31
DJ
128372003-10-13 Daniel Jacobowitz <drow@mvista.com>
12838
12839 * linux-low.c (linux_resume): Take a struct thread_resume *
12840 argument.
12841 (linux_wait): Update call.
12842 (resume_ptr): New static variable.
12843 (linux_continue_one_thread): Renamed from
12844 linux_continue_one_process. Use resume_ptr.
12845 (linux_resume): Use linux_continue_one_thread.
12846 * server.c (handle_v_cont, handle_v_requests): New functions.
12847 (myresume): New function.
12848 (main): Handle 'v' case.
12849 * target.h (struct thread_resume): New type.
12850 (struct target_ops): Change argument of "resume" to struct
12851 thread_resume *.
12852 (myresume): Delete macro.
12853
c938e9b0
L
128542003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12855
12856 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12857 (uninstall): Support DESTDIR.
12858
7f313d07
BC
12859Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12860
12861 * configure.srv: Add xscale*linux copy of arm*linux entry.
12862
3b2fc2ea
DJ
128632003-07-24 Daniel Jacobowitz <drow@mvista.com>
12864
12865 * linux-arm-low.c (arm_reinsert_addr): New function.
12866 (the_low_target): Add arm_reinsert_addr.
12867
1c0a559e
MK
128682003-07-08 Mark Kettenis <kettenis@gnu.org>
12869
12870 * mem-break.c: Remove whitespace at end of file.
12871
43d5792c
DJ
128722003-06-28 Daniel Jacobowitz <drow@mvista.com>
12873
12874 * configure.in: Check whether we need to prototype strerror.
12875 * server.h: Optionally prototype strerror.
12876 * gdbreplay.c (perror_with_name): Use strerror.
12877 * linux-low.c (linux_attach_lwp): Use strerror.
12878 * utils.c (perror_with_name): Use strerror.
12879 * config.in, configure: Regenerated.
12880
c8a86edf
DJ
128812003-06-28 Daniel Jacobowitz <drow@mvista.com>
12882
12883 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12884 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12885
73d37363
DJ
128862003-06-20 Daniel Jacobowitz <drow@mvista.com>
12887
12888 * Makefile.in (SFILES): Update.
12889 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12890 low-sun3.c: Remove files.
12891
6ad8ae5c
DJ
128922003-06-17 Daniel Jacobowitz <drow@mvista.com>
12893
12894 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12895 (linux_detach_one_process, linux_detach): New functions.
12896 (linux_target_ops): Add linux_detach.
12897 * server.c (main): Handle 'D' packet.
12898 * target.h (struct target_ops): Add "detach" member.
12899 (detach_inferior): Define.
12900
1581182a
MK
129012003-06-13 Mark Kettenis <kettenis@gnu.org>
12902
12903 From Kelley Cook <kelleycook@wideopenwest.com>:
12904 * configure.srv: Accept i[34567]86 variants.
12905
e5379b03
DJ
129062003-06-05 Daniel Jacobowitz <drow@mvista.com>
12907
12908 * linux-low.c (linux_wait_for_event): Correct comment typos.
12909 (linux_resume_one_process): Call check_removed_breakpoint.
12910 (linux_send_signal): New function.
12911 (linux_target_ops): Add linux_send_signal.
12912 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12913 of kill.
12914 * target.h (struct target_ops): Add send_signal.
12915
2ff29de4
JB
129162003-05-29 Jim Blandy <jimb@redhat.com>
12917
12918 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12919 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12920 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12921 away part of the register's value.
12922
254787d4
DJ
129232003-03-26 Daniel Jacobowitz <drow@mvista.com>
12924
12925 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12926 (linux_wait_for_event, linux_init_signals): Likewise.
12927
94e10508
DJ
129282003-03-17 Daniel Jacobowitz <drow@mvista.com>
12929
12930 * configure.in: Check for stdlib.h.
12931 * configure: Regenerated.
12932 * config.in: Regenerated.
12933
4c0711e0
DJ
129342003-01-04 Andreas Schwab <schwab@suse.de>
12935
12936 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12937
ef66e766
AC
129382003-01-02 Andrew Cagney <ac131313@redhat.com>
12939
12940 * Makefile.in: Remove obsolete code.
12941
a1358604
DJ
129422002-11-20 Daniel Jacobowitz <drow@mvista.com>
12943
12944 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12945 defined(PT_FPR0_HI).
12946
23ce3b1c
DJ
129472002-11-17 Stuart Hughes <seh@zee2.com>
12948
12949 * linux-arm-low.c (arm_num_regs): Increase.
12950 (arm_regmap): Include status register.
12951
129522002-11-17 Daniel Jacobowitz <drow@mvista.com>
12953
12954 * linux-low.c (register_addr): Remove incorrect -1 check.
12955
a9fa9f7d
DJ
129562002-08-29 Daniel Jacobowitz <drow@mvista.com>
12957
12958 * linux-low.c (linux_create_inferior): Call setpgid. Return
12959 the new PID.
12960 (unstopped_p, linux_signal_pid): Remove.
12961 (linux_target_ops): Remove linux_signal_pid.
12962 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12963 global instead of target method.
12964 * target.h (struct target_ops): Remove signal_pid. Update comment
12965 for create_inferior.
12966 * server.c (signal_pid): New variable.
12967 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12968 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12969 (attach_inferior): Set signal_pid.
12970
17574093
DJ
129712002-08-23 Daniel Jacobowitz <drow@mvista.com>
12972
12973 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12974
129752002-08-20 Jim Blandy <jimb@redhat.com>
12976
12977 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12978 default for this.
12979
129802002-08-01 Andrew Cagney <cagney@redhat.com>
12981
12982 * Makefile.in: Make chill references obsolete.
12983
129842002-07-24 Kevin Buettner <kevinb@redhat.com>
12985
12986 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12987 * configure: Regenerate.
12988 * config.in: Regenerate.
12989
129902002-07-09 David O'Brien <obrien@FreeBSD.org>
12991
12992 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12993 (perror_with_name, remote_close, remote_open, expect, play): Static.
12994
129952002-07-04 Michal Ludvig <mludvig@suse.cz>
12996
4b8dad4a 12997 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12998 byte offsets instead of an array of indexes.
12999 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13000
130012002-06-13 Daniel Jacobowitz <drow@mvista.com>
13002
13003 * regcache.c: Add comment.
13004
130052002-06-11 Daniel Jacobowitz <drow@mvista.com>
13006
13007 * thread-db.c: New file.
13008 * proc-service.c: New file.
13009 * acinclude.m4: New file.
13010 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13011 proc-service.o, and thread-db.o.
13012 (linux-low.o): Add USE_THREAD_DB.
13013 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13014 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13015 * aclocal.m4: Regenerated.
13016 * config.in: Regenerated.
13017 * configure: Regenerated.
13018 * configure.in: Check for proc_service.h, sys/procfs.h,
13019 thread_db.h, and linux/elf.h headrs.
13020 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13021 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13022 Check for -lthread_db and thread support.
13023 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13024 PowerPC, and SuperH.
13025 * i387-fp.c: Constify arguments.
13026 * i387-fp.h: Likewise.
13027 * inferiors.c: (struct thread_info): Renamed from
13028 `struct inferior_info'. Remove PID member. Use generic inferior
13029 list header. All uses updated.
13030 (inferiors, signal_pid): Removed.
13031 (all_threads): New variable.
13032 (get_thread): Define.
13033 (add_inferior_to_list): New function.
13034 (for_each_inferior): New function.
13035 (change_inferior_id): New function.
13036 (add_inferior): Removed.
13037 (remove_inferior): New function.
13038 (add_thread): New function.
13039 (free_one_thread): New function.
13040 (remove_thread): New function.
13041 (clear_inferiors): Use for_each_inferior and free_one_thread.
13042 (find_inferior): New function.
13043 (find_inferior_id): New function.
13044 (inferior_target_data): Update argument type.
13045 (set_inferior_target_data): Likewise.
13046 (inferior_regcache_data): Likewise.
13047 (set_inferior_regcache_data): Likewise.
13048 * linux-low.c (linux_bp_reinsert): Remove.
13049 (all_processes, stopping_threads, using_thrads)
13050 (struct pending_signals, debug_threads, pid_of): New.
13051 (inferior_pid): Replace with macro.
13052 (struct inferior_linux_data): Remove.
13053 (get_stop_pc, add_process): New functions.
13054 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13055 Use add_process and add_thread.
13056 (linux_attach_lwp): New function, based on old linux_attach. Use
13057 add_process and add_thread. Set stop_expected for new threads.
13058 (linux_attach): New function.
13059 (linux_kill_one_process): New function.
13060 (linux_kill): Kill all LWPs.
13061 (linux_thread_alive): Use find_inferior_id.
13062 (check_removed_breakpoints, status_pending_p): New functions.
13063 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13064 Update. Use WNOHANG. Wait for cloned processes also. Update process
13065 struct for the found process.
13066 (linux_wait_for_event): New function.
13067 (linux_wait): Use it. Support LWPs.
13068 (send_sigstop, wait_for_sigstop, stop_all_processes)
13069 (linux_resume_one_process, linux_continue_one_process): New functions.
13070 (linux_resume): Support LWPs.
13071 (REGISTER_RAW_SIZE): Remove.
13072 (fetch_register): Use register_size instead. Call supply_register.
13073 (usr_store_inferior_registers): Likewise. Call collect_register.
13074 Fix recursive case.
13075 (regsets_fetch_inferior_registers): Improve error message.
13076 (regsets_store_inferior_registers): Add debugging.
13077 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13078 (unstopped_p, linux_signal_pid): New functions.
13079 (linux_target_ops): Add linux_signal_pid.
13080 (linux_init_signals): New function.
13081 (initialize_low): Call it. Initialize using_threads.
13082 * regcache.c (inferior_regcache_data): Add valid
13083 flag.
13084 (get_regcache): Fetch registers lazily. Add fetch argument
13085 and update all callers.
13086 (regcache_invalidate_one, regcache_invalidate): New
13087 functions.
13088 (new_register_cache): Renamed from create_register_cache.
13089 Return the new regcache.
13090 (free_register_cache): Change argument to a void *.
13091 (registers_to_string, registers_from_string): Call get_regcache
13092 with fetch flag set.
13093 (register_data): Make static. Pass fetch flag to get_regcache.
13094 (supply_register): Call get_regcache with fetch flag clear.
13095 (collect_register): Call get_regcache with fetch flag set.
13096 (collect_register_as_string): New function.
13097 * regcache.h: Update.
13098 * remote-utils.c (putpkt): Flush after debug output and use
13099 stderr.
13100 Handle input interrupts while waiting for an ACK.
13101 (input_interrupt): Use signal_pid method.
13102 (getpkt): Flush after debug output and use stderr.
13103 (outreg): Use collect_register_as_string.
13104 (new_thread_notify, dead_thread_notify): New functions.
13105 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13106 and general_thread.
13107 (look_up_one_symbol): Flush after debug output.
13108 * server.c (step_thread, server_waiting): New variables.
13109 (start_inferior): Don't use signal_pid. Update call to mywait.
13110 (attach_inferior): Update call to mywait.
13111 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13112 (main): Don't fetch/store registers explicitly. Use
13113 set_desired_inferior. Support proposed ``Hs'' packet. Update
13114 calls to mywait.
13115 * server.h: Update.
13116 (struct inferior_list, struct_inferior_list_entry): New.
13117 * target.c (set_desired_inferior): New.
13118 (write_inferior_memory): Constify.
13119 (mywait): New function.
13120 * target.h: Update.
13121 (struct target_ops): New signal_pid method.
13122 (mywait): Removed macro, added prototype.
13123
13124 * linux-low.h (regset_func): Removed.
13125 (regset_fill_func, regset_store_func): New.
13126 (enum regset_type): New.
13127 (struct regset_info): Add type field. Use new operation types.
13128 (struct linux_target_ops): stop_pc renamed to get_pc.
13129 Add decr_pc_after_break and breakpoint_at.
13130 (get_process, get_thread_proess, get_process_thread)
13131 (strut process_info, all_processes, linux_attach_lwp)
13132 (thread_db_init): New.
13133
13134 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13135 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13136 (the_low_target): Add new members.
13137 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13138 (i386_store_fpxregset): Constify.
13139 (target_regsets): Add new kind identifier.
13140 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13141 (i386_set_pc): Add debugging.
13142 (i386_breakpoint_at): New function.
13143 (the_low_target): Add new members.
13144 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13145 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13146 (mips_breakpoint_at): New.
13147 (the_low_target): Add new members.
13148 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13149 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13150 (the_low_target): Add new members.
13151 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13152 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13153 (the_low_target): Add new members.
13154 * linux-x86-64-low.c (target_regsets): Add new kind
13155 identifier.
13156
131572002-05-15 Daniel Jacobowitz <drow@mvista.com>
13158
13159 From Martin Pool <mbp@samba.org>:
13160 * server.c (gdbserver_usage): New function.
13161 (main): Call it.
13162
131632002-05-14 Daniel Jacobowitz <drow@mvista.com>
13164
13165 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13166 stop_at -> stop_pc.
13167
131682002-05-04 Andrew Cagney <ac131313@redhat.com>
13169
13170 * Makefile.in: Remove obsolete code.
13171
131722002-04-24 Michal Ludvig <mludvig@suse.cz>
13173
13174 * linux-low.c (regsets_fetch_inferior_registers),
13175 (regsets_store_inferior_registers): Removed cast to int from
13176 ptrace() calls.
13177 * regcache.h: Added declaration of struct inferior_info.
13178
131792002-04-20 Daniel Jacobowitz <drow@mvista.com>
13180
13181 * inferiors.c (struct inferior_info): Add regcache_data.
13182 (add_inferior): Call create_register_cache.
13183 (clear_inferiors): Call free_register_cache.
13184 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13185 * regcache.c (struct inferior_regcache_data): New.
13186 (registers): Remove.
13187 (get_regcache): New function.
13188 (create_register_cache, free_register_cache): New functions.
13189 (set_register_cache): Don't initialize the register cache here.
13190 (registers_to_string, registers_from_string, register_data): Call
13191 get_regcache.
13192 * regcache.h: Add prototypes.
13193 * server.h: Likewise.
13194
131952002-04-20 Daniel Jacobowitz <drow@mvista.com>
13196
13197 * mem-break.c: New file.
13198 * mem-break.h: New file.
13199 * Makefile.in: Add mem-break.o rule; update server.h
13200 dependencies.
13201 * inferiors.c (struct inferior_info): Add target_data
13202 member.
13203 (clear_inferiors): Free target_data member if set.
13204 (inferior_target_data, set_inferior_target_data): New functions.
13205 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13206 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13207 * linux-low.c (linux_bp_reinsert): New variable.
13208 (struct inferior_linux_data): New.
13209 (linux_create_inferior): Use set_inferior_target_data.
13210 (linux_attach): Likewise. Call add_inferior.
13211 (linux_wait_for_one_inferior): New function.
13212 (linux_wait): Call it.
13213 (linux_write_memory): Add const.
13214 (initialize_low): Call set_breakpoint_data.
13215 * linux-low.h (struct linux_target_ops): Add breakpoint
13216 handling members.
13217 * server.c (attach_inferior): Remove extra add_inferior
13218 call.
13219 * server.h: Include mem-break.h. Update inferior.c
13220 prototypes.
13221 * target.c (read_inferior_memory)
13222 (write_inferior_memory): New functions.
13223 * target.h (read_inferior_memory)
13224 (write_inferior_memory): Change macros to prototypes.
13225 (struct target_ops): Update comments. Add const to write_memory
13226 definition.
13227
132282002-04-11 Daniel Jacobowitz <drow@mvista.com>
13229
13230 * linux-low.c (usr_store_inferior_registers): Support
13231 registers which are allowed to fail to store.
13232 * linux-low.h (linux_target_ops): Likewise.
13233 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13234 (ppc_cannot_store_register): FPSCR may not be storable.
13235
132362002-04-09 Daniel Jacobowitz <drow@mvista.com>
13237
13238 * server.h: Include <string.h> if HAVE_STRING_H.
13239 * ChangeLog: Correct paths in last ChangeLog entry.
13240
132412002-04-09 Daniel Jacobowitz <drow@mvista.com>
13242
13243 * linux-low.h: Remove obsolete prototypes.
13244 (struct linux_target_ops): New.
13245 (extern the_low_target): New.
13246 * linux-low.c (num_regs, regmap): Remove declarations.
13247 (register_addr): Use the_low_target explicitly.
13248 (fetch_register): Likewise.
13249 (usr_fetch_inferior_registers): Likewise.
13250 (usr_store_inferior_registers): Likewise.
13251 * linux-arm-low.c (num_regs): Remove.
13252 (arm_num_regs): Define.
13253 (arm_regmap): Renamed from regmap, made static.
13254 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13255 made static.
13256 (arm_cannot_store_register): Renamed from cannot_store_register,
13257 made static.
13258 (the_low_target): New.
13259 * linux-i386-low.c (num_regs): Remove.
13260 (i386_num_regs): Define.
13261 (i386_regmap): Renamed from regmap, made static.
13262 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13263 made static.
13264 (i386_cannot_store_register): Renamed from cannot_store_register,
13265 made static.
13266 (the_low_target): New.
13267 * linux-ia64-low.c (num_regs): Remove.
13268 (ia64_num_regs): Define.
13269 (ia64_regmap): Renamed from regmap, made static.
13270 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13271 made static.
13272 (ia64_cannot_store_register): Renamed from cannot_store_register,
13273 made static.
13274 (the_low_target): New.
13275 * linux-m68k-low.c (num_regs): Remove.
13276 (m68k_num_regs): Define.
13277 (m68k_regmap): Renamed from regmap, made static.
13278 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13279 made static.
13280 (m68k_cannot_store_register): Renamed from cannot_store_register,
13281 made static.
13282 (the_low_target): New.
13283 * linux-mips-low.c (num_regs): Remove.
13284 (mips_num_regs): Define.
13285 (mips_regmap): Renamed from regmap, made static.
13286 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13287 made static.
13288 (mips_cannot_store_register): Renamed from cannot_store_register,
13289 made static.
13290 (the_low_target): New.
13291 * linux-ppc-low.c (num_regs): Remove.
13292 (ppc_num_regs): Define.
13293 (ppc_regmap): Renamed from regmap, made static.
13294 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13295 made static.
13296 (ppc_cannot_store_register): Renamed from cannot_store_register,
13297 made static.
13298 (the_low_target): New.
13299 * linux-s390-low.c (num_regs): Remove.
13300 (s390_num_regs): Define.
13301 (s390_regmap): Renamed from regmap, made static.
13302 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13303 made static.
13304 (s390_cannot_store_register): Renamed from cannot_store_register,
13305 made static.
13306 (the_low_target): New.
13307 * linux-sh-low.c (num_regs): Remove.
13308 (sh_num_regs): Define.
13309 (sh_regmap): Renamed from regmap, made static.
13310 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13311 made static.
13312 (sh_cannot_store_register): Renamed from cannot_store_register,
13313 made static.
13314 (the_low_target): New.
13315 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13316 (the_low_target): New.
13317
133182002-04-09 Daniel Jacobowitz <drow@mvista.com>
13319
13320 * Makefile.in: Add stamp-h target.
13321 * configure.in: Create stamp-h.
13322 * configure: Regenerated.
13323
133242002-04-09 Daniel Jacobowitz <drow@mvista.com>
13325
13326 * inferiors.c: New file.
13327 * target.c: New file.
13328 * target.h: New file.
13329 * Makefile.in: Add target.o and inferiors.o. Update
13330 dependencies.
13331 * linux-low.c (inferior_pid): New static variable,
13332 moved from server.c.
13333 (linux_create_inferior): Renamed from create_inferior.
13334 Call add_inferior. Return 0 on success instead of a PID.
13335 (linux_attach): Renamed from myattach.
13336 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13337 (linux_thread_alive): Renamed from mythread_alive.
13338 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13339 child dies.
13340 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13341 (regsets_store_inferior_registers): Correct error message.
13342 Add missing ``return 0''.
13343 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13344 (linux_store_registers): Renamed from store_inferior_registers.
13345 (linux_read_memory): Renamed from read_inferior_memory.
13346 (linux_write_memory): Renamed from write_inferior_memory.
13347 (linux_target_ops): New structure.
13348 (initialize_low): Call set_target_ops ().
13349 * remote-utils.c (unhexify): New function.
13350 (hexify): New function.
13351 (input_interrupt): Send signals to ``signal_pid''.
13352 * server.c (inferior_pid): Remove.
13353 (start_inferior): Update create_inferior call.
13354 (attach_inferior): Call add_inferior.
13355 (handle_query): New function.
13356 (main): Call handle_query for `q' packets.
13357 * server.h: Include "target.h". Remove obsolete prototypes.
13358 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13359
133602002-04-09 Daniel Jacobowitz <drow@mvista.com>
13361
13362 * Makefile.in: Add WARN_CFLAGS. Update configury
13363 dependencies.
13364 * configure.in: Check for <string.h>
13365 * configure: Regenerate.
13366 * config.in: Regenerate.
13367 * gdbreplay.c: Include needed system headers.
13368 (remote_open): Remove strchr prototype.
13369 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13370 * regcache.c (supply_register): Change buf argument to const void *.
13371 (supply_register_by_name): Likewise.
13372 (collect_register): Change buf argument to void *.
13373 (collect_register_by_name): Likewise.
13374 * regcache.h: Add missing prototypes.
13375 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13376 * server.c (handle_query): New function.
13377 (attached): New static variable, moved out of main.
13378 (main): Quiet longjmp clobber warnings.
13379 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13380 * utils.c (error): Remove NORETURN.
13381 (fatal): Likewise.