1 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5 * configure: Regenerate.
7 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
11 * linux-low.c (siginfo_fixup): Likewise.
12 (linux_xfer_siginfo): Likewise.
13 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
15 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
17 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
19 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
21 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
23 * linux-x86-low.c [__x86_64__]: Include
24 "nat/amd64-linux-siginfo.h".
25 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
26 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
27 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
28 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
29 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
30 (cpt_si_fd, si_timerid, si_overrun): Move from
31 nat/amd64-linux-siginfo.c.
32 * Makefile.in (amd64-linux-siginfo.o:): New rule.
34 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
36 * server.c (skip_to_semicolon): Remove.
37 (process_point_options): Use strchrnul instead of
40 2016-01-26 Yao Qi <yao.qi@linaro.org>
42 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
43 * linux-low.c (install_software_single_step_breakpoints): Don't
44 call regcache_read_pc.
45 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
48 2016-01-26 Yao Qi <yao.qi@linaro.org>
50 * linux-low.c (install_software_single_step_breakpoints): Call
51 regcache_read_pc instead of get_pc.
53 2016-01-26 Yao Qi <yao.qi@linaro.org>
55 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
56 (unblock_async_io): Rename to ...
57 (block_unblock_async_io): ... it. New function.
58 (enable_async_io): Don't install SIGIO handler. Unblock it
60 (disable_async_io): Don't ignore SIGIO. Block it instead.
61 (initialize_async_io): Install SIGIO handler. Don't call
64 2016-01-26 Yao Qi <yao.qi@linaro.org>
66 * remote-utils.c (getpkt): If the buffer isn't empty, and the
67 first character is '\003', call *the_target->request_interrupt.
69 2016-01-25 Yao Qi <yao.qi@linaro.org>
71 * remote-utils.c (new_thread_notify): Remove.
72 (dead_thread_notify): Likewise.
73 * remote-utils.h (new_thread_notify): Remove declaration.
74 (dead_thread_notify): Likewise.
76 2016-01-23 Marcin KoĆcielnicki <koriakin@0x04.net>
78 * gdb.trace/pending.exp: Fix expected message on continue.
80 2016-01-22 Marcin KoĆcielnicki <koriakin@0x04.net>
82 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
83 it works properly on big-endian machines where sizeof (CORE_ADDR)
86 2016-01-21 Pedro Alves <palves@redhat.com>
88 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
89 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
90 * configure: Regenerate.
92 2016-01-21 Yao Qi <yao.qi@linaro.org>
94 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
95 is_thumb and set it according to CPSR saved on the stack.
96 (get_next_pcs_syscall_next_pc): Pass is_thumb to
97 arm_sigreturn_next_pc.
99 2016-01-18 Yao Qi <yao.qi@linaro.org>
101 * linux-low.c (linux_set_pc_64bit): New function.
102 (linux_get_pc_64bit): New function.
103 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
105 * linux-sparc-low.c (debug_threads): Remove declaration.
106 (sparc_get_pc): Remove.
107 (the_low_target): Use linux_get_pc_64bit instead of
109 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
110 (the_low_target): Use linux_get_pc_64bit and
113 2016-01-18 Yao Qi <yao.qi@linaro.org>
115 * linux-arm-low.c (debug_threads): Remove declaration.
116 (arm_get_pc, arm_set_pc): Remove.
117 (the_low_target): Use linux_get_pc_32bit and
119 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
120 (the_low_target): Use linux_get_pc_32bit and
122 * linux-cris-low.c (debug_threads): Remove declaration.
123 (cris_get_pc, cris_set_pc,): Remove.
124 (the_low_target): Use linux_get_pc_32bit and
126 * linux-crisv32-low.c (debug_threads): Remove declaration.
127 (cris_get_pc, cris_set_pc): Remove.
128 (the_low_target): Use linux_get_pc_32bit and
130 * linux-low.c: Include inttypes.h.
131 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
132 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
133 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
134 (the_low_target): Use linux_get_pc_32bit and
136 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
137 (the_low_target): Use linux_get_pc_32bit and
139 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
140 (the_low_target): Use linux_get_pc_32bit and
142 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
143 (the_low_target): Use linux_get_pc_32bit and
145 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
146 (the_low_target): Use linux_get_pc_32bit and
149 2016-01-18 Gary Benson <gbenson@redhat.com>
151 * configure.ac (AC_FUNC_FORK): New check.
152 * config.in: Regenerate.
153 * configure: Likewise.
155 2016-01-14 Yao Qi <yao.qi@linaro.org>
157 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
158 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
159 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
160 arm_get_next_pcs_ctor.
162 2016-01-12 Josh Stone <jistone@redhat.com>
163 Philippe Waroquiers <philippe.waroquiers@skynet.be>
165 * inferiors.h: Include "gdb_vecs.h".
166 (struct process_info): Add syscalls_to_catch.
167 * inferiors.c (remove_process): Free syscalls_to_catch.
168 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
169 syscall_return stops.
170 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
171 * server.c (handle_general_set): Handle QCatchSyscalls.
172 (handle_query): Report support for QCatchSyscalls.
173 * target.h (struct target_ops): Add supports_catch_syscall.
174 (target_supports_catch_syscall): New macro.
175 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
176 (struct lwp_info): Add syscall_state.
177 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
178 Maintain syscall_state and syscalls_to_catch across exec.
179 (get_syscall_trapinfo): New function, proxy to the_low_target.
180 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
181 (linux_low_filter_event): Toggle syscall_state entry/return for
182 syscall traps, and set it ignored for all others.
183 (gdb_catching_syscalls_p): New function.
184 (gdb_catch_this_syscall_p): New function.
185 (linux_wait_1): Handle SYSCALL_SIGTRAP.
186 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
187 (linux_supports_catch_syscall): New function.
188 (linux_target_ops): Install it.
189 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
190 (the_low_target): Install it.
192 2016-01-12 Mike Frysinger <vapier@gentoo.org>
194 * acinclude.m4: Include new ../warning.m4 file.
195 * configure: Regenerated.
196 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
198 2016-01-12 Mike Frysinger <vapier@gentoo.org>
200 * ax.c (is_goto_target): Mark static.
201 * linux-low.c (register_addr): Likewise.
202 (linux_fetch_registers, linux_store_registers): Likewise.
203 * mem-break.c (any_persistent_commands): Fix old prototype.
204 (add_commands_to_breakpoint): Mark static.
205 * regcache.c (find_register_by_name): Delete unused func.
206 * remote-utils.c (hex_or_minus_one): Mark static.
207 * server.c (monitor_show_help): Mark static.
208 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
209 handle_v_requests): Likewise.
211 2016-01-12 Pedro Alves <palves@redhat.com>
213 Remove use of the registered trademark symbol throughout.
215 2016-01-08 Yao Qi <yao.qi@linaro.org>
217 * remote-utils.c (getpkt): If c is '\003', call target hook
220 2016-01-06 Yao Qi <yao.qi@linaro.org>
222 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
224 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
225 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
226 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
227 (thumb2_breakpoint): Declare.
228 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
230 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
231 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
232 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
234 2016-01-01 Joel Brobecker <brobecker@adacore.com>
236 * gdbreplay.c (gdbreplay_version): Change copyright year in
238 * server.c (gdbserver_version): Likewise.
240 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
242 * server.c (crc32_table): Delete.
243 (crc32): Use libiberty's xcrc32 function.
245 2015-12-22 Joel Brobecker <brobecker@adacore.com>
247 * lynx-low.c (lynx_delete_thread_callback): New function.
248 (lynx_mourn): Properly delete our process and all of its
249 threads. Remove call to clear_inferiors.
251 2015-12-22 Joel Brobecker <brobecker@adacore.com>
253 * target.c (thread_search_callback): Add check that
254 the thread_stopped target callback is not NULL before
257 2015-12-21 Yao Qi <yao.qi@linaro.org>
259 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
262 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
264 * server.c (handle_query): Call target_supports_software_single_step.
266 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
268 * linux-low.c (single_step): New function.
269 (linux_resume_one_lwp_throw): Call single_step.
270 (start_step_over): Likewise.
272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
274 * Makefile.in (SFILES): Append arch/arm-linux.c,
275 arch/arm-get-next-pcs.c.
276 (arm-linux.o): New rule.
277 (arm-get-next-pcs.o): New rule.
278 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
280 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
281 to linux-aarch32-low.c.
282 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
283 (arm_breakpoint_len, thumb_breakpoint): Likewise.
284 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
285 (thumb2_breakpoint_len): Likewise.
286 (arm_is_thumb_mode): Make non-static.
287 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
288 from linux-aarch32-low.c.
289 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
290 (arm_breakpoint_len, thumb_breakpoint): Likewise.
291 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
292 (thumb2_breakpoint_len): Likewise.
293 (arm_is_thumb_mode): New declaration.
294 * linux-arm-low.c: Include arch/arm-linux.h
295 aarch/arm-get-next-pcs.h, sys/syscall.h.
296 (get_next_pcs_ops): New struct.
297 (get_next_pcs_addr_bits_remove): New function.
298 (get_next_pcs_is_thumb): New function.
299 (get_next_pcs_read_memory_unsigned_integer): Likewise.
300 (arm_sigreturn_next_pc): Likewise.
301 (get_next_pcs_syscall_next_pc): Likewise.
302 (arm_gdbserver_get_next_pcs): Likewise.
303 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
305 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
306 * server.h: Include gdb_vecs.h.
308 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
310 * Makefile.in (SFILES): Append common/common-regcache.c.
311 (OBS): Append common-regcache.o.
312 (common-regcache.o): New rule.
313 * regcache.c (init_register_cache): Initialize cache to
315 (regcache_raw_read_unsigned): New function.
316 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
317 register_status enum.
319 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
321 * linux-aarch64-low.c (the_low_targets): Rename
322 breakpoint_reinsert_addr to get_next_pcs.
323 * linux-arm-low.c (the_low_targets): Likewise.
324 * linux-bfin-low.c (the_low_targets): Likewise.
325 * linux-cris-low.c (the_low_targets): Likewise.
326 * linux-crisv32-low.c (the_low_targets): Likewise.
327 * linux-low.c (can_software_single_step): Likewise.
328 (install_software_single_step_breakpoints): New function.
329 (start_step_over): Use install_software_single_step_breakpoints.
330 * linux-low.h: New CORE_ADDR vector.
331 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
333 * linux-mips-low.c (the_low_targets): Likewise.
334 * linux-nios2-low.c (the_low_targets): Likewise.
335 * linux-sparc-low.c (the_low_targets): Likewise.
337 2015-12-17 Pedro Alves <palves@redhat.com>
339 * linux-low.c (linux_kill_one_lwp): Remove references to
341 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
343 (linux_init_signals): Delete.
344 (initialize_low): Adjust.
345 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
347 2015-12-16 Pedro Alves <palves@redhat.com>
349 * configure.ac (compiler warning flags): When testing a
350 -Wno-foo option, check whether -Wfoo works instead.
351 * configure: Regenerate.
353 2015-12-11 Don Breazeal <donb@codesourcery.com>
355 * server.c (process_serial_event): Don't exit from gdbserver
356 in remote mode if there are still active inferiors.
358 2015-12-11 Yao Qi <yao.qi@linaro.org>
360 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
361 arm_breakpoint_at if the process is 32-bit.
363 2015-12-11 Yao Qi <yao.qi@linaro.org>
365 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
368 2015-12-07 Yao Qi <yao.qi@linaro.org>
370 * configure.srv: Append arm.o to srv_tgtobj for
371 aarch64*-*-linux* target.
372 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
373 from linux-arm-low.c.
374 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
375 (arm_breakpoint_len, thumb_breakpoint): Likewise.
376 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
377 (thumb2_breakpoint_len): Likewise.
378 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
379 (arm_breakpoint_kinds): Likewise.
380 (arm_breakpoint_kind_from_pc): Likewise.
381 (arm_sw_breakpoint_from_kind): Likewise.
382 (arm_breakpoint_kind_from_current_state): Likewise.
383 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
384 (arm_sw_breakpoint_from_kind): Declare.
385 (arm_breakpoint_kind_from_current_state): Declare.
386 (arm_breakpoint_at): Declare.
387 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
388 arm_sw_breakpoint_from_kind if process is 32-bit.
389 (aarch64_breakpoint_kind_from_pc): New function.
390 (aarch64_breakpoint_kind_from_current_state): New function.
391 (the_low_target): Initialize fields breakpoint_kind_from_pc
392 and breakpoint_kind_from_current_state.
393 * linux-arm-low.c (arm_breakpoint_kinds): Move to
395 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
396 (arm_breakpoint, arm_breakpoint_len): Likewise.
397 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
398 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
399 (arm_is_thumb_mode): Likewise.
400 (arm_breakpoint_at): Likewise.
401 (arm_breakpoint_kind_from_pc): Likewise.
402 (arm_sw_breakpoint_from_kind): Likewise.
403 (arm_breakpoint_kind_from_current_state): Likewise.
406 2015-08-04 Yao Qi <yao.qi@linaro.org>
408 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
409 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
410 * server.c (extended_protocol): Remove "static".
411 * server.h (extended_protocol): Declare it.
413 2015-12-04 Josh Stone <jistone@redhat.com>
415 * target.h (struct target_ops) <arch_setup>: Rename to ...
416 (struct target_ops) <post_create_inferior>: ... this.
417 (target_arch_setup): Rename to ...
418 (target_post_create_inferior): ... this, calling post_create_inferior.
419 * server.c (start_inferior): Update target_arch_setup calls to
420 target_post_create_inferior.
421 * linux-low.c (linux_low_ptrace_options): Forward declare.
422 (linux_arch_setup): Update its comment for general use.
423 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
424 (struct linux_target_ops): Use linux_post_create_inferior.
425 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
426 to post_create_inferior.
427 * nto-low.c (struct nto_target_ops): Likewise.
428 * spu-low.c (struct spu_target_ops): Likewise.
429 * win32-low.c (struct win32_target_ops): Likewise.
431 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
433 * linux-arm-low.c: Remove duplicate arch/arm.h include.
435 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
437 * linux-arm-low.c (arm_reinsert_addr): Remove function.
438 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
439 * linux-cris-low.c (cris_reinsert_addr> Remove function.
440 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
441 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
442 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
443 * linux-mips-low.c (mips_reinsert_addr): Remove function.
444 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
445 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
446 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
447 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
448 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
450 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
452 * linux-low.c (linux_look_up_symbols): Don't call
453 linux_supports_traceclone.
454 * linux-low.h (thread_db_init): Remove use_events argument.
455 * thread-db.c (thread_db_use_event): Remove global variable.
456 (struct thread_db) <td_thr_event_enable_p>: Remove field.
457 (struct thread_db) <td_create_bp>: Remove field.
458 (thread_db_create_event): Remove function.
459 (thread_db_enable_reporting): Likewise.
460 (find_one_thread): Don't check for thread_db_use_events.
461 (attach_thread): Likewise.
462 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
463 (try_thread_db_load_1): Don't check for thread_db_use_events.
464 (thread_db_init): Remove use_events argument and thread events
466 (remove_thread_event_breakpoints): Remove function.
467 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
469 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
471 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
474 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
475 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
476 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
477 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
479 * linux-crisv32-low.c (cris_supports_hardware_single_step):
481 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
482 * linux-low.c (can_hardware_single_step): Use
483 supports_hardware_single_step.
484 (can_software_single_step): New function.
485 (start_step_over): Call can_software_single_step.
486 (linux_supports_hardware_single_step): New function.
487 (struct target_ops) <supports_software_single_step>: Initialize.
488 * linux-low.h (struct linux_target_ops)
489 <supports_hardware_single_step>: Initialize.
490 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
491 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
492 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
493 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
494 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
496 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
497 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
498 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
499 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
501 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
502 (struct linux_target_ops) <tile_supports_hardware_single_step>:
504 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
506 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
509 * target.h (struct target_ops): <supports_software_single_step>:
511 (target_supports_software_single_step): New macro.
513 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
515 * linux-low.c (linux_wait_1): Fix pc advance condition.
516 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
517 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
519 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
521 * linux-arm-low.c (arm_is_thumb_mode): New function.
522 (arm_breakpoint_at): Use arm_is_thumb_mode.
523 (arm_breakpoint_kind_from_current_state): New function.
524 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
526 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
527 (linux_breakpoint_kind_from_current_state): New function.
528 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
529 * linux-low.h (struct linux_target_ops)
530 <breakpoint_kind_from_current_state>: New field.
531 * target.h (struct target_ops): Likewise.
532 (target_breakpoint_kind_from_current_state): New macro.
534 2015-11-30 Pedro Alves <palves@redhat.com>
536 * linux-low.c (linux_resume): Wake up the event loop before
539 2015-11-30 Pedro Alves <palves@redhat.com>
541 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
543 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
545 * target.c (struct thread_search): New structure.
546 (thread_search_callback): New function.
547 (prev_general_thread): New global.
548 (prepare_to_access_memory, done_accessing_memory): New functions.
549 * target.h (prepare_to_access_memory, done_accessing_memory):
550 Replace macros with function declarations.
552 2015-11-30 Pedro Alves <palves@redhat.com>
555 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
556 report TARGET_WAITKIND_NO_RESUMED.
557 * remote-utils.c (prepare_resume_reply): Handle
558 TARGET_WAITKIND_NO_RESUMED.
559 * server.c (report_no_resumed): New global.
560 (handle_query) <qSupported>: Handle "no-resumed+". Report
561 "no-resumed+" support.
562 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
563 return error if the client doesn't support no-resumed events.
564 (push_stop_notification): New function.
565 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
566 events if the client supports them.
568 2015-11-30 Pedro Alves <palves@redhat.com>
570 * linux-low.c (thread_still_has_status_pending_p): Don't check
572 (lwp_resumed): New function.
573 (status_pending_p_callback): Return early if the LWP is not
574 supposed to be resumed.
576 2015-11-30 Pedro Alves <palves@redhat.com>
578 * linux-low.c (handle_extended_wait): Assert that the LWP's
579 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
580 thread create events, leave the new child's status pending.
581 (linux_low_filter_event): If GDB wants to hear about thread exit
582 events, leave the LWP marked dead and don't delete it.
583 (linux_wait_for_event_filtered): Don't check for thread exit.
584 (filter_exit_event): New function.
585 (linux_wait_1): Use it, when returning an exit event.
586 (linux_resume_one_lwp_throw): Assert that the LWP's
587 waitstatus is TARGET_WAITKIND_IGNORE.
588 * remote-utils.c (prepare_resume_reply): Handle
589 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
590 * server.c (report_thread_events): New global.
591 (handle_general_set): Handle QThreadEvents.
592 (handle_query) <qSupported>: Handle and report QThreadEvents+;
593 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
594 TARGET_WAITKIND_THREAD_EXITED.
595 * server.h (report_thread_events): Declare.
597 2015-11-30 Pedro Alves <palves@redhat.com>
599 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
600 the thread's last_resume_kind was resume_stop.
602 2015-11-30 Pedro Alves <palves@redhat.com>
604 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
607 2015-11-30 Pedro Alves <palves@redhat.com>
609 * server.c (handle_v_requests): Handle vCtrlC.
611 2015-11-30 Pedro Alves <palves@redhat.com>
613 * gdbthread.h (find_any_thread_of_pid): Declare.
614 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
616 * server.c (handle_query): If current_thread is NULL, look for
617 another thread of the selected process.
619 2015-11-26 Daniel Colascione <dancol@dancol.org>
620 Simon Marchi <simon.marchi@ericsson.com>
622 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
623 * server.c (handle_qxfer_threads_worker): Refactor to include thread
625 * target.h (struct target_ops) <thread_name>: New field.
626 (target_thread_name): New macro.
628 2015-11-23 Joel Brobecker <brobecker@adacore.com>
630 * regcache.h (regcache_invalidate_pid): Add declaration.
631 * regcache.c (regcache_invalidate_pid): New function, extracted
632 from regcache_invalidate.
633 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
634 Add trivial documentation comment.
635 * lynx-low.c: Use regcache_invalidate_pid instead of
638 2015-11-23 Joel Brobecker <brobecker@adacore.com>
640 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
641 and Elf64_auxv_t if the target is Android.
643 2015-11-22 Doug Evans <xdje42@gmail.com>
645 * target.h: #include <sys/types.h>.
647 2015-11-19 Pedro Alves <palves@redhat.com>
649 * linux-low.c (linux_process_qsupported): Change prototype.
651 * linux-low.h (struct linux_target_ops) <process_qsupported>:
653 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
654 and adjust to loop over all features.
655 * server.c (handle_query) <qSupported>: Adjust to call
656 target_process_qsupported once, passing it a vector of unprocessed
658 * target.h (struct target_ops) <process_qsupported>: Change
660 (target_process_qsupported): Adjust.
662 2015-11-19 Pedro Alves <palves@redhat.com>
664 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
666 * configure: Regenerate.
668 2015-11-19 Pedro Alves <palves@redhat.com>
670 * configure: Regenerate.
672 2015-11-19 Yao Qi <yao.qi@linaro.org>
674 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
677 2015-11-19 Yao Qi <yao.qi@linaro.org>
679 * linux-aarch64-low.c (enum aarch64_operand_type): New.
680 (struct aarch64_operand): Move enum out.
682 2015-11-19 Yao Qi <yao.qi@linaro.org>
684 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
685 struct user_fpsimd_state *.
686 (aarch64_store_fpregset): Likewise.
688 2015-11-19 Yao Qi <yao.qi@linaro.org>
690 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
691 struct user_pt_regs *.
692 (aarch64_store_gregset): Likewise.
694 2015-11-18 Pedro Alves <palves@redhat.com>
696 * Makefile.in (all_object_files): Add $IPA_OBJS.
698 2015-11-17 Pedro Alves <palves@redhat.com>
700 * win32-low.c (win32_resume): Use gdb_signal_from_host,
701 GDB_SIGNAL_0 and gdb_signal_to_string.
703 2015-11-17 Pedro Alves <palves@redhat.com>
705 * win32-low.c (handle_output_debug_string): Remove parameter.
706 (win32_kill): Remove our_status local and adjust call to
707 handle_output_debug_string.
708 (get_child_debug_event): Adjust call to
709 handle_output_debug_string.
711 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
713 * linux-mips-low.c (mips_fill_gregset): Add cast.
714 (mips_store_gregset): Likewise.
715 (mips_fill_fpregset): Likewise.
716 (mips_store_fpregset): Likewise.
718 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
720 * linux-mips-low.c (mips_add_watchpoint): Rename private to
723 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
725 * linux-mips-low.c (mips_linux_new_thread): Change type of
726 watch_type to enum target_hw_bp_type.
728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
730 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
731 Change return type to arm_hwbp_type.
733 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
735 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
736 (arm_store_gregset): Likewise.
737 * linux-arm-low.c (arm_get_hwcap): Likewise.
738 (arm_read_description): Likewise.
740 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
742 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
744 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
746 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
747 (ppc_fill_vsxregset): Likewise.
748 (ppc_store_vsxregset): Likewise.
749 (ppc_fill_vrregset): Likewise.
750 (ppc_store_vrregset): Likewise.
751 (ppc_fill_evrregset): Likewise.
752 (ppc_store_evrregset): Likewise.
754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
756 * linux-ppc-low.c (ppc_usrregs_info): Remove
758 (ppc_arch_setup): Move lower in file.
760 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
762 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
763 (ps_pdwrite): Likewise.
765 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
767 * linux-arm-low.c (arm_new_thread): Move pointer dereference
768 to after assert checks.
770 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
772 * proc-service.c (ps_pdread): Add/adjust casts.
773 (ps_pdwrite): Add/adjust casts.
775 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
777 * server.c (handle_search_memory_1): Cast return value of
780 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
782 * server.c (write_qxfer_response): Change type of data to
785 2015-10-29 Pedro Alves <palves@redhat.com>
787 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
789 2015-10-29 Pedro Alves <palves@redhat.com>
791 * tracepoint.c (clear_installed_tracepoints): Add casts.
793 2015-10-29 Pedro Alves <palves@redhat.com>
795 * server.c (handle_v_cont, process_serial_event): Add enum
796 gdb_signal casts to signal parsing code.
798 2015-10-29 Pedro Alves <palves@redhat.com>
800 * linux-low.h (NULL_REGSET): Define.
801 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
802 * linux-arm-low.c (arm_regsets): Likewise.
803 * linux-crisv32-low.c (cris_regsets): Likewise.
804 * linux-m68k-low.c (m68k_regsets): Likewise.
805 * linux-mips-low.c (mips_regsets): Likewise.
806 * linux-nios2-low.c (nios2_regsets): Likewise.
807 * linux-ppc-low.c (ppc_regsets): Likewise.
808 * linux-s390-low.c (s390_regsets): Likewise.
809 * linux-sh-low.c (sh_regsets): Likewise.
810 * linux-sparc-low.c (sparc_regsets): Likewise.
811 * linux-tic6x-low.c (tic6x_regsets): Likewise.
812 * linux-tile-low.c (tile_regsets): Likewise.
813 * linux-x86-low.c (x86_regsets): Likewise.
814 * linux-xtensa-low.c (xtensa_regsets): Likewise.
816 2015-10-29 Pedro Alves <palves@redhat.com>
818 * linux-low.h (NULL_REGSET): Define.
819 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
820 * linux-arm-low.c (arm_regsets): Likewise.
821 * linux-crisv32-low.c (cris_regsets): Likewise.
822 * linux-m68k-low.c (m68k_regsets): Likewise.
823 * linux-mips-low.c (mips_regsets): Likewise.
824 * linux-nios2-low.c (nios2_regsets): Likewise.
825 * linux-ppc-low.c (ppc_regsets): Likewise.
826 * linux-s390-low.c (s390_regsets): Likewise.
827 * linux-sh-low.c (sh_regsets): Likewise.
828 * linux-sparc-low.c (sparc_regsets): Likewise.
829 * linux-tic6x-low.c (tic6x_regsets): Likewise.
830 * linux-tile-low.c (tile_regsets): Likewise.
831 * linux-x86-low.c (x86_regsets): Likewise.
832 * linux-xtensa-low.c (xtensa_regsets): Likewise.
834 2015-10-26 Doug Evans <dje@google.com>
836 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
838 2015-10-26 Doug Evans <dje@google.com>
840 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
842 2015-10-26 Doug Evans <dje@google.com>
844 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
846 (attach_thread, find_new_threads_callback): Ditto.
848 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
850 * mem-break.h (set_breakpoint_data): Remove.
852 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
854 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
855 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
856 (initialize_low): Remove set_breakpoint_data call.
857 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
858 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
859 (initialize_low): Remove set_breakpoint_data call.
860 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
861 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
862 (initialize_low): Remove set_breakpoint_data call.
864 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
866 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
867 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
868 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
869 * target.h (target_breakpoint_kind_from_pc): New macro.
871 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
873 * linux-low.c (default_breakpoint_kind_from_pc): New function.
874 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
875 the default breakpoint kind.
877 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
879 * linux-arm-low.c (arm_supports_z_point_type): Add software
882 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
884 * linux-arm-low.c: Refactor breakpoint definitions.
885 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
886 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
888 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
890 * Makefile.in: Add arm.c/o.
891 * configure.srv: Likewise.
892 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
893 (arm_breakpoint_kind_from_pc): New function.
894 (arm_sw_breakpoint_from_kind): Return proper kind.
895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
897 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
899 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
901 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
902 (struct raw_breakpoint) <size>: Remove.
903 (struct raw_breakpoint) <kind>: Add.
904 (bp_size): New function.
905 (bp_opcode): Likewise.
906 (find_raw_breakpoint_at): Adjust for kind.
907 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
908 (remove_memory_breakpoint): Adjust for kind call bp_size.
909 (set_raw_breakpoint_at): Adjust for kind.
910 (set_breakpoint): Likewise.
911 (set_breakpoint_at): Call breakpoint_kind_from_pc.
912 (delete_raw_breakpoint): Adjust for kind.
913 (delete_breakpoint): Likewise.
914 (find_gdb_breakpoint): Likewise.
915 (set_gdb_breakpoint_1): Likewise.
916 (set_gdb_breakpoint): Likewise.
917 (delete_gdb_breakpoint_1): Likewise.
918 (delete_gdb_breakpoint): Likewise.
919 (uninsert_raw_breakpoint): Likewise.
920 (reinsert_raw_breakpoint): Likewise.
921 (set_breakpoint_data): Remove.
922 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
923 (check_mem_read): Adjust for kind call bp_size.
924 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
925 (clone_one_breakpoint): Adjust for kind.
926 * mem-break.h (set_gdb_breakpoint): Likewise.
927 (delete_gdb_breakpoint): Likewise.
928 * server.c (process_serial_event): Likewise.
930 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
932 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
938 (arm_sw_breakpoint_from_kind): New function.
939 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
940 (struct linux_target_ops) <breakpoint>: Remove.
941 (struct linux_target_ops) <breakpoint_len>: Remove.
942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
944 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
945 (struct linux_target_ops) <breakpoint>: Remove.
946 (struct linux_target_ops) <breakpoint_len>: Remove.
947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
949 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
950 (struct linux_target_ops) <breakpoint>: Remove.
951 (struct linux_target_ops) <breakpoint_len>: Remove.
952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
954 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
955 and sw_breakpoint_from_kind to increment the pc.
956 (linux_breakpoint_kind_from_pc): New function.
957 (linux_sw_breakpoint_from_kind): New function.
958 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
959 (initialize_low): Call breakpoint_kind_from_pc and
960 sw_breakpoint_from_kind to replace breakpoint_data/len.
961 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
964 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
965 (struct linux_target_ops) <breakpoint>: Remove.
966 (struct linux_target_ops) <breakpoint_len>: Remove.
967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
969 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
970 (struct linux_target_ops) <breakpoint>: Remove.
971 (struct linux_target_ops) <breakpoint_len>: Remove.
972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
974 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
975 (struct linux_target_ops) <breakpoint>: Remove.
976 (struct linux_target_ops) <breakpoint_len>: Remove.
977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
979 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
980 (struct linux_target_ops) <breakpoint>: Remove.
981 (struct linux_target_ops) <breakpoint_len>: Remove.
982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
984 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
985 (struct linux_target_ops) <breakpoint>: Remove.
986 (struct linux_target_ops) <breakpoint_len>: Remove.
987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
989 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
990 (struct linux_target_ops) <breakpoint>: Remove.
991 (struct linux_target_ops) <breakpoint_len>: Remove.
992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
994 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
995 (struct linux_target_ops) <breakpoint>: Remove.
996 (struct linux_target_ops) <breakpoint_len>: Remove.
997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
999 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1000 (struct linux_target_ops) <breakpoint>: Remove.
1001 (struct linux_target_ops) <breakpoint_len>: Remove.
1002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1004 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1005 (struct linux_target_ops) <breakpoint>: Remove.
1006 (struct linux_target_ops) <breakpoint_len>: Remove.
1007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1009 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1010 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1011 (struct linux_target_ops) <breakpoint>: Remove.
1012 (struct linux_target_ops) <breakpoint_len>: Remove.
1013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1015 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1016 (struct linux_target_ops) <breakpoint>: Remove.
1017 (struct linux_target_ops) <breakpoint_len>: Remove.
1018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1021 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1023 * linux-cris-low.c (cris_get_pc): Remove void arg.
1025 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1027 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1030 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1032 * inferiors.c (thread_pid_matches_callback): New function.
1033 (find_thread_process): New function.
1034 (remove_thread): Reset current_thread.
1035 (remove_process): Assert threads have been removed first.
1037 2015-10-15 Yao Qi <yao.qi@linaro.org>
1039 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1041 (aarch64_remove_point): Likewise.
1042 * regcache.c (regcache_register_size): New function.
1044 2015-10-12 Yao Qi <yao.qi@linaro.org>
1046 * linux-aarch64-low.c: Update all callers as emit_load_store
1047 is renamed to aarch64_emit_load_store.
1049 2015-10-12 Yao Qi <yao.qi@linaro.org>
1051 * linux-aarch64-low.c: Update all callers of function renaming
1052 from emit_insn to aarch64_emit_insn.
1054 2015-10-12 Yao Qi <yao.qi@linaro.org>
1056 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1057 arch/aarch64-insn.h.
1058 (struct aarch64_memory_operand): Likewise.
1060 (emit_insn): Move to arch/aarch64-insn.c.
1061 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1062 (emit_load_store): Move to arch/aarch64-insn.c.
1063 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1064 (can_encode_int32): Remove.
1066 2015-10-12 Yao Qi <yao.qi@linaro.org>
1068 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1069 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1070 (aarch64_relocate_instruction): Likewise.
1071 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1072 (struct aarch64_insn_visitor): Likewise.
1074 2015-10-12 Yao Qi <yao.qi@linaro.org>
1076 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1077 (struct aarch64_insn_visitor): New.
1078 (struct aarch64_insn_relocation_data): New.
1079 (aarch64_ftrace_insn_reloc_b): New function.
1080 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1081 (aarch64_ftrace_insn_reloc_cb): Likewise.
1082 (aarch64_ftrace_insn_reloc_tb): Likewise.
1083 (aarch64_ftrace_insn_reloc_adr): Likewise.
1084 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1085 (aarch64_ftrace_insn_reloc_others): Likewise.
1087 (aarch64_relocate_instruction): Use visitor.
1089 2015-10-12 Yao Qi <yao.qi@linaro.org>
1091 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1092 int. Add argument buf.
1093 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1094 aarch64_relocate_instruction.
1096 2015-10-12 Yao Qi <yao.qi@linaro.org>
1098 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1099 argument insn. Remove local variable insn. Don't call
1101 (aarch64_install_fast_tracepoint_jump_pad): Call
1104 2015-09-30 Yao Qi <yao.qi@linaro.org>
1106 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1107 (emit_load_store_pair): Likewise.
1109 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1111 * dll.c (match_dll): Add cast(s).
1112 (unloaded_dll): Likewise.
1113 * linux-low.c (second_thread_of_pid_p): Likewise.
1114 (delete_lwp_callback): Likewise.
1115 (count_events_callback): Likewise.
1116 (select_event_lwp_callback): Likewise.
1117 (linux_set_resume_request): Likewise.
1118 * server.c (accumulate_file_name_length): Likewise.
1119 (emit_dll_description): Likewise.
1120 (handle_qxfer_threads_worker): Likewise.
1121 (visit_actioned_threads): Likewise.
1122 * thread-db.c (any_thread_of): Likewise.
1123 * tracepoint.c (same_process_p): Likewise.
1124 (match_blocktype): Likewise.
1125 (build_traceframe_info_xml): Likewise.
1127 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1129 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1131 (gdb_unparse_agent_expr): Likewise.
1132 * hostio.c (require_data): Likewise.
1133 (handle_pread): Likewise.
1134 * linux-low.c (disable_regset): Likewise.
1135 (fetch_register): Likewise.
1136 (store_register): Likewise.
1137 (get_dynamic): Likewise.
1138 (linux_qxfer_libraries_svr4): Likewise.
1139 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1140 (set_fast_tracepoint_jump): Likewise.
1141 (uninsert_fast_tracepoint_jumps_at): Likewise.
1142 (reinsert_fast_tracepoint_jumps_at): Likewise.
1143 (validate_inserted_breakpoint): Likewise.
1144 (clone_agent_expr): Likewise.
1145 * regcache.c (init_register_cache): Likewise.
1146 * remote-utils.c (putpkt_binary_1): Likewise.
1147 (decode_M_packet): Likewise.
1148 (decode_X_packet): Likewise.
1149 (look_up_one_symbol): Likewise.
1150 (relocate_instruction): Likewise.
1151 (monitor_output): Likewise.
1152 * server.c (handle_search_memory): Likewise.
1153 (handle_qxfer_exec_file): Likewise.
1154 (handle_qxfer_libraries): Likewise.
1155 (handle_qxfer): Likewise.
1156 (handle_query): Likewise.
1157 (handle_v_cont): Likewise.
1158 (handle_v_run): Likewise.
1159 (captured_main): Likewise.
1160 * target.c (write_inferior_memory): Likewise.
1161 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1162 * tracepoint.c (init_trace_buffer): Likewise.
1163 (add_tracepoint_action): Likewise.
1164 (add_traceframe): Likewise.
1165 (add_traceframe_block): Likewise.
1166 (cmd_qtdpsrc): Likewise.
1167 (cmd_qtdv): Likewise.
1168 (cmd_qtstatus): Likewise.
1169 (response_source): Likewise.
1170 (response_tsv): Likewise.
1171 (cmd_qtnotes): Likewise.
1172 (gdb_collect): Likewise.
1173 (initialize_tracepoint): Likewise.
1175 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1177 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1178 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1179 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1181 (enum aarch64_condition_codes): New enum.
1182 (w0): New static global.
1185 (struct aarch64_memory_operand) <type>: New
1186 MEMORY_OPERAND_POSTINDEX type.
1187 (postindex_memory_operand): New helper function.
1188 (emit_ret): New function.
1189 (emit_load_store_pair): New function, factored out of emit_stp
1190 with support for MEMORY_OPERAND_POSTINDEX.
1191 (emit_stp): Rewrite using emit_load_store_pair.
1192 (emit_ldp): New function.
1193 (emit_load_store): Likewise.
1194 (emit_ldr): Mention post-index instruction in comment.
1195 (emit_ldrh): New function.
1196 (emit_ldrb): New function.
1197 (emit_ldrsw): Mention post-index instruction in comment.
1198 (emit_str): Likewise.
1199 (emit_subs): New function.
1200 (emit_cmp): Likewise.
1201 (emit_and): Likewise.
1202 (emit_orr): Likewise.
1203 (emit_orn): Likewise.
1204 (emit_eor): Likewise.
1205 (emit_mvn): Likewise.
1206 (emit_lslv): Likewise.
1207 (emit_lsrv): Likewise.
1208 (emit_asrv): Likewise.
1209 (emit_mul): Likewise.
1210 (emit_sbfm): Likewise.
1211 (emit_sbfx): Likewise.
1212 (emit_ubfm): Likewise.
1213 (emit_ubfx): Likewise.
1214 (emit_csinc): Likewise.
1215 (emit_cset): Likewise.
1216 (emit_nop): Likewise.
1217 (emit_ops_insns): New helper function.
1218 (emit_pop): Likewise.
1219 (emit_push): Likewise.
1220 (aarch64_emit_prologue): New function.
1221 (aarch64_emit_epilogue): Likewise.
1222 (aarch64_emit_add): Likewise.
1223 (aarch64_emit_sub): Likewise.
1224 (aarch64_emit_mul): Likewise.
1225 (aarch64_emit_lsh): Likewise.
1226 (aarch64_emit_rsh_signed): Likewise.
1227 (aarch64_emit_rsh_unsigned): Likewise.
1228 (aarch64_emit_ext): Likewise.
1229 (aarch64_emit_log_not): Likewise.
1230 (aarch64_emit_bit_and): Likewise.
1231 (aarch64_emit_bit_or): Likewise.
1232 (aarch64_emit_bit_xor): Likewise.
1233 (aarch64_emit_bit_not): Likewise.
1234 (aarch64_emit_equal): Likewise.
1235 (aarch64_emit_less_signed): Likewise.
1236 (aarch64_emit_less_unsigned): Likewise.
1237 (aarch64_emit_ref): Likewise.
1238 (aarch64_emit_if_goto): Likewise.
1239 (aarch64_emit_goto): Likewise.
1240 (aarch64_write_goto_address): Likewise.
1241 (aarch64_emit_const): Likewise.
1242 (aarch64_emit_call): Likewise.
1243 (aarch64_emit_reg): Likewise.
1244 (aarch64_emit_pop): Likewise.
1245 (aarch64_emit_stack_flush): Likewise.
1246 (aarch64_emit_zero_ext): Likewise.
1247 (aarch64_emit_swap): Likewise.
1248 (aarch64_emit_stack_adjust): Likewise.
1249 (aarch64_emit_int_call_1): Likewise.
1250 (aarch64_emit_void_call_2): Likewise.
1251 (aarch64_emit_eq_goto): Likewise.
1252 (aarch64_emit_ne_goto): Likewise.
1253 (aarch64_emit_lt_goto): Likewise.
1254 (aarch64_emit_le_goto): Likewise.
1255 (aarch64_emit_gt_goto): Likewise.
1256 (aarch64_emit_ge_got): Likewise.
1257 (aarch64_emit_ops_impl): New static global variable.
1258 (aarch64_emit_ops): New target function, return
1259 &aarch64_emit_ops_impl.
1260 (struct linux_target_ops): Install it.
1262 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1264 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1265 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1267 * linux-aarch64-ipa.c: New file.
1268 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1270 (aarch64_get_thread_area): New target method.
1271 (extract_signed_bitfield): New helper function.
1272 (aarch64_decode_ldr_literal): New function.
1273 (enum aarch64_opcodes): New enum.
1274 (struct aarch64_register): New struct.
1275 (struct aarch64_operand): New struct.
1276 (x0): New static global.
1285 (aarch64_register): New helper function.
1286 (register_operand): Likewise.
1287 (immediate_operand): Likewise.
1288 (struct aarch64_memory_operand): New struct.
1289 (offset_memory_operand): New helper function.
1290 (preindex_memory_operand): Likewise.
1291 (enum aarch64_system_control_registers): New enum.
1292 (ENCODE): New macro.
1293 (emit_insn): New helper function.
1294 (emit_b): New function.
1295 (emit_bcond): Likewise.
1296 (emit_cb): Likewise.
1297 (emit_tb): Likewise.
1298 (emit_blr): Likewise.
1299 (emit_stp): Likewise.
1300 (emit_ldp_q_offset): Likewise.
1301 (emit_stp_q_offset): Likewise.
1302 (emit_load_store): Likewise.
1303 (emit_ldr): Likewise.
1304 (emit_ldrsw): Likewise.
1305 (emit_str): Likewise.
1306 (emit_ldaxr): Likewise.
1307 (emit_stxr): Likewise.
1308 (emit_stlr): Likewise.
1309 (emit_data_processing_reg): Likewise.
1310 (emit_data_processing): Likewise.
1311 (emit_add): Likewise.
1312 (emit_sub): Likewise.
1313 (emit_mov): Likewise.
1314 (emit_movk): Likewise.
1315 (emit_mov_addr): Likewise.
1316 (emit_mrs): Likewise.
1317 (emit_msr): Likewise.
1318 (emit_sevl): Likewise.
1319 (emit_wfe): Likewise.
1320 (append_insns): Likewise.
1321 (can_encode_int32_in): New helper function.
1322 (aarch64_relocate_instruction): New function.
1323 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1324 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1325 (struct linux_target_ops): Install aarch64_get_thread_area,
1326 aarch64_install_fast_tracepoint_jump_pad and
1327 aarch64_get_min_fast_tracepoint_insn_len.
1329 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1331 * Makefile.in (aarch64-insn.o): New rule.
1332 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1334 2015-09-21 Yao Qi <yao.qi@linaro.org>
1336 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1338 2015-09-21 Yao Qi <yao.qi@linaro.org>
1340 * tracepoint.c (max_jump_pad_size): Remove.
1342 2015-09-18 Yao Qi <yao.qi@linaro.org>
1344 * linux-aarch64-low.c: Don't include sys/uio.h.
1345 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1347 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1349 * tracepoint.c (eval_result_type): Change prototype.
1350 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1352 2015-09-15 Pedro Alves <palves@redhat.com>
1354 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1355 Check whether to report exec events instead of checking whether
1356 multiprocess is enabled.
1358 2015-09-15 Pedro Alves <palves@redhat.com>
1361 * remote-utils.c (prepare_resume_reply): Merge
1362 TARGET_WAITKIND_VFORK_DONE switch case with the
1363 TARGET_WAITKIND_FORKED case.
1365 2015-09-15 Yao Qi <yao.qi@linaro.org>
1367 * server.c (handle_query): Check string comparison using
1368 "else if" instead of "if".
1370 2015-09-15 Yao Qi <yao.qi@linaro.org>
1372 * server.c (vCont_supported): New global variable.
1373 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1374 matches. Append ";vContSupported+" to own_buf.
1375 (handle_v_requests): Append ";s;S" to own_buf if target supports
1376 hardware single step or vCont_supported is false.
1377 (capture_main): Set vCont_supported to zero.
1379 2015-09-15 Yao Qi <yao.qi@linaro.org>
1381 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1383 (linux_supports_hardware_single_step): ... New function.
1384 (linux_target_ops): Update.
1385 * lynx-low.c (lynx_target_ops): Set field
1386 supports_hardware_single_step to target_can_do_hardware_single_step.
1387 * nto-low.c (nto_target_ops): Likewise.
1388 * spu-low.c (spu_target_ops): Likewise.
1389 * win32-low.c (win32_target_ops): Likewise.
1390 * target.c (target_can_do_hardware_single_step): New function.
1391 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1392 Remove. <supports_hardware_single_step>: New field.
1393 (target_supports_conditional_breakpoints): Remove.
1394 (target_supports_hardware_single_step): New macro.
1395 (target_can_do_hardware_single_step): Declare.
1396 * server.c (handle_query): Use target_supports_hardware_single_step
1397 instead of target_supports_conditional_breakpoints.
1399 2015-09-15 Yao Qi <yao.qi@linaro.org>
1401 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1403 (struct linux_target_ops the_low_target): Install
1404 aarch64_linux_siginfo_fixup.
1406 2015-09-11 Don Breazeal <donb@codesourcery.com>
1407 Luis Machado <lgustavo@codesourcery.com>
1409 * linux-low.c (linux_mourn): Static declaration.
1410 (linux_arch_setup): Move in front of
1411 handle_extended_wait.
1412 (linux_arch_setup_thread): New function.
1413 (handle_extended_wait): Handle exec events. Call
1414 linux_arch_setup_thread. Make event_lwp argument a
1415 pointer-to-a-pointer.
1416 (check_zombie_leaders): Do not check stopped threads.
1417 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1418 (linux_low_filter_event): Add lwp and thread for exec'ing
1419 non-leader thread if leader thread has been deleted.
1420 Refactor code into linux_arch_setup_thread and call it.
1421 Pass child lwp pointer by reference to handle_extended_wait.
1422 (linux_wait_for_event_filtered): Update comment.
1423 (linux_wait_1): Prevent clobbering exec event status.
1424 (linux_supports_exec_events): New function.
1425 (linux_target_ops) <supports_exec_events>: Initialize new member.
1426 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1428 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1429 * server.c (report_exec_events): New global variable.
1430 (handle_query): Handle qSupported query for exec-events feature.
1431 (captured_main): Initialize report_exec_events.
1432 * server.h (report_exec_events): Declare new global variable.
1433 * target.h (struct target_ops) <supports_exec_events>: New
1435 (target_supports_exec_events): New macro.
1436 * win32-low.c (win32_target_ops) <supports_exec_events>:
1437 Initialize new member.
1439 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1441 * linux-low.c (linux_low_enable_btrace): Remove.
1442 (linux_target_ops): Replace linux_low_enable_btrace with
1443 linux_enable_btrace.
1445 2015-09-03 Yao Qi <yao.qi@linaro.org>
1447 * linux-aarch64-low.c (aarch64_insert_point): Call
1448 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1451 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1453 * linux-low.c (check_stopped_by_breakpoint): Use
1454 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1456 2015-08-27 Pedro Alves <palves@redhat.com>
1458 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1460 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1462 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1463 the XNEW-family equivalent.
1464 (compile_bytecodes): Likewise.
1465 * dll.c (loaded_dll): Likewise.
1466 * event-loop.c (append_callback_event): Likewise.
1467 (create_file_handler): Likewise.
1468 (create_file_event): Likewise.
1469 * hostio.c (handle_open): Likewise.
1470 * inferiors.c (add_thread): Likewise.
1471 (add_process): Likewise.
1472 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1473 * linux-arm-low.c (arm_new_process): Likewise.
1474 (arm_new_thread): Likewise.
1475 * linux-low.c (add_to_pid_list): Likewise.
1476 (linux_add_process): Likewise.
1477 (handle_extended_wait): Likewise.
1478 (add_lwp): Likewise.
1479 (enqueue_one_deferred_signal): Likewise.
1480 (enqueue_pending_signal): Likewise.
1481 (linux_resume_one_lwp_throw): Likewise.
1482 (linux_resume_one_thread): Likewise.
1483 (linux_read_memory): Likewise.
1484 (linux_write_memory): Likewise.
1485 * linux-mips-low.c (mips_linux_new_process): Likewise.
1486 (mips_linux_new_thread): Likewise.
1487 (mips_add_watchpoint): Likewise.
1488 * linux-x86-low.c (initialize_low_arch): Likewise.
1489 * lynx-low.c (lynx_add_process): Likewise.
1490 * mem-break.c (set_raw_breakpoint_at): Likewise.
1491 (set_breakpoint): Likewise.
1492 (add_condition_to_breakpoint): Likewise.
1493 (add_commands_to_breakpoint): Likewise.
1494 (clone_agent_expr): Likewise.
1495 (clone_one_breakpoint): Likewise.
1496 * regcache.c (new_register_cache): Likewise.
1497 * remote-utils.c (look_up_one_symbol): Likewise.
1498 * server.c (queue_stop_reply): Likewise.
1499 (start_inferior): Likewise.
1500 (queue_stop_reply_callback): Likewise.
1501 (handle_target_event): Likewise.
1502 * spu-low.c (fetch_ppc_memory): Likewise.
1503 (store_ppc_memory): Likewise.
1504 * target.c (set_target_ops): Likewise.
1505 * thread-db.c (thread_db_load_search): Likewise.
1506 (try_thread_db_load_1): Likewise.
1507 * tracepoint.c (add_tracepoint): Likewise.
1508 (add_tracepoint_action): Likewise.
1509 (create_trace_state_variable): Likewise.
1510 (cmd_qtdpsrc): Likewise.
1511 (cmd_qtro): Likewise.
1512 (add_while_stepping_state): Likewise.
1513 * win32-low.c (child_add_thread): Likewise.
1514 (get_image_name): Likewise.
1516 2015-08-25 Yao Qi <yao.qi@linaro.org>
1518 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1520 2015-08-25 Yao Qi <yao.qi@linaro.org>
1522 * Makefile.in (aarch64-linux.o): New rule.
1523 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1525 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1526 (aarch64_init_debug_reg_state): Make it extern.
1527 (aarch64_linux_prepare_to_resume): Remove.
1529 2015-08-25 Yao Qi <yao.qi@linaro.org>
1531 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1532 lwp_arch_private_info and ptid_of_lwp.
1534 2015-08-25 Yao Qi <yao.qi@linaro.org>
1536 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1537 Find proc_info by find_process_pid. All callers updated.
1539 2015-08-25 Yao Qi <yao.qi@linaro.org>
1541 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1543 (debug_reg_change_callback): Remove.
1544 (aarch64_notify_debug_reg_change): Remove.
1546 2015-08-25 Yao Qi <yao.qi@linaro.org>
1548 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1549 Call current_lwp_ptid.
1551 2015-08-25 Yao Qi <yao.qi@linaro.org>
1553 * linux-aarch64-low.c (debug_reg_change_callback): Use
1556 2015-08-25 Yao Qi <yao.qi@linaro.org>
1558 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1560 2015-08-25 Yao Qi <yao.qi@linaro.org>
1562 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1564 2015-08-25 Yao Qi <yao.qi@linaro.org>
1566 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1569 2015-08-25 Yao Qi <yao.qi@linaro.org>
1571 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1573 (debug_reg_change_callback): Remove argument entry and add argument
1574 lwp. Remove local variable thread. Don't print thread id in the
1575 debugging output. Don't check whether pid of thread equals to pid.
1576 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1577 iterate_over_lwps instead find_inferior.
1579 2015-08-24 Pedro Alves <palves@redhat.com>
1581 * inferiors.c (get_first_process): New function.
1582 * inferiors.h (get_first_process): New declaration.
1583 * remote-utils.c (read_ptid): Default to the first process in the
1584 list, instead of to the current thread's process.
1586 2015-08-24 Pedro Alves <palves@redhat.com>
1588 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1589 * event-loop.c: Likewise.
1590 * remote-utils.c: Likewise.
1591 * tracepoint.c: Likewise.
1593 2015-08-24 Pedro Alves <palves@redhat.com>
1595 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1598 2015-08-21 Pedro Alves <palves@redhat.com>
1600 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1601 instead of literal 1.
1603 2015-08-21 Pedro Alves <palves@redhat.com>
1605 * tdesc.c (default_description): Explicitly zero-initialize.
1607 2015-08-21 Pedro Alves <palves@redhat.com>
1610 * inferiors.c (remove_thread): Discard any pending stop reply for
1612 * server.c (remove_all_on_match_pid): Rename to ...
1613 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1615 (discard_queued_stop_replies): Change parameter to a ptid. Now
1617 (handle_v_kill, kill_inferior_callback, captured_main)
1618 (process_serial_event): Adjust.
1619 * server.h (discard_queued_stop_replies): Declare.
1621 2015-08-21 Pedro Alves <palves@redhat.com>
1623 * linux-low.c (wait_for_sigstop): Always switch to no thread
1624 selected if the previously current thread dies.
1625 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1626 process instead of the current thread's.
1627 * remote-utils.c (input_interrupt): Don't check if there's no
1629 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1630 current thread to the general thread fails, error out.
1631 (handle_qxfer_auxv, handle_qxfer_libraries)
1632 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1633 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1634 (handle_query): Check if there's a thread selected instead of
1635 checking whether there's any thread in the thread list.
1636 (handle_qxfer_threads, handle_qxfer_btrace)
1637 (handle_qxfer_btrace_conf): Don't error out early if there's no
1638 thread in the thread list.
1639 (handle_v_cont, myresume): Don't set the current thread to the
1641 (process_serial_event) <Hg handling>: Also set thread_id if the
1642 previous general thread is still alive.
1643 (process_serial_event) <g/G handling>: If setting the current
1644 thread to the general thread fails, error out.
1645 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1646 thread's lwp instead of the current thread's.
1647 * target.c (set_desired_thread): If the desired thread was not
1648 found, leave the current thread pointing to NULL. Return an int
1649 (boolean) indicating success.
1650 * target.h (set_desired_thread): Change return type to int.
1652 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1654 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1655 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1657 (ps_get_thread_area): New function.
1659 2015-08-19 Gary Benson <gbenson@redhat.com>
1661 * hostio.c (handle_pread): Do not attempt to read more data
1662 than hostio_reply_with_data can fit in a packet.
1664 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1666 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1668 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1670 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1672 2015-08-06 Pedro Alves <palves@redhat.com>
1674 * tracepoint.c (expr_eval_result): Now an int.
1676 2015-08-06 Pedro Alves <palves@redhat.com>
1678 * gdbthread.h (struct regcache): Forward declare.
1679 (struct thread_info) <regcache_data>: Now a struct regcache
1681 * inferiors.c (inferior_regcache_data)
1682 (set_inferior_regcache_data): Now work with struct regcache
1684 * inferiors.h (struct regcache): Forward declare.
1685 (inferior_regcache_data, set_inferior_regcache_data): Now work
1686 with struct regcache pointers.
1687 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1688 (free_register_cache_thread): Remove struct regcache pointer
1691 2015-08-06 Pedro Alves <palves@redhat.com>
1693 * server.c (captured_main): On error, print the exception message
1694 to stderr, and if run_once is set, throw a quit.
1696 2015-08-06 Pedro Alves <palves@redhat.com>
1698 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1701 2015-08-06 Pedro Alves <palves@redhat.com>
1703 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1704 reading beyond the passed in buffer length.
1706 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1708 * tracepoint.c (symbol_list) <required>: Remove.
1710 2015-08-06 Pedro Alves <palves@redhat.com>
1712 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1713 count if stopping and suspending threads.
1714 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1715 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1716 (linux_detach): Complete an ongoing step-over.
1717 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1719 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1720 (linux_wait_1): If passing a signal to the inferior after
1721 finishing a step-over, unsuspend and re-resume all lwps. If we
1722 see a single-step event but the thread should be continuing, don't
1723 pass the trap to gdb.
1724 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1725 internal_error instead of gdb_assert.
1726 (enqueue_pending_signal): New function.
1727 (check_ptrace_stopped_lwp_gone): Add debug output.
1728 (start_step_over): Use internal_error instead of gdb_assert.
1729 (complete_ongoing_step_over): New function.
1730 (linux_resume_one_thread): Don't resume a suspended thread.
1731 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1734 2015-08-06 Pedro Alves <palves@redhat.com>
1736 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1737 (linux_thread_alive): Use lwp_is_marked_dead.
1738 (extended_event_reported): Delete.
1739 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1740 instead of extended_event_reported.
1741 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1743 (lwp_is_marked_dead): New function.
1744 (lwp_running): Use lwp_is_marked_dead.
1745 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1748 2015-08-06 Pedro Alves <palves@redhat.com>
1750 * linux-low.c (linux_wait_1): Move fork event output out of the
1751 !report_to_gdb check. Pass event_child->waitstatus to
1752 target_waitstatus_to_string instead of ourstatus.
1754 2015-08-04 Yao Qi <yao.qi@linaro.org>
1756 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1757 if current_thread is 32 bit.
1759 2015-08-04 Yao Qi <yao.qi@linaro.org>
1761 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1762 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1763 * server.c (extended_protocol): Remove "static".
1764 * server.h (extended_protocol): Declare it.
1766 2015-08-04 Yao Qi <yao.qi@linaro.org>
1768 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1769 both aarch64 and aarch32.
1770 (aarch64_set_pc): Likewise.
1772 2015-08-04 Yao Qi <yao.qi@linaro.org>
1774 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1775 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1776 arm-with-neon.xml to srv_xmlfiles.
1777 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1778 (is_64bit_tdesc): New function.
1779 (aarch64_linux_read_description): New function.
1780 (aarch64_arch_setup): Call aarch64_linux_read_description.
1781 (regs_info): Rename to regs_info_aarch64.
1782 (aarch64_regs_info): Return right regs_info.
1783 (initialize_low_arch): Call initialize_low_arch_aarch32.
1785 2015-08-04 Yao Qi <yao.qi@linaro.org>
1787 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1788 * linux-aarch32-low.c: New file.
1789 * linux-aarch32-low.h: New file.
1790 * linux-arm-low.c (arm_fill_gregset): Move it to
1791 linux-aarch32-low.c.
1792 (arm_store_gregset): Likewise.
1793 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1794 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1795 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1796 (regs_info): Rename to regs_info_arm.
1797 (arm_regs_info): Return regs_info_aarch32 if
1798 have_ptrace_getregset is 1 and target description is
1799 arm_with_neon or arm_with_vfpv3.
1800 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1801 Call initialize_low_arch_aarch32 instead.
1803 2015-08-04 Yao Qi <yao.qi@linaro.org>
1805 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1806 * linux-low.c: ... here.
1807 * linux-low.h (have_ptrace_getregset): Declare it.
1809 2015-08-04 Pedro Alves <palves@redhat.com>
1811 * thread-db.c (struct thread_db): Use new typedefs.
1812 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1814 (disable_thread_event_reporting): Cast result of dlsym to
1815 destination function pointer type.
1816 (thread_db_mourn): Use td_ta_delete_ftype.
1818 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1820 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1822 (CDX_BREAKPOINT): Define for R2.
1823 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1824 (the_low_target): Add comments.
1826 2015-07-30 Yao Qi <yao.qi@linaro.org>
1828 * linux-arm-low.c (arm_hwcap): Remove it.
1829 (arm_read_description): New local variable arm_hwcap. Don't
1830 set arm_hwcap to zero.
1832 2015-07-30 Yao Qi <yao.qi@linaro.org>
1834 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1835 Use regcache->tdesc instead.
1836 (arm_store_wmmxregset): Likewise.
1837 (arm_fill_vfpregset): Likewise.
1838 (arm_store_vfpregset): Likewise.
1840 2015-07-30 Yao Qi <yao.qi@linaro.org>
1842 * linux-arm-low.c: Include arch/arm.h.
1843 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1844 (arm_store_gregset): Likewise.
1846 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1848 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1849 ptrace's 4th parameter.
1851 2015-07-27 Yao Qi <yao.qi@linaro.org>
1853 * configure.srv (case aarch64*-*-linux*): Don't set
1856 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1858 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1860 * linux-arm-low.c: Likewise.
1861 * linux-cris-low.c: Likewise.
1862 * linux-crisv32-low.c: Likewise.
1863 * linux-low.c: Likewise.
1864 * linux-m68k-low.c: Likewise.
1865 * linux-mips-low.c: Likewise.
1866 * linux-nios2-low.c: Likewise.
1867 * linux-s390-low.c: Likewise.
1868 * linux-sparc-low.c: Likewise.
1869 * linux-tic6x-low.c: Likewise.
1870 * linux-tile-low.c: Likewise.
1871 * linux-x86-low.c: Likewise.
1873 2015-07-24 Pedro Alves <palves@redhat.com>
1875 * config.in: Regenerate.
1876 * configure: Regenerate.
1878 2015-07-24 Pedro Alves <palves@redhat.com>
1880 * acinclude.m4: Include ../ptrace.m4.
1881 * configure.ac: Call GDB_AC_PTRACE.
1882 * config.in, configure: Regenerate.
1884 2015-07-24 Yao Qi <yao.qi@linaro.org>
1886 * linux-low.c (linux_create_inferior): Remove setting to
1887 proc->priv->new_inferior.
1888 (linux_attach): Likewise.
1889 (linux_low_filter_event): Likewise.
1890 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1892 2015-07-24 Yao Qi <yao.qi@linaro.org>
1894 * linux-low.c (linux_arch_setup): New function.
1895 (linux_low_filter_event): If proc->tdesc is NULL and
1896 proc->attached is true, call the_low_target.arch_setup.
1897 Otherwise, keep status pending, and return.
1898 (linux_resume_one_lwp_throw): Don't call get_pc if
1899 thread->while_stepping isn't NULL. Don't call
1900 get_thread_regcache if proc->tdesc is NULL.
1901 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1902 (linux_target_ops): Install arch_setup.
1903 * server.c (start_inferior): Call the_target->arch_setup.
1904 * target.h (struct target_ops) <arch_setup>: New field.
1905 (target_arch_setup): New marco.
1906 * lynx-low.c (lynx_target_ops): Update.
1907 * nto-low.c (nto_target_ops): Update.
1908 * spu-low.c (spu_target_ops): Update.
1909 * win32-low.c (win32_target_ops): Update.
1911 2015-07-24 Yao Qi <yao.qi@linaro.org>
1913 * linux-low.c (linux_add_process): Don't set
1914 proc->priv->new_inferior.
1915 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1916 (linux_attach): Likewise.
1918 2015-07-24 Yao Qi <yao.qi@linaro.org>
1920 * server.c (start_inferior): Code refactor.
1922 2015-07-24 Yao Qi <yao.qi@linaro.org>
1924 * server.c (process_serial_event): Set general_thread.
1926 2015-07-21 Yao Qi <yao.qi@linaro.org>
1928 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1929 aarch64_linux_get_debug_reg_capacity.
1931 2015-07-17 Yao Qi <yao.qi@linaro.org>
1933 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1934 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1935 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1936 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1937 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1938 (AARCH64_HWP_ALIGNMENT): Likewise.
1939 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1940 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1941 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1942 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1943 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1944 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1945 (struct aarch64_debug_reg_state): Likewise.
1946 (struct arch_lwp_info): Likewise.
1947 (aarch64_align_watchpoint): Likewise.
1948 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1949 (aarch64_watchpoint_length): Likewise.
1950 (aarch64_point_encode_ctrl_reg): Likewise
1951 (aarch64_point_is_aligned): Likewise.
1952 (aarch64_align_watchpoint): Likewise.
1953 (aarch64_linux_set_debug_regs):
1954 (aarch64_dr_state_insert_one_point): Likewise.
1955 (aarch64_dr_state_remove_one_point): Likewise.
1956 (aarch64_handle_breakpoint): Likewise.
1957 (aarch64_handle_aligned_watchpoint): Likewise.
1958 (aarch64_handle_unaligned_watchpoint): Likewise.
1959 (aarch64_handle_watchpoint): Likewise.
1961 2015-07-17 Yao Qi <yao.qi@linaro.org>
1963 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1964 and don't aarch64_get_debug_reg_state. All callers update.
1965 (aarch64_handle_aligned_watchpoint): Likewise.
1966 (aarch64_handle_unaligned_watchpoint): Likewise.
1967 (aarch64_handle_watchpoint): Likewise.
1968 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1969 (aarch64_remove_point): Likewise.
1971 2015-07-17 Yao Qi <yao.qi@linaro.org>
1973 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1975 (aarch64_handle_unaligned_watchpoint): Likewise.
1977 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1979 Revert the previous 3 commits:
1980 Move gdb_regex* to common/
1981 Move linux_find_memory_regions_full & co.
1982 gdbserver build-id attribute generator
1984 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1985 Jan Kratochvil <jan.kratochvil@redhat.com>
1987 gdbserver build-id attribute generator.
1988 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1989 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1990 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1992 (get_dynamic): Use find_pdhr to traverse program headers.
1993 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1994 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1995 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1996 (get_hex_build_id): New.
1997 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1998 to reply XML document.
2000 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2001 Jan Kratochvil <jan.kratochvil@redhat.com>
2003 * target.c: Include target/target-utils.h and fcntl.h.
2004 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2005 (target_fileio_read_stralloc): New functions.
2007 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2009 * Makefile.in (OBS): Add gdb_regex.o.
2011 * config.in: Rebuilt.
2012 * configure: Rebuilt.
2014 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2015 Jan Kratochvil <jan.kratochvil@redhat.com>
2017 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2018 * Makefile.in (OBS): Add target-utils.o.
2019 (linux-maps.o, target-utils.o): New.
2020 * configure.srv (srv_linux_obj): Add linux-maps.o.
2022 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2024 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2026 (the_low_target): Install it.
2028 2015-07-14 Pedro Alves <palves@redhat.com>
2030 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2031 Instead, ignore ECHILD, and throw an error for other errnos.
2033 2015-07-10 Pedro Alves <palves@redhat.com>
2035 * event-loop.c (struct callback_event) <data>: Change type to
2036 gdb_client_data instance instead of gdb_client_data pointer.
2037 (append_callback_event): Adjust.
2039 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2041 * linux-aarch64-low.c: Add comments for each linux_target_ops
2042 method. Remove comments already covered in target_ops and
2043 linux_target_ops definitions.
2044 (the_low_target): Add comments for each unimplemented method.
2046 2015-07-09 Yao Qi <yao.qi@linaro.org>
2048 * linux-aarch64-low.c (aarch64_regmap): Remove.
2049 (aarch64_usrregs_info): Remove.
2050 (regs_info): Set field usrregs to NULL.
2052 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2054 * linux-low.c: Include "rsp-low.h"
2055 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2056 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2057 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2058 (handle_btrace_enable_pt): New.
2059 (handle_btrace_general_set): Support "pt".
2060 (handle_btrace_conf_general_set): Support "pt:size".
2062 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2064 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2067 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2069 * linux-aarch64-low.c: Remove comment about endianness.
2070 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2071 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2074 2015-06-24 Gary Benson <gbenson@redhat.com>
2076 * linux-i386-ipa.c (stdint.h): Do not include.
2077 * lynx-i386-low.c (stdint.h): Likewise.
2078 * lynx-ppc-low.c (stdint.h): Likewise.
2079 * mem-break.c (stdint.h): Likewise.
2080 * thread-db.c (stdint.h): Likewise.
2081 * tracepoint.c (stdint.h): Likewise.
2082 * win32-low.c (stdint.h): Likewise.
2084 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2086 * server.c (write_qxfer_response): Update call to
2087 remote_escape_output.
2089 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2090 Jan Kratochvil <jan.kratochvil@redhat.com>
2092 Merge multiple hex conversions.
2093 * gdbreplay.c (tohex): Rename to 'fromhex'.
2094 (logchar): Use fromhex.
2096 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2098 * server.c (handle_qxfer_libraries): Set `version' attribute for
2101 2015-06-10 Gary Benson <gbenson@redhat.com>
2103 * target.h (struct target_ops) <multifs_open>: New field.
2104 <multifs_unlink>: Likewise.
2105 <multifs_readlink>: Likewise.
2106 * linux-low.c (nat/linux-namespaces.h): New include.
2107 (linux_target_ops): Initialize the_target->multifs_open,
2108 the_target->multifs_unlink and the_target->multifs_readlink.
2109 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2110 * hostio.c (hostio_fs_pid): New static variable.
2111 (hostio_handle_new_gdb_connection): New function.
2112 (handle_setfs): Likewise.
2113 (handle_open): Use the_target->multifs_open as appropriate.
2114 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2115 (handle_readlink): Use the_target->multifs_readlink as
2117 (handle_vFile): Handle vFile:setfs packets.
2118 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2119 after target_handle_new_gdb_connection.
2121 2015-06-10 Gary Benson <gbenson@redhat.com>
2123 * configure.ac (AC_CHECK_FUNCS): Add setns.
2124 * config.in: Regenerate.
2125 * configure: Likewise.
2126 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2127 (linux-namespaces.o): New rule.
2128 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2130 2015-06-09 Gary Benson <gbenson@redhat.com>
2132 * hostio.c (handle_open): Process mode argument with
2133 fileio_to_host_mode.
2135 2015-06-01 Yao Qi <yao.qi@linaro.org>
2137 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2138 * linux-x86-low.c: Likewise.
2140 2015-05-28 Don Breazeal <donb@codesourcery.com>
2142 * linux-low.c (handle_extended_wait): Initialize
2143 thread_info.last_resume_kind for new fork children.
2145 2015-05-15 Pedro Alves <palves@redhat.com>
2147 * target.h (target_handle_new_gdb_connection): Rewrite using if
2148 wrapped in do/while.
2150 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2152 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2153 * configure, config.in: Regenerate.
2154 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2157 2015-05-12 Don Breazeal <donb@codesourcery.com>
2159 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2160 PTRACE_EVENT_VFORK_DONE.
2161 (linux_low_ptrace_options, extended_event_reported): Add vfork
2163 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2164 and "vforkdone" for RSP 'T' Stop Reply Packet.
2165 * server.h (report_vfork_events): Declare
2168 2015-05-12 Don Breazeal <donb@codesourcery.com>
2170 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2171 (the_low_target) <new_fork>: Initialize new member.
2172 * linux-arm-low.c (arm_new_fork): New function.
2173 (the_low_target) <new_fork>: Initialize new member.
2174 * linux-low.c (handle_extended_wait): Call new target function
2176 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2177 * linux-mips-low.c (mips_add_watchpoint): New function
2178 extracted from mips_insert_point.
2179 (the_low_target) <new_fork>: Initialize new member.
2180 (mips_linux_new_fork): New function.
2181 (mips_insert_point): Call mips_add_watchpoint.
2182 * linux-x86-low.c (x86_linux_new_fork): New function.
2183 (the_low_target) <new_fork>: Initialize new member.
2185 2015-05-12 Don Breazeal <donb@codesourcery.com>
2187 * linux-low.c (handle_extended_wait): Implement return value,
2188 rename argument 'event_child' to 'event_lwp', handle
2189 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2190 (linux_low_ptrace_options): New function.
2191 (linux_low_filter_event): Call linux_low_ptrace_options,
2192 use different argument fo linux_enable_event_reporting,
2193 use return value from handle_extended_wait.
2194 (extended_event_reported): New function.
2195 (linux_wait_1): Call extended_event_reported and set
2196 status to report fork events.
2197 (linux_write_memory): Add pid to debug message.
2198 (reset_lwp_ptrace_options_callback): New function.
2199 (linux_handle_new_gdb_connection): New function.
2200 (linux_target_ops): Initialize new structure member.
2201 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2202 * lynx-low.c: Initialize new structure member.
2203 * remote-utils.c (prepare_resume_reply): Implement stop reason
2204 "fork" for "T" stop message.
2205 * server.c (handle_query): Call handle_new_gdb_connection.
2206 * server.h (report_fork_events): Declare global flag.
2207 * target.h (struct target_ops) <handle_new_gdb_connection>:
2209 (target_handle_new_gdb_connection): New macro.
2210 * win32-low.c: Initialize new structure member.
2212 2015-05-12 Don Breazeal <donb@codesourcery.com>
2214 * mem-break.c (APPEND_TO_LIST): Define macro.
2215 (clone_agent_expr): New function.
2216 (clone_one_breakpoint): New function.
2217 (clone_all_breakpoints): New function.
2218 * mem-break.h: Declare new functions.
2220 2015-05-12 Don Breazeal <donb@codesourcery.com>
2222 * linux-low.c (linux_supports_fork_events): New function.
2223 (linux_supports_vfork_events): New function.
2224 (linux_target_ops): Initialize new structure members.
2225 (initialize_low): Call linux_check_ptrace_features.
2226 * lynx-low.c (lynx_target_ops): Initialize new structure
2228 * server.c (report_fork_events, report_vfork_events):
2230 (handle_query): Add new features to qSupported packet and
2232 (captured_main): Initialize new global variables.
2233 * target.h (struct target_ops) <supports_fork_events>:
2235 <supports_vfork_events>: New member.
2236 (target_supports_fork_events): New macro.
2237 (target_supports_vfork_events): New macro.
2238 * win32-low.c (win32_target_ops): Initialize new structure
2241 2015-05-12 Gary Benson <gbenson@redhat.com>
2243 * server.c (handle_qxfer_exec_file): Use current process
2246 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2248 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2249 Remove HAVE_PTRACE_GETREGS conditionals.
2250 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2251 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2253 2015-05-08 Yao Qi <yao.qi@linaro.org>
2255 * linux-low.c (linux_supports_conditional_breakpoints): New
2257 (linux_target_ops): Install new target method.
2258 * lynx-low.c (lynx_target_ops): Install NULL hook for
2259 supports_conditional_breakpoints.
2260 * nto-low.c (nto_target_ops): Likewise.
2261 * spu-low.c (spu_target_ops): Likewise.
2262 * win32-low.c (win32_target_ops): Likewise.
2263 * server.c (handle_query): Check
2264 target_supports_conditional_breakpoints.
2265 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2267 (target_supports_conditional_breakpoints): New macro.
2269 2015-05-06 Pedro Alves <palves@redhat.com>
2272 * server.c (start_inferior): If the process exits, mourn it.
2274 2015-04-21 Gary Benson <gbenson@redhat.com>
2276 * hostio.c (fileio_open_flags_to_host): Factored out to
2277 fileio_to_host_openflags in common/fileio.c. Single use
2280 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2282 * linux-xtensa-low.c (xtensa_fill_gregset)
2283 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2286 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2288 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2289 (regs_info): Replace usrregs pointer with NULL.
2291 2015-04-17 Gary Benson <gbenson@redhat.com>
2293 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2294 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2295 * server.c (handle_qxfer_exec_file): New function.
2296 (qxfer_packets): Add exec-file entry.
2297 (handle_query): Report qXfer:exec-file:read as supported packet.
2299 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2301 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2303 2015-04-09 Gary Benson <gbenson@redhat.com>
2305 * hostio-errno.c (errno_to_fileio_error): Remove function.
2306 Update caller to use remote_fileio_to_fio_error.
2308 2015-04-09 Yao Qi <yao.qi@linaro.org>
2310 * linux-low.c (linux_insert_point): Call
2311 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2312 (linux_remove_point): Call remove_memory_breakpoint if type is
2314 * linux-x86-low.c (x86_insert_point): Don't call
2315 insert_memory_breakpoint.
2316 (x86_remove_point): Don't call remove_memory_breakpoint.
2318 2015-04-01 Pedro Alves <palves@redhat.com>
2319 Cleber Rosa <crosa@redhat.com>
2321 * server.c (gdbserver_usage): Reorganize and extend the usage
2324 2015-03-24 Pedro Alves <palves@redhat.com>
2326 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2327 output. Also dump TRAP_TRACE.
2328 (linux_low_filter_event): In debug output, distinguish a
2329 resume_stop SIGSTOP from a delayed SIGSTOP.
2331 2015-03-24 Gary Benson <gbenson@redhat.com>
2333 * linux-x86-low.c (x86_linux_new_thread): Moved to
2335 (x86_linux_prepare_to_resume): Likewise.
2337 2015-03-24 Gary Benson <gbenson@redhat.com>
2339 * Makefile.in (x86-linux-dregs.o): New rule.
2340 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2341 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2342 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2343 (x86_linux_dr_get): Likewise.
2344 (x86_linux_dr_set): Likewise.
2345 (update_debug_registers_callback): Likewise.
2346 (x86_linux_dr_set_addr): Likewise.
2347 (x86_linux_dr_get_addr): Likewise.
2348 (x86_linux_dr_set_control): Likewise.
2349 (x86_linux_dr_get_control): Likewise.
2350 (x86_linux_dr_get_status): Likewise.
2351 (x86_linux_update_debug_registers): Likewise.
2353 2015-03-24 Gary Benson <gbenson@redhat.com>
2355 * linux-x86-low.c (x86_linux_update_debug_registers):
2356 New function, factored out from...
2357 (x86_linux_prepare_to_resume): ...this.
2359 2015-03-24 Gary Benson <gbenson@redhat.com>
2361 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2362 (x86_linux_dr_set): Likewise.
2363 (update_debug_registers_callback): Likewise.
2364 (x86_linux_dr_set_addr): Likewise.
2365 (x86_linux_dr_get_addr): Likewise.
2366 (x86_linux_dr_set_control): Likewise.
2367 (x86_linux_dr_get_control): Likewise.
2368 (x86_linux_dr_get_status): Likewise.
2369 (x86_linux_prepare_to_resume): Likewise.
2371 2015-03-24 Gary Benson <gbenson@redhat.com>
2373 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2374 Use perror_with_name. Pass string through gettext.
2375 (x86_linux_dr_set): Likewise.
2377 2015-03-24 Gary Benson <gbenson@redhat.com>
2379 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2380 (x86_linux_dr_set_addr): ...this.
2381 (x86_dr_low_get_addr): Rename to...
2382 (x86_linux_dr_get_addr): ...this.
2383 (x86_dr_low_set_control): Rename to...
2384 (x86_linux_dr_set_control): ...this.
2385 (x86_dr_low_get_control): Rename to...
2386 (x86_linux_dr_get_control): ...this.
2387 (x86_dr_low_get_status): Rename to...
2388 (x86_linux_dr_get_status): ...this.
2389 (x86_dr_low): Update with new function names.
2391 2015-03-24 Gary Benson <gbenson@redhat.com>
2393 * Makefile.in (x86-linux.o): New rule.
2394 * configure.srv: Add x86-linux.o to relevant targets.
2395 * linux-low.c (lwp_set_arch_private_info): New function.
2396 (lwp_arch_private_info): Likewise.
2397 * linux-x86-low.c: Include nat/x86-linux.h.
2398 (arch_lwp_info): Removed structure.
2399 (update_debug_registers_callback):
2400 Use lwp_set_debug_registers_changed.
2401 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2402 and lwp_set_debug_registers_changed.
2403 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2405 2015-03-24 Gary Benson <gbenson@redhat.com>
2407 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2408 * linux-arm-low.c (arm_new_thread): Likewise.
2409 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2410 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2411 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2412 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2414 2015-03-24 Gary Benson <gbenson@redhat.com>
2416 * linux-low.c (ptid_of_lwp): New function.
2417 (lwp_is_stopped): Likewise.
2418 (lwp_stop_reason): Likewise.
2419 * linux-x86-low.c (update_debug_registers_callback):
2421 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2424 2015-03-24 Gary Benson <gbenson@redhat.com>
2426 * linux-low.h (linux_stop_lwp): Remove declaration.
2428 2015-03-24 Gary Benson <gbenson@redhat.com>
2430 * linux-low.h: Include nat/linux-nat.h.
2431 * linux-low.c (iterate_over_lwps_args): New structure.
2432 (iterate_over_lwps_filter): New function.
2433 (iterate_over_lwps): Likewise.
2434 * linux-x86-low.c (update_debug_registers_callback):
2435 Update signature to what iterate_over_lwps expects.
2436 Remove PID check that iterate_over_lwps now performs.
2437 (x86_dr_low_set_addr): Use iterate_over_lwps.
2438 (x86_dr_low_set_control): Likewise.
2440 2015-03-24 Gary Benson <gbenson@redhat.com>
2442 * linux-x86-low.c (x86_debug_reg_state): New function.
2443 (x86_linux_prepare_to_resume): Use the above.
2445 2015-03-24 Gary Benson <gbenson@redhat.com>
2447 * linux-low.c (current_lwp_ptid): New function.
2448 * linux-x86-low.c: Include nat/linux-nat.h.
2449 (x86_dr_low_get_addr): Use current_lwp_ptid.
2450 (x86_dr_low_get_control): Likewise.
2451 (x86_dr_low_get_status): Likewise.
2453 2015-03-20 Pedro Alves <palves@redhat.com>
2455 * tracepoint.c (cmd_qtstatus): Make "str" const.
2457 2015-03-20 Pedro Alves <palves@redhat.com>
2459 * server.c (handle_general_set): Make "req_str" const.
2461 2015-03-19 Pedro Alves <palves@redhat.com>
2463 * linux-low.c (linux_resume_one_lwp): Rename to ...
2464 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2465 instead call perror_with_name.
2466 (check_ptrace_stopped_lwp_gone): New function.
2467 (linux_resume_one_lwp): Reimplement as wrapper around
2468 linux_resume_one_lwp_throw that swallows errors if the LWP is
2471 2015-03-19 Pedro Alves <palves@redhat.com>
2473 * linux-low.c (count_events_callback, select_event_lwp_callback):
2474 No longer check whether the thread has resume_stop as last resume
2477 2015-03-19 Pedro Alves <palves@redhat.com>
2479 * linux-low.c (count_events_callback, select_event_lwp_callback):
2480 Use the lwp's status_pending_p field, not the thread's.
2482 2015-03-19 Pedro Alves <palves@redhat.com>
2484 * linux-low.c (select_event_lwp_callback): Update comments to
2485 no longer mention SIGTRAP.
2487 2015-03-18 Gary Benson <gbenson@redhat.com>
2489 * server.c (handle_query): Do not report vFile:fstat as supported.
2491 2015-03-11 Gary Benson <gbenson@redhat.com>
2493 * hostio.c (sys/types.h): New include.
2494 (sys/stat.h): Likewise.
2495 (common-remote-fileio.h): Likewise.
2496 (handle_fstat): New function.
2497 (handle_vFile): Handle vFile:fstat packets.
2499 2015-03-11 Gary Benson <gbenson@redhat.com>
2501 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2502 struct stat.st_blocks and struct stat.st_blksize.
2503 * configure: Regenerate.
2504 * config.in: Likewise.
2505 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2506 (OBS): Add common-remote-fileio.o.
2507 (common-remote-fileio.o): New rule.
2509 2015-03-09 Pedro Alves <palves@redhat.com>
2511 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2512 'struct sockaddr' pointer in 'accept' call.
2514 2015-03-09 Pedro Alves <palves@redhat.com>
2517 2015-03-07 Pedro Alves <palves@redhat.com>
2518 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2519 or <winsock2.h> here. Instead include "gdb_socket.h".
2520 (remote_open): Use union gdb_sockaddr_u.
2521 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2522 or <winsock2.h> here. Instead include "gdb_socket.h".
2523 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2524 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2526 (init_named_socket, gdb_agent_helper_thread): Use union
2529 2015-03-07 Pedro Alves <palves@redhat.com>
2531 * configure.ac (build_warnings): Move
2532 -Wdeclaration-after-statement to the C-specific set.
2533 * configure: Regenerate.
2535 2015-03-07 Pedro Alves <palves@redhat.com>
2537 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2538 or <winsock2.h> here. Instead include "gdb_socket.h".
2539 (remote_open): Use union gdb_sockaddr_u.
2540 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2541 or <winsock2.h> here. Instead include "gdb_socket.h".
2542 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2543 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2545 (init_named_socket, gdb_agent_helper_thread): Use union
2548 2015-03-07 Pedro Alves <palves@redhat.com>
2550 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2553 2015-03-06 Yao Qi <yao.qi@linaro.org>
2555 * linux-aarch64-low.c (aarch64_insert_point): Use
2556 show_debug_regs as a boolean.
2557 (aarch64_remove_point): Likewise.
2559 2015-03-05 Pedro Alves <palves@redhat.com>
2561 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2562 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2563 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2564 * nto-low.c (nto_target_ops): Likewise.
2565 * spu-low.c (spu_target_ops): Likewise.
2566 * win32-low.c (win32_target_ops): Likewise.
2568 2015-03-04 Pedro Alves <palves@redhat.com>
2570 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2571 Decide whether a breakpoint triggered based on the SIGTRAP's
2573 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2574 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2575 (linux_low_filter_event): Check for breakpoints before checking
2577 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2579 (linux_stopped_by_sw_breakpoint)
2580 (linux_supports_stopped_by_sw_breakpoint)
2581 (linux_stopped_by_hw_breakpoint)
2582 (linux_supports_stopped_by_hw_breakpoint): New functions.
2583 (linux_target_ops): Install new target methods.
2585 2015-03-04 Pedro Alves <palves@redhat.com>
2587 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2588 * server.c (swbreak_feature, hwbreak_feature): New globals.
2589 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2590 (captured_main): Clear swbreak_feature and hwbreak_feature.
2591 * server.h (swbreak_feature, hwbreak_feature): Declare.
2592 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2593 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2594 supports_stopped_by_hw_breakpoint>: New fields.
2595 (target_supports_stopped_by_sw_breakpoint)
2596 (target_stopped_by_sw_breakpoint)
2597 (target_supports_stopped_by_hw_breakpoint)
2598 (target_stopped_by_hw_breakpoint): Declare.
2600 2015-03-04 Pedro Alves <palves@redhat.com>
2602 enum lwp_stop_reason -> enum target_stop_reason
2603 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2604 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2605 (linux_wait_1, stuck_in_jump_pad_callback)
2606 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2607 (linux_stopped_by_watchpoint):
2608 * linux-low.h (enum lwp_stop_reason): Delete.
2609 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2610 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2612 2015-03-04 Yao Qi <yao.qi@linaro.org>
2614 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2616 2015-03-03 Gary Benson <gbenson@redhat.com>
2618 * hostio.c (handle_vFile): Fix prefix lengths.
2620 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2622 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2625 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2627 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2628 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2629 (clean): Add "rm -f" for above C files.
2630 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2631 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2632 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2633 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2634 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2635 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2636 (init_registers_s390x_vx_linux64)
2637 (init_registers_s390x_tevx_linux64)
2638 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2639 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2641 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2642 (s390_store_vxrs_high): New functions.
2643 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2645 (s390_arch_setup): Add logic for selecting one of the new target
2646 descriptions. Activate the new vector regsets if applicable.
2647 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2648 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2649 and init_registers_s390x_tevx_linux64.
2651 2015-03-01 Pedro Alves <palves@redhat.com>
2653 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2656 2015-02-27 Pedro Alves <palves@redhat.com>
2658 * linux-x86-low.c (u_debugreg_offset): New function.
2659 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2661 2015-02-27 Pedro Alves <palves@redhat.com>
2663 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2664 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2665 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2666 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2667 (ps_lsetfpregs, ps_getpid)
2668 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2669 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2670 (ps_lsetxregs, ps_plog): Declare.
2672 2015-02-27 Pedro Alves <palves@redhat.com>
2674 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2675 IP_AGENT_EXPORT_FUNC.
2676 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2677 IP_AGENT_EXPORT_FUNC.
2678 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2679 (IP_AGENT_EXPORT): Delete.
2680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2681 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2682 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2683 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2684 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2685 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2686 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2687 (traceframe_read_count, traceframe_write_count)
2688 (traceframes_created, trace_state_variables, get_raw_reg)
2689 (get_trace_state_variable_value, set_trace_state_variable_value)
2690 (ust_loaded, helper_thread_id, cmd_buf): Use
2691 IPA_SYM_EXPORTED_NAME.
2692 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2693 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2694 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2695 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2696 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2697 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2698 EXTERN_C_PUSH/EXTERN_C_POP.
2699 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2700 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2701 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2702 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2703 (traceframe_write_count, traceframe_read_count)
2704 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2705 (about_to_request_buffer_space, get_trace_state_variable_value)
2706 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2707 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2708 EXTERN_C_PUSH/EXTERN_C_POP.
2709 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2710 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2711 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2712 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2713 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2714 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2715 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2716 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2718 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2719 (IP_AGENT_EXPORT_VAR_DECL): Define.
2721 (gdb_agent_get_raw_reg): Declare.
2723 2015-02-27 Tom Tromey <tromey@redhat.com>
2724 Pedro Alves <palves@redhat.com>
2726 Rename symbols whose names are reserved C++ keywords throughout.
2728 2015-02-27 Pedro Alves <palves@redhat.com>
2730 * Makefile.in (COMPILER): New, get it from autoconf.
2731 (CXX): Get from autoconf instead.
2732 (COMPILE.pre): Use COMPILER.
2733 (CC-LD): Rename to ...
2734 (CC_LD): ... this. Use COMPILER.
2735 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2736 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2737 * acinclude.m4: Include build-with-cxx.m4.
2738 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2739 Disable -Werror by default if building in C++ mode.
2740 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2741 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2742 the C++ compiler. Save/restore CXXFLAGS too.
2743 * configure: Regenerate.
2745 2015-02-27 Pedro Alves <palves@redhat.com>
2747 * acinclude.m4: Include libiberty.m4.
2748 * configure.ac: Call libiberty_INIT.
2749 * config.in, configure: Regenerate.
2751 2015-02-26 Pedro Alves <palves@redhat.com>
2753 * linux-low.c (linux_wait_1): When incrementing the PC past a
2754 program breakpoint always use the_low_target.breakpoint_len as
2755 increment, rather than the maximum between that and
2756 the_low_target.decr_pc_after_break.
2758 2015-02-23 Pedro Alves <palves@redhat.com>
2760 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2761 thread was doing a step-over; always adjust the PC if
2762 we stepped over a permanent breakpoint.
2763 (linux_wait_1): If we stepped over breakpoint that was on top of a
2764 permanent breakpoint, manually advance the PC past it.
2766 2015-02-23 Pedro Alves <palves@redhat.com>
2768 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2770 (x86_fill_gregset, x86_store_gregset): Use it when handling
2773 2015-02-20 Pedro Alves <palves@redhat.com>
2775 * thread-db.c: Include "nat/linux-procfs.h".
2776 (thread_db_init): Skip listing new threads if the kernel supports
2777 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2779 2015-02-20 Pedro Alves <palves@redhat.com>
2781 * linux-low.c (status_pending_p_callback): Use ptid_match.
2783 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2785 PR breakpoints/16812
2786 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2787 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2788 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2790 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2792 PR breakpoints/15956
2793 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2795 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2797 * linux-low.c (linux_low_btrace_conf): Print size.
2798 * server.c (handle_btrace_conf_general_set): New.
2799 (hanle_general_set): Call handle_btrace_conf_general_set.
2800 (handle_query): Report Qbtrace-conf:bts:size as supported.
2802 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2804 * linux-low.c (linux_low_enable_btrace): Update parameters.
2805 (linux_low_btrace_conf): New.
2806 (linux_target_ops)<to_btrace_conf>: Initialize.
2807 * server.c (current_btrace_conf): New.
2808 (handle_btrace_enable): Rename to ...
2809 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2810 to target_enable_btrace. Update comment. Update users.
2811 (handle_qxfer_btrace_conf): New.
2812 (qxfer_packets): Add btrace-conf entry.
2813 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2814 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2815 (target_ops)<read_btrace_conf>: New.
2816 (target_enable_btrace): Update parameters.
2817 (target_read_btrace_conf): New.
2819 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2821 * server.c (handle_btrace_general_set): Remove call to
2822 target_supports_btrace.
2823 (supported_btrace_packets): New.
2824 (handle_query): Call supported_btrace_packets.
2825 * target.h: include btrace-common.h.
2826 (btrace_target_info): Removed.
2827 (supports_btrace, target_supports_btrace): Update parameters.
2829 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2831 * Makefile.in (SFILES): Add common/btrace-common.c.
2832 (OBS): Add common/btrace-common.o.
2833 (btrace-common.o): Add build rules.
2834 * linux-low: Include btrace-common.h.
2835 (linux_low_read_btrace): Use struct btrace_data. Call
2836 btrace_data_init and btrace_data_fini.
2838 2015-02-06 Pedro Alves <palves@redhat.com>
2840 * thread-db.c (find_new_threads_callback): Add debug output.
2842 2015-02-04 Pedro Alves <palves@redhat.com>
2844 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2845 (resume_stopped_resumed_lwps): New function.
2846 (linux_wait_for_event_filtered): Use it.
2848 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2850 * Makefile.in (SFILES): Add linux-personality.c.
2851 (linux-personality.o): New rule.
2852 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2853 list of objects to be built.
2854 * linux-low.c: Include nat/linux-personality.h.
2855 (linux_create_inferior): Remove code to disable address space
2856 randomization (moved to ../nat/linux-personality.c). Create
2857 cleanup to disable address space randomization.
2859 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2861 * Makefile.in (posix-strerror.o): New rule.
2862 (mingw-strerror.o): Likewise.
2863 * configure: Regenerated.
2864 * configure.ac: Source file ../common/common.host. Initialize new
2865 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2867 2015-01-14 Yao Qi <yao@codesourcery.com>
2869 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2870 (ppc-linux.o): New rule.
2871 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2872 * configure.ac: AC_CHECK_FUNCS(getauxval).
2873 * config.in: Re-generated.
2874 * configure: Re-generated.
2875 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2876 ppc64_64bit_inferior_p
2878 2015-01-14 Yao Qi <yao@codesourcery.com>
2880 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2881 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2882 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2883 (PT_ORIG_R3, PT_TRAP): Likewise.
2884 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2885 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2886 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2888 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2890 * i387-fp.c (i387_cache_to_xsave): In look over
2891 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2892 zmmh_low_space field by use of zmmh_high_space.
2894 2015-01-09 Pedro Alves <palves@redhat.com>
2896 * linux-low.c (step_over_bkpt): Move higher up in the file.
2897 (handle_extended_wait): Don't store the stop_pc here.
2898 (get_stop_pc): Adjust comments and rename to ...
2899 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2900 stopped for a software breakpoint or hardware breakpoint.
2901 (thread_still_has_status_pending_p): New function.
2902 (status_pending_p_callback): Use
2903 thread_still_has_status_pending_p. If the event is no longer
2904 interesting, resume the LWP.
2905 (handle_tracepoints): Add assert.
2906 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2907 (wstatus_maybe_breakpoint): New function.
2908 (cancel_breakpoint): Delete function.
2909 (check_stopped_by_watchpoint): New function, factored out from
2910 linux_low_filter_event.
2911 (lp_status_maybe_breakpoint): Delete function.
2912 (linux_low_filter_event): Remove filter_ptid argument.
2913 Leave thread group exits pending here. Store the LWP's stop PC.
2914 Always leave events pending.
2915 (linux_wait_for_event_filtered): Pull all events out of the
2916 kernel, and leave them all pending.
2917 (count_events_callback, select_event_lwp_callback): Consider all
2919 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2920 (select_event_lwp): Only give preference to the stepping LWP in
2921 all-stop mode. Adjust comments.
2922 (ignore_event): New function.
2923 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2924 references to cancel_breakpoints. Adjust to renames. Also give
2925 equal priority to all LWPs that have had events in non-stop mode.
2926 If reporting a software breakpoint event, unadjust the LWP's PC.
2927 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2928 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2930 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2931 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2932 (linux_stopped_by_watchpoint): Adjust.
2933 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2934 * linux-low.h (enum lwp_stop_reason): New.
2935 (struct lwp_info) <stop_pc>: Adjust comment.
2936 <stopped_by_watchpoint>: Delete field.
2937 <stop_reason>: New field.
2938 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2939 * mem-break.c (software_breakpoint_inserted_here)
2940 (hardware_breakpoint_inserted_here): New function.
2941 * mem-break.h (software_breakpoint_inserted_here)
2942 (hardware_breakpoint_inserted_here): Declare.
2943 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2944 (cancel_breakpoints): Delete.
2945 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2946 (upload_fast_traceframes): Remove references to
2949 2015-01-09 Pedro Alves <palves@redhat.com>
2951 * thread-db.c (find_new_threads_callback): Ignore thread if the
2952 kernel thread ID is -1.
2954 2015-01-09 Pedro Alves <palves@redhat.com>
2956 * linux-low.c (linux_attach_fail_reason_string): Move to
2957 nat/linux-ptrace.c, and rename.
2958 (linux_attach_lwp): Update comment.
2959 (attach_proc_task_lwp_callback): New function.
2960 (linux_attach): Adjust to rename and use
2961 linux_proc_attach_tgid_threads.
2962 (linux_attach_fail_reason_string): Delete declaration.
2964 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2966 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2967 * server.c (gdbserver_version): Likewise.
2969 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2971 * remote-utils.c: Include ctype.h.
2972 (input_interrupt): Explicitly handle the case when the char
2973 received is the NUL byte. Improve the printing of non-ASCII
2976 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2978 * linux-low.c (linux_low_filter_event): Update call to
2979 linux_enable_event_reporting following the addition of
2980 a new parameter to that function.
2982 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2985 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2986 (AARCH64_FPCR_REGNO): Likewise.
2987 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2988 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2989 (aarch64_store_fpregset): Likewise.
2991 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2993 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2994 Remove FIXME comment about assumption about N.
2996 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2998 * configure.ac: If large-file support is disabled in GDBserver,
2999 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3000 * configure: Regenerate.
3002 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3004 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3005 warning upon ENODATA from ptrace.
3006 * linux-s390-low.c (s390_store_tdb): New.
3007 (s390_regsets): Add regset for NT_S390_TDB.
3009 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3011 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3012 without a fill_function.
3013 * linux-s390-low.c (s390_fill_last_break): Remove.
3014 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3015 (s390_arch_setup): Use regset's size instead of fill_function for
3018 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3020 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3021 the regset's store function when ptrace returned an error.
3022 * regcache.c (get_thread_regcache): Invalidate register cache
3023 before fetching inferior's registers.
3025 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3027 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3028 while-loop as for-loop.
3029 (regsets_store_inferior_registers): Likewise.
3031 2014-11-28 Yao Qi <yao@codesourcery.com>
3033 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3034 * config.in, configure: Re-generate.
3035 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3038 2014-11-21 Yao Qi <yao@codesourcery.com>
3040 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3041 (AC_CHECK_HEADERS): Remove malloc.h.
3042 * configure: Re-generated.
3043 * config.in: Re-generated.
3044 * server.h: Don't include alloca.h and malloc.h.
3045 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3046 Don't include malloc.h.
3048 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3050 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3051 corresponding ERRNO check in same block.
3053 2014-11-12 Pedro Alves <palves@redhat.com>
3055 * server.c (cont_thread): Update comment.
3056 (start_inferior, attach_inferior): No longer clear cont_thread.
3057 (handle_v_cont): No longer set cont_thread.
3058 (captured_main): Clear cont_thread each time a GDB connects.
3060 2014-11-12 Pedro Alves <palves@redhat.com>
3062 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3063 thread, and don't resume all threads if the Hc thread has exited.
3065 2014-11-12 Pedro Alves <palves@redhat.com>
3067 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3068 the process group instead of to a specific LWP.
3070 2014-10-15 Pedro Alves <palves@redhat.com>
3073 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3075 (arm_set_thread_context): Delete.
3076 (the_low_target): Adjust.
3077 * win32-i386-low.c (debug_registers_changed)
3078 (debug_registers_used): Delete.
3079 (update_debug_registers_callback): New function.
3080 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3081 needing to update their debug registers.
3082 (win32_get_current_dr): New function.
3083 (x86_dr_low_get_addr, x86_dr_low_get_control)
3084 (x86_dr_low_get_status): Fetch the debug register from the thread
3086 (i386_initial_stuff): Adjust.
3087 (i386_get_thread_context): Remove current_event parameter. Don't
3088 clear debug_registers_changed nor copy DR values to
3090 (i386_set_thread_context): Delete.
3091 (i386_prepare_to_resume): New function.
3092 (i386_thread_added): Mark the thread as needing to update irs
3094 (the_low_target): Remove i386_set_thread_context and install
3095 i386_prepare_to_resume.
3096 * win32-low.c (win32_get_thread_context): Adjust.
3097 (win32_set_thread_context): Use SetThreadContext
3099 (win32_prepare_to_resume): New function.
3100 (win32_require_context): New function, factored out from ...
3101 (thread_rec): ... this.
3102 (continue_one_thread): Call win32_prepare_to_resume on each thread
3103 we're about to continue.
3104 (win32_resume): Call win32_prepare_to_resume on the event thread.
3105 * win32-low.h (struct win32_thread_info)
3106 <debug_registers_changed>: New field.
3107 (struct win32_target_ops): Change prototype of set_thread_context,
3108 delete set_thread_context and add prepare_to_resume.
3109 (win32_require_context): New declaration.
3111 2014-10-08 Gary Benson <gbenson@redhat.com>
3113 * server.h: Do not include common-exceptions.h.
3115 2014-10-08 Gary Benson <gbenson@redhat.com>
3117 * server.h: Do not include cleanups.h.
3119 2014-09-30 James Hogan <james.hogan@imgtec.com>
3121 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3124 2014-09-23 Yao Qi <yao@codesourcery.com>
3126 * linux-low.c (lp_status_maybe_breakpoint): New function.
3127 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3128 (count_events_callback): Likewise.
3129 (select_event_lwp_callback): Likewise.
3130 (cancel_breakpoints_callback): Likewise.
3132 2014-09-19 Don Breazeal <donb@codesourcery.com>
3134 * linux-low.c (handle_extended_wait): Call
3135 linux_ptrace_get_extended_event.
3136 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3137 linux_is_extended_waitstatus.
3139 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3141 * Makefile.in (CPPFLAGS): Define.
3142 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3143 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3145 2014-09-16 Gary Benson <gbenson@redhat.com>
3147 * inferiors.h (current_inferior): Renamed as...
3148 (current_thread): New variable. All uses updated.
3149 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3150 (maybe_move_out_of_jump_pad): Likewise.
3151 (cancel_breakpoint): Likewise.
3152 (linux_low_filter_event): Likewise.
3153 (wait_for_sigstop): Likewise.
3154 (linux_resume_one_lwp): Likewise.
3155 (need_step_over_p): Likewise.
3156 (start_step_over): Likewise.
3157 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3158 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3159 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3160 and save_inferior as saved_thread.
3161 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3163 (regcache_invalidate_thread): Likewise.
3164 * remote-utils.c (prepare_resume_reply): Likewise.
3165 * thread-db.c (thread_db_get_tls_address): Likewise.
3166 (disable_thread_event_reporting): Likewise.
3167 (remove_thread_event_breakpoints): Likewise.
3168 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3170 * target.h (set_desired_inferior): Renamed as...
3171 (set_desired_thread): New declaration. All uses updated.
3172 * server.c (myresume): Updated comment to reference thread instead
3174 (handle_serial_event): Likewise.
3175 (handle_target_event): Likewise.
3177 2014-09-12 Tom Tromey <tromey@redhat.com>
3178 Gary Benson <gbenson@redhat.com>
3180 * regcache.h: Include common-regcache.h.
3181 (regcache_read_pc): Don't declare.
3182 * regcache.c (get_thread_regcache_for_ptid): New function.
3184 2014-09-11 Tom Tromey <tromey@redhat.com>
3185 Gary Benson <gbenson@redhat.com>
3187 * symbol.c: New file.
3188 * Makefile.in (SFILES): Add symbol.c.
3189 (OBS): Add symbol.o.
3191 2014-09-11 Gary Benson <gbenson@redhat.com>
3193 * target.c (target_stop_ptid, target_continue_ptid): New
3196 2014-09-11 Tom Tromey <tromey@redhat.com>
3197 Gary Benson <gbenson@redhat.com>
3199 * target.h: Include target/target.h.
3200 * target.c (target_read_memory, target_read_uint32)
3201 (target_write_memory): New functions.
3203 2014-09-11 Gary Benson <gbenson@redhat.com>
3205 * server.h (debug_hw_points): Don't declare.
3206 * server.c (debug_hw_points): Don't define. Replace all uses
3207 with show_debug_regs.
3208 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3209 all uses with show_debug_regs.
3211 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3213 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3214 endianness into account.
3215 (ppc_supply_ptrace_register): Likewise.
3217 2014-09-03 James Hogan <james.hogan@imgtec.com>
3219 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3220 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3222 2014-09-03 Gary Benson <gbenson@redhat.com>
3224 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3225 ALL_DEBUG_ADDRESS_REGISTERS.
3227 2014-09-02 Gary Benson <gbenson@redhat.com>
3229 * i386-low.h: Renamed as...
3230 * x86-low.h: New file. All type, function and variable name
3231 prefixes changed from "i386_" to "x86_". All references updated.
3232 * i386-low.c: Renamed as...
3233 * x86-low.c: New file. All type, function and variable name
3234 prefixes changed from "i386_" to "x86_". All references updated.
3236 2014-09-02 Gary Benson <gbenson@redhat.com>
3238 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3239 (x86_linux_new_thread): Likewise.
3241 2014-08-29 Gary Benson <gbenson@redhat.com>
3243 * server.h (setjmp.h): Do not include.
3244 (toplevel): Do not declare.
3245 (common-exceptions.h): Include.
3246 (cleanups.h): Likewise.
3247 * server.c (toplevel): Do not define.
3248 (exit_code): New static global.
3249 (detach_or_kill_for_exit_cleanup): New function.
3250 (main): New function. Original main renamed to...
3251 (captured_main): New function.
3252 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3254 2014-08-29 Gary Benson <gbenson@redhat.com>
3256 * Makefile.in (SFILES): Add common/common-exceptions.c.
3257 (OBS): Add common-exceptions.o.
3258 (common-exceptions.o): New rule.
3259 * utils.c (prepare_to_throw_exception): New function.
3261 2014-08-29 Gary Benson <gbenson@redhat.com>
3263 * config.in: Regenerate.
3264 * configure: Likewise.
3266 2014-08-29 Gary Benson <gbenson@redhat.com>
3268 * Makefile.in (SFILES): Add common/cleanups.c.
3270 (cleanups.o): New rule.
3272 2014-08-29 Gary Benson <gbenson@redhat.com>
3274 * utils.c (internal_vwarning): New function.
3276 2014-08-28 Gary Benson <gbenson@redhat.com>
3278 * utils.h (fatal): Remove declaration.
3279 * utils.c (fatal): Remove function.
3281 2014-08-28 Gary Benson <gbenson@redhat.com>
3283 * tracepoint.c (gdb_agent_init): Replace fatal with
3285 (initialize_tracepoint): Likewise.
3287 2014-08-28 Gary Benson <gbenson@redhat.com>
3289 * remote-utils.c (remote_prepare): Replace fatal with error.
3291 2014-08-28 Gary Benson <gbenson@redhat.com>
3293 * linux-low.c (linux_async): Replace fatal with warning.
3295 (linux_start_non_stop): Return -1 if linux_async failed.
3297 2014-08-28 Gary Benson <gbenson@redhat.com>
3299 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3301 (i386_dr_low_get_addr): Remove vague comment.
3302 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3305 2014-08-28 Gary Benson <gbenson@redhat.com>
3307 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3308 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3310 (linux_resume_one_lwp): Likewise.
3311 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3313 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3314 with internal_error.
3315 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3316 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3317 (find_register_by_name): Replace fatal with internal_error.
3318 (find_regno): Likewise.
3319 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3320 * thread-db.c (thread_db_create_event): Likewise.
3321 (thread_db_load_search): Likewise.
3322 (try_thread_db_load_1): Likewise.
3323 * tracepoint.c (get_jump_space_head): Replace fatal with
3325 (claim_trampoline_space): Likewise.
3326 (have_fast_tracepoint_trampoline_buffer): Likewise.
3327 (cmd_qtstart): Likewise.
3328 (stop_tracing): Likewise.
3329 (fast_tracepoint_collecting): Likewise.
3330 (target_malloc): Likewise.
3331 (download_tracepoint): Likewise.
3332 (download_trace_state_variables): Replace check with gdb_assert.
3333 (upload_fast_traceframes): Replace fatal with internal_error.
3335 2014-08-19 Tom Tromey <tromey@redhat.com>
3336 Gary Benson <gbenson@redhat.com>
3338 * Makefile.in (SFILES): Add common/common-debug.c.
3339 (OBS): Add common-debug.o.
3340 (common-debug.o): New rule.
3341 * debug.h (debug_printf): Don't declare.
3342 * debug.c (debug_printf): Renamed and rewritten as...
3343 (debug_vprintf): New function.
3345 2014-08-19 Gary Benson <gbenson@redhat.com>
3347 * utils.h: Do not include print-utils.h.
3349 2014-08-19 Tom Tromey <tromey@redhat.com>
3350 Gary Benson <gbenson@redhat.com>
3352 * server.h: Add static assertion.
3353 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3355 2014-08-19 Tom Tromey <tromey@redhat.com>
3356 Gary Benson <gbenson@redhat.com>
3358 * Makefile.in (SFILES): Add common/errors.c.
3359 (OBS): Add errors.o.
3360 (IPA_OBS): Add errors-ipa.o.
3361 (errors.o): New rule.
3362 (errors-ipa.o): Likewise.
3363 * utils.h (perror_with_name, error, warning): Don't declare.
3364 * utils.c (warning): Renamed and rewritten as...
3365 (vwarning): New function.
3366 (error): Renamed and rewritten as...
3367 (verror): New function.
3368 (internal_error): Renamed and rewritten as...
3369 (internal_verror): New function.
3371 2014-08-07 Gary Benson <gbenson@redhat.com>
3373 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3374 * configure: Regenerate.
3375 * config.in: Likewise.
3376 * server.h: Do not include errno.h.
3377 * event-loop.c: Likewise.
3378 * hostio-errno.c: Likewise.
3379 * linux-low.c: Likewise.
3380 * remote-utils.c: Likewise.
3381 * spu-low.c: Likewise.
3382 * utils.c: Likewise.
3383 * gdbreplay.c: Unconditionally include errno.h.
3385 2014-08-07 Gary Benson <gbenson@redhat.com>
3387 * server.h: Do not include string.h.
3388 * event-loop.c: Likewise.
3389 * linux-low.c: Likewise.
3390 * regcache.c: Likewise.
3391 * remote-utils.c: Likewise.
3392 * spu-low.c: Likewise.
3393 * utils.c: Likewise.
3395 2014-08-07 Gary Benson <gbenson@redhat.com>
3397 * server.h: Do not include gdb_assert.h.
3399 2014-08-07 Gary Benson <gbenson@redhat.com>
3401 * server.h: Do not include common-utils.h.
3403 2014-08-07 Gary Benson <gbenson@redhat.com>
3405 * server.h: Do not include ptid.h.
3406 * notif.h: Likewise.
3408 2014-08-07 Gary Benson <gbenson@redhat.com>
3410 * server.h: Do not include gdb_locale.h.
3412 2014-08-07 Gary Benson <gbenson@redhat.com>
3414 * server.h: Do not include gdb/signals.h.
3415 * win32-low.c: Likewise.
3417 2014-08-07 Gary Benson <gbenson@redhat.com>
3419 * server.h: Do not include pathmax.h.
3421 2014-08-07 Gary Benson <gbenson@redhat.com>
3423 * server.h: Do not include libiberty.h.
3424 * linux-bfin-low.c: Likewise.
3426 2014-08-07 Gary Benson <gbenson@redhat.com>
3428 * server.h: Do not include ansidecl.h.
3430 2014-08-07 Gary Benson <gbenson@redhat.com>
3432 * linux-x86-low.c: Do not include stddef.h.
3433 * lynx-ppc-low.c: Likewise.
3434 * tracepoint.c: Likewise.
3436 2014-08-07 Gary Benson <gbenson@redhat.com>
3438 * server.h: Do not include stdarg.h.
3439 * nto-low.c: Likewise.
3441 2014-08-07 Gary Benson <gbenson@redhat.com>
3443 * server.h: Do not include stdlib.h.
3444 * inferiors.c: Likewise.
3445 * linux-low.c: Likewise.
3446 * regcache.c: Likewise.
3447 * spu-low.c: Likewise.
3448 * tracepoint.c: Likewise.
3449 * utils.c: Likewise.
3451 2014-08-07 Gary Benson <gbenson@redhat.com>
3453 * server.h: Do not include stdio.h.
3454 * linux-low.c: Likewise.
3455 * remote-utils.c: Likewise.
3456 * spu-low.c: Likewise.
3457 * utils.c: Likewise.
3458 * wincecompat.c: Likewise.
3460 2014-08-06 Gary Benson <gbenson@redhat.com>
3462 * regcache.c (init_register_cache): Move conditionals inside if.
3464 2014-08-06 Gary Benson <gbenson@redhat.com>
3466 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3468 2014-07-31 Gary Benson <gbenson@redhat.com>
3470 * ax.h: Do not include server.h.
3471 * gdbthread.h: Likewise.
3472 * lynx-low.h: Likewise.
3473 * notif.h: Likewise.
3475 2014-07-30 Gary Benson <gbenson@redhat.com>
3477 * server.h: Include common-defs.h.
3478 Do not include config.h or build-gnulib-gdbserver/config.h.
3480 2014-07-30 Gary Benson <gbenson@redhat.com>
3482 * hostio-errno.c: Move server.h to top of includes list.
3483 * inferiors.c: Likewise.
3484 * linux-x86-low.c: Likewise.
3485 * notif.c: Include server.h.
3487 2014-07-24 Tom Tromey <tromey@redhat.com>
3488 Gary Benson <gbenson@redhat.com>
3490 * server.h (CORE_ADDR): Now unsigned.
3492 2014-07-16 Pedro Alves <palves@redhat.com>
3494 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3496 2014-07-15 Pedro Alves <palves@redhat.com>
3498 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3501 2014-07-11 Pedro Alves <palves@redhat.com>
3503 * linux-low.c (kill_wait_lwp): New function, based on
3504 kill_one_lwp_callback, but use my_waitpid directly.
3505 (kill_one_lwp_callback, linux_kill): Use it.
3507 2014-06-23 Pedro Alves <palves@redhat.com>
3509 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3510 before setting DR0..DR3.
3512 2014-06-20 Gary Benson <gbenson@redhat.com>
3514 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3515 * configure: Regenerated.
3516 * config.in: Likewise.
3518 2014-06-20 Gary Benson <gbenson@redhat.com>
3520 * Makefile.in (SFILES): Update locations for files moved
3522 (object file files): Reordered.
3524 2014-06-20 Gary Benson <gbenson@redhat.com>
3526 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3527 (i386_dr_low_set_addr): Likewise.
3528 (i386_dr_low_get_addr): Likewise.
3529 (i386_dr_low_can_set_control): Likewise.
3530 (i386_dr_low_set_control): Likewise.
3531 (i386_dr_low_get_control): Likewise.
3532 (i386_dr_low_get_status): Likewise.
3533 (i386_get_debug_register_length): Likewise.
3534 * linux-x86-low.c (i386_dr_low_set_addr):
3535 Changed signature. Made static.
3536 (i386_dr_low_get_addr): Likewise.
3537 (i386_dr_low_set_control): Likewise.
3538 (i386_dr_low_get_control): Likewise.
3539 (i386_dr_low_get_status): Likewise.
3540 (i386_dr_low): New global variable.
3541 * win32-i386-low.c (i386_dr_low_set_addr):
3542 Changed signature. Made static.
3543 (i386_dr_low_get_addr): Likewise.
3544 (i386_dr_low_set_control): Likewise.
3545 (i386_dr_low_get_control): Likewise.
3546 (i386_dr_low_get_status): Likewise.
3547 (i386_dr_low): New global variable.
3549 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3551 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3552 * Makefile.in (AR, AR_FLAGS): Define.
3553 * configure: Regenerate.
3555 2014-06-19 Gary Benson <gbenson@redhat.com>
3557 * Makefile.in (i386-dregs.o): New rule.
3558 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3559 * i386-low.c (target.h): Remove include.
3560 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3561 (DR_CONTROL_SHIFT): Likewise.
3562 (DR_CONTROL_SIZE): Likewise.
3563 (DR_RW_EXECUTE): Likewise.
3564 (DR_RW_WRITE): Likewise.
3565 (DR_RW_READ): Likewise.
3566 (DR_RW_IORW): Likewise.
3567 (DR_LEN_1): Likewise.
3568 (DR_LEN_2): Likewise.
3569 (DR_LEN_4): Likewise.
3570 (DR_LEN_8): Likewise.
3571 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3572 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3573 (DR_ENABLE_SIZE): Likewise.
3574 (DR_LOCAL_SLOWDOWN): Likewise.
3575 (DR_GLOBAL_SLOWDOWN): Likewise.
3576 (DR_CONTROL_RESERVED): Likewise.
3577 (I386_DR_CONTROL_MASK): Likewise.
3578 (I386_DR_VACANT): Likewise.
3579 (I386_DR_LOCAL_ENABLE): Likewise.
3580 (I386_DR_GLOBAL_ENABLE): Likewise.
3581 (I386_DR_DISABLE): Likewise.
3582 (I386_DR_SET_RW_LEN): Likewise.
3583 (I386_DR_GET_RW_LEN): Likewise.
3584 (I386_DR_WATCH_HIT): Likewise.
3585 (i386_wp_op_t): Likewise.
3586 (i386_show_dr): Likewise.
3587 (i386_length_and_rw_bits): Likewise.
3588 (i386_insert_aligned_watchpoint): Likewise.
3589 (i386_remove_aligned_watchpoint): Likewise.
3590 (i386_handle_nonaligned_watchpoint): Likewise.
3591 i386_update_inferior_debug_regs(): Likewise.
3592 (i386_dr_insert_watchpoint): Likewise.
3593 (i386_dr_remove_watchpoint): Likewise.
3594 (i386_dr_region_ok_for_watchpoint): Likewise.
3595 (i386_dr_stopped_data_address): Likewise.
3596 (i386_dr_stopped_by_watchpoint): Likewise.
3598 2014-06-19 Gary Benson <gbenson@redhat.com>
3600 * i386-low.c (i386_dr_show): Renamed to
3601 i386_show_dr and made static. All uses updated.
3602 (i386_dr_length_and_rw_bits): Renamed to
3603 i386_length_and_rw_bits and made static.
3605 (i386_dr_insert_aligned_watchpoint): Renamed to
3606 i386_insert_aligned_watchpoint and made static.
3608 (i386_dr_remove_aligned_watchpoint): Renamed to
3609 i386_remove_aligned_watchpoint and made static.
3611 (i386_dr_update_inferior_debug_regs): Renamed to
3612 i386_update_inferior_debug_regs and made static.
3615 2014-06-18 Gary Benson <gbenson@redhat.com>
3617 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3618 (i386_dr_low_can_set_control): Likewise.
3619 (i386_get_debug_register_length): Likewise.
3620 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3621 (i386_dr_low_can_set_control): Likewise.
3622 (i386_get_debug_register_length): Likewise.
3624 2014-06-17 Gary Benson <gbenson@redhat.com>
3626 * i386-low.h (i386-dregs.h): New include.
3627 (DR_FIRSTADDR): Now in i386-dregs.h.
3628 (DR_LASTADDR): Likewise.
3629 (DR_NADDR): Likewise.
3630 (DR_STATUS): Likewise.
3631 (DR_CONTROL): Likewise.
3632 (i386_debug_reg_state): Likewise.
3633 (i386_dr_insert_watchpoint): Likewise.
3634 (i386_dr_remove_watchpoint): Likewise.
3635 (i386_dr_region_ok_for_watchpoint): Likewise.
3636 (i386_dr_stopped_data_address): Likewise.
3637 (i386_dr_stopped_by_watchpoint): Likewise.
3638 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3640 2014-06-18 Gary Benson <gbenson@redhat.com>
3642 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3643 i386_dr_insert_watchpoint.
3644 (i386_low_remove_watchpoint): Renamed to
3645 i386_dr_remove_watchpoint.
3646 (i386_low_region_ok_for_watchpoint): Renamed to
3647 i386_dr_region_ok_for_watchpoint.
3648 (i386_low_stopped_data_address): Renamed to
3649 i386_dr_stopped_data_address.
3650 (i386_low_stopped_by_watchpoint): Renamed to
3651 i386_dr_stopped_by_watchpoint.
3652 * i386-low.c (i386_show_dr): Renamed to
3653 i386_dr_show and made nonstatic. All uses updated.
3654 (i386_length_and_rw_bits): Renamed to
3655 i386_dr_length_and_rw_bits and made nonstatic.
3657 (i386_insert_aligned_watchpoint): Renamed to
3658 i386_dr_insert_aligned_watchpoint and made nonstatic.
3660 (i386_remove_aligned_watchpoint): Renamed to
3661 i386_dr_remove_aligned_watchpoint and made nonstatic.
3663 (i386_update_inferior_debug_regs): Renamed to
3664 i386_dr_update_inferior_debug_regs and made nonstatic.
3666 (i386_low_insert_watchpoint): Renamed to
3667 i386_dr_insert_watchpoint. All uses updated.
3668 (i386_low_remove_watchpoint): Renamed to
3669 i386_dr_remove_watchpoint. All uses updated.
3670 (i386_low_region_ok_for_watchpoint): Renamed to
3671 i386_dr_region_ok_for_watchpoint. All uses updated.
3672 (i386_low_stopped_data_address): Renamed to
3673 i386_dr_stopped_data_address. All uses updated.
3674 (i386_low_stopped_by_watchpoint): Renamed to
3675 i386_dr_stopped_by_watchpoint. All uses updated.
3677 2014-06-18 Gary Benson <gbenson@redhat.com>
3679 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3680 (i386_dr_low_can_set_control): Likewise.
3681 (i386_insert_aligned_watchpoint): New check.
3683 2014-06-18 Gary Benson <gbenson@redhat.com>
3685 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3688 2014-06-18 Gary Benson <gbenson@redhat.com>
3690 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3691 instead of fatal and error.
3692 (i386_handle_nonaligned_watchpoint): Likewise.
3694 2014-06-18 Gary Benson <gbenson@redhat.com>
3696 * i386-low.c (i386_get_debug_register_length): New macro.
3697 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3698 (i386_show_dr): Use debug_printf instead of fprintf. Use
3699 phex to format values.
3701 2014-06-18 Gary Benson <gbenson@redhat.com>
3703 * i386-low.h: Comment changes.
3704 * i386-low.c: Likewise.
3706 2014-06-18 Gary Benson <gbenson@redhat.com>
3708 * i386-low.c: Whitespace changes.
3710 2014-06-12 Tom Tromey <tromey@redhat.com>
3712 * utils.c (freeargv): Remove.
3714 2014-06-12 Tom Tromey <tromey@redhat.com>
3716 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3717 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3718 (parse_debug_format_options): Likewise.
3719 (gdbserver_usage): Likewise.
3720 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3721 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3722 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3724 ($(LIBGNU)): Depend on libiberty.
3725 (all-lib): Recurse into all subdirs.
3726 (install-only): Invoke "install" target in subdirs.
3727 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3729 * configure: Rebuild.
3730 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3731 for vasprintf, vsnprintf, or gettimeofday.
3732 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3735 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3737 * development.sh: Delete.
3738 * Makefile.in (config.status): Adjust dependency on development.sh.
3739 * configure.ac: Adjust development.sh source call.
3740 * configure: Regenerate.
3742 2014-06-02 Pedro Alves <palves@redhat.com>
3744 * ax.c (gdb_free_agent_expr): New function.
3745 * ax.h (gdb_free_agent_expr): New declaration.
3746 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3748 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3750 (clear_breakpoint_conditions_and_commands): New function.
3751 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3752 (clear_breakpoint_conditions_and_commands): New declaration.
3754 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3756 * linux-aarch64-low.c (asm/ptrace.h): Include.
3758 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3760 Fix TLS access for -static -pthread.
3761 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3762 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3763 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3765 2014-05-20 Pedro Alves <palves@redhat.com>
3767 * linux-aarch64-low.c (aarch64_insert_point)
3768 (aarch64_remove_point): No longer check whether the type is
3769 supported here. Adjust to new interface.
3770 (the_low_target): Install aarch64_supports_z_point_type as
3771 supports_z_point_type method.
3772 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3773 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3774 instead of a Z packet char. Adjust.
3775 (arm_supports_z_point_type): New function.
3776 (arm_insert_point, arm_remove_point): Adjust to new interface.
3777 (the_low_target): Install arm_supports_z_point_type.
3778 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3779 (cris_insert_point, cris_remove_point): Adjust to new interface.
3780 Don't check whether the type is supported here.
3781 (the_low_target): Install cris_supports_z_point_type.
3782 * linux-low.c (linux_supports_z_point_type): New function.
3783 (linux_insert_point, linux_remove_point): Adjust to new interface.
3784 * linux-low.h (struct linux_target_ops) <insert_point,
3785 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3786 raw_breakpoint pointer parameter.
3787 <supports_z_point_type>: New method.
3788 * linux-mips-low.c (mips_supports_z_point_type): New function.
3789 (mips_insert_point, mips_remove_point): Adjust to new interface.
3790 Use mips_supports_z_point_type.
3791 (the_low_target): Install mips_supports_z_point_type.
3792 * linux-ppc-low.c (the_low_target): Install NULL as
3793 supports_z_point_type method.
3794 * linux-s390-low.c (the_low_target): Install NULL as
3795 supports_z_point_type method.
3796 * linux-sparc-low.c (the_low_target): Install NULL as
3797 supports_z_point_type method.
3798 * linux-x86-low.c (x86_supports_z_point_type): New function.
3799 (x86_insert_point): Adjust to new insert_point interface. Use
3800 insert_memory_breakpoint. Adjust to new
3801 i386_low_insert_watchpoint interface.
3802 (x86_remove_point): Adjust to remove_point interface. Use
3803 remove_memory_breakpoint. Adjust to new
3804 i386_low_remove_watchpoint interface.
3805 (the_low_target): Install x86_supports_z_point_type.
3806 * lynx-low.c (lynx_target_ops): Install NULL as
3807 supports_z_point_type callback.
3808 * nto-low.c (nto_supports_z_point_type): New.
3809 (nto_insert_point, nto_remove_point): Adjust to new interface.
3810 (nto_target_ops): Install nto_supports_z_point_type.
3811 * mem-break.c: Adjust intro comment.
3812 (struct raw_breakpoint) <raw_type, size>: New fields.
3813 <inserted>: Update comment.
3814 <shlib_disabled>: Delete field.
3815 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3816 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3817 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3818 (raw_bkpt_type_to_target_hw_bp_type): New function.
3819 (find_enabled_raw_code_breakpoint_at): New function.
3820 (find_raw_breakpoint_at): New type and size parameters. Use them.
3821 (insert_memory_breakpoint): New function, based off
3822 set_raw_breakpoint_at.
3823 (remove_memory_breakpoint): New function.
3824 (set_raw_breakpoint_at): Reimplement.
3825 (set_breakpoint): New, based on set_breakpoint_at.
3826 (set_breakpoint_at): Reimplement.
3827 (delete_raw_breakpoint): Go through the_target->remove_point
3828 instead of assuming memory breakpoints.
3829 (find_gdb_breakpoint_at): Delete.
3830 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3831 (find_gdb_breakpoint): New function.
3832 (set_gdb_breakpoint_at): Delete.
3833 (z_type_supported): New function.
3834 (set_gdb_breakpoint_1): New function, loosely based off
3835 set_gdb_breakpoint_at.
3836 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3837 (delete_gdb_breakpoint_at): Delete.
3838 (delete_gdb_breakpoint_1): New function, loosely based off
3839 delete_gdb_breakpoint_at.
3840 (delete_gdb_breakpoint): New function.
3841 (clear_gdb_breakpoint_conditions): Rename to ...
3842 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3844 (add_condition_to_breakpoint): Make static.
3845 (add_breakpoint_condition): Take a struct breakpoint pointer
3846 instead of an address. Adjust.
3847 (gdb_condition_true_at_breakpoint): Rename to ...
3848 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3850 (gdb_condition_true_at_breakpoint): Reimplement.
3851 (add_breakpoint_commands): Take a struct breakpoint pointer
3852 instead of an address. Adjust.
3853 (gdb_no_commands_at_breakpoint): Rename to ...
3854 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3855 parameter. Return true if no breakpoint was found. Change debug
3857 (gdb_no_commands_at_breakpoint): Reimplement.
3858 (run_breakpoint_commands): Rename to ...
3859 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3860 and change return type to boolean.
3861 (run_breakpoint_commands): New function.
3862 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3863 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3864 breakpoint. Go through the_target->remove_point instead of
3865 assuming memory breakpoint.
3866 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3867 software and hardware breakpoints.
3868 (reinsert_raw_breakpoint): Go through the_target->insert_point
3869 instead of assuming memory breakpoint.
3870 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3871 software and hardware breakpoints.
3872 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3873 Check both software and hardware breakpoints.
3874 (validate_inserted_breakpoint): Assert the breakpoint is a
3875 software breakpoint. Set the inserted flag to -1 instead of
3876 setting shlib_disabled.
3877 (delete_disabled_breakpoints): Adjust.
3878 (validate_breakpoints): Only validate software breakpoints.
3879 Adjust to inserted flag change.
3880 (check_mem_read, check_mem_write): Skip breakpoint types other
3881 than software breakpoints. Adjust to inserted flag change.
3882 * mem-break.h (enum raw_bkpt_type): New enum.
3883 (raw_breakpoint, struct process_info): Forward declare.
3884 (Z_packet_to_target_hw_bp_type): Delete declaration.
3885 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3886 (set_gdb_breakpoint, delete_gdb_breakpoint)
3887 (clear_breakpoint_conditions): New declarations.
3888 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3889 (breakpoint_inserted_here): Update comment.
3890 (add_breakpoint_condition, add_breakpoint_commands): Replace
3891 address parameter with a breakpoint pointer parameter.
3892 (gdb_breakpoint_here): Update comment.
3893 (delete_gdb_breakpoint_at): Delete.
3894 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3895 * server.c (process_point_options): Take a struct breakpoint
3896 pointer instead of an address. Adjust.
3897 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3898 delete_gdb_breakpoint.
3899 * spu-low.c (spu_target_ops): Install NULL as
3900 supports_z_point_type method.
3901 * target.h: Include mem-break.h.
3902 (struct target_ops) <prepare_to_access_memory>: Update comment.
3903 <supports_z_point_type>: New field.
3904 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3905 instead of a char. Also take a raw breakpoint pointer.
3906 * win32-arm-low.c (the_low_target): Install NULL as
3907 supports_z_point_type.
3908 * win32-i386-low.c (i386_supports_z_point_type): New function.
3909 (i386_insert_point, i386_remove_point): Adjust to new interface.
3910 (the_low_target): Install i386_supports_z_point_type.
3911 * win32-low.c (win32_supports_z_point_type): New function.
3912 (win32_insert_point, win32_remove_point): Adjust to new interface.
3913 (win32_target_ops): Install win32_supports_z_point_type.
3914 * win32-low.h (struct win32_target_ops):
3915 <supports_z_point_type>: New method.
3916 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3917 instead of a char. Also take a raw breakpoint pointer.
3919 2014-05-20 Pedro Alves <palves@redhat.com>
3921 * mem-break.h: Include break-common.h.
3922 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3923 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3924 (Z_packet_to_target_hw_bp_type): New declaration.
3925 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3926 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3927 (Z_PACKET_ACCESS_WP): Delete macros.
3928 (Z_packet_to_hw_type): Delete function.
3929 * i386-low.h: Don't include break-common.h here.
3930 (Z_packet_to_hw_type): Delete declaration.
3931 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3932 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3933 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3934 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3935 * linux-aarch64-low.c: Don't include break-common.h here.
3936 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3937 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3938 (Z_packet_to_target_hw_bp_type): Delete function.
3939 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3941 (mips_insert_point, mips_remove_point): Use
3942 Z_packet_to_target_hw_bp_type.
3944 2014-05-20 Pedro Alves <palves@redhat.com>
3946 * linux-aarch64-low.c: Include break-common.h.
3947 (enum target_point_type): Delete.
3948 (Z_packet_to_point_type): Rename to ...
3949 (Z_packet_to_target_hw_bp_type): ... this, and return a
3950 target_hw_bp_type instead.
3951 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3952 instead of an enum target_point_type.
3953 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3955 (aarch64_dr_state_insert_one_point)
3956 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3957 (aarch64_handle_aligned_watchpoint)
3958 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3959 Take an enum target_hw_bp_type instead of an enum
3961 (aarch64_supports_z_point_type): New function.
3962 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3963 use Z_packet_to_target_hw_bp_type.
3965 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3967 * configure.ac: Only use -Werror by default when DEVELOPMENT
3969 * configure: Regenerate.
3971 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3973 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3974 * linux-x86-low.c (X86_64_USER_REGS): New.
3975 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3977 2014-04-28 Yao Qi <yao@codesourcery.com>
3979 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3982 2014-04-25 Pedro Alves <palves@redhat.com>
3985 * linux-low.c (linux_attach_fail_reason_string): New function.
3986 (linux_attach_lwp): Delete.
3987 (linux_attach_lwp_1): Rename to ...
3988 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3989 argument. Remove "initial" parameter. Return int instead of
3990 void. Don't error or warn here.
3991 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3992 failure to attach to the tgid. Call warning when failing to
3994 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3995 argument. Remove "initial" parameter. Return int instead of
3996 void. Don't error or warn here.
3997 (linux_attach_fail_reason_string): New declaration.
3998 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3999 interface change. Use linux_attach_fail_reason_string.
4001 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4002 Walfred Tedeschi <walfred.tedeschi@intel.com>
4004 * Makefile.in: Added rules to handle new files
4005 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4006 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4007 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4008 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4009 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4010 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4012 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4013 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4014 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4015 i386/x32-avx512.xml.
4016 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4017 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4018 i386/x32-avx512-linux.xml.
4019 * i387-fp.c (num_avx512_k_registers): New constant for number
4021 (num_avx512_zmmh_low_registers): New constant for number of
4022 lower ZMM registers (0-15).
4023 (num_avx512_zmmh_high_registers): New constant for number of
4024 higher ZMM registers (16-31).
4025 (num_avx512_ymmh_registers): New contant for number of higher
4026 YMM registers (ymm16-31 added by avx521 on x86_64).
4027 (num_avx512_xmm_registers): New constant for number of higher
4028 XMM registers (xmm16-31 added by AVX512 on x86_64).
4029 (struct i387_xsave): Add space for AVX512 registers.
4030 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4031 Add code to handle AVX512 registers.
4032 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4033 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4034 prototypei from generated file.
4035 (tdesc_amd64_avx512_linux): Likewise.
4036 (init_registers_x32_avx512_linux): Likewise.
4037 (tdesc_x32_avx512_linux): Likewise.
4038 (init_registers_i386_avx512_linux): Likewise.
4039 (tdesc_i386_avx512_linux): Likewise.
4040 (x86_64_regmap): Add AVX512 registers.
4041 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4043 (initialize_low_arch): Add code to initialize AVX512 registers.
4045 2014-04-23 Pedro Alves <palves@redhat.com>
4047 * mem-break.c (find_gdb_breakpoint_at): Make static.
4048 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4050 2014-04-23 Pedro Alves <palves@redhat.com>
4052 * i386-low.c: Don't include break-common.h here.
4053 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4054 prototype to take target_hw_bp_type as argument instead of a Z
4056 * i386-low.h: Include break-common.h here.
4057 (Z_packet_to_hw_type): Declare.
4058 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4060 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4061 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4062 (x86_remove_point): Convert the packet number to a
4063 target_hw_bp_type before calling i386_low_remove_watchpoint.
4064 * win32-i386-low.c (i386_insert_point): Convert the packet number
4065 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4066 (i386_remove_point): Convert the packet number to a
4067 target_hw_bp_type before calling i386_low_remove_watchpoint.
4069 2014-04-23 Pedro Alves <palves@redhat.com>
4071 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4073 2014-04-10 Pedro Alves <palves@redhat.com>
4075 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4076 Check if the condition or command is NULL before checking if the
4077 breakpoint is known. On success, return true.
4078 * mem-break.h (add_breakpoint_condition): Document return.
4079 (add_breakpoint_commands): Add describing comment.
4080 * server.c (skip_to_semicolon): New function.
4081 (process_point_options): Use it.
4083 2014-04-09 Pedro Alves <palves@redhat.com>
4085 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4088 2014-02-27 Pedro Alves <palves@redhat.com>
4091 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4093 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4095 (last_thread_of_process_p): Take a PID argument instead of a
4097 (linux_wait_for_lwp): Delete.
4098 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4100 (linux_low_filter_event): New function, party factored out from
4101 linux_wait_for_event.
4102 (linux_wait_for_event): Rename to ...
4103 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4104 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4105 sigsuspend. Check for zombie leaders.
4106 (linux_wait_for_event): Reimplement as wrapper around
4107 linux_wait_for_event_filtered.
4108 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4109 a normal or signal exit is seen, it's the whole process exiting.
4110 (wait_for_sigstop): No longer a for_each_inferior callback.
4111 Rewrite on top of linux_wait_for_event_filtered.
4112 (stop_all_lwps): Call wait_for_sigstop directly.
4113 * server.c (resume, handle_target_event): Handle
4114 TARGET_WAITKIND_NO_RESUMED.
4116 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4118 * win32-low.c (psapi_get_dll_name,
4119 * win32_CreateToolhelp32Snapshot): Delete.
4120 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4121 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4123 (handle_load_dll): Add function description.
4124 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4126 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4128 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4130 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4131 base address when calling win32_add_one_solib.
4132 (handle_load_dll): Delete local variable load_addr.
4133 Remove 0x1000 offset applied to DLL base address when calling
4134 win32_add_one_solib.
4135 (handle_unload_dll): Add comment.
4137 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4139 * win32-low.c (win32_add_all_dlls): Renames
4140 win32_ensure_ntdll_loaded. Rewrite function documentation.
4141 Adjust implementation to always load all DLLs.
4142 Add 0x1000 offset to DLL base address when calling
4143 win32_add_one_solib.
4144 (child_initialization_done): New static global.
4145 (do_initial_child_stuff): Set child_initialization_done to
4146 zero during child initialization, and 1 after. Replace call
4147 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4149 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4150 (handle_unload_dll): Add function documentation.
4151 (get_child_debug_event): Ignore load and unload DLL events
4152 during child initialization.
4154 2014-02-20 Doug Evans <dje@google.com>
4156 Remove global all_lwps.
4157 * inferiors.h (ptid_of): Move here from linux-low.h.
4158 (pid_of, lwpid_of): Ditto.
4159 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4160 parameter is a struct thread_info * now.
4161 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4162 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4163 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4165 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4166 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4167 * linux-arm-low.c (update_registers_callback): Update, "entry"
4168 parameter is a struct thread_info * now.
4169 Fetch lwpid from current_inferior directly.
4170 (arm_insert_point): Pass &all_threads to find_inferior instead of
4172 (arm_remove_point): Ditto.
4173 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4174 (arm_prepare_to_resume): Fetch pid from thread.
4175 (arm_read_description): Fetch lwpid from current_inferior directly.
4176 * linux-low.c (all_lwps): Delete.
4177 (delete_lwp): Delete call to remove_inferior.
4178 (handle_extended_wait): Fetch lwpid from thread.
4179 (add_lwp): Don't set lwp->entry.id. Remove call to
4180 add_inferior_to_list.
4181 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4182 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4183 (kill_one_lwp_callback): Ditto.
4184 (linux_kill): Don't dereference NULL pointer.
4185 Fetch ptid,lwpid from thread.
4186 (get_detach_signal): Fetch ptid from thread.
4187 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4188 Simplify call to regcache_invalidate_thread.
4189 (delete_lwp_callback): Update, "entry" parameter is a
4190 struct thread_info * now. Fetch pid from thread.
4191 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4192 (status_pending_p_callback): Update, "entry" parameter is a
4193 struct thread_info * now. Fetch ptid from thread.
4194 (find_lwp_pid): Update, "entry" parameter is a
4195 struct thread_info * now.
4196 (linux_wait_for_lwp): Fetch pid from thread.
4197 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4198 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4199 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4200 (dequeue_one_deferred_signal): Ditto.
4201 (cancel_breakpoint): Fetch ptid from current_inferior.
4202 (linux_wait_for_event): Pass &all_threads to find_inferior,
4203 not &all_lwps. Fetch ptid, lwpid from thread.
4204 (count_events_callback): Update, "entry" parameter is a
4205 struct thread_info * now.
4206 (select_singlestep_lwp_callback): Ditto.
4207 (select_event_lwp_callback): Ditto.
4208 (cancel_breakpoints_callback): Ditto.
4209 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4211 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4212 (unsuspend_one_lwp): Update, "entry" parameter is a
4213 struct thread_info * now.
4214 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4216 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4217 Fetch lwpid from thread, not lwp.
4218 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4219 Pass &all_threads to find_inferior, not &all_lwps.
4220 (send_sigstop): Fetch lwpid from thread, not lwp.
4221 (send_sigstop_callback): Update, "entry" parameter is a
4222 struct thread_info * now.
4223 (suspend_and_send_sigstop_callback): Ditto.
4224 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4225 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4226 struct thread_info * now.
4227 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4229 (lwp_running): Update, "entry" parameter is a
4230 struct thread_info * now.
4231 (stop_all_lwps): Fetch ptid from thread.
4232 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4233 (linux_resume_one_lwp): Fetch lwpid from thread.
4234 (linux_set_resume_request): Update, "entry" parameter is a
4235 struct thread_info * now. Fetch pid, lwpid from thread.
4236 (resume_status_pending_p): Update, "entry" parameter is a
4237 struct thread_info * now.
4238 (need_step_over_p): Ditto. Fetch lwpid from thread.
4239 (start_step_over): Fetch lwpid from thread.
4240 (linux_resume_one_thread): Update, "entry" parameter is a
4241 struct thread_info * now. Fetch lwpid from thread.
4242 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4243 (proceed_one_lwp): Update, "entry" parameter is a
4244 struct thread_info * now. Fetch lwpid from thread.
4245 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4246 struct thread_info * now.
4247 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4248 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4249 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4251 (regsets_store_inferior_registers): Ditto.
4252 (fetch_register, store_register): Ditto.
4253 (linux_read_memory, linux_write_memory): Ditto.
4254 (linux_request_interrupt): Ditto.
4255 (linux_read_auxv): Ditto.
4256 (linux_xfer_siginfo): Ditto.
4257 (linux_qxfer_spu): Ditto.
4258 (linux_qxfer_libraries_svr4): Ditto.
4259 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4260 moved to inferiors.h.
4262 (get_thread_lwp): Update.
4263 (struct lwp_info): Delete member "entry". Simplify comment for
4266 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4267 current_inferior directly.
4268 (update_watch_registers_callback): Update, "entry" parameter is a
4269 struct thread_info * now. Fetch pid from thread.
4270 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4271 (mips_insert_point): Fetch lwpid from current_inferior.
4272 Pass &all_threads to find_inferior, not &all_lwps.
4273 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4274 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4276 (mips_stopped_data_address): Ditto.
4277 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4279 * linux-tile-low.c (tile_arch_setup): Ditto.
4280 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4281 (update_debug_registers_callback): Update, "entry" parameter is a
4282 struct thread_info * now. Fetch pid from thread.
4283 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4284 Pass &all_threads to find_inferior, not &all_lwps.
4285 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4286 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4287 Pass &all_threads to find_inferior, not &all_lwps.
4288 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4289 (i386_dr_low_get_status): Ditto.
4290 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4291 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4292 (x86_linux_read_description): Ditto.
4293 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4295 2014-02-20 Doug Evans <dje@google.com>
4297 * inferiors.c (get_first_inferior): Fix buglet.
4299 2014-02-19 Doug Evans <dje@google.com>
4301 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4302 * inferiors.c (add_thread): Change result type to struct thread_info *.
4303 All callers updated.
4304 (add_lwp): Call add_thread here instead of in callers.
4305 All callers updated.
4306 * linux-low.h (get_lwp_thread): Rewrite.
4307 (struct lwp_info): New member "thread".
4309 2014-02-19 Doug Evans <dje@google.com>
4311 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4312 All callers updated.
4314 2014-02-19 Doug Evans <dje@google.com>
4316 * inferiors.c (add_thread): Fix whitespace.
4318 2014-02-19 Doug Evans <dje@google.com>
4320 * dll.c (clear_dlls): Replace accessing list implemention details
4322 * gdbthread.h (get_first_thread): Declare.
4323 * inferiors.c (for_each_inferior_with_data): New function.
4324 (get_first_thread): New function.
4325 (find_thread_ptid): Simplify.
4326 (get_first_inferior): New function.
4327 (clear_list): Delete.
4328 (one_inferior_p): New function.
4329 (clear_inferior_list): New function.
4330 (clear_inferiors): Update.
4331 * inferiors.h (for_each_inferior_with_data): Declare.
4332 (clear_inferior_list): Declare.
4333 (one_inferior_p): Declare.
4334 (get_first_inferior): Declare.
4335 * linux-low.c (linux_wait_for_event): Replace accessing list
4336 implemention details with API function.
4337 * server.c (target_running): Ditto.
4338 (accumulate_file_name_length): New function.
4339 (emit_dll_description): New function.
4340 (handle_qxfer_libraries): Replace accessing list implemention
4341 details with API function.
4342 (handle_qxfer_threads_worker): New function.
4343 (handle_qxfer_threads_proper): Replace accessing list implemention
4344 details with API function.
4345 (handle_query): Ditto.
4346 (visit_actioned_threads_callback_ftype): New typedef.
4347 (visit_actioned_threads_data): New struct.
4348 (visit_actioned_threads): Rewrite to be find_inferior callback.
4349 (resume): Call find_inferior.
4350 (handle_status): Replace accessing list implemention
4351 details with API function.
4352 (process_serial_event): Replace accessing list implemention details
4354 * target.c (set_desired_inferior): Replace accessing list implemention
4355 details with API function.
4356 * tracepoint.c (same_process_p): New function.
4357 (gdb_agent_about_to_close): Replace accessing list implemention
4358 details with API function.
4359 * win32-low.c (child_delete_thread): Replace accessing list
4360 implemention details with API function.
4361 (match_dll_by_basename): New function.
4362 (dll_is_loaded_by_basename): New function.
4363 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4364 details call to dll_is_loaded_by_basename.
4366 2014-02-19 Doug Evans <dje@google.com>
4368 * dll.h (struct dll_info): Add comment.
4369 * gdbthread.h (struct thread_info): Add comment.
4370 (current_ptid): Simplify.
4371 * inferiors.c (add_process): Update.
4372 (remove_process): Update.
4373 * inferiors.h (struct process_info): Rename member "head" to "entry".
4374 * linux-low.c (delete_lwp): Update.
4376 (last_thread_of_process_p): Update.
4377 (kill_one_lwp_callback, linux_kill): Update.
4378 (status_pending_p_callback): Update.
4379 (wait_for_sigstop): Update. Simplify read of ptid.
4380 (start_step_over): Update.
4381 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4382 (get_lwp_thread): Update.
4383 (struct lwp_info): Rename member "head" to "entry".
4384 * regcache.h (inferior_list_entry): Delete.
4385 * server.c (kill_inferior_callback): Update.
4386 (detach_or_kill_inferior_callback): Update.
4387 (print_started_pid): Update.
4388 (print_attached_pid): Update.
4389 (process_serial_event): Simplify read of ptid.
4390 * thread-db.c (thread_db_create_event): Update.
4391 (thread_db_get_tls_address): Update.
4392 * win32-low.c (current_inferior_ptid): Simplify.
4394 2014-02-19 Tom Tromey <tromey@redhat.com>
4396 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4398 (target_supports_btrace): Update.
4400 2014-02-14 Yao Qi <yao@codesourcery.com>
4402 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4403 (rsp-low-ipa.o): New target.
4405 2014-02-12 Tom Tromey <tromey@redhat.com>
4407 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4408 convert_ascii_to_int.
4409 * regcache.c (registers_to_string): Likewise.
4410 * remote-utils.c (decode_M_packet): Likewise.
4411 * server.c (process_serial_event): Likewise.
4413 2014-02-12 Tom Tromey <tromey@redhat.com>
4415 * server.c (handle_query, handle_v_run): Use hex2bin, not
4417 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4419 2014-02-12 Tom Tromey <tromey@redhat.com>
4421 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4422 convert_int_to_ascii.
4423 * regcache.c (registers_to_string, collect_register_as_string):
4425 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4427 * server.c (process_serial_event): Likewise.
4428 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4429 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4431 2014-02-12 Tom Tromey <tromey@redhat.com>
4433 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4434 bin2hex, not hexify.
4435 * tracepoint.c (cmd_qtstatus): Likewise.
4437 2014-02-12 Tom Tromey <tromey@redhat.com>
4439 * remote-utils.c (monitor_output): Pass explicit length to
4442 2014-02-12 Tom Tromey <tromey@redhat.com>
4444 * tracepoint.c: Include rsp-low.h.
4445 * server.c: Include rsp-low.h.
4446 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4447 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4449 * remote-utils.c: Include rsp-low.h.
4450 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4451 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4452 (convert_int_to_ascii, convert_ascii_to_int): Move to
4454 * regcache.c: Include rsp-low.h.
4455 * ax.c: Include rsp-low.h.
4456 * Makefile.in (SFILES): Add common/rsp-low.c.
4457 (OBS): Add rsp-low.o.
4458 (rsp-low.o): New target.
4460 2014-02-12 Tom Tromey <tromey@redhat.com>
4462 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4463 Include print-utils.h.
4464 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4465 (plongest, thirty_two, phex_nz): Remove.
4466 * Makefile.in (SFILES): Add common/print-utils.c.
4467 (OBS): Add print-utils.o.
4468 (print-utils-ipa.o): New target.
4469 (print-utils.o): New target.
4470 (IPA_OBJS): Add print-utils-ipa.o.
4472 2014-02-06 Tom Tromey <tromey@redhat.com>
4474 * Makefile.in (SFILES): Fix indentation.
4476 2014-02-05 Doug Evans <dje@google.com>
4478 * linux-low.c (linux_wait_for_event): Improve comment.
4479 (linux_wait_1): Keep current_inferior in sync with event_child.
4481 2014-01-22 Doug Evans <dje@google.com>
4483 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4485 2014-01-22 Doug Evans <dje@google.com>
4487 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4488 * configure: Regenerate.
4489 * config.in: Regenerate.
4490 * Makefile.in (SFILES): Add debug.c.
4492 * debug.c: New file.
4493 * debug.h: New file.
4494 * linux-aarch64-low.c (*): Update all debugging printfs to use
4495 debug_printf instead of fprintf.
4496 * linux-arm-low.c (*): Ditto.
4497 * linux-cris-low.c (*): Ditto.
4498 * linux-crisv32-low.c (*): Ditto.
4499 * linux-m32r-low.c (*): Ditto.
4500 * linux-sparc-low.c (*): Ditto.
4501 * linux-x86.c (*): Ditto.
4502 * linux-low.c (*): Ditto.
4503 (linux_wait_1): Add calls to debug_enter, debug_exit.
4504 (linux_wait): Remove redundant debugging printf.
4505 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4506 (linux_resume, unstop_all_lwps): Ditto.
4507 * mem-break.c (*): Update all debugging printfs to use
4508 debug_printf instead of fprintf.
4509 * remote-utils.c (*): Ditto.
4510 * thread-db.c (*): Ditto.
4511 * server.c #include <ctype.h>, "gdb_vecs.h".
4512 (debug_threads): Moved to debug.c.
4513 (*): Update all debugging printfs to use debug_printf instead of
4515 (start_inferior): Replace call to fflush with call to debug_flush.
4516 (monitor_show_help): Mention set debug-format.
4517 (parse_debug_format_options): New function.
4518 (handle_monitor_command): Handle "monitor set debug-format".
4519 (gdbserver_usage): Mention --debug-format.
4520 (main): Parse --debug-format.
4521 * server.h (debug_threads): Declaration moved to debug.h.
4523 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4524 trace_debug_1 that uses debug_printf.
4525 (tracepoint_look_up_symbols): Update all debugging printfs to use
4526 debug_printf instead of fprintf.
4528 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4530 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4533 2014-01-17 Pedro Alves <palves@redhat.com>
4536 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4537 defined after including gdb_proc_service.h.
4539 2014-01-16 Doug Evans <dje@google.com>
4541 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4542 (match_dll): Use it.
4544 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4546 * target.h (target_ops) <read_btrace>: Change parameters and
4547 return type to allow error reporting.
4548 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4549 trace reading errors on.
4550 * linux-low.c (linux_low_read_btrace): Pass trace reading
4552 (linux_low_disable_btrace): New.
4554 2014-01-15 Doug Evans <dje@google.com>
4556 * inferiors.c (thread_id_to_gdb_id): Delete.
4557 * inferiors.h (thread_id_to_gdb_id): Delete.
4559 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4561 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4562 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4565 2014-01-08 Pedro Alves <palves@redhat.com>
4567 * server.c (handle_status): Don't discard previous queued stop
4568 replies or thread's pending status here.
4569 (main) <disconnection>: Do it here instead.
4571 2014-01-08 Pedro Alves <palves@redhat.com>
4573 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4574 * server.c (visit_actioned_threads, handle_pending_status): New
4576 (handle_v_cont): Factor out parts to ...
4577 (resume): ... this new function. If in all-stop, and a thread
4578 being resumed has a pending status, report it without actually
4580 (myresume): Adjust to use the new 'resume' function.
4581 (clear_pending_status_callback, set_pending_status_callback)
4582 (find_status_pending_thread_callback): New functions.
4583 (handle_status): Handle the case of multiple threads having
4584 interesting statuses to report. Report threads' real last signal
4585 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4586 with an interesting thread to report the status for, instead of
4587 always reporting the status of the first thread.
4589 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4591 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4592 * gdbreplay.c (gdbreplay_version): Likewise.
4594 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4596 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4597 iov.iov_len with the real length in use.
4599 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4601 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4602 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4603 for all targets that use win32-low.c.
4604 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4605 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4607 2013-12-13 Pedro Alves <palves@redhat.com>
4609 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4610 if equal to TARGET_WAITKIND_LOADED.
4611 * win32-low.c (cached_status): New static global.
4612 (win32_wait): Add declaration.
4613 (do_initial_child_stuff): Flush all initial pending debug events
4614 up to the initial breakpoint.
4615 (win32_wait): If CACHED_STATUS was set, return that instead
4616 of doing a real wait. Remove the code resuming the execution
4617 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4618 during the initial phase. Also remove the code changing
4619 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4620 TARGET_WAITKIND_STOPPED.
4622 2013-12-11 Yao Qi <yao@codesourcery.com>
4624 * notif.c (handle_notif_ack): Return 0 if no notification
4627 2013-11-20 Doug Evans <dje@google.com>
4629 * linux-low.c (linux_set_resume_request): Fix comment.
4631 2013-11-20 Doug Evans <dje@google.com>
4633 * linux-low.c (resume_status_pending_p): Tweak comment.
4635 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4637 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4638 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4639 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4640 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4641 (srv_amd64_regobj): Add amd64-mpx.o.
4642 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4643 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4644 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4645 * i387-fp.c (num_pl_bnd_register) Added constant.
4646 (num_pl_bnd_cfg_registers) Added constant.
4647 (struct i387_xsave) Added reserved area and MPX fields.
4648 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4649 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4651 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4652 (init_registers_amd64_mpx_linux): Declare new function.
4653 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4654 (x86_64_regmap): Add MPX registers.
4655 (x86_linux_read_description): Add MPX case.
4656 (initialize_low_arch): Initialize MPX targets.
4658 2013-11-18 Tom Tromey <tromey@redhat.com>
4660 * configure: Rebuild.
4661 * configure.ac: Don't check for stdlib.h.
4662 * gdbreplay.c: Unconditionally include stdlib.h.
4664 2013-11-18 Tom Tromey <tromey@redhat.com>
4666 * config.in: Rebuild.
4667 * configure: Rebuild.
4668 * configure.ac: Don't use AC_HEADER_DIRENT.
4670 2013-11-18 Tom Tromey <tromey@redhat.com>
4672 * server.h: Don't check HAVE_STRING_H.
4673 * gdbreplay.c: Don't check HAVE_STRING_H.
4674 * configure: Rebuild.
4676 2013-11-18 Tom Tromey <tromey@redhat.com>
4678 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4681 2013-11-08 Tom Tromey <tromey@redhat.com>
4683 * configure, config.in: Rebuild.
4684 * configure.ac: Remove unused configury.
4686 2013-11-08 Tom Tromey <tromey@redhat.com>
4688 * acinclude.m4: Include common.m4, codeset.m4.
4689 * configure, config.in: Rebuild.
4690 * configure.ac: Use GDB_AC_COMMON.
4692 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4694 * linux-s390-low.c (HWCAP_S390_TE): New define.
4695 (s390_arch_setup): Consider the TE field in the HWCAP for
4696 determining 'have_regset_tdb'.
4698 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4701 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4704 2013-10-02 Pedro Alves <palves@redhat.com>
4706 * server.c (process_serial_event): Don't output "GDBserver
4707 exiting" if GDB is connected through stdio.
4708 * target.c (mywait): Likewise, be silent if GDB is connected
4711 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4713 * lynx-low.c (lynx_add_threads_after_attach): New function.
4714 (lynx_attach): Remove call to add_thread. Add call to
4715 lynx_add_threads_after_attach instead.
4717 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4719 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4720 * config.in, configure: Regenerated.
4722 2013-09-18 Yao Qi <yao@codesourcery.com>
4725 * server.c (start_inferior): Clear 'resume_info'.
4727 2013-09-16 Jiong Wang <jiwang@tilera.com>
4729 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4732 2013-09-16 Jiong Wang <jiwang@tilera.com>
4734 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4735 linux-tile-low.o to srv_tgtobj.
4737 2013-09-16 Will Newton <will.newton@linaro.org>
4739 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4742 2013-09-06 Pedro Alves <palves@redhat.com>
4744 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4745 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4746 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4747 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4748 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4749 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4751 2013-09-06 Pedro Alves <palves@redhat.com>
4753 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4754 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4756 2013-09-06 Pedro Alves <palves@redhat.com>
4758 * linux-amd64-ipa.c: Include tracepoint.h.
4759 * linux-i386-ipa.c: Include tracepoint.h.
4761 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4763 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4764 (ps_get_thread_area): New function.
4766 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4768 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4769 (initialize_low_arch): Call init_registers_crisv32 rather than
4770 init_register_crisv32.
4772 2013-09-05 Pedro Alves <palves@redhat.com>
4774 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4776 * hostio.h: ... this new file.
4777 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4778 win32-low.c: Include hostio.h.
4780 2013-09-05 Pedro Alves <palves@redhat.com>
4782 * server.h (gdb_client_data, handler_func, callback_handler_func)
4783 (delete_file_handler, add_file_handler, append_callback_event)
4784 (delete_callback_event, start_event_loop, initialize_event_loop):
4785 Move to event-loop.h and include it.
4786 * event-loop.h: New file.
4788 2013-09-05 Pedro Alves <palves@redhat.com>
4790 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4791 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4792 (loaded_dll, unloaded_dll): Move to ...
4793 * dll.h: ... this new file.
4794 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4796 2013-09-05 Pedro Alves <palves@redhat.com>
4798 * server.h (current_process, get_thread_process, all_processes)
4799 (add_inferior_to_list, for_each_inferior, current_inferior)
4800 (remove_inferior, add_process, remove_process, find_process_pid)
4801 (have_started_inferiors_p, have_attached_inferiors_p)
4802 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4803 (clear_inferiors, find_inferior, find_inferior_id)
4804 (inferior_target_data, set_inferior_target_data)
4805 (inferior_regcache_data, set_inferior_regcache_data): Move to
4806 inferiors.h, and include it.
4807 * inferiors.h: New file.
4809 2013-09-05 Pedro Alves <palves@redhat.com>
4811 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4815 2013-09-05 Pedro Alves <palves@redhat.com>
4817 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4819 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4820 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4821 (handle_tracepoint_general_set, handle_tracepoint_query)
4822 (tracepoint_finished_step, tracepoint_was_hit)
4823 (release_while_stepping_state_list, current_traceframe)
4824 (in_readonly_region, traceframe_read_mem)
4825 (fetch_traceframe_registers, traceframe_read_sdata)
4826 (traceframe_read_info, struct fast_tpoint_collect_status)
4827 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4828 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4829 (supply_fast_tracepoint_registers)
4830 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4831 (ipa_tdesc, claim_trampoline_space)
4832 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4833 (agent_mem_read, agent_get_trace_state_variable_value)
4834 (agent_set_trace_state_variable_value, agent_tsv_read)
4835 (agent_mem_read_string, get_raw_reg_func_addr)
4836 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4837 * tracepoint.h: ... this new file.
4839 2013-09-05 Pedro Alves <palves@redhat.com>
4841 * server.h (perror_with_name, error, fatal, warning, paddress)
4842 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4844 * utils.h: New file.
4846 2013-09-05 Pedro Alves <palves@redhat.com>
4848 * server.h (remote_debug, noack_mode, transport_is_reliable)
4849 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4850 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4851 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4852 (write_enn, initialize_async_io, enable_async_io)
4853 (disable_async_io, check_remote_input_interrupt_request)
4854 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4855 (dead_thread_notify, prepare_resume_reply)
4856 (decode_address_to_semicolon, decode_address, decode_m_packet)
4857 (decode_M_packet, decode_X_packet, decode_xfer_write)
4858 (decode_search_memory_packet, unhexify, hexify)
4859 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4860 (look_up_one_symbol, relocate_instruction)
4861 (monitor_output): Move to remote-utils.h, and include it.
4862 * remote-utils.h: New file.
4864 2013-09-05 Pedro Alves <palves@redhat.com>
4866 * server.h (_): Delete.
4868 2013-09-02 Pedro Alves <palves@redhat.com>
4870 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4871 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4873 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4875 2013-09-02 Pierre Muller <muller@sourceware.org>
4877 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4878 or WriteProcessMemory complete successfully and handle
4879 ERROR_PARTIAL_COPY error.
4881 2013-09-02 Pedro Alves <palves@redhat.com>
4883 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4884 error instead of EIO.
4886 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4889 * linux-low.c: Include filestuff.h.
4890 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4891 * lynx-low.c: Include filestuff.h.
4892 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4893 * server.c: Include filestuff.h.
4894 (main): Call notice_open_fds.
4895 * spu-low.c: Include filestuff.h.
4896 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4898 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4900 * Makefile.in: Explain why ../target and ../nat are not
4901 listed as include file search paths.
4902 (linux-waitpid.o): New object file rule.
4903 * configure.srv (srv_native_linux_obj): New variable.
4904 Replace all occurrences of linux native object files with
4905 $srv_native_linux_obj.
4906 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4907 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4908 (linux_enable_event_reporting): Remove declaration.
4909 (my_waitpid): Moved to common/linux-waitpid.c.
4910 (linux_wait_for_event): Pass ptid when calling
4911 linux_enable_event_reporting.
4912 (linux_supports_tracefork_flag): Remove.
4913 (linux_enable_event_reporting): Likewise.
4914 (linux_tracefork_grandchild): Remove.
4915 (STACK_SIZE): Moved to common/linux-ptrace.c.
4916 (linux_tracefork_child): Remove.
4917 (linux_test_for_tracefork): Remove.
4918 (linux_look_up_symbols): Call linux_supports_traceclone.
4919 (initialize_low): Remove call to linux_test_for_tracefork.
4920 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4921 common/linux-ptrace.h.
4922 (PTRACE_TYPE_ARG4): Likewise.
4923 Include linux-ptrace.h.
4925 2013-08-21 Pedro Alves <palves@redhat.com>
4927 * config.in: Renegerate.
4929 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4931 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4932 (SFILES): Remove $(srcdir)/common/target-common.c and
4933 add $(srcdir)/target/waitstatus.c.
4934 (OBS): Remove target-common.o and add waitstatus.o.
4935 (server_h): Remove $(srcdir)/../common/target-common.h and
4936 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4937 and $(srcdir)/../target/waitstatus.h.
4938 (target-common.o): Remove.
4939 (waitstatus.o): New target object file.
4940 * target.h: Do not include target-common.h and
4941 include target/resume.h, target/wait.h and
4942 target/waitstatus.h.
4944 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4946 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4947 to PTRACE_TYPE_ARG3.
4948 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4949 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4951 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4952 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4954 2013-07-27 Jie Zhang <jie@codesourcery.com>
4955 Daniel Jacobowitz <dan@codesourcery.com>
4956 Yao Qi <yao@codesourcery.com>
4958 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4959 (mips-linux-watch.o): New rule.
4960 (mips_linux_watch_h): New variable.
4961 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4963 * linux-mips-low.c: Include mips-linux-watch.h.
4964 (struct arch_process_info, struct arch_lwp_info): New.
4965 (update_watch_registers_callback): New function.
4966 (mips_linux_new_process, mips_linux_new_thread) New functions.
4967 (mips_linux_prepare_to_resume, mips_insert_point): New
4969 (mips_remove_point, mips_stopped_by_watchpoint): New
4971 (rsp_bp_type_to_target_hw_bp_type): New function.
4972 (mips_stopped_data_address): New function.
4973 (the_low_target): Add watchpoint support functions.
4975 2013-07-27 Yao Qi <yao@codesourcery.com>
4977 * i386-low.c: Include break-common.h.
4978 (enum target_hw_bp_type): Remove.
4980 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4982 * Makefile.in (SFILES): /common/target-common.c.
4983 (OBS): Add target-common.o.
4984 (server_h): Add $(srcdir)/../common/target-common.h.
4985 (target-common.o): New target.
4986 * server.c (queue_stop_reply_callback): Free
4987 status string after use.
4988 * target.c (target_waitstatus_to_string): Remove.
4989 * target.h: Include target-common.h.
4990 (resume_kind): Likewise.
4991 (target_waitkind): Likewise.
4992 (target_waitstatus): Likewise.
4993 (TARGET_WNOHANG): Likewise.
4995 2013-07-04 Yao Qi <yao@codesourcery.com>
4997 * Makefile.in (host_alias): Use @host_noncanonical@.
4998 (target_alias): Use @target_noncanonical@.
4999 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5000 ACX_NONCANONICAL_HOST.
5001 * configure: Regenerated.
5004 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5006 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5007 * configure: Rebuild.
5008 * Makefile.in (version_host, version_target): Get from configure.
5009 (version.c): Use $(version_host) and $(version_target).
5011 2013-07-03 Pedro Alves <palves@redhat.com>
5013 * Makefile.in (config.status): Depend on development.sh.
5014 * acinclude.m4: Include libmcheck.m4.
5015 * configure: Regenerate.
5017 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5019 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5020 attribute inside the parentheses.
5021 (winapi_DebugSetProcessKillOnExit): Ditto.
5022 (winapi_DebugBreakProcess): Ditto.
5023 (winapi_GenerateConsoleCtrlEvent): Ditto.
5025 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5027 * notif.h (notif_event): Add a dummy member to avoid compiler
5030 2013-07-01 Pedro Alves <palves@redhat.com>
5032 * hostio.c (HOSTIO_PATH_MAX): Define.
5033 (require_filename, handle_open, handle_unlink, handle_readlink):
5036 2013-07-01 Pedro Alves <palves@redhat.com>
5038 * server.h: Include "pathmax.h".
5039 * linux-low.c: Don't include sys/param.h.
5040 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5042 * win32-low.c: Don't include sys/param.h.
5043 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5045 2013-07-01 Pedro Alves <palves@redhat.com>
5047 * event-loop.c: Don't check HAVE_UNISTD_H before including
5049 * gdbreplay.c: Likewise.
5050 * remote-utils.c: Likewise.
5051 * server.c: Likewise.
5052 * configure.ac: Don't check for unistd.h.
5053 * configure: Regenerate.
5055 2013-06-28 Tom Tromey <tromey@redhat.com>
5057 * Makefile.in (version.c): Use version.in, not
5060 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5062 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5063 * configure: Rebuild.
5064 * Makefile.in (version_host, version_target): Get from configure.
5065 (version.c): Use $(version_host) and $(version_target).
5067 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5069 Fix trace-status to output user name without trailing colon.
5070 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5072 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5074 Fix trace-status to output proper start-time and stop-time.
5075 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5076 output start time and stop time in hex as gdb expects.
5078 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5080 * tracepoint.c (build_traceframe_info_xml): Output trace state
5081 variables present in the trace buffer.
5083 2013-06-24 Tom Tromey <tromey@redhat.com>
5085 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5087 (version.o): Remove.
5088 * gdbreplay.c: Include version.h.
5089 (version, host_name): Don't declare.
5090 * server.h: Include version.h.
5091 (version, host_name): Don't declare.
5093 2013-06-12 Pedro Alves <palves@redhat.com>
5095 * linux-x86-low.c (linux_is_elf64): Delete global.
5096 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5097 with local linux_pid_exe_is_elf_64_file use.
5099 2013-06-11 Pedro Alves <palves@redhat.com>
5101 * linux-low.c (regset_disabled, disable_regset): New functions.
5102 (regsets_fetch_inferior_registers)
5103 (regsets_store_inferior_registers): Use them.
5104 (initialize_regsets_info); Don't allocate the disabled_regsets
5106 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5109 2013-06-11 Pedro Alves <palves@redhat.com>
5111 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5114 2013-06-11 Pedro Alves <palves@redhat.com>
5116 * linux-x86-low.c (initialize_low_arch): Call
5117 init_registers_x32_avx_linux.
5119 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5121 Fix compatibility with Android Bionic.
5122 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5125 2013-06-07 Pedro Alves <palves@redhat.com>
5128 * Makefile.in (OBS): Add tdesc.o.
5129 (IPA_OBJS): Add tdesc-ipa.o.
5130 (tdesc-ipa.o): New rule.
5131 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5133 * linux-low.c (new_inferior): Delete.
5134 (disabled_regsets, num_regsets): Delete.
5135 (linux_add_process): Adjust to set the new per-process
5137 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5138 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5139 was a stop. When calling arch_setup, switch the current inferior
5140 to the thread that got an event.
5141 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5142 (regsets_fetch_inferior_registers)
5143 (regsets_store_inferior_registers): New regsets_info parameter.
5145 (linux_register_in_regsets): New regs_info parameter. Adjust to
5147 (register_addr, fetch_register, store_register): New usrregs_info
5148 parameter. Adjust to use it.
5149 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5150 parameter regs_info. Adjust to use it.
5151 (linux_fetch_registers): Get the current inferior's regs_info, and
5153 (linux_store_registers): Ditto.
5154 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5155 (initialize_low): Don't initialize the target_regsets here. Call
5156 initialize_low_arch.
5157 * linux-low.h (target_regsets): Delete declaration.
5158 (struct regsets_info): New.
5159 (struct usrregs_info): New.
5160 (struct regs_info): New.
5161 (struct process_info_private) <new_inferior>: New field.
5162 (struct linux_target_ops): Delete the num_regs, regmap, and
5163 regset_bitmap fields. New field regs_info.
5164 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5165 * i387-fp.c (num_xmm_registers): Delete.
5166 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5167 calls to new interface.
5168 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5169 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5170 Infer the number of xmm registers from the regcache's target
5172 * i387-fp.h (num_xmm_registers): Delete.
5173 * inferiors.c (add_thread): Don't install the thread's regcache
5175 * proc-service.c (gregset_info): Fetch the current inferior's
5176 regs_info. Adjust to use it.
5177 * regcache.c: Include tdesc.h.
5178 (register_bytes, reg_defs, num_registers)
5179 (gdbserver_expedite_regs): Delete.
5180 (get_thread_regcache): If the thread doesn't have a regcache yet,
5181 create one, instead of aborting gdbserver.
5182 (regcache_invalidate_one): Rename to ...
5183 (regcache_invalidate_thread): ... this.
5184 (regcache_invalidate_one): New.
5185 (regcache_invalidate): Only invalidate registers of the current
5187 (init_register_cache): Add target_desc parameter, and use it.
5188 (new_register_cache): Ditto. Assert the target description has a
5189 non zero registers_size.
5190 (regcache_cpy): Add assertions. Adjust.
5191 (realloc_register_cache, set_register_cache): Delete.
5192 (registers_to_string, registers_from_string): Adjust.
5193 (find_register_by_name, find_regno, find_register_by_number)
5194 (register_cache_size): Add target_desc parameter, and use it.
5195 (free_register_cache_thread, free_register_cache_thread_one)
5196 (regcache_release, register_cache_size): New.
5197 (register_size): Add target_desc parameter, and use it.
5198 (register_data, supply_register, supply_register_zeroed)
5199 (supply_regblock, supply_register_by_name, collect_register)
5200 (collect_register_as_string, collect_register_by_name): Adjust.
5201 * regcache.h (struct target_desc): Forward declare.
5202 (struct regcache) <tdesc>: New field.
5203 (init_register_cache, new_register_cache): Add target_desc
5205 (regcache_invalidate_thread): Declare.
5206 (regcache_invalidate_one): Delete declaration.
5207 (regcache_release): Declare.
5208 (find_register_by_number, register_cache_size, register_size)
5209 (find_regno): Add target_desc parameter.
5210 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5212 * remote-utils.c: Include tdesc.h.
5213 (outreg, prepare_resume_reply): Adjust.
5214 * server.c: Include tdesc.h.
5215 (gdbserver_xmltarget): Delete declaration.
5216 (get_features_xml, process_serial_event): Adjust.
5217 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5219 (struct process_info) <tdesc>: New field.
5220 (ipa_tdesc): Declare.
5221 * tdesc.c: New file.
5222 * tdesc.h: New file.
5223 * tracepoint.c: Include tdesc.h.
5224 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5225 (get_context_regcache): Adjust to pass ipa_tdesc down.
5226 (do_action_at_tracepoint): Adjust to get the register cache size
5227 from the context regcache's description.
5228 (traceframe_walk_blocks): Adjust to get the register cache size
5229 from the current trace frame's description.
5230 (traceframe_get_pc): Adjust to get current trace frame's
5231 description and pass it down.
5232 (gdb_collect): Adjust to get the register cache size from the
5234 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5235 (gdbserver_xmltarget): Delete.
5236 (initialize_low_tracepoint): Set the ipa's target description.
5237 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5238 (initialize_low_tracepoint): Set the ipa's target description.
5239 * linux-x86-low.c: Include tdesc.h.
5240 [__x86_64__] (is_64bit_tdesc): New.
5241 (ps_get_thread_area, x86_get_thread_area): Use it.
5242 (i386_cannot_store_register): Rename to ...
5243 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5244 (i386_cannot_fetch_register): Rename to ...
5245 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5246 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5248 (target_regsets): Rename to ...
5249 (x86_regsets): ... this.
5250 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5252 (x86_siginfo_fixup): Use is_64bit_tdesc.
5253 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5254 (tdesc_x32_avx_linux, tdesc_x32_linux)
5255 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5257 (x86_linux_update_xmltarget): Delete.
5258 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5259 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5260 (AMD64_LINUX_USER64_CS): New.
5261 (x86_linux_read_description): New, based on
5262 x86_linux_update_xmltarget.
5263 (same_process_callback): New.
5264 (x86_arch_setup_process_callback): New.
5265 (x86_linux_update_xmltarget): New.
5266 (x86_regsets_info): New.
5267 (amd64_linux_regs_info): New.
5268 (i386_linux_usrregs_info): New.
5269 (i386_linux_regs_info): New.
5270 (x86_linux_regs_info): New.
5271 (x86_arch_setup): Reimplement.
5272 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5273 (x86_emit_ops): Ditto.
5274 (the_low_target): Adjust. Install x86_linux_regs_info,
5275 x86_cannot_fetch_register, and x86_cannot_store_register.
5276 (initialize_low_arch): New.
5277 * linux-ia64-low.c (tdesc_ia64): Declare.
5278 (ia64_fetch_register): Adjust.
5279 (ia64_usrregs_info, regs_info): New globals.
5280 (ia64_regs_info): New function.
5281 (the_low_target): Adjust.
5282 (initialize_low_arch): New function.
5283 * linux-sparc-low.c (tdesc_sparc64): Declare.
5284 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5286 (sparc_arch_setup): New function.
5287 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5288 (the_low_target): Adjust.
5289 (initialize_low_arch): New function.
5290 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5291 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5292 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5293 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5294 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5295 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5296 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5297 (tdesc_powerpc_isa205_vsx64l): Declare.
5298 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5299 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5300 (ppc_set_pc, ppc_get_hwcap): Adjust.
5301 (ppc_usrregs_info): Forward declare.
5302 (!__powerpc64__) ppc_regmap_adjusted: New global.
5303 (ppc_arch_setup): Adjust to the current process'es target
5305 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5306 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5307 (ppc_store_evrregset): Adjust.
5308 (target_regsets): Rename to ...
5309 (ppc_regsets): ... this, and make static.
5310 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5311 (ppc_regs_info): New function.
5312 (the_low_target): Adjust.
5313 (initialize_low_arch): New function.
5314 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5315 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5316 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5317 (tdesc_s390x_linux64v2): Declare.
5318 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5319 (s390_fill_gregset, s390_store_last_break): Adjust.
5320 (target_regsets): Rename to ...
5321 (s390_regsets): ... this, and make static.
5322 (s390_get_pc, s390_set_pc): Adjust.
5323 (s390_get_hwcap): New target_desc parameter, and use it.
5324 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5325 (s390_arch_setup): Adjust to set the current process'es target
5326 description. Don't adjust the regmap.
5327 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5328 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5329 (regs_info_3264): New globals.
5330 (s390_regs_info): New function.
5331 (the_low_target): Adjust.
5332 (initialize_low_arch): New function.
5333 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5334 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5335 [__mips64] (init_registers_mips_linux)
5336 (init_registers_mips_dsp_linux): Delete defines.
5337 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5338 (have_dsp): New global.
5339 (mips_read_description): New, based on mips_arch_setup.
5340 (mips_arch_setup): Reimplement.
5341 (get_usrregs_info): New function.
5342 (mips_cannot_fetch_register, mips_cannot_store_register)
5343 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5344 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5345 (target_regsets): Rename to ...
5346 (mips_regsets): ... this, and make static.
5347 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5348 (dsp_regs_info, regs_info): New globals.
5349 (mips_regs_info): New function.
5350 (the_low_target): Adjust.
5351 (initialize_low_arch): New function.
5352 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5353 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5355 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5356 (arm_read_description): New, with bits factored from
5358 (arm_arch_setup): Reimplement.
5359 (target_regsets): Rename to ...
5360 (arm_regsets): ... this, and make static.
5361 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5362 (arm_regs_info): New function.
5363 (the_low_target): Adjust.
5364 (initialize_low_arch): New function.
5365 * linux-m68k-low.c (tdesc_m68k): Declare.
5366 (target_regsets): Rename to ...
5367 (m68k_regsets): ... this, and make static.
5368 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5369 (m68k_regs_info): New function.
5370 (m68k_arch_setup): New function.
5371 (the_low_target): Adjust.
5372 (initialize_low_arch): New function.
5373 * linux-sh-low.c (tdesc_sharch): Declare.
5374 (target_regsets): Rename to ...
5375 (sh_regsets): ... this, and make static.
5376 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5377 (sh_regs_info, sh_arch_setup): New functions.
5378 (the_low_target): Adjust.
5379 (initialize_low_arch): New function.
5380 * linux-bfin-low.c (tdesc_bfin): Declare.
5381 (bfin_arch_setup): New function.
5382 (bfin_usrregs_info, regs_info): New globals.
5383 (bfin_regs_info): New function.
5384 (the_low_target): Adjust.
5385 (initialize_low_arch): New function.
5386 * linux-cris-low.c (tdesc_cris): Declare.
5387 (cris_arch_setup): New function.
5388 (cris_usrregs_info, regs_info): New globals.
5389 (cris_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
5392 * linux-cris-low.c (tdesc_crisv32): Declare.
5393 (cris_arch_setup): New function.
5394 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5395 (cris_regs_info): New function.
5396 (the_low_target): Adjust.
5397 (initialize_low_arch): New function.
5398 * linux-m32r-low.c (tdesc_m32r): Declare.
5399 (m32r_arch_setup): New function.
5400 (m32r_usrregs_info, regs_info): New globals.
5401 (m32r_regs_info): Adjust.
5402 (initialize_low_arch): New function.
5403 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5404 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5405 (tic6x_usrregs_info): Forward declare.
5406 (tic6x_read_description): New function, based on ...
5407 (tic6x_arch_setup): ... this. Reimplement.
5408 (target_regsets): Rename to ...
5409 (tic6x_regsets): ... this, and make static.
5410 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5411 (tic6x_regs_info): New function.
5412 (the_low_target): Adjust.
5413 (initialize_low_arch): New function.
5414 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5415 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5416 (target_regsets): Rename to ...
5417 (xtensa_regsets): ... this, and make static.
5418 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5420 (xtensa_arch_setup, xtensa_regs_info): New functions.
5421 (the_low_target): Adjust.
5422 (initialize_low_arch): New function.
5423 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5424 (nios2_arch_setup): Set the current process'es tdesc.
5425 (target_regsets): Rename to ...
5426 (nios2_regsets): ... this.
5427 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5428 (nios2_regs_info): New function.
5429 (the_low_target): Adjust.
5430 (initialize_low_arch): New function.
5431 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5432 (aarch64_arch_setup): Set the current process'es tdesc.
5433 (target_regsets): Rename to ...
5434 (aarch64_regsets): ... this.
5435 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5436 (aarch64_regs_info): New function.
5437 (the_low_target): Adjust.
5438 (initialize_low_arch): New function.
5439 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5441 (target_regsets): Rename to ...
5442 (tile_regsets): ... this.
5443 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5444 (tile_regs_info): New function.
5445 (tile_arch_setup): Set the current process'es tdesc.
5446 (the_low_target): Adjust.
5447 (initialize_low_arch): New function.
5448 * spu-low.c (tdesc_spu): Declare.
5449 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5450 * win32-arm-low.c (tdesc_arm): Declare.
5451 (arm_arch_setup): New function.
5452 (the_low_target): Install arm_arch_setup instead of
5454 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5455 (init_windows_x86): Rename to ...
5456 (i386_arch_setup): ... this. Set `win32_tdesc'.
5457 (the_low_target): Adjust.
5458 * win32-low.c (win32_tdesc): New global.
5459 (child_add_thread): Don't create the thread cache here.
5460 (do_initial_child_stuff): Set the new process'es tdesc.
5461 * win32-low.h (struct target_desc): Forward declare.
5462 (win32_tdesc): Declare.
5463 * lynx-i386-low.c (tdesc_i386): Declare global.
5464 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5465 * lynx-low.c (lynx_tdesc): New global.
5466 (lynx_add_process): Set the new process'es tdesc.
5467 * lynx-low.h (struct target_desc): Forward declare.
5468 (lynx_tdesc): Declare global.
5469 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5470 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5471 * nto-low.c (nto_tdesc): New global.
5472 (do_attach): Set the new process'es tdesc.
5473 * nto-low.h (struct target_desc): Forward declare.
5474 (nto_tdesc): Declare.
5475 * nto-x86-low.c (tdesc_i386): Declare.
5476 (nto_x86_arch_setup): Set `nto_tdesc'.
5478 2013-06-04 Gary Benson <gbenson@redhat.com>
5480 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5481 to qSupported response when appropriate.
5482 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5483 with nonzero-length annex.
5484 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5485 arguments supplied in annex.
5487 2013-05-31 Doug Evans <dje@google.com>
5490 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5491 64 bits in 64-cross-32 environment.
5493 2013-05-28 Pedro Alves <palves@redhat.com>
5495 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5496 (aarch64-without-fpu.c): Delete rule.
5497 * configure.srv (aarch64*-*-linux*): Remove references to
5498 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5499 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5502 2013-05-24 Pedro Alves <palves@redhat.com>
5504 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5505 instead of strchr/decode_address. Error if the range isn't split
5506 with a ','. Don't assume there's be a ':' in the action.
5508 2013-05-23 Yao Qi <yao@codesourcery.com>
5509 Pedro Alves <palves@redhat.com>
5511 * linux-low.c (lwp_in_step_range): New function.
5512 (linux_wait_1): If the thread was range stepping and stopped
5513 outside the stepping range, report the stop to GDB. Otherwise,
5514 continue stepping. Add range stepping debug output.
5515 (linux_set_resume_request): Copy the step range from the resume
5517 (linux_supports_range_stepping): New.
5518 (linux_target_ops) <supports_range_stepping>: Set to
5519 linux_supports_range_stepping.
5520 * linux-low.h (struct linux_target_ops)
5521 <supports_range_stepping>: New field.
5522 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5523 * linux-x86-low.c (x86_supports_range_stepping): New.
5524 (the_low_target) <supports_range_stepping>: Set to
5525 x86_supports_range_stepping.
5526 * server.c (handle_v_cont): Handle 'r' action.
5527 (handle_v_requests): Append ";r" if the target supports range
5529 * target.h (struct thread_resume) <step_range_start,
5530 step_range_end>: New fields.
5531 (struct target_ops) <supports_range_stepping>:
5533 (target_supports_range_stepping): New macro.
5535 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5537 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5538 confusion in comment.
5540 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5542 * lynx-low.c (struct process_info_private): New type.
5543 (lynx_add_process): New function.
5544 (lynx_create_inferior, lynx_attach): Replace calls to
5545 add_process by calls to lynx_add_process.
5546 (lynx_resume): If PTID is null, then try using
5547 current_process()->private->last_wait_event_ptid.
5549 (lynx_clear_inferiors): Delete. The contents of that function
5550 has been inlined in lynx_mourn;
5551 (lynx_wait_1): Save the ptid in the process's private data.
5552 (lynx_mourn): Free the process' private data. Replace call
5553 to lynx_clear_inferiors by call to clear_inferiors.
5555 2013-05-17 Yao Qi <yao@codesourcery.com>
5557 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5560 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5562 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5563 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5564 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5565 PT_TEXT_END_ADDR guards. Update comments.
5566 (linux_target_op) <read_offsets>: Conditionally define to
5567 linux_read_offsets if the target is UCLIBC and if it defines
5568 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5570 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5571 Andrew Jenner <andrew@codesourcery.com>
5573 * Makefile.in (SFILES): Add linux-nios2-low.c.
5574 (clean): Add action to delete nios2-linux.c.
5575 (nios2-linux.c): New rule.
5576 * configure.srv: Add nios2*-*-linux*.
5577 * linux-nios2-low.c: New.
5579 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5581 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5583 2013-04-25 Hui Zhu <hui@codesourcery.com>
5586 * ax.c (ax_printf): Add fflush.
5588 2013-04-22 Tom Tromey <tromey@redhat.com>
5590 * Makefile.in (SFILES): Add filestuff.c.
5591 (OBS): Add filestuff.o.
5592 (filestuff.o): New target.
5593 * config.in, configure: Rebuild.
5594 * configure.ac: Check for fdwalk, pipe2.
5596 2013-04-17 Pedro Alves <palves@redhat.com>
5598 * configure.ac (USE_THREAD_DB): Delete variable.
5599 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5600 Don't AC_SUBST USE_THREAD_DB.
5601 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5602 * config.in, configure: Regenerate.
5604 2013-04-16 Pedro Alves <palves@redhat.com>
5606 * linux-low.h (struct lwp_info) <thread_known>: Move under
5607 the USE_THREAD_DB #ifdef.
5609 2013-04-16 Pedro Alves <palves@redhat.com>
5611 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5612 (linux-low.o): Delete rule.
5613 * linux-low.h: Always include "gdb_thread_db.h" instead of
5614 conditionally including thread_db.h.
5615 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5618 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5620 * Makefile.in (install-only): Fix make install regression.
5622 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5624 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5625 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5627 * gdbserver.1: Remove.
5629 2013-03-22 Pedro Alves <palves@redhat.com>
5631 * linux-low.c (handle_extended_wait): Don't call
5632 linux_enable_event_reporting.
5634 2013-03-15 Tony Theodore <tonyt@logyst.com>
5637 * Makefile.in (SHELL): Use @SHELL@.
5639 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5641 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5644 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5646 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5647 Remove extraneous NULL element.
5649 2013-03-13 Yao Qi <yao@codesourcery.com>
5651 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5652 'V' block in trace frame.
5654 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5656 * target.h (struct target_ops): Add btrace ops.
5657 (target_supports_btrace): New macro.
5658 (target_enable_btrace): New macro.
5659 (target_disable_btrace): New macro.
5660 (target_read_btrace): New macro.
5661 * gdbthread.h (struct thread_info): Add btrace field.
5662 * server.c: Include btrace-common.h.
5663 (handle_btrace_general_set): New function.
5664 (handle_btrace_enable): New function.
5665 (handle_btrace_disable): New function.
5666 (handle_general_set): Call handle_btrace_general_set.
5667 (handle_qxfer_btrace): New function.
5668 (struct qxfer qxfer_packets[]): Add btrace entry.
5669 * inferiors.c (remove_thread): Disable btrace.
5670 * linux-low: Include linux-btrace.h.
5671 (linux_low_enable_btrace): New function.
5672 (linux_low_read_btrace): New function.
5673 (linux_target_ops): Add btrace ops.
5674 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5675 Add srv_linux_btrace=yes.
5676 (x86_64-*-linux*): Add linux-btrace.o.
5677 Add srv_linux_btrace=yes.
5678 * configure.ac: Define HAVE_LINUX_BTRACE.
5679 * config.in: Regenerated.
5680 * configure: Regenerated.
5682 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5684 * server.c (handle_qxfer): Preserve error message if -3 is
5686 (qxfer): Document the -3 return value.
5688 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5690 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5691 (linux_btrace_h): New variable.
5692 (linux-btrace.o): New rule.
5694 2013-03-08 Stan Shebs <stan@codesourcery.com>
5695 Hafiz Abid Qadeer <abidh@codesourcery.com>
5697 * tracepoint.c (trace_buffer_size): New global.
5698 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5699 (init_trace_buffer): Change to one-argument function. Allocate
5700 trace buffer memory.
5701 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5702 handle QTBuffer:size packet.
5703 (cmd_bigqtbuffer_size): New function.
5704 (initialize_tracepoint): Call init_trace_buffer with
5705 DEFAULT_TRACE_BUFFER_SIZE.
5706 * server.c (handle_query): Add QTBuffer:size in the
5709 2013-03-07 Yao Qi <yao@codesourcery.com>
5711 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5712 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5714 (cmd_qtsp): Adjust condition. Do post increment.
5715 Set cur_action and cur_step_action back to 0.
5717 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5720 * linux-low.c (linux_write_memory): Return early success if LEN is
5723 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5725 * configure.srv: Add x86_64-*-cygwin* as target.
5727 2013-02-28 Tom Tromey <tromey@redhat.com>
5729 * configure.ac: Invoke AC_SYS_LARGEFILE.
5730 * configure, config.in: Rebuild.
5732 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5734 * win32-low.c: Throughout, fix format strings and casts of
5735 printf-like functions to avoid type related warnings on all
5737 (get_child_debug_event): Print dwDebugEventCode as hex since
5738 that's how it's usually documented.
5740 2013-02-28 Yao Qi <yao@codesourcery.com>
5742 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5745 2013-02-27 Jiong Wang <jiwang@tilera.com>
5747 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5748 (reg-tilegx32.c): New rule.
5749 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5750 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5751 different register info initializer according to elf class.
5752 (init_registers_tilgx32): New function. The tilegx32 register info
5754 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5755 (tile_store_gregset): Likewise.
5757 2013-02-27 Yao Qi <yao@codesourcery.com>
5759 * server.c (process_point_options): Print debug message when
5760 debug_threads is true.
5762 2013-02-26 Yao Qi <yao@codesourcery.com>
5764 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5766 2013-02-19 Pedro Alves <palves@redhat.com>
5767 Kai Tietz <ktietz@redhat.com>
5771 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5772 instead of strtoul to extract address from packet.
5773 (process_serial_event) <'z'>: Likewise.
5775 2013-02-18 Yao Qi <yao@codesourcery.com>
5777 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5779 2013-02-14 Pedro Alves <palves@redhat.com>
5783 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5784 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5786 2013-02-14 Pedro Alves <palves@redhat.com>
5788 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5790 2013-02-14 Pedro Alves <palves@redhat.com>
5792 * tracepoint.c (save_string): Delete.
5793 (add_tracepoint_action): Use savestring instead of save_string.
5795 2013-02-12 Pedro Alves <palves@redhat.com>
5797 * linux-xtensa-low.c: Ditto.
5798 * xtensa-xtregs.c: Ditto.
5800 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5802 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5805 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5807 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5808 aarch64_num_wp_regs and aarch64_num_bp_regs to
5809 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5811 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5813 * linux-aarch64-low.c (ps_get_thread_area): Replace
5814 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5816 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5817 Marcus Shawcroft <marcus.shawcroft@arm.com>
5818 Nigel Stephens <nigel.stephens@arm.com>
5819 Yufeng Zhang <yufeng.zhang@arm.com>
5821 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5822 (aarch64.c, aarch64-without-fpu.c): New targets.
5823 * configure.srv (aarch64*-*-linux*): New.
5824 * linux-aarch64-low.c: New file.
5826 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5828 * linux-low.c (handle_extended_wait, linux_create_inferior)
5829 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5830 (dequeue_one_deferred_signal, linux_resume_one_thread)
5831 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5832 (linux_tracefork_grandchild, linux_test_for_tracefork)
5833 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5834 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5835 where the argument is 0.
5837 2013-01-25 Yao Qi <yao@codesourcery.com>
5839 * event-loop.c: Include "queue.h".
5840 (gdb_event_p): New typedef.
5841 (struct gdb_event) <next_event>: Remove.
5842 (event_queue): Change to QUEUE(gdb_event_p).
5843 (async_queue_event): Remove.
5844 (gdb_event_xfree): New.
5845 (initialize_event_loop): New.
5846 (process_event): Use API from QUEUE.
5847 (wait_for_event): Likewise.
5848 * server.c (main): Call initialize_event_loop.
5849 * server.h (initialize_event_loop): Declare.
5851 2013-01-18 Yao Qi <yao@codesourcery.com>
5853 * ax.h (struct eval_agent_expr_context): New.
5854 (gdb_eval_agent_expr): Update declaration.
5855 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5856 TFRAME. Add new argument CTX.
5857 * server.h (struct eval_agent_expr_context): Declare.
5858 (agent_mem_read, agent_tsv_read): Update declaration.
5859 (agent_mem_read_string): Likewise.
5860 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5861 (add_traceframe_block): Add new argument TPOINT.
5862 Increase TPOINT->traceframe_usage.
5863 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5864 eval_tracepoint_agent_expr.
5865 (condition_true_at_tracepoint): Likewise.
5866 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5867 (agent_mem_read_string, agent_tsv_read): Likewise.
5869 2013-01-16 Yao Qi <yao@codesourcery.com>
5871 * linux-low.c (linux_resume_one_lwp): Don't check
5872 'lwp->bp_reinsert != 0'.
5874 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5875 Pedro Alves <palves@redhat.com>
5877 * lynx-low.c (ptrace_request_to_str): Define a temporary
5878 macro and use it to simplify this function's implementation.
5880 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5882 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5885 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5887 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5889 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5891 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5895 * lynx-low.c (lynx_resume): Use the resume_info parameter
5896 to determine the ptid for the lynx_ptrace call, unless
5897 it is equal to minus_one_ptid, in which case we use the
5898 ptid of the current_inferior.
5899 (lynx_wait_1): After having received a thread create/exit
5900 event, resume the inferior's execution using the signaling
5901 thread's ptid, rather than the old ptid.
5903 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5905 * lynx-low.c (lynx_resume): Delete variable ret.
5907 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5909 * gdbreplay.c (gdbreplay_version): Update copyright year.
5910 * server.c (gdbserver_version): Likewise.
5912 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5914 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5917 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5919 * lynx-low.c (ptrace_request_to_str): Add handling for
5922 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5924 * lynx-low.c (lynx_attach): Delete variable new_process.
5926 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5928 * lynx-low.c (lynx_create_inferior): Delete variable
5931 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5933 * lynx-low.c (ptrace_request_to_str): Do not handle
5934 PTRACE_GETTHREADLIST if this macro does not exist.
5936 2012-12-15 Yao Qi <yao@codesourcery.com>
5938 * Makefile.in (OBS): Add notif.o.
5939 * notif.c, notif.h: New.
5940 * server.c: Include "notif.h".
5941 (struct vstop_notif) <next>: Remove.
5943 (queue_stop_reply): Update.
5944 (push_event, send_next_stop_reply): Remove.
5945 (discard_queued_stop_replies): Update.
5946 (notif_stop): New variable.
5947 (handle_v_stopped): Remove.
5948 (handle_v_requests): Don't call handle_v_stopped. Call
5949 handle_ack_notif instead.
5950 (queue_stop_reply_callback): Call notif_event_enque instead
5951 of queue_stop_reply.
5952 (handle_status): Don't call send_next_stop_reply, call
5953 notif_write_event instead.
5954 (kill_inferior_callback): Likewise.
5955 (detach_or_kill_inferior_callback): Likewise.
5956 (main): Call initialize_notif.
5957 (process_serial_event): Call QUEUE_is_empty.
5958 (handle_target_event): Call notif_push instead of push event.
5959 * server.h (push_event): Remove declaration.
5961 2012-12-10 Tom Tromey <tromey@redhat.com>
5963 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5964 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5967 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5968 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5969 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5970 (amd64-linux-ipa.o, ax.o): Rewrite.
5971 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5972 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5973 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5974 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5975 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5976 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5977 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5978 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5979 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5980 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5981 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5982 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5983 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5984 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5985 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5986 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5987 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5988 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5989 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5990 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5991 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5992 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5993 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5994 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5995 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5996 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5997 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5998 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5999 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6000 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6001 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6002 (reg-tilegx.o): Remove.
6003 (all_object_files): New macro.
6004 Include .deps files.
6005 * aclocal.m4, configure: Rebuild.
6006 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6007 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6008 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6010 2012-12-05 Tom Tromey <tromey@redhat.com>
6013 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6015 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6017 * configure.ac: Check for linux/perf_event.h.
6018 * config.in: Regenerated.
6019 * configure: Regenerated.
6021 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6023 * hostio.c (handle_readlink): Decrease buffer size
6024 parameter passed to readlink by one byte.
6026 2012-11-26 Yao Qi <yao@codesourcery.com>
6028 * configure.ac (build_warnings): Append '-Wempty-body'.
6029 * configure: Regenerated.
6030 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6033 2012-11-15 Pierre Muller <muller@sourceware.org>
6035 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6036 * config.in: Regenerate.
6037 * configure: Regenerate.
6038 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6039 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6040 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6041 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6043 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6044 instead of <sys/wait.h> header.
6045 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6047 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6049 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6050 (various make rules): Remove -DGDBSERVER
6052 2012-11-09 Yao Qi <yao@codesourcery.com>
6054 * spu-low.c (current_ptid): Move it to ..
6055 * gdbthread.h: ... here. New.
6056 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6057 * server.c (myresume, process_serial_event): Likewise.
6058 * thread-db.c (thread_db_find_new_threads): Likewise.
6059 * tracepoint.c (run_inferior_command): Likewise.
6061 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6063 * server.c (handle_search_memory_1): Include access length in
6066 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6068 * linux-crisv32-low.c: Fix compile errors.
6070 2012-09-04 Yao Qi <yao@codesourcery.com>
6072 * tracepoint.c (cmd_qtsv): Adjust debug message.
6073 Don't check CUR_TPOINT.
6075 2012-08-28 Yao Qi <yao@codesourcery.com>
6077 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6078 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6079 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6080 Remove declarations of xmalloc, xreallloc, xstrdup and
6082 * Makefile.in (libiberty_h): New.
6083 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6084 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6086 2012-08-23 Yao Qi <yao@codesourcery.com>
6088 * server.h: Remove declaration of 'xsnprintf'.
6090 2012-08-22 Keith Seitz <keiths@redhat.com>
6092 * server.h: Include build-gnulib-gbserver/config.h.
6093 * gdbreplay.c: Likewise.
6095 2012-08-08 Doug Evans <dje@google.com>
6097 * Makefile.in (SFILES): Add gdb_vecs.c.
6098 (OBS): Add gdb_vecs.o.
6099 (gdb_vecs_h, host_defs_h): New variables.
6100 (thread-db.o): Add $(gdb_vecs_h) dependency.
6101 (gdb_vecs.o): New rule.
6102 * thread-db.c: #include "gdb_vecs.h".
6103 (thread_db_load_search): Use a vector to iterate over path elements.
6104 Handle text appearing after "$pdir".
6106 * configure.ac: Add check for strstr.
6107 * config.in: Regenerate.
6108 * configure: Regenerate.
6110 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6112 * hostio.c (handle_pread): If pread fails, fall back to attempting
6114 (handle_pwrite): Likewise for pwrite.
6116 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6118 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6119 between unsupported TYPE and unimplementable ADDR/LEN combination.
6120 (arm_insert_point): Act on new return value.
6122 2012-07-31 Pedro Alves <palves@redhat.com>
6124 * server.c (process_point_options): Only skip tokens if we find
6125 one that is unrecognized. Don't treat 'X' specially while
6126 skipping unrecognized tokens.
6128 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6130 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6131 to 4-byte-align HW breakpoint addresses for Thumb.
6133 2012-07-27 Yao Qi <yao@codesourcery.com>
6137 * server.h: Declare gdb_agent_about_to_close.
6138 * target.c (kill_inferior): Include "agent.h".
6139 New. Send command 'kill'.
6140 * target.h (kill_inferior): Removed macro.
6141 * tracepoint.c (gdb_agent_about_to_close): New.
6142 (gdb_agent_helper_thread): Handle command 'close'.
6143 Wait endlessly until the inferior stops.
6144 Install gdb_agent_remove_socket to atexit hook.
6145 (agent_socket_name): New static variable.
6146 (gdb_agent_socket_init): Replace local variable 'name' with
6147 'agent_socket_name'.
6148 (gdb_agent_remove_socket): New.
6150 2012-07-27 Yao Qi <yao@codesourcery.com>
6152 * server.c (process_point_options): Stop at 'X' when parsing.
6154 2012-07-19 Michael Eager <eager@eagercon.com>
6156 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6158 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6159 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6160 hardware breakpoint.
6162 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6164 * gdbserver/linux-low.c (initialize_low): Call
6165 linux_ptrace_init_warnings.
6167 2012-07-02 Doug Evans <dje@google.com>
6169 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6172 2012-07-02 Stan Shebs <stan@codesourcery.com>
6174 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6175 (ax.o): Add it to build rule.
6177 (OBS): Add format.o.
6178 (IPA_OBS): Add format.o.
6179 * server.c (handle_query): Claim support for breakpoint commands.
6180 (process_point_options): Add command case.
6181 (process_serial_event): Leave running if there are printfs in
6183 * mem-break.h (any_persistent_commands): Declare.
6184 (add_breakpoint_commands): Declare.
6185 (gdb_no_commands_at_breakpoint): Declare.
6186 (run_breakpoint_commands): Declare.
6187 * mem-break.c (struct point_command_list): New struct.
6188 (struct breakpoint): New field command_list.
6189 (any_persistent_commands): New function.
6190 (add_commands_to_breakpoint): New function.
6191 (add_breakpoint_commands): New function.
6192 (gdb_no_commands_at_breakpoint): New function.
6193 (run_breakpoint_commands): New function.
6194 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6196 * ax.c: Include format.h.
6197 (ax_printf): New function.
6198 (gdb_eval_agent_expr): Add printf opcode.
6200 2012-06-13 Yao Qi <yao@codesourcery.com>
6202 * server.c (start_inferior): Remove duplicated writes to fields
6203 'last_resume_kind' and 'last_status' of 'current_inferior'.
6205 2012-06-12 Yao Qi <yao@codesourcery.com>
6206 Pedro Alves <palves@redhat.com>
6208 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6210 * server.c (handle_v_cont): Extend comment.
6212 2012-06-11 Yao Qi <yao@codesourcery.com>
6214 * linux-low.c (linux_attach): Add 'static'.
6216 2012-06-06 Yao Qi <yao@codesourcery.com>
6218 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6220 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6222 Fix gcc -flto compilation warning.
6223 * server.c (main): Make variable multi_mode and attach volatile.
6225 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6227 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6228 if the platform doesn't know about it.
6230 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6232 * Makefile.in (SFILES): Add linux-tile-low.c.
6233 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6234 * configure.srv: Handle tilegx-*-linux*.
6235 * linux-tile-low.c: New file.
6237 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6239 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6241 2012-05-24 Pedro Alves <palves@redhat.com>
6245 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6247 2012-05-24 Pedro Alves <palves@redhat.com>
6251 Replace target_signal with gdb_signal throughout.
6253 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6255 * linux-low.c (linux_store_registers): Avoid the copying sequence
6256 when no data has been retrieved by ptrace.
6258 2012-05-22 Will Deacon <will.deacon@arm.com>
6260 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6261 Include asm/ptrace.h.
6262 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6265 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6267 * linux-low.c (linux_store_registers): Don't re-retrieve data
6268 with ptrace that has already been obtained from /proc. Always
6269 copy any data retrieved with ptrace to the buffer supplied.
6271 2012-05-11 Yao Qi <yao@codesourcery.com>
6272 Pedro Alves <palves@redhat.com>
6274 * linux-low.c (enum stopping_threads_kind): New.
6275 (stopping_threads): Change type to `enum stopping_threads_kind'.
6276 (handle_extended_wait): If stopping and suspending threads, leave
6277 the new_lwp suspended too.
6278 (linux_wait_for_event): Adjust.
6279 (stop_all_lwps): Set `stopping_threads' to
6280 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6281 whether we're suspending threads or just stopping them. Assert no
6284 2012-04-29 Yao Qi <yao@codesourcery.com>
6286 * server.h: Move some code to ...
6287 * gdbthread.h: ... here. New.
6288 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6289 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6290 (nto-low.o, win32-low.o): Likewise.
6291 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6292 * regcache.c, remote-utils.c, server.c: Likewise.
6293 * target.c, tracepoint.c, win32-low.c: Likewise.
6295 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6297 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6298 (PTRACE_ARG4_TYPE): Likewise.
6299 (PTRACE_XFER_TYPE): Likewise.
6300 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6301 ptrace to PTRACE_ARG3_TYPE.
6302 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6303 (PTRACE_ARG4_TYPE): Likewise.
6304 (PTRACE_XFER_TYPE): Likewise.
6305 (linux_detach_one_lwp): Cast fourth argument of
6306 ptrace to long then PTRACE_ARG4_TYPE.
6307 (regsets_fetch_inferior_registers): Cast third argument of
6308 ptrace to long then PTRACE_ARG3_TYPE.
6309 (regsets_store_inferior_registers): Likewise.
6311 2012-04-20 Pedro Alves <palves@redhat.com>
6313 * configure: Regenerate.
6315 2012-04-19 Pedro Alves <palves@redhat.com>
6317 * Makefile.in (GNULIB_BUILDDIR): New.
6318 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6319 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6320 (all, install-only, uninstall, clean-info, all-lib, clean): No
6321 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6322 (maintainer-clean realclean distclean): Use subdir_do.
6324 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6325 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6326 * acinclude.m4: Include acx_configure_dir.m4.
6327 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6328 calls. Call AC_PROG_RANLIB. Configure gnulib using
6331 (GNULIB_STDINT_H): Adjust.
6332 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6333 * gdbreplay.c: Include build-gnulib/config.h.
6334 * server.h: Likewise.
6335 * aclocal.m4: Regenerate.
6336 * config.in: Regenerate.
6337 * configure: Regenerate.
6339 2012-04-19 Pedro Alves <palves@redhat.com>
6341 * Makefile.in (LIBGNU, INCGNU): Adjust.
6342 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6343 (all, install-only, uninstall, clean-info, all-lib, clean)
6344 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6345 * configure.ac: Adjust AC_OUTPUT output.
6346 * aclocal.m4: Regenerate.
6347 * configure: Regenerate.
6349 2012-04-19 Pedro Alves <palves@redhat.com>
6351 * Makefile.in (generated_files): New.
6352 (server_h): Remove the explicit dependency on config.h, and depend
6353 on $generated_files.
6355 2012-04-19 Pedro Alves <palves@redhat.com>
6357 * Makefile.in (INCGNU): Add -Ignulib.
6359 2012-04-19 Pedro Alves <palves@redhat.com>
6361 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6362 (INCGNU): ... this, and spell out -I here.
6363 (GNULIB_LIB): Rename to ...
6365 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6367 2012-04-19 Pedro Alves <palves@redhat.com>
6369 * config.in: Regenerate.
6371 2012-04-19 Pedro Alves <palves@redhat.com>
6373 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6374 * server.h (memmem): Remove declaration.
6375 * config.in: Regenerate.
6376 * configure: Regenerate.
6378 2012-04-19 Yao Qi <yao@codesourcery.com>
6380 * Makefile.in (SFILES): Add common/vec.c.
6384 2012-04-19 Yao Qi <yao@codesourcery.com>
6386 * remote-utils.c (prepare_resume_reply): Replace with macro
6387 target_core_of_thread.
6388 * server.c (handle_qxfer_threads_proper): Likewise.
6389 * target.h (traget_core_of_thread): New macro.
6391 2012-04-18 Pedro Alves <palves@redhat.com>
6393 * aclocal.m4: Regenerate.
6394 * configure: Regenerate.
6396 2012-04-16 Yao Qi <yao@codesourcery.com>
6398 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6399 duplicated on address.
6401 2012-04-16 Yao Qi <yao@codesourcery.com>
6403 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6404 (struct tracepoint_action_ops) <send>: New field.
6405 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6406 (agent_expr_send, x_tracepoint_action_send): New.
6407 (l_tracepoint_action_send): New.
6408 (cmd_qtdp): Download and install tracepoint
6409 according to `use_agent'.
6410 (run_inferior_command): Add one more parameter `len'.
6412 (tracepoint_send_agent): New.
6413 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6415 2012-04-16 Yao Qi <yao@codesourcery.com>
6417 * tracepoint.c (download_tracepoints): Moved to ...
6418 (cmd_qtstart): ... here.
6420 2012-04-14 Yao Qi <yao@codesourcery.com>
6422 * tracepoint.c: Include inttypes.h.
6423 (struct collect_memory_action): Use sized types.
6424 (struct tracepoint): Likewise.
6425 (cmd_qtdp, stop_tracing): Update print specifiers.
6426 (cmd_qtp, response_tracepoint): Likewise.
6427 (collect_data_at_tracepoint): Likewise.
6428 (collect_data_at_step): Likewise.
6430 2012-04-14 Yao Qi <yao@codesourcery.com>
6432 Import gnulib module inttypes.
6433 * aclocal.m4, config.in, configure: Regenerated.
6435 2012-04-14 Yao Qi <yao@codesourcery.com>
6437 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6438 Makefile and config.status at last.
6440 2012-04-13 Yao Qi <yao@codesourcery.com>
6442 * tracepoint.c: Include stdint.h unconditionally.
6444 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6446 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6447 on BFD_HAVE_SYS_PROCFS_TYPE.
6448 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6449 * configure: Regenerate.
6450 * config.in: Likewise.
6452 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6454 * Makefile.in (clean): Also remove x32.c x32-linux.c
6455 x32-avx.c x32-avx-linux.c.
6456 (x32.o): New target.
6458 (x32-linux.o): Likewise.
6459 (x32-linux.c): Likewise.
6460 (x32-avx.o): Likewise.
6461 (x32-avx.c): Likewise.
6462 (x32-avx-linux.o): Likewise.
6463 (x32-avx-linux.c): Likewise.
6465 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6466 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6467 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6468 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6469 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6470 i386/x32-avx-linux.xml.
6472 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6473 (init_registers_x32_avx_linux): Likwise.
6474 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6475 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6477 2012-04-13 Pedro Alves <palves@redhat.com>
6479 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6480 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6481 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6482 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6485 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6487 * linux-x86-low.c (compat_x32_clock_t): New.
6488 (compat_x32_siginfo_t): Likewise.
6489 (compat_x32_siginfo_from_siginfo): Likewise.
6490 (siginfo_from_compat_x32_siginfo): Likewise.
6491 (linux_is_elf64): Likewise.
6492 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6493 and siginfo_from_compat_x32_siginfo for x32.
6494 (x86_arch_setup): Set linux_is_elf64.
6496 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6499 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6501 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6502 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6503 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6504 compatible with process.
6506 2012-04-12 Yao Qi <yao@codesourcery.com>
6508 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6509 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6510 (install-only, install-info, clean): Handle sub dir gnulib.
6511 (all-lib, am--refresh): New targets.
6512 (memmem.o): Remove target.
6513 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6514 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6515 (AC_REPLACE_FUNCS): Remove memmem.
6516 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6517 (AC_OUTPUT): Generate Makefile in gnulib/.
6518 * aclocal.m4, config.in, configure: Regenerated.
6520 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6522 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6524 2012-04-05 Pedro Alves <palves@redhat.com>
6526 -Werror=strict-aliasing
6528 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6531 2012-04-04 Pedro Alves <palves@redhat.com>
6533 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6534 (sparc_store_gregset_from_stack, sparc_store_gregset)
6535 (sparc_breakpoint_at): Fix formatting.
6537 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6539 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6541 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6542 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6543 * config.in: Regenerate.
6544 * configure: Likewise.
6546 2012-03-29 Pedro Alves <palves@redhat.com>
6548 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6549 Correct ptrace arguments.
6551 2012-03-28 Pedro Alves <palves@redhat.com>
6553 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6554 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6555 (IA64_FR1_REGNUM): New defines.
6556 (ia64_fetch_register): New.
6557 (the_low_target): Install it.
6558 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6560 * linux-low.c (linux_fetch_registers): Try the
6561 the_low_target.fetch_register hook first.
6563 * linux-arm-low.c (the_low_target): Adjust.
6564 * linux-bfin-low.c (the_low_target): Adjust.
6565 * linux-cris-low.c (the_low_target): Adjust.
6566 * linux-crisv32-low.c (the_low_target): Adjust.
6567 * linux-m32r-low.c (the_low_target): Adjust.
6568 * linux-m68k-low.c (the_low_target): Adjust.
6569 * linux-mips-low.c (the_low_target): Adjust.
6570 * linux-ppc-low.c (the_low_target): Adjust.
6571 * linux-s390-low.c (the_low_target): Adjust.
6572 * linux-sh-low.c (the_low_target): Adjust.
6573 * linux-sparc-low.c (the_low_target): Adjust.
6574 * linux-tic6x-low.c (the_low_target): Adjust.
6575 * linux-x86-low.c (the_low_target): Adjust.
6576 * linux-xtensa-low.c (the_low_target): Adjust.
6578 2012-03-26 Pedro Alves <palves@redhat.com>
6580 * server.c (handle_qxfer_libraries): Don't bail early if
6581 the_target->qxfer_libraries_svr4 is not NULL.
6583 2012-03-26 Pedro Alves <palves@redhat.com>
6585 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6587 2012-03-23 Pedro Alves <palves@redhat.com>
6589 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6590 "library-list-svr4" element's start tag when the the DSO list is
6593 2012-03-23 Pedro Alves <palves@redhat.com>
6595 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6596 a variable whose type size is the same as the inferior's pointer
6599 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6601 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6603 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6604 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6605 * linux-low.h: Include <signal.h>.
6606 (struct siginfo): Remove forward declaration.
6607 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6610 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6612 * .gitignore: Ignore more files.
6614 2012-03-19 Pedro Alves <palves@redhat.com>
6615 Jan Kratochvil <jan.kratochvil@redhat.com>
6617 * server.c (cont_thread, general_thread): Add describing comments.
6618 (start_inferior): Clear `cont_thread'.
6619 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6622 2012-03-15 Yao Qi <yao@codesourcery.com>
6624 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6626 (cmd_qtdp): ... here.
6628 2012-03-15 Yao Qi <yao@codesourcery.com>
6630 * tracepoint.c (struct tracepoint_action_ops): New.
6631 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6632 (m_tracepoint_action_download): New.
6633 (r_tracepoint_action_download): New.
6634 (x_tracepoint_action_download): New.
6635 (l_tracepoint_action_download): New.
6636 (add_tracepoint_action): Install `action->ops' according type.
6637 (download_tracepoint_1): Move code `download' function pointer
6638 of various tracepoint_action_ops.
6640 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6642 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6643 linux_ptrace_attach_warnings.
6645 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6647 * Makefile.in (linux-ptrace.o): New.
6648 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6649 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6650 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6651 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6652 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6654 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6656 2012-03-08 Yao Qi <yao@codesourcery.com>
6657 Pedro Alves <palves@redhat.com>
6659 Fix PR server/13392.
6660 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6662 * tracepoint.c (remove_tracepoint): New.
6663 (cmd_qtdp): Call remove_tracepoint when failed to install.
6665 2012-03-07 Pedro Alves <palves@redhat.com>
6667 * linux-low.c (get_detach_signal): New.
6668 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6669 Pass on pending signals to PTRACE_DETACH. Check the result of the
6671 * server.c (program_signals, program_signals_p): New.
6672 (handle_general_set): Handle QProgramSignals.
6673 * server.h (program_signals, program_signals_p): Declare.
6675 2012-03-05 Pedro Alves <palves@redhat.com>
6676 Jan Kratochvil <jan.kratochvil@redhat.com>
6678 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6681 2012-03-03 Yao Qi <yao@codesourcery.com>
6683 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6684 agent_look_up_symbols.
6686 2012-03-03 Yao Qi <yao@codesourcery.com>
6688 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6689 (linux-x86-low.o): Likewise.
6690 * server.h: Remove in_process_agent_loaded.
6691 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6695 2012-03-03 Yao Qi <yao@codesourcery.com>
6697 * tracepoint.c (gdb_agent_capability): New global.
6698 (in_process_agent_loaded_ust): Renamed to
6699 `in_process_agent_supports_ust'.
6701 (in_process_agent_supports_ust): Call agent_capability_check.
6702 (clear_installed_tracepoints): Assert that agent supports
6705 2012-03-03 Yao Qi <yao@codesourcery.com>
6707 * linux-low.c (linux_supports_agent): New.
6708 (linux_target_ops): Initialize field `supports_agent' with
6709 linux_supports_agent.
6710 * target.h (struct target_ops) <supports_agent>: New.
6711 (target_supports_agent): New macro.
6712 * server.c (handle_general_set): Handle packet 'QAgent'.
6713 (handle_query): Send `QAgent+'.
6714 * Makefile.in (server.o): Depends on agent.h.
6716 2012-03-03 Yao Qi <yao@codesourcery.com>
6718 * Makefile.in (OBS): Add agent.o.
6719 Add new rule for agent.o.
6720 Track dependence of tracepoint.c on agent.h.
6721 * tracepoint.c (run_inferior_command_1):
6722 (run_inferior_command): Call agent_run_command.
6723 (gdb_ust_connect_sync_socket): Deleted. Move it to
6725 (resume_thread, stop_thread): Likewise.
6726 (gdb_ust_socket_init): Renamed to ...
6727 (gdb_agent_socket_init): ... New.
6728 (gdb_ust_thread): Renamed to ...
6729 (gdb_agent_helper_thread): ... New.
6730 (gdb_ust_init): Move some code to ...
6731 (gdb_agent_init): ... here. New.
6732 [HAVE_UST]: Call gdb_ust_init.
6733 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6734 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6735 * config.in, configure: Regenerated.
6737 2012-03-02 Pedro Alves <palves@redhat.com>
6739 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6740 * linux-low.c (struct simple_pid_list): New.
6741 (stopped_pids): New a struct simple_pid_list pointer.
6742 (add_to_pid_list, pull_pid_from_list): New.
6743 (handle_extended_wait): Don't assume the first signal new children
6744 report is SIGSTOP. Adjust call to pull_pid_from_list.
6745 (linux_wait_for_lwp): Adjust.
6747 2012-03-02 Yao Qi <yao@codesourcery.com>
6749 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6752 2012-03-02 Yao Qi <yao@codesourcery.com>
6754 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6755 `stop_pc' and `tpoint'. Update caller.
6757 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6759 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6760 * linux-low.c (use_linux_regsets): New macro.
6761 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6762 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6763 (linux_register_in_regsets): New function.
6764 (usr_fetch_inferior_registers): Skip registers covered by
6766 (usr_store_inferior_registers): Likewise.
6767 (usr_fetch_inferior_registers): New macro.
6768 (usr_store_inferior_registers): Likewise.
6769 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6770 (linux_store_registers): Likewise.
6771 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6773 (init_registers_mips64_dsp_linux): Likewise.
6774 (init_registers_mips_linux): New macro.
6775 (init_registers_mips_dsp_linux): Likewise.
6776 (mips_dsp_num_regs): Likewise.
6777 (DSP_BASE, DSP_CONTROL): New fallback macros.
6778 (mips_base_regs): New macro.
6779 (mips_regmap): Use it. Fix the size.
6780 (mips_dsp_regmap): New variable.
6781 (mips_dsp_regset_bitmap): Likewise.
6782 (mips_arch_setup): New function.
6783 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6785 (mips_cannot_store_register): Likewise.
6786 (the_low_target): Update .arch_setup, .num_regs and .regmap
6787 initializers. Add .regset_bitmap initializer.
6788 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6790 * linux-bfin-low.c (the_low_target): Likewise.
6791 * linux-cris-low.c (the_low_target): Likewise.
6792 * linux-crisv32-low.c (the_low_target): Likewise.
6793 * linux-ia64-low.c (the_low_target): Likewise.
6794 * linux-m32r-low.c (the_low_target): Likewise.
6795 * linux-m68k-low.c (the_low_target): Likewise.
6796 * linux-ppc-low.c (the_low_target): Likewise.
6797 * linux-s390-low.c (the_low_target): Likewise.
6798 * linux-sh-low.c (the_low_target): Likewise.
6799 * linux-sparc-low.c (the_low_target): Likewise.
6800 * linux-tic6x-low.c (the_low_target): Likewise.
6801 * linux-x86-low.c (the_low_target): Likewise.
6802 * linux-xtensa-low.c (the_low_target): Likewise.
6803 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6804 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6805 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6807 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6808 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6810 2012-02-29 Yao Qi <yao@codesourcery.com>
6811 Pedro Alves <palves@redhat.com>
6813 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6814 `step_over_finished' is true.
6816 2012-02-27 Pedro Alves <palves@redhat.com>
6818 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6819 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6821 2012-02-27 Pedro Alves <palves@redhat.com>
6824 * linux-low.c (pid_is_stopped): New.
6825 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6827 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6829 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6832 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6834 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6836 2012-02-24 Luis Machado <lgustavo@codesourcery>
6838 * server.c (handle_query): Advertise support for target-side
6839 breakpoint condition evaluation.
6840 (process_point_options): New function.
6841 (process_serial_event): When inserting a breakpoint, check for
6842 a target-side condition that should be evaluated.
6844 * mem-break.c: Include regcache.h and ax.h.
6845 (point_cond_list_t): New data structure.
6846 (breakpoint) <cond_list>: New field.
6847 (find_gdb_breakpoint_at): Make non-static.
6848 (delete_gdb_breakpoint_at): Clear any target-side
6850 (clear_gdb_breakpoint_conditions): New function.
6851 (add_condition_to_breakpoint): Likewise.
6852 (add_breakpoint_condition): Likewise.
6853 (gdb_condition_true_at_breakpoint): Likewise.
6854 (gdb_breakpoint_here): Return result directly instead
6855 of going through a local variable.
6857 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6858 (clear_gdb_breakpoint_conditions): Likewise.
6859 (add_breakpoint_condition): Likewise.
6860 (gdb_condition_true_at_breakpoint): Likewise.
6862 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6863 (need_step_over_p): Take target-side breakpoint condition into
6866 2012-02-24 Luis Machado <lgustavo@codesourcery>
6868 * server.h: Include tracepoint.h.
6869 (agent_mem_read, agent_get_trace_state_variable_value,
6870 agent_set_trace_state_variable_value,
6871 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6872 get_set_tsv_func_addr): New prototypes.
6874 * ax.h: New include file.
6875 * ax.c: New source file.
6877 * tracepoint.c: Include ax.h.
6878 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6879 agent_expr, eval_result_type): Move to ax.h.
6880 (parse_agent_expr): Rename to ...
6881 (gdb_parse_agent_expr): ... this, make it non-static and move
6883 (unparse_agent_expr) Rename to ...
6884 (gdb_unparse_agent_expr): ... this, make it non-static and move
6886 (eval_agent_expr): Rename to ...
6887 (eval_tracepoint_agent_expr): ... this.
6888 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6889 forward declarations.
6890 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6891 (agent_get_trace_state_variable_value): New function.
6892 (agent_set_trace_state_variable_value): New function.
6893 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6894 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6895 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6896 (condition_true_at_tracepoint): Likewise.
6897 (parse_agent_expr): Rename to ...
6898 (gdb_parse_agent_expr): ... this and move to ax.c.
6899 (unparse_agent_expr): Rename to ...
6900 (gdb_unparse_agent_expr): ... this and move to ax.c.
6901 (gdb_agent_op_name): Move to ax.c.
6902 (eval_agent_expr): Rename to ...
6903 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6905 (eval_tracepoint_agent_expr): New function.
6906 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6908 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6910 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6911 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6912 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6913 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6914 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6915 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6916 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6917 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6918 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6919 (compile_bytecodes): Remove forward declaration.
6920 (is_goto_target): Move to ax.c.
6921 (compile_bytecodes): Move to ax.c and call
6922 agent_get_trace_state_variable_value (...) and
6923 agent_set_trace_state_variable_value (...).
6925 * Makefile.in: Update ax.c and IPA dependencies.
6927 2012-02-24 Pedro Alves <palves@redhat.com>
6929 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6930 (cmd_bigqtbuffer_circular): ... this. Only handle
6931 'QTBuffer:circular:'.
6932 (handle_tracepoint_general_set): Adjust.
6934 2012-02-16 Yao Qi <yao@codesourcery.com>
6936 * inferiors.c: Move code to ...
6937 * dll.c: .... here. New.
6938 * server.h: Declare clear_dlls.
6939 * Makefile.in (SFILES): Add dll.c.
6943 2012-02-11 Yao Qi <yao@codesourcery.com>
6945 * server.c: (handle_monitor_command): Add a new parameter
6947 (handle_query): Update caller.
6949 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6951 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6952 * configure, config.in: Regenerate.
6953 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6956 2012-02-02 Pedro Alves <palves@redhat.com>
6958 Try SIGKILL first, then PTRACE_KILL.
6959 * linux-low.c (linux_kill_one_lwp): New.
6960 (linux_kill_one_lwp): Rename to ...
6961 (kill_one_lwp_callback): ... this. Use the new
6964 2012-02-02 Pedro Alves <palves@redhat.com>
6966 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6969 2012-01-27 Pedro Alves <palves@redhat.com>
6971 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6972 (elf_64_file_p): Make static.
6973 (linux_pid_exe_is_elf_64_file): New.
6974 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6975 Delete declarations.
6976 (linux_pid_exe_is_elf_64_file): Declare.
6977 * linux-x86-low.c (x86_arch_setup): Use
6978 linux_pid_exe_is_elf_64_file.
6980 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6982 * linux-low.c (linux_wait_for_event_1): Rename to ...
6983 (linux_wait_for_event): ... here and merge it with former
6984 linux_wait_for_event - new variable wait_ptid, use it.
6985 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6987 2012-01-23 Pedro Alves <palves@redhat.com>
6989 * server.c (main): Avoid yet another case of infinite loop while
6990 detaching/killing after a longjmp.
6992 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6995 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6997 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6999 * hostio.c (handle_readlink): New function.
7000 (handle_vFile): Call it to handle "vFile:readlink" packets.
7002 2012-01-20 Pedro Alves <palves@redhat.com>
7003 Ulrich Weigand <ulrich.weigand@linaro.org>
7005 * server.c (handle_v_requests): Only support vAttach and vRun to
7006 start multiple processes when in extended protocol mode.
7008 2012-01-17 Pedro Alves <palves@redhat.com>
7010 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7011 memalign plus mprotect to allocate the scratch buffer.
7013 2012-01-13 Pedro Alves <palves@redhat.com>
7015 * server.c (attach_inferior): Clear `cont_thread'.
7017 2012-01-13 Pedro Alves <palves@redhat.com>
7019 * server.c (main): Avoid infinite loop while detaching/killing
7022 2012-01-09 Doug Evans <dje@google.com>
7024 * server.c (start_inferior): Set last_ptid in --wrapper case.
7026 2012-01-06 Yao Qi <yao@codesourcery.com>
7028 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7030 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7032 2012-01-04 Yao Qi <yao@codesourcery.com>
7034 * tracepoint.c (cmd_qtdp): Print debug message
7035 for static tracepoint.
7037 2012-01-04 Yao Qi <yao@codesourcery.com>
7039 * tracepoint.c (trace_vdebug): Differentiate debug message
7040 between gdbserver and IPA.
7042 2012-01-03 Yao Qi <yao@codesourcery.com>
7044 * tracepoint.c (tracepoint_was_hit): Don't collect for
7047 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7049 * terminal.h: Reformat copyright header.
7051 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7053 * server.c (gdbserver_version): Update copyright year.
7054 * gdbreplay.c (gdbreplay_version): Likewise.
7056 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7058 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7061 2011-12-18 Hui Zhu <teawater@gmail.com>
7062 * linux-low.c (linux_create_inferior): Save return value to ret.
7064 2011-12-18 Hui Zhu <teawater@gmail.com>
7066 * linux-low.c (linux_create_inferior): Save return value to ret.
7068 2011-12-16 Doug Evans <dje@google.com>
7070 * linux-low.c (linux_create_inferior): If stdio connection,
7071 redirect stdin from /dev/null, stdout to stderr.
7072 * remote-utils.c (remote_is_stdio): New static global.
7073 (remote_connection_is_stdio): New function.
7074 (remote_prepare): Handle stdio connection.
7075 (remote_open): Ditto.
7076 (remote_close): Don't close stdin for stdio connections.
7077 (read_prim,write_prim): New functions. Replace all calls to
7078 read/write to these.
7079 * server.c (main): Watch for "-" argument. Move call to
7080 remote_prepare before start_inferior.
7081 * server.h (STDIO_CONNECTION_NAME): New macro.
7082 (remote_connection_is_stdio): Declare.
7084 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7085 in debugging output.
7087 2011-12-15 Yao Qi <yao@codesourcery.com>
7089 * tracepoint.c: Include sys/syscall.h.
7090 (gdb_ust_thread): Remove preprocessor conditional.
7092 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7094 * linux-low.c (linux_detach_one_lwp): Call
7095 the_low_target.prepare_to_resume before detaching.
7097 2011-12-14 Yao Qi <yao@codesourcery.com>
7099 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7102 2011-12-14 Yao Qi <yao@codesourcery.com>
7104 * i386-low.c (i386_low_stopped_data_address): Initialize local
7107 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7111 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7112 DR_CONTROL unless necessary. Extend comments.
7113 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7114 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7116 2011-12-13 Yao Qi <yao@codesourcery.com>
7118 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7120 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7122 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7124 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7125 Print new debug message for such case.
7127 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7129 Fix overlapping memcpy.
7130 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7131 the read_inferior_memory transfer.
7132 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7133 write_inferior_memory transfer.
7134 (set_fast_tracepoint_jump): New variable buf. Use it for the
7135 read_inferior_memory and write_inferior_memory transfers.
7136 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7137 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7138 Use it for the write_inferior_memory transfer.
7139 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7142 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7144 * linux-low.c (fetch_register, store_register): Make code
7145 consistent, fix formatting.
7147 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7149 * linux-low.c (usr_store_inferior_registers): Factor out code
7150 to handle individual registers into...
7151 (store_register): ... this new function.
7153 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7155 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7156 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7157 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7158 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7159 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7160 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7161 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7162 (srv_xmlfiles): Add new XML files.
7164 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7166 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7167 (init_registers_s390_linux32v1): Add prototype.
7168 (init_registers_s390_linux32v2): Likewise.
7169 (init_registers_s390_linux64v1): Likewise.
7170 (init_registers_s390_linux64v2): Likewise.
7171 (init_registers_s390x_linux64v1): Likewise.
7172 (init_registers_s390x_linux64v2): Likewise.
7173 (s390_num_regs): Increment to 52.
7174 (s390_regmap): Add orig_r2 register.
7175 (s390_num_regs_3264): Increment to 68.
7176 (s390_regmap_3264): Add orig_r2 register.
7177 (s390_collect_ptrace_register): Handle orig_r2 register.
7178 (s390_supply_ptrace_register): Likewise.
7179 (s390_fill_last_break): New function.
7180 (s390_store_last_break): Likewise.
7181 (s390_fill_system_call): New function.
7182 (s390_store_system_call): Likewise.
7183 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7185 (s390_check_regset): New function.
7186 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7187 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7188 Update target_regsets for available register sets.
7190 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7191 Jan Kratochvil <jan.kratochvil@redhat.com>
7193 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7194 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7196 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7197 * linux-low.h (struct process_info_private): New member r_debug.
7198 * server.c (handle_qxfer_libraries): Call
7199 the_target->qxfer_libraries_svr4.
7200 (handle_qxfer_libraries_svr4): New function.
7201 (qxfer_packets): New entry "libraries-svr4".
7202 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7203 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7204 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7205 PACKET_qXfer_libraries_svr4.
7207 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7209 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7210 PSW address/mask between 8-byte and 16-byte formats.
7211 (s390_supply_ptrace_register): Likewise.
7212 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7213 basic addressing mode bit.
7215 2011-11-24 Stan Shebs <stan@codesourcery.com>
7217 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7219 2011-11-17 Stan Shebs <stan@codesourcery.com>
7221 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7222 (tracing_start_time): New global.
7223 (tracing_stop_time): New global.
7224 (tracing_user_name): New global.
7225 (tracing_notes): New global.
7226 (tracing_stop_note): New global.
7227 (cmd_qtstart): Set traceframe_usage, start_time.
7228 (stop_tracing): Set stop_time.
7229 (cmd_qtstatus): Report additional status.
7230 (cmd_qtp): New function.
7231 (handle_tracepoint_query): Call it.
7232 (cmd_qtnotes): New function.
7233 (handle_tracepoint_general_set): Call it.
7234 (get_timestamp): Rename from tsv_get_timestamp.
7236 2011-11-14 Stan Shebs <stan@codesourcery.com>
7237 Kwok Cheung Yeung <kcy@codesourcery.com>
7239 * linux-x86-low.c (small_jump_insn): New.
7240 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7241 trampoline and error message, build a trampoline and issue a small
7242 jump instruction to it.
7243 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7244 trampoline and error message.
7245 (x86_get_min_fast_tracepoint_insn_len): New.
7246 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7247 * linux-low.h (struct linux_target_ops): Add arguments to
7248 install_fast_tracepoint_jump_pad operation, add new operation.
7249 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7251 (linux_get_min_fast_tracepoint_insn_len): New function.
7252 (linux_target_op): Add new operation.
7253 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7254 (gdb_trampoline_buffer_end): Ditto.
7255 (gdb_trampoline_buffer_error): Ditto.
7256 (struct ipa_sym_addresses): Add fields for new IPA variables.
7257 (symbol_list): Add entries for new IPA variables.
7258 (struct tracepoint): Add fields to hold the address range of the
7259 trampoline used by the tracepoint.
7260 (trampoline_buffer_head): New static variable.
7261 (trampoline_buffer_tail): Ditto.
7262 (claim_trampoline_space): New function.
7263 (have_fast_tracepoint_trampoline_buffer): New function.
7264 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7266 (install_fast_tracepoint): Ditto, also add error buffer argument.
7267 (cmd_qtminftpilen): New function.
7268 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7269 (fast_tracepoint_from_trampoline_address): New function.
7270 (fast_tracepoint_collecting): Handle trampoline as part of jump
7272 (set_trampoline_buffer_space): New function.
7273 (initialize_tracepoint): Initialize new IPA variables.
7274 * target.h (struct target_ops): Add arguments to
7275 install_fast_tracepoint_jump_pad operation, add new
7276 get_min_fast_tracepoint_insn_len operation.
7277 (target_get_min_fast_tracepoint_insn_len): New.
7278 (install_fast_tracepoint_jump_pad): Add arguments.
7279 * server.h (IPA_BUFSIZ): Define.
7280 * linux-i386-ipa.c: Include extra header files.
7281 (initialize_fast_tracepoint_trampoline_buffer): New function.
7282 (initialize_low_tracepoint): Call it.
7283 * server.h (set_trampoline_buffer_space): Declare.
7284 (claim_trampoline_space): Ditto.
7285 (have_fast_tracepoint_trampoline_buffer): Ditto.
7287 2011-11-14 Yao Qi <yao@codesourcery.com>
7289 * server.c (handle_query): Handle InstallInTrace for qSupported.
7290 * tracepoint.c (add_tracepoint): Sort list.
7291 (install_tracepoint, download_tracepoint): New.
7292 (cmd_qtdp): Call them to install and download tracepoints.
7293 (sort_tracepoints): Removed.
7294 (cmd_qtstart): Update.
7296 2011-11-14 Yao Qi <yao@codesourcery.com>
7298 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7299 * mem-break.h: Declare.
7300 * tracepoint.c (cmd_qtstart): Move some code to ...
7301 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7303 (download_tracepoints): Move some code to ...
7304 (download_tracepoint_1): ... here. New.
7306 2011-11-08 Yao Qi <yao@codesourcery.com>
7308 * remote-utils.c (relocate_instruction): A comment fix.
7310 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7312 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7313 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7314 dr_status_mirror and dr_control_mirror from debug_reg_state.
7315 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7316 (i386_initial_stuff): Remove use of deleted globals.
7317 (i386_get_thread_context, i386_set_thread_context,
7318 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7319 from debug_reg_state.
7321 2011-11-05 Yao Qi <yao@codesourcery.com>
7323 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7324 address as TPOINT's.
7326 2011-11-02 Stan Shebs <stan@codesourcery.com>
7328 * tracepoint.c (agent_mem_read_string): New function.
7329 (eval_agent_expr): Call it for tracenz.
7330 * server.c (handle_query): Report support for tracenz.
7332 2011-11-02 Yao Qi <yao@codesourcery.com>
7334 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7336 2011-11-02 Yao Qi <yao@codesourcery.com>
7338 * target.h: Fix a typo in comment.
7340 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7342 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7343 clobber the breakpoints' shadows with fast tracepoint jumps.
7344 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7345 * target.c (write_inferior_memory): Also pass MYADDR down to
7348 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7350 * configure.ac: Check support for personality routine.
7351 * configure: Regenerate.
7352 * config.in: Likewise.
7353 * linux-low.c: Include <sys/personality.h>.
7354 Define ADDR_NO_RANDOMIZE if necessary.
7355 (linux_create_inferior): Disable address space randomization when
7356 forking inferior, if requested.
7357 (linux_supports_disable_randomization): New function.
7358 (linux_target_ops): Install it.
7359 * server.h (disable_randomization): Declare.
7360 * server.c (disable_randomization): New global variable.
7361 (handle_general_set): Handle QDisableRandomization.
7362 (handle_query): Likewise for qSupported.
7363 (main): Support --disable-randomization and --no-disable-randomization
7364 command line arguments.
7365 * target.h (struct target_ops): Add supports_disable_randomization.
7366 (target_supports_disable_randomization): New macro.
7368 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7370 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7372 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7373 [!PT_GETDSBT] (target_loadmap): New definition.
7374 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7375 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7376 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7377 and PT_GETDSBT to LINUX_LOADMAP.
7378 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7379 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7381 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7383 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7384 (arm_linux_hwbp_cap): New static variable.
7385 (arm_linux_get_hwbp_cap): Replace by ...
7386 (arm_linux_init_hwbp_cap): ... this new function.
7387 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7388 (arm_linux_get_hw_watchpoint_count): Likewise.
7389 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7390 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7391 (arm_prepare_to_resume): Use perror_with_name instead of error.
7393 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7395 * linux-arm-low.c: Include <signal.h>.
7396 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7397 (struct arm_linux_hwbp_cap): New data type.
7398 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7399 (struct arm_linux_hw_breakpoint): New data type.
7400 (MAX_BPTS, MAX_WPTS): Define.
7401 (struct arch_process_info, struct arch_lwp_info): New data types.
7402 (arm_linux_get_hwbp_cap): New function.
7403 (arm_linux_get_hw_breakpoint_count): Likewise.
7404 (arm_linux_get_hw_watchpoint_count): Likewise.
7405 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7406 (arm_hwbp_control_initialize): Likewise.
7407 (arm_hwbp_control_is_enabled): Likewise.
7408 (arm_hwbp_control_is_initialized): Likewise.
7409 (arm_hwbp_control_disable): Likewise.
7410 (arm_linux_hw_breakpoint_equal): Likewise.
7411 (arm_linux_hw_point_initialize): Likewise.
7412 (struct update_registers_data): New data structure.
7413 (update_registers_callback: New function.
7414 (arm_insert_point): Likewise.
7415 (arm_remove_point): Likewise.
7416 (arm_stopped_by_watchpoint): Likewise.
7417 (arm_stopped_data_address): Likewise.
7418 (arm_new_process): Likewise.
7419 (arm_new_thread): Likewise.
7420 (arm_prepare_to_resume): Likewise.
7421 (the_low_target): Register arm_insert_point, arm_remove_point,
7422 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7423 arm_new_thread, and arm_prepare_to_resume.
7425 2011-09-15 Stan Shebs <stan@codesourcery.com>
7427 * server.h (struct emit_ops): Add compare-goto fields.
7428 * tracepoint.c (gdb_agent_op_sizes): New table.
7429 (emit_eq_goto): New function.
7430 (emit_ne_goto): New function.
7431 (emit_lt_goto): New function.
7432 (emit_le_goto): New function.
7433 (emit_gt_goto): New function.
7434 (emit_ge_goto): New function.
7435 (is_goto_target): New function.
7436 (compile_bytecodes): Recognize special cases of compare-goto
7437 combinations and call specialized emitters for them.
7438 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7439 (amd64_emit_ne_goto): New function.
7440 (amd64_emit_lt_goto): New function.
7441 (amd64_emit_le_goto): New function.
7442 (amd64_emit_gt_goto): New function.
7443 (amd64_emit_ge_goto): New function.
7444 (amd64_emit_ops): Add the new functions.
7445 (i386_emit_eq_goto): New function.
7446 (i386_emit_ne_goto): New function.
7447 (i386_emit_lt_goto): New function.
7448 (i386_emit_le_goto): New function.
7449 (i386_emit_gt_goto): New function.
7450 (i386_emit_ge_goto): New function.
7451 (i386_emit_ops): Add the new functions.
7453 2011-09-08 Stan Shebs <stan@codesourcery.com>
7455 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7456 (i386_emit_epilogue): Restore %ebx.
7458 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7460 * server.c (step_thread): Remove definition.
7461 (process_serial_event): Don't handle Hs.
7462 * server.h (step_thread): Remove declaration.
7463 * target.c (set_desired_inferior): Remove use of step_thread.
7465 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7467 * linux-low.c: Include linux-procfs.h.
7468 (linux_attach_lwp_1): Update comments.
7469 (linux_attach): Scan for existing threads when attaching to a
7470 process that is the tgid.
7471 * Makefile.in: Update dependencies.
7473 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7475 * configure.srv: Add linux-procfs.o dependencies.
7477 2011-08-14 Yao Qi <yao@codesourcery.com>
7479 * target.h (struct target_ops): Fix indent.
7480 * win32-low.c (win32_target_ops): Fix comment.
7482 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7483 Yao Qi <yao@codesourcery.com>
7485 * Makefile.in (clean): Remove tic6x-*.c files.
7486 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7487 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7488 (tic6x-c64xp-linux.c): Likewise.
7489 * configure.srv: Add support for tic6x-*-uclinux.
7490 * linux-tic6x-low.c: New.
7491 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7493 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7494 Yao Qi <yao@codesourcery.com>
7496 * target.h (struct target_ops): Add read_loadmap.
7497 * linux-low.c (struct target_loadseg): New type.
7498 (struct target_loadmap): New type.
7499 (linux_read_loadmap): New function.
7500 (linux_target_ops): Add linux_read_loadmap.
7501 * server.c (handle_query): Support qXfer:fdpic:read packet.
7502 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7505 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7507 * win32-low.c: Include <stdint.h>.
7509 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7511 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7512 to the inferior here.
7513 (i386_remove_aligned_watchpoint): Ditto.
7514 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7515 fit part of the watchpoint in the debug registers.
7516 (i386_update_inferior_debug_regs): New.
7517 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7518 registers, and only update the inferior on success.
7519 (i386_low_remove_watchpoint): Ditto.
7521 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7523 * linux-low.c (compare_ints, unique, list_threads, show_process,
7524 linux_core_of_thread): Delete.
7525 (linux_target_ops): Change linux_core_of_thread to
7526 linux_common_core_of_thread.
7527 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7528 * utils.c (malloc_failure): Change type of argument.
7529 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7530 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7531 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7532 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7533 (IPA_OBJS): Add common-utils-ipa.o.
7534 (ptid_h, linux_osdata_h): New macros.
7535 (server_h): Add common/common-utils.h, common/xml-utils.h,
7536 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7538 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7539 ptid.o, buffer.o): New rules.
7540 (linux-low.o): Add common/linux-osdata.h as a dependency.
7541 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7542 * configure.ac: Add AC_HEADER_DIRENT check.
7543 * config.in: Regenerate.
7544 * configure: Regenerate.
7545 * remote-utils.c (xml_escape_text): Delete.
7546 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7547 buffer_xml_printf): Move to common/buffer.c.
7548 * server.c (main): Remove call to initialize_inferiors.
7549 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7550 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7551 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7552 internal_error, gdb_assert, gdb_assert_fail): Delete.
7553 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7554 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7556 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7557 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7558 initialize_inferiors): Delete.
7560 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7562 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7565 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7567 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7569 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7571 2011-05-26 Yao Qi <yao@codesourcery.com>
7573 * Makefile.in (thread-db.o): Track dependence to
7574 common/gdb_thread_db.h.
7575 * thread-db.c: include gdb_thread_db.h from right place.
7577 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7579 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7580 __FILE__ and __LINE__ to internal_error.
7582 2011-05-13 Doug Evans <dje@google.com>
7584 * thread-db.c (try_thread_db_load_from_sdir): New function.
7585 (try_thread_db_load_from_dir): New function.
7586 (thread_db_load_search): Handle $sdir, ignore $pdir.
7587 Remove trying of system directories if search of
7588 libthread-db-search-path fails, that is now done via $sdir.
7590 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7592 * server.c (handle_query): Add EnableDisableTracepoints to the list
7593 of supported features.
7594 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7596 (cmd_qtenable_disable): New.
7597 (cmd_qtstart): Install tracepoints even if disabled.
7598 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7599 receiving a QTEnable or QTDisable packet.
7600 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7601 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7603 (gdb_probe): Skip data collection if static tracepoint is disabled.
7605 2011-05-10 Doug Evans <dje@google.com>
7607 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7609 2011-05-04 Doug Evans <dje@google.com>
7611 * linux-low.c (linux_join): Skip process lookup.
7612 * spu-low.c (spu_join): Ditto.
7613 * server.c (join_inferiors_callback): Delete.
7614 (process_serial_event): For 'D' packet (detach) call join_inferior
7617 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7619 * README: Don't mention xscale*-*-linux*.
7620 * configure.srv (xscale*-*-linux*): Don't handle target.
7622 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7624 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7626 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7627 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7628 (i386_emit_void_call_2): Likewise.
7630 2011-04-26 Yao Qi <yao@codesourcery.com>
7632 * linux-low.c: Move common macros to linux-ptrace.h.
7633 Include linux-ptrace.h.
7634 * Makefile.in (linux_ptrace_h): New.
7635 (linux-low.o): Depends on linux-ptrace.h.
7637 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7639 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7640 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7641 (remote_prepare): New function with most of the TCP code from ...
7642 (remote_open): ... here. Detect PORT here unconditionally. Move also
7643 setting transport_is_reliable.
7644 * server.c (run_once): New variable.
7645 (gdbserver_usage): Document it.
7646 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7647 the first run if RUN_ONCE.
7648 * server.h (run_once, remote_prepare): New declarations.
7650 2011-04-19 Tom Tromey <tromey@redhat.com>
7652 * win32-low.c (handle_load_dll): Remove duplicate "the".
7654 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7656 Remove support for old Cygwin 1.5 versions.
7657 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7658 function to avoid warning.
7659 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7662 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7664 * gdbserver/server.h (Macro _): Define it if not available.
7666 2011-03-14 Michael Snyder <msnyder@vmware.com>
7668 * hostio.c (handle_close): Remove unnecessary null test.
7670 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7672 * Makefile.in (maintainer-clean realclean distclean): Remove
7673 "make ... subdir_do" command.
7675 2011-03-10 Michael Snyder <msnyder@vmware.com>
7677 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7679 * server.c (handle_v_run): Free alloced buffer on early return.
7681 2011-03-09 Yao Qi <yao@codesourcery.com>
7684 2011-03-04 Yao Qi <yao@codesourcery.com>
7686 * Makefile.in: Remove GNU make feature --directory.
7688 2011-03-05 Yao Qi <yao@codesourcery.com>
7690 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7691 (subdir_do): New make target. Copied from gdb/Makefile.
7692 (maintainer-clean, realclean, distclean, clean): Call corresponding
7693 make targets in common/Makefile.
7695 2011-02-11 Yao Qi <yao@codesourcery.com>
7697 * configure.ac: Call AC_PROG_RANLIB.
7698 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7699 * configure: Regenerate.
7701 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7703 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7705 2011-03-06 Yao Qi <yao@codesourcery.com>
7707 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7709 2011-03-05 Yao Qi <yao@codesourcery.com>
7711 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7712 (subdir_do): New make target. Copied from gdb/Makefile.
7713 (maintainer-clean, realclean, distclean, clean): Call corresponding
7714 make targets in common/Makefile.
7716 2011-03-04 Yao Qi <yao@codesourcery.com>
7718 * Makefile.in: Remove GNU make feature --directory.
7720 2011-03-04 Michael Snyder <msnyder@vmware.com>
7722 * server.c (queue_stop_reply): Call xmalloc not malloc.
7724 2011-03-02 Michael Snyder <msnyder@vmware.com>
7726 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7728 2011-02-28 Michael Snyder <msnyder@vmware.com>
7730 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7731 (cmd_qtframe): Ditto.
7732 (cmd_qtbuffer): Ditto.
7733 (cmd_bigqtbuffer): Ditto.
7735 * utils.c (decimal2str): Initialize 'width' to nine, then
7738 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7740 * hostio.c (require_data): Free *data, not data.
7742 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7744 * hostio.c (require_data): Use free, not xfree.
7746 2011-02-27 Michael Snyder <msnyder@vmware.com>
7748 * server.c (handle_query): Discard unused value.
7750 * hostio.c (require_data): Free malloc memory before returning
7753 2011-02-26 Michael Snyder <msnyder@vmware.com>
7755 * linux-low.c (list_threads): Call closedir for dirent.
7757 2011-02-27 Michael Snyder <msnyder@vmware.com>
7759 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7760 a case statement falls through.
7762 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7764 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7767 2011-02-26 Michael Snyder <msnyder@vmware.com>
7769 * utils.c (decimal2str): Eliminate dead code and dead param.
7770 (pulongest): Drop dead param from call to decimal2str.
7773 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7775 Revert the following patch (not approved yet):
7776 2011-02-21 Hui Zhu <teawater@gmail.com>
7777 * tracepoint.c (tp_printf): New function.
7778 (eval_agent_expr): Handle gdb_agent_op_printf.
7780 2011-02-21 Hui Zhu <teawater@gmail.com>
7782 * tracepoint.c (tp_printf): New function.
7783 (eval_agent_expr): Handle gdb_agent_op_printf.
7785 2011-02-18 Tom Tromey <tromey@redhat.com>
7787 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7788 (tracepoint.o): Likewise.
7789 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7790 (gdb_agent_op_names): Likewise.
7792 2011-02-18 Tom Tromey <tromey@redhat.com>
7794 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7795 gdb_agent_op_rot>: New constants.
7796 (gdb_agent_op_names): Add pick and roll.
7797 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7800 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7802 * aclocal.m4: Regenerated with aclocal-1.11.1.
7804 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7806 * server.c (handle_qxfer_traceframe_info): New.
7807 (qxfer_packets): Register "traceframe-info".
7808 (handle_query): Report support for qXfer:traceframe-info:read+.
7809 * tracepoint.c (match_blocktype): New.
7810 (traceframe_find_block_type): Rename to ...
7811 (traceframe_walk_blocks): ... this. Add callback filter argument,
7813 (traceframe_find_block_type): New, reimplemented on top of
7814 traceframe_walk_blocks.
7815 (build_traceframe_info_xml): New.
7816 (traceframe_read_info): New.
7817 * server.h (traceframe_read_info): Declare.
7819 2011-02-11 Yao Qi <yao@codesourcery.com>
7821 * configure.ac: Call AC_PROG_RANLIB.
7822 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7823 * configure: Regenerate.
7825 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7827 * server.c (gdb_read_memory): Change return semantics to allow
7829 (handle_search_memory_1): Adjust.
7830 (process_serial_event) <'m' packet>: Handle partial transfers.
7831 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7833 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7835 * regcache.c (init_register_cache): Initialize
7836 regcache->register_status.
7837 (free_register_cache): Release regcache->register_status.
7838 (regcache_cpy): Copy register_status.
7839 (registers_to_string): Print 'x's for unavailable registers.
7840 (supply_register): Mark the register's status valid or
7841 unavailable, depending on whether a buffer was passed in or not.
7842 (supply_register_zeroed): New.
7843 (supply_regblock): Mark the registers' status valid or
7844 unavailable, depending on whether a buffer was passed in or not.
7845 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7846 (struct regcache): New `register_status' field.
7847 (supply_register_zeroed): Declare.
7848 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7849 supply_register_zeroed, rather than passing a NULL buffer to
7851 * tracepoint.c (fetch_traceframe_registers): Update comment.
7853 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7855 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7858 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7860 * server.h (decode_xfer_write): Change prototype.
7861 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7862 and don't extract the annex here.
7863 * server.c (decode_xfer_read): Remove `annex' parameter,
7864 and don't extract the annex here.
7866 (struct qxfer): New.
7867 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7868 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7869 (handle_qxfer_statictrace): New functions, abstracted out from
7870 handle_query, and made to use the struct qxfer interface.
7871 (handle_threads_qxfer_proper): Rename to ...
7872 (handle_qxfer_threads_proper): ... this.
7873 (handle_threads_qxfer): Rename to ...
7874 (handle_qxfer_threads): ... this. Adjust.
7875 (qxfer_packets): New array.
7876 (handle_qxfer): New function.
7877 (handle_query): Use handle_qxfer.
7879 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7881 * gdbreplay.c: Shorten lines of >= 80 columns.
7882 * linux-low.c: Ditto.
7883 * linux-ppc-low.c: Ditto.
7884 * linux-s390-low.c: Ditto.
7885 * linux-sparc-low.c: Ditto.
7886 * linux-x86-low.c: Ditto.
7887 * linux-xtensa-low.c: Ditto.
7888 * mem-break.c: Ditto.
7890 * regcache.h: Ditto.
7891 * remote-utils.c: Ditto.
7894 * thread-db.c: Ditto.
7895 * tracepoint.c: Ditto.
7897 * win32-low.h: Ditto.
7899 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7901 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7904 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7906 * server.c (gdbserver_version): Update copyright year in version
7908 * gdbreplay.c (gdbreplay_version): Ditto.
7910 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7912 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7913 * linux-bfin-low.c: New file.
7914 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7915 PT_DATA_ADDR for BFIN targets.
7916 * Makefile.in (SFILES): Add linux-bfin-low.c.
7917 (clean): Remove reg-bfin.c.
7918 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7919 * README: Mention supported Blackfin targets.
7921 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7923 * .gitignore: New file.
7925 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7927 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7929 2010-10-22 Jie Zhang <jie@codesourcery.com>
7931 * Makefile.in: Add FLAGS_TO_PASS variable.
7932 (install): Remove dependency of install-only and recursively
7933 invoke make for install-only.
7935 2010-10-04 Doug Evans <dje@google.com>
7937 * Makefile.in (uninstall): Use $(DESTDIR).
7939 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7943 * linux-x86-low.c (compat_siginfo_from_siginfo)
7944 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7945 si_code is < 0. Check for si_code == SI_TIMER before checking for
7948 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7950 * lynx-i386-low.c: New file.
7951 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7953 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7955 * lynx-low.c (ptrace_request_to_str): Remove handling for
7956 request values that have been removed in LynxOS 5.x.
7958 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7960 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7963 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7965 * configure.ac: Add --enable-inprocess-agent option.
7966 * configure: Rebuilt.
7968 2010-09-06 Yao Qi <yao@codesourcery.com>
7970 * linux-low.c (linux_kill): Remove unused variable.
7971 (linux_stabilize_threads): Likewise.
7972 * server.c (start_inferior): Likewise.
7973 (queue_stop_reply_callback): Likewise.
7974 * tracepoint.c (do_action_at_tracepoint): Likewise.
7976 2010-09-06 Yao Qi <yao@codesourcery.com>
7978 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7981 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7983 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7985 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7987 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7990 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7992 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7993 gdbserver/lynx-ppc-low.c: New files.
7994 * Makefile.in (lynx_low_h): New variable.
7995 (lynx-low.o, lynx-ppc-low.o): New rules.
7996 * configure.ac: On LynxOS, link with -lnetinet.
7997 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7998 * configure: regenerate.
8000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8002 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8003 * configure.ac: Add check for vasprintf and vsnprintf.
8004 * configure, config.in: Regenerate.
8005 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8009 * gdbreplay.c: Move include of alloca.h up, next to include of
8011 * server.h: Add include of malloc.h.
8012 * mem-break.c: Remove include of malloc.h.
8013 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8015 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8017 * Makefile.in (memmem.o): Build with -Wno-error.
8019 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8021 * utils.c (xsnprintf): Make non-static.
8022 * server.h: Add xsnprintf declaration.
8023 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8024 replace calls to snprintf by calls to xsnprintf throughout.
8026 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8028 * configure.ac: Add configure check for alloca.
8029 * configure, config.in: Regenerate.
8030 * server.h: Include alloca.h if it exists.
8031 * gdbreplay.c: Include alloca.h if it exists.
8033 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8035 * linux-low.c (__SIGRTMIN): Define if not already defined.
8036 (linux_create_inferior): Check for __ANDROID__ rather than
8038 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8039 are already deferred.
8040 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8041 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8042 stopped and already has a pending signal to report.
8043 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8044 a pending signal to report or is moving out of a jump pad.
8045 (linux_init_signals): Check for __ANDROID__ rather than
8048 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8050 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8051 debug_threads check. Avoid a linear search when not doing debug
8054 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8056 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8057 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8058 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8059 (process_event): Change local fd's type to gdb_fildes_t.
8060 (create_file_handler): Adjust prototype.
8061 (delete_file_handler): Adjust prototype.
8062 (handle_file_event): Adjust prototype. Use pfildes.
8063 (create_file_event): Adjsut prototype.
8064 * remote-utils.c (remote_desc, listen_desc): Change type to
8066 * server.h: New gdb_fildes_t typedef.
8067 [USE_WIN32API]: Include winsock2.h.
8068 (delete_file_handler, add_file_handler): Adjust prototypes.
8070 * utils.c (pfildes): New.
8072 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8074 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8075 * configure: Regenerate.
8077 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8079 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8080 (linux_done_accessing_memory): ... this.
8081 (linux_target_ops): Adjust.
8082 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8083 * nto-low.c (nto_target_ops): Adjust comment.
8084 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8085 * spu-low.c (spu_target_ops): Adjust comment.
8086 * target.h (target_ops): Rename unprepare_to_access_memory field
8087 to done_accessing_memory.
8088 (unprepare_to_access_memory): Rename to ...
8089 (done_accessing_memory): ... this.
8091 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8093 * linux-low.c (linux_prepare_to_access_memory): New.
8094 (linux_unprepare_to_access_memory): New.
8095 (linux_target_ops): Install them.
8096 * server.c (read_memory): Rename to ...
8097 (gdb_read_memory): ... this. Use
8098 prepare_to_access_memory/prepare_to_access_memory.
8099 (write_memory): Rename to ...
8100 (gdb_write_memory): ... this. Use
8101 prepare_to_access_memory/prepare_to_access_memory.
8102 (handle_search_memory_1): Adjust.
8103 (process_serial_event): Adjust.
8104 * target.h (struct target_ops): New fields
8105 prepare_to_access_memory and unprepare_to_access_memory.
8106 (prepare_to_access_memory, unprepare_to_access_memory): New.
8107 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8108 prepare_to_access_memory/prepare_to_access_memory.
8109 * nto-low.c (nto_target_ops): Adjust.
8110 * spu-low.c (spu_target_ops): Adjust.
8111 * win32-low.c (win32_target_ops): Adjust.
8113 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8115 * Makefile.in (WARN_CFLAGS): Get it from configure.
8116 (WERROR_CFLAGS): New.
8117 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8118 * configure.ac: Introduce --enable-werror, which adds -Werror to
8119 the compiler command line. Enabled by default. Disable with
8120 --disable-werror. Add -Wdeclaration-after-statement
8121 Wpointer-arith and -Wformat-nonliteral to warning flags.
8122 * configure: Regenerate.
8124 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8126 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8128 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8130 * gdbreplay.c (remote_error): New.
8132 (expect): Use gdbchar. Check for error reading from GDB.
8133 Clarify sync error output.
8134 (play): Check for errors writing to GDB.
8135 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8136 * remote-utils.c (getpkt): Check for errors writing to the remote
8139 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8141 * linux-low.c (linux_wait_1): Move non-debugging code out of
8142 `debug_threads' control.
8144 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8146 * linux-low.c (linux_wait_1): Don't set last_status here.
8147 * server.c (push_event, queue_stop_reply_callback): Assert we're
8148 not pushing a TARGET_WAITKIND_IGNORE event.
8149 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8150 (myresume, handle_target_event): Set the thread's last_resume_kind
8151 and last_status from the target returned status.
8153 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8157 * linux-x86-low.c (update_debug_registers_callback): New.
8158 (i386_dr_low_set_addr): Use it.
8159 (i386_dr_low_get_addr): New.
8160 (i386_dr_low_set_control): Use update_debug_registers_callback.
8161 (i386_dr_low_get_control): New.
8162 (i386_dr_low_get_status): Adjust.
8163 * linux-low.c (linux_stop_lwp): New.
8164 * linux-low.h (linux_stop_lwp): Declare.
8166 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8167 argument instead of a i386_debug_reg_state.
8168 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8169 a i386_debug_reg_state.
8170 (i386_insert_aligned_watchpoint): Adjust.
8171 (i386_remove_aligned_watchpoint): Adjust.
8172 (i386_low_stopped_data_address): Read the debug registers from the
8173 inferior instead of from the mirrors.
8174 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8175 (i386_dr_low_get_addr): Declare.
8176 (i386_dr_low_get_control): Declare.
8177 (i386_dr_low_get_status): Change prototype.
8179 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8180 (i386_dr_low_get_addr): New.
8181 (i386_dr_low_get_control): New.
8182 (i386_dr_low_get_status): Adjust prototype. Return
8184 (i386_initial_stuff): Clear dr_status_mirror and
8186 (i386_get_thread_context): Adjust.
8187 (i386_set_thread_context): Adjust.
8188 (i386_thread_added): Adjust.
8190 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8192 * linux-low.h (linux_thread_area): Delete declaration.
8194 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8196 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8197 after its termination.
8199 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8201 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8202 (gdb_wants_all_stopped): Delete.
8203 (linux_wait_1): Don't call them.
8204 * server.c (handle_v_cont): Tag all threads as want-stopped.
8205 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8206 stopped as "client-wants-stopped".
8208 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8210 * Makefile.in (signals_h): New.
8211 (server_h): Depend on it.
8212 (server.o): Don't depend on $(signals_def).
8213 (signals.o): Depend on $(signals_def).
8215 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8217 * Makefile.in (signals_def): New.
8218 (server_h): Append include/gdb/signals.h and signals_def.
8219 (server.o): Append signals_def.
8221 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8223 * server.c (handle_target_event): Use target_signal_to_host for
8224 resume_info.sig initialization.
8225 * target.h (struct thread_resume) <sig>: New comment.
8227 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8229 * server.c (handle_query): strcpy() the returned string from paddress()
8230 instead of sprintf().
8231 * utils.c (paddress): Return phex_nz().
8233 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8235 * server.c (handle_v_cont): Call mourn_inferior if process
8237 (myresume): Likewise.
8239 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8241 Static tracepoints, and integration with UST.
8243 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8244 * mem-break.c (uninsert_all_breakpoints)
8245 (reinsert_all_breakpoints): New.
8246 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8247 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8248 (gdb_agent_ust_loaded, helper_thread_id)
8249 (gdb_agent_helper_thread_id): New macros.
8250 (struct ipa_sym_addresses): Add addr_ust_loaded,
8251 addr_helper_thread_id, addr_cmd_buf.
8252 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8253 (in_process_agent_loaded_ust): New.
8254 (write_e_ust_not_loaded): New.
8255 (maybe_write_ipa_ust_not_loaded): New.
8256 (struct collect_static_trace_data_action): New.
8257 (enum tracepoint_type) <static_tracepoint>: New.
8258 (struct tracepoint) <handle>: Mention static tracepoints.
8259 (struct static_tracepoint_ctx): New.
8260 (CMD_BUF_SIZE): New.
8261 (add_tracepoint_action): Handle static tracepoint actions.
8262 (unprobe_marker_at): New.
8263 (clear_installed_tracepoints): Handle static tracepoints.
8264 (cmd_qtdp): Handle static tracepoints.
8265 (probe_marker_at): New.
8266 (cmd_qtstart): Handle static tracepoints.
8267 (response_tracepoint): Handle static tracepoints.
8268 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8269 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8270 (get_context_regcache): Handle static tracepoints.
8271 (do_action_at_tracepoint): Handle static tracepoint actions.
8272 (traceframe_find_block_type): Handle static trace data blocks.
8273 (traceframe_read_sdata): New.
8274 (download_tracepoints): Download static tracepoint actions.
8275 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8276 (GDB_PROBE_NAME): New.
8281 (ust_marker_to_static_tracepoint): New.
8283 (collect_ust_data_at_tracepoint): New.
8284 (gdb_ust_probe): New.
8285 (UNIX_PATH_MAX, SOCK_DIR): New.
8286 (gdb_ust_connect_sync_socket): New.
8287 (resume_thread, stop_thread): New.
8288 (run_inferior_command): New.
8289 (init_named_socket): New.
8290 (gdb_ust_socket_init): New.
8291 (cstr_to_hexstr): New.
8293 (first_marker, next_marker): New.
8294 (response_ust_marker): New.
8295 (cmd_qtfstm, cmd_qtsstm): New.
8296 (unprobe_marker_at, probe_marker_at): New.
8297 (cmd_qtstmat, gdb_ust_thread): New.
8298 (gdb_ust_init): New.
8299 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8300 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8302 (x86_64_st_collect_regmap): New.
8303 (X86_64_NUM_ST_COLLECT_GREGS): New.
8304 (AMD64_RIP_REGNUM): New.
8305 (supply_static_tracepoint_registers): New.
8306 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8308 (i386_st_collect_regmap): New.
8309 (i386_NUM_ST_COLLECT_GREGS): New.
8310 (supply_static_tracepoint_registers): New.
8311 * server.c (handle_query): Handle qXfer:statictrace:read.
8312 <qSupported>: Report support for StaticTracepoints, and
8313 qXfer:statictrace:read features.
8314 * server.h (traceframe_read_sdata)
8315 (supply_static_tracepoint_registers): Declare.
8316 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8317 (unpack_varlen_hex): Include in IPA build.
8318 * Makefile.in (ustlibs, ustinc): New.
8319 (IPA_OBJS): Add remote-utils-ipa.o.
8320 ($(IPA_LIB)): Link -ldl and -lpthread.
8322 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8323 * config.in, configure: Regenerate.
8325 2010-06-20 Ian Lance Taylor <iant@google.com>
8326 Pedro Alves <pedro@codesourcery.com>
8328 * linux-x86-low.c (always_true): Delete.
8329 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8330 trying to fool the compiler with always_true.
8332 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8334 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8335 conditions in gdbserver.
8337 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8339 * spu-low.c (spu_read_memory): Wrap around local store limit.
8340 (spu_write_memory): Likewise.
8342 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8344 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8345 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8347 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8349 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8350 uses with LONGEST uses.
8352 2010-06-14 Stan Shebs <stan@codesourcery.com>
8353 Pedro Alves <pedro@codesourcery.com>
8357 * linux-x86-low.c: Include limits.h.
8362 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8363 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8364 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8365 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8366 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8367 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8368 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8369 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8370 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8371 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8372 (amd64_emit_void_call_2): New.
8373 (amd64_emit_ops): New.
8374 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8375 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8376 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8377 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8378 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8379 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8380 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8381 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8382 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8383 (i386_emit_stack_adjust, i386_emit_int_call_1)
8384 (i386_emit_void_call_2): New.
8385 (i386_emit_ops): New.
8386 (x86_emit_ops): New.
8387 (the_low_target): Install x86_emit_ops.
8388 * server.h (struct emit_ops): New.
8389 (get_raw_reg_func_addr): Declare.
8390 (current_insn_ptr, emit_error): Declare.
8391 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8392 (set_trace_state_variable_value): New defines.
8393 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8394 addr_get_trace_state_variable_value and
8395 addr_set_trace_state_variable_value.
8396 (symbol_list): New fields for get_raw_reg,
8397 get_trace_state_variable_value and set_trace_state_variable_value.
8398 (condfn): New typedef.
8399 (struct tracepoint): New field `compiled_cond'.
8400 (do_action_at_tracepoint): Clear compiled_cond.
8401 (get_trace_state_variable_value, set_trace_state_variable_value):
8403 (condition_true_at_tracepoint): If there's a compiled condition,
8405 (current_insn_ptr, emit_error): New globals.
8406 (struct bytecode_address): New.
8407 (get_raw_reg_func_addr): New.
8408 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8409 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8410 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8411 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8412 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8413 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8414 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8415 (compile_tracepoint_condition, compile_bytecodes): New.
8416 * target.h (emit_ops): Forward declare.
8417 (struct target_ops): New field emit_ops.
8418 (target_emit_ops): New.
8419 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8420 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8421 * linux-low.c (linux_emit_ops): New.
8422 (linux_target_ops): Install it.
8423 * linux-low.h (struct linux_target_ops): New field emit_ops.
8425 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8427 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8428 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8430 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8431 Stan Shebs <stan@codesourcery.com>
8433 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8434 (all): Depend on $(extra_libraries).
8435 (install-only): Install the IPA.
8436 (IPA_OBJS, IPA_LIB): New.
8437 (clean): Remove the IPA lib.
8438 (IPAGENT_CFLAGS): New.
8439 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8440 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8441 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8442 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8443 * configure.ac: Check for atomic builtins support in the compiler.
8444 (IPA_DEPFILES, extra_libraries): Define.
8445 * configure.srv (ipa_obj): Add description.
8446 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8447 (i[34567]86-*-linux*): Set ipa_obj.
8448 (x86_64-*-linux*): Set ipa_obj.
8449 * linux-low.c (stabilizing_threads): New.
8450 (supports_fast_tracepoints): New.
8451 (linux_detach): Stabilize threads before detaching.
8452 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8453 the lwp is either not stabilizing, or is moving out of a jump pad.
8454 (linux_fast_tracepoint_collecting): New.
8455 (maybe_move_out_of_jump_pad): New.
8456 (enqueue_one_deferred_signal): New.
8457 (dequeue_one_deferred_signal): New.
8458 (linux_wait_for_event_1): If moving out of a jump pad, defer
8459 pending signals to later.
8460 (linux_stabilize_threads): New.
8461 (linux_wait_1): Check if threads need moving out of jump pads, and
8463 (stuck_in_jump_pad_callback): New.
8464 (move_out_of_jump_pad_callback): New.
8466 (linux_resume_one_lwp): Handle moving out of jump pads.
8467 (linux_set_resume_request): Dequeue deferred signals.
8468 (need_step_over_p): Also step over fast tracepoint jumps.
8469 (start_step_over): Also uninsert fast tracepoint jumps.
8470 (finish_step_over): Also reinsert fast tracepoint jumps.
8471 (linux_install_fast_tracepoint_jump): New.
8472 (linux_target_ops): Install linux_stabilize_threads and
8473 linux_install_fast_tracepoint_jump_pad.
8474 * linux-low.h (linux_target_ops) <get_thread_area,
8475 install_fast_tracepoint_jump_pad>: New fields.
8476 (struct lwp_info) <collecting_fast_tracepoint,
8477 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8478 (linux_get_thread_area): Declare.
8479 * linux-x86-low.c (jump_insn): New.
8480 (x86_get_thread_area): New.
8481 (append_insns): New.
8483 (amd64_install_fast_tracepoint_jump_pad): New.
8484 (i386_install_fast_tracepoint_jump_pad): New.
8485 (x86_install_fast_tracepoint_jump_pad): New.
8486 (the_low_target): Install x86_get_thread_area and
8487 x86_install_fast_tracepoint_jump_pad.
8488 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8489 (struct fast_tracepoint_jump): New.
8490 (fast_tracepoint_jump_insn): New.
8491 (fast_tracepoint_jump_shadow): New.
8492 (find_fast_tracepoint_jump_at): New.
8493 (fast_tracepoint_jump_here): New.
8494 (delete_fast_tracepoint_jump): New.
8495 (set_fast_tracepoint_jump): New.
8496 (uninsert_fast_tracepoint_jumps_at): New.
8497 (reinsert_fast_tracepoint_jumps_at): New.
8498 (set_breakpoint_at): Use write_inferior_memory.
8499 (uninsert_raw_breakpoint): Use write_inferior_memory.
8500 (check_mem_read): Mask out fast tracepoint jumps.
8501 (check_mem_write): Mask out fast tracepoint jumps.
8502 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8503 (set_fast_tracepoint_jump): Declare.
8504 (delete_fast_tracepoint_jump)
8505 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8506 (reinsert_fast_tracepoint_jumps_at): Declare.
8507 * regcache.c: Don't compile many functions when building the
8508 in-process agent library.
8509 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8510 the register buffer in the heap.
8511 (free_register_cache): If the register buffer isn't owned by the
8512 regcache, don't free it.
8513 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8514 pre-existing register caches.
8515 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8517 (convert_ascii_to_int): : Constify `from' parameter type.
8518 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8519 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8520 the needed buffer in-place.
8521 (relocate_instruction): New.
8522 * server.c (handle_query) <qSymbols>: If the target supports
8523 tracepoints, give it a chance of looking up symbols. Report
8524 support for fast tracepoints.
8525 (handle_status): Stabilize threads.
8526 (process_serial_event): Adjust.
8527 * server.h (struct fast_tracepoint_jump): Forward declare.
8528 (struct process_info) <fast_tracepoint_jumps>: New field.
8529 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8530 (decode_X_packet, decode_M_packet): Adjust.
8531 (relocate_instruction): Declare.
8532 (in_process_agent_loaded): Declare.
8533 (tracepoint_look_up_symbols): Declare.
8534 (struct fast_tpoint_collect_status): Declare.
8535 (fast_tracepoint_collecting): Declare.
8536 (force_unlock_trace_buffer): Declare.
8537 (handle_tracepoint_bkpts): Declare.
8538 (initialize_low_tracepoint)
8539 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8540 * target.h (struct target_ops) <stabilize_threads,
8541 install_fast_tracepoint_jump_pad>: New fields.
8542 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8543 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8544 [HAVE_STDINT_H]: Include stdint.h.
8545 (trace_debug_1): Rename to ...
8546 (trace_vdebug): ... this.
8547 (trace_debug): Rename to ...
8548 (trace_debug_1): ... this. Add `level' parameter.
8550 (ATTR_USED, ATTR_NOINLINE): New.
8551 (IP_AGENT_EXPORT): New.
8552 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8553 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8554 (about_to_request_buffer_space, trace_buffer_is_full)
8555 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8556 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8557 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8558 (traceframe_write_count, traceframes_created)
8559 (trace_state_variables)
8560 New renaming defines.
8561 (struct ipa_sym_addresses): New.
8562 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8564 (ipa_sym_addrs): New.
8565 (all_tracepoint_symbols_looked_up): New.
8566 (in_process_agent_loaded): New.
8567 (write_e_ipa_not_loaded): New.
8568 (maybe_write_ipa_not_loaded): New.
8569 (tracepoint_look_up_symbols): New.
8570 (debug_threads) [IN_PROCESS_AGENT]: New.
8571 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8572 (UNKNOWN_SIDE_EFFECTS): New.
8573 (stop_tracing): New.
8574 (flush_trace_buffer): New.
8575 (stop_tracing_bkpt): New.
8576 (flush_trace_buffer_bkpt): New.
8577 (read_inferior_integer): New.
8578 (read_inferior_uinteger): New.
8579 (read_inferior_data_pointer): New.
8580 (write_inferior_data_pointer): New.
8581 (write_inferior_integer): New.
8582 (write_inferior_uinteger): New.
8583 (struct collect_static_trace_data_action): Delete.
8584 (enum tracepoint_type): New.
8585 (struct tracepoint) <type>: New field `type'.
8586 <actions_str, step_actions, step_actions_str>: Only include in
8588 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8589 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8590 (tracepoints): Use IP_AGENT_EXPORT.
8591 (last_tracepoint): Don't include in the IPA.
8592 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8593 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8594 (alloced_trace_state_variables): New.
8595 (trace_state_variables): Use IP_AGENT_EXPORT.
8596 (traceframe_t): Delete unused variable.
8597 (circular_trace_buffer): Don't include in the IPA.
8598 (trace_buffer_start): Delete.
8599 (struct trace_buffer_control): New.
8600 (trace_buffer_free): Delete.
8601 (struct ipa_trace_buffer_control): New.
8602 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8603 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8605 (trace_buffer_ctrl): New.
8606 (TRACE_BUFFER_CTRL_CURR): New.
8607 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8608 Reimplement as macros.
8609 (trace_buffer_wrap): Delete.
8610 (traceframe_write_count, traceframe_read_count)
8611 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8612 (struct tracepoint_hit_ctx) <type>: New field.
8613 (struct fast_tracepoint_ctx): New.
8614 (memory_barrier): New.
8616 (record_tracepoint_error): Update atomically in the IPA.
8617 (clear_inferior_trace_buffer): New.
8618 (about_to_request_buffer_space): New.
8619 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8620 updating the same buffer.
8621 (add_tracepoint): Default the tracepoint's type to trap
8622 tracepoint, and orig_size to -1.
8623 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8625 (create_trace_state_variable): New parameter `gdb'. Handle it.
8626 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8627 (cmd_qtdp): Handle fast tracepoints.
8629 (max_jump_pad_size): New.
8630 (gdb_jump_pad_head): New.
8631 (get_jump_space_head): New.
8632 (claim_jump_space): New.
8633 (sort_tracepoints): New.
8634 (MAX_JUMP_SIZE): New.
8635 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8637 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8638 support. Upload fast traceframes, and delete internal IPA
8640 (stop_tracing_handler): New.
8641 (flush_trace_buffer_handler): New.
8642 (cmd_qtstop): Upload fast tracepoints.
8643 (response_tracepoint): Handle fast tracepoints.
8644 (tracepoint_finished_step): Upload fast traceframes. Set the
8645 tracepoint hit context's tracepoint type.
8646 (handle_tracepoint_bkpts): New.
8647 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8648 type. Add comment about fast tracepoints.
8649 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8650 non-existing action_str field.
8651 (get_context_regcache): Handle fast tracepoints.
8652 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8654 (fast_tracepoint_from_jump_pad_address): New.
8655 (fast_tracepoint_from_ipa_tpoint_address): New.
8656 (collecting_t): New.
8657 (force_unlock_trace_buffer): New.
8658 (fast_tracepoint_collecting): New.
8661 (write_inferior_data_ptr): New.
8662 (target_tp_heap): New.
8663 (target_malloc): New.
8664 (download_agent_expr): New.
8666 (download_tracepoints): New.
8667 (download_trace_state_variables): New.
8668 (upload_fast_traceframes): New.
8669 (IPA_FIRST_TRACEFRAME): New.
8670 (IPA_NEXT_TRACEFRAME_1): New.
8671 (IPA_NEXT_TRACEFRAME): New.
8672 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8673 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8674 (gdb_jump_pad_buffer_end): New.
8675 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8676 (initialize_tracepoint): Adjust.
8677 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8678 buffer. Initialize the low module.
8679 * utils.c (PREFIX, TOOLNAME): New.
8680 (malloc_failure): Use PREFIX.
8681 (error): In the IPA, an error causes an exit.
8682 (fatal, warning): Use PREFIX.
8683 (internal_error): Use TOOLNAME.
8684 (NUMCELLS): Increase to 10.
8685 * configure, config.in: Regenerate.
8687 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8689 * server.c (handle_query) <qSupported>: Do two passes over the
8690 qSupported string to avoid nesting strtok.
8692 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8694 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8696 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8698 * configure: Regenerate.
8699 * proc-service.list: New.
8701 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8703 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8706 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8708 * gdbreplay.c (remote_open): Check error return from socket() call by
8709 its equality to -1 not by it being negative.
8710 * remote-utils.c (remote_open): Likewise.
8712 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8714 * config.h: Regenerate.
8716 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8718 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8719 doesn't provide PTRACE_GET_THREAD_AREA.
8721 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8723 * linux-m68k-low.c: Include <asm/ptrace.h>
8724 (ps_get_thread_area): Implement.
8726 2010-05-03 Doug Evans <dje@google.com>
8728 * event-loop.c (struct callback_event): New struct.
8729 (callback_list): New global.
8730 (append_callback_event, delete_callback_event): New functions.
8731 (process_callback): New function.
8732 (start_event_loop): Call it.
8733 * remote-utils.c (NOT_SCHEDULED): Define.
8734 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8735 moved out of readchar.
8736 (readchar): Rewrite. Call reschedule before returning.
8737 (reset_readchar): New function.
8738 (remote_close): Call it.
8739 (process_remaining, reschedule): New functions.
8740 * server.h (callback_handler_func): New typedef.
8741 (append_callback_event, delete_callback_event): Declare.
8743 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8745 * proc-service.c (ps_pglobal_lookup): Use
8746 thread_db_look_up_one_symbol.
8747 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8748 parameter. Use it instead of all_symbols_looked_up.
8749 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8751 (all_symbols_looked_up): Don't declare.
8752 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8753 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8755 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8756 Set all_symbols_looked_up here.
8757 (thread_db_look_up_one_symbol): New.
8758 (thread_db_get_tls_address): Adjust.
8759 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8760 thread_db object on the heap, and tentatively set it in the
8762 (thread_db_init): Don't set all_symbols_looked_up here.
8763 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8765 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8767 * linux-low.c (linux_kill, linux_detach): Adjust.
8768 (status_pending_p_callback): Remove redundant statement. Check
8769 for !TARGET_WAITIKIND_IGNORE, instead of
8770 TARGET_WAITKIND_STOPPED.
8771 (handle_tracepoints): Make sure LWP is locked. Adjust.
8772 (linux_wait_for_event_1): Adjust.
8773 (linux_cancel_breakpoints): New.
8774 (unsuspend_one_lwp): New.
8775 (unsuspend_all_lwps): New.
8776 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8777 (send_sigstop_callback): Change return type to int, add new
8778 `except' parameter and handle it.
8779 (suspend_and_send_sigstop_callback): New.
8780 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8781 pass them down. If SUSPEND, also increment the lwp's suspend
8783 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8784 (need_step_over_p): Don't consider suspended LWPs.
8785 (start_step_over): Adjust.
8786 (proceed_one_lwp): Change return type to int, add new `except'
8787 parameter and handle it.
8788 (unsuspend_and_proceed_one_lwp): New.
8789 (proceed_all_lwps): Use find_inferior instead of
8791 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8792 also decrement the suspend count of LWPs. Pass `except' down,
8793 instead of hacking its suspend count.
8794 (linux_pause_all): Add `freeze' parameter. Adjust.
8795 (linux_unpause_all): New.
8796 (linux_target_ops): Install linux_unpause_all.
8797 * server.c (handle_status): Adjust.
8798 * target.h (struct target_ops): New fields `unpause_all' and
8799 `cancel_breakpoints'. Add new parameter to `pause_all'.
8800 (pause_all): Add new `freeze' parameter.
8802 (cancel_breakpoints): New.
8803 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8805 (cmd_qtstart): Pause threads.
8806 (stop_tracing): Pause threads, and cancel breakpoints.
8807 * win32-low.c (win32_target_ops): Adjust.
8809 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8811 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8812 the inferior right away from here...
8813 (linux_wait_1): ... to here, and adjust to check the thread's
8814 last_resume_kind instead of the lwp's step or stop_expected flags.
8816 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8818 * README: Use consistent `GDB' and `GDBserver' spellings.
8820 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8822 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8823 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8824 (linux_detach_one_lwp): Assume the lwp is stopped.
8825 (any_thread_of): Delete.
8826 (linux_detach): Stop all lwps here. Don't blindly delete all
8828 (delete_lwp_callback): New.
8829 (linux_mourn): Delete all lwps of the process that is gone.
8830 (linux_wait_1): Don't delete the last lwp of the process here.
8831 * mem-break.h (mark_breakpoints_out): Declare.
8832 * mem-break.c (mark_breakpoints_out): New.
8833 (free_all_breakpoints): Use it.
8834 * server.c (handle_target_event): If the process is gone, mark
8836 * thread-db.c (struct thread_db) <create_bp>: New field.
8837 (thread_db_enable_reporting): Fix prototype. Store a thread event
8838 breakpoint reference in the thread_db struct.
8839 (thread_db_load_search): Clear the thread_db object.
8840 (try_thread_db_load_1): Ditto.
8841 (switch_to_process): New.
8842 (disable_thread_event_reporting): Use it.
8843 (remove_thread_event_breakpoints): New.
8844 (thread_db_detach, thread_db_mourn): Use it.
8846 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8848 * linux-low.c (linux_enable_event_reporting): New.
8849 (linux_wait_for_event_1, handle_extended_wait): Use it.
8851 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8853 * linux-low.c (linux_kill_one_lwp, linux_kill)
8854 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8855 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8856 SIGSTOP even if the LWP is stopped.
8857 (send_sigstop_callback): New.
8858 (stop_all_lwps): Use send_sigstop_callback instead.
8859 (linux_resume_one_thread): Adjust.
8860 (proceed_one_lwp): Still proceed an LWP that the client has
8861 requested to stop, if we haven't reported it as stopped yet. Make
8862 sure that LWPs the client want stopped, have a pending SIGSTOP.
8864 2010-04-26 Doug Evans <dje@google.com>
8866 * server.c (handle_general_set): Make static.
8868 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8869 Print received char after testing for error/eof instead of before.
8870 (input_interrupt): Tweak comment.
8872 2010-04-23 Doug Evans <dje@google.com>
8874 * server.c (start_inferior): Print inferior argv if --debug.
8876 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8878 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8879 * nto-x86-low.c: Include server.h
8881 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8883 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8884 be consistent with other sources of this directory.
8885 (init_registers_amd64): Correct name of source file of this function
8888 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8890 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8893 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8895 * win32-i386-low.c: Add 64-bit support.
8896 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8897 (init_registers_amd64): Declare.
8898 (mappings): Add 64-bit version of array.
8899 (init_windows_x86): New function.
8900 (the_low_target): Change init_arch field to init_windows_x86.
8902 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8904 * win32-low.c: Adapt to support also 64-bit architecture.
8905 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8906 (get_image_name): Use SIZE_T type for local variable `done'.
8907 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8908 (toolhelp_get_dll_name): Idem.
8909 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8910 Use uintptr_t typecast to avoid warning.
8911 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8912 (handle_exception): Use phex_nz to avoid warning.
8913 (win32_wait): Remove unused local variable `process'.
8915 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8917 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8920 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8922 * configure.ac: Use `ws2_32' library for srv_mingw.
8923 * configure: Regenerate.
8924 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8925 * remote-utils.c: Likewise.
8927 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8929 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8930 if __x86_64__ is defined.
8932 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8934 * configure: Regenerate.
8936 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8938 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8939 * target.h (target_ops): New get_tib_address field.
8940 * win32-low.h (win32_thread_info): Add thread_local_base field.
8941 * win32-low.c (child_add_thread): Add tlb argument.
8942 Set thread_local_base field to TLB.
8943 (get_child_debug_event): Adapt to child_add_thread change.
8944 (win32_get_tib_address): New function.
8945 (win32_target_ops): Set get_tib_address field to
8946 win32_get_tib_address.
8947 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8949 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8951 * linux-low.c (linux_mourn): Also remove the process.
8952 * server.c (handle_target_event): Don't remove the process here.
8953 * nto-low.c (nto_mourn): New.
8954 (nto_target_ops): Install it.
8955 * spu-low.c (spu_mourn): New.
8956 (spu_target_ops): Install it.
8957 * win32-low.c (win32_mourn): New.
8958 (win32_target_ops): Install it.
8960 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8962 * server.h (buffer_xml_printf): Remove redundant `;'.
8964 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8966 * regcache.c (set_register_cache): Invalidate regcaches before
8967 changing the register cache layout.
8968 (regcache_invalidate_one): Allow a NULL regcache.
8969 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8970 regcaches before changing the register cache layout or the target
8973 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8975 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8976 variable warning on Linux/x86-64.
8978 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8980 GDBserver disconnected tracing support.
8982 * linux-low.c (linux_remove_process): Delete.
8983 (add_lwp): Don't set last_resume_kind here.
8984 (linux_kill): Use `mourn'.
8985 (linux_detach): Use `thread_db_detach', and `mourn'.
8987 (linux_attach_lwp_1): Adjust comment.
8988 (linux_attach): last_resume_kind moved the thread_info; adjust.
8989 (status_pending_p_callback): Adjust.
8990 (linux_wait_for_event_1): Adjust.
8991 (count_events_callback, select_singlestep_lwp_callback)
8992 (select_event_lwp_callback, cancel_breakpoints_callback)
8993 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8994 (proceed_one_lwp): Adjust.
8995 (linux_async): Add debug output.
8996 (linux_thread_stopped): New.
8997 (linux_pause_all): New.
8998 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9000 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9001 (thread_db_free): Delete declaration.
9002 (thread_db_detach, thread_db_mourn): Declare.
9003 * thread-db.c (thread_db_init): Use thread_db_mourn.
9004 (thread_db_free): Delete, split in two.
9005 (disable_thread_event_reporting): New.
9006 (thread_db_detach): New.
9007 (thread_db_mourn): New.
9009 * server.h (struct thread_info) <last_resume_kind>: New field.
9010 <attached>: Add comment.
9011 <gdb_detached>: New field.
9012 (handler_func): Change return type to int.
9013 (handle_serial_event, handle_target_event): Ditto.
9014 (gdb_connected): Declare.
9016 (disconnected_tracing): Declare.
9017 (stop_tracing): Declare.
9019 * server.c (handle_query) <qSupported>: Report support for
9020 disconnected tracing.
9021 (queue_stop_reply_callback): Account for running threads.
9022 (gdb_wants_thread_stopped): New.
9023 (gdb_wants_all_threads_stopped): New.
9024 (gdb_reattached_process): New.
9025 (handle_status): Clear the `gdb_detached' flag of all processes.
9026 In all-stop, stop all threads.
9027 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9028 (process_serial_event): If the remote connection breaks, or if an
9029 exit was forced with "monitor exit", force an event loop exit.
9030 Handle disconnected tracing on detach.
9031 (handle_serial_event): Adjust.
9032 (handle_target_event): If GDB isn't connected, forward events back
9033 to the inferior, unless the last process exited, in which case,
9034 exit gdbserver. Adjust interface.
9036 * remote-utils.c (remote_open): Don't block in accept. Instead
9037 register an event loop source on the listen socket file
9038 descriptor. Refactor bits into ...
9039 (listen_desc): ... this new global.
9040 (gdb_connected): ... this new function.
9041 (enable_async_notification): ... this new function.
9042 (handle_accept_event): ... this new function.
9043 (remote_close): Clear remote_desc.
9045 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9047 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9049 (mourn_inferior): Define.
9050 (target_process_qsupported): Avoid the dangling else problem.
9051 (thread_stopped): Define.
9052 (pause_all): Define.
9053 (target_waitstatus_to_string): Declare.
9054 * target.c (target_waitstatus_to_string): New.
9056 * tracepoint.c (tracing): Make extern.
9057 (disconnected_tracing): New.
9058 (stop_tracing): Make extern. Handle tracing stops due to GDB
9060 (cmd_qtdisconnected): New.
9061 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9062 (handle_tracepoint_general_set): Handle QTDisconnected.
9064 * event-loop.c (event_handler_func): Change return type to int.
9065 (process_event): Bail out if the event handler wants the event
9067 (handle_file_event): Ditto.
9068 (start_event_loop): Bail out if the event handler wants the event
9071 * nto-low.c (nto_target_ops): Adjust.
9072 * spu-low.c (spu_wait): Don't remove the process here.
9073 (spu_target_ops): Adjust.
9074 * win32-low.c (win32_wait): Don't remove the process here.
9075 (win32_target_ops): Adjust.
9077 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9079 * regcache.c (realloc_register_cache): Invalidate inferior's
9080 regcache before recreating it.
9082 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9084 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9086 2010-04-09 Stan Shebs <stan@codesourcery.com>
9087 Pedro Alves <pedro@codesourcery.com>
9089 * server.h (LONGEST): New.
9090 (struct thread_info) <while_stepping>: New field.
9091 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9093 (initialize_tracepoint, handle_tracepoint_general_set)
9094 (handle_tracepoint_query, tracepoint_finished_step)
9095 (tracepoint_was_hit, release_while_stepping_state_list):
9096 (current_traceframe): Declare.
9097 * server.c (handle_general_set): Handle tracepoint packets.
9099 (write_memory): New.
9100 (handle_search_memory_1): Use read_memory.
9101 (handle_query): Report support for conditional tracepoints, trace
9102 state variables, and tracepoint sources. Handle tracepoint
9104 (main): Initialize the tracepoints module.
9105 (process_serial_event): Handle traceframe reads/writes.
9107 * linux-low.c (handle_tracepoints): New.
9108 (linux_wait_1): Call it.
9109 (linux_resume_one_lwp): Handle while-stepping.
9110 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9111 (linux_target_ops): Install them.
9112 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9114 * linux-x86-low.c (x86_supports_tracepoints): New.
9115 (the_low_target). Install it.
9117 * mem-break.h (delete_breakpoint): Declare.
9118 * mem-break.c (delete_breakpoint): Make external.
9120 * target.h (struct target_ops): Add `supports_tracepoints',
9121 `read_pc', and `write_pc' fields.
9122 (target_supports_tracepoints): Define.
9123 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9126 * regcache.h (struct regcache) <registers_owned>: New field.
9127 (init_register_cache, regcache_cpy): Declare.
9128 (regcache_read_pc, regcache_write_pc): Declare.
9129 (register_cache_size): Declare.
9130 (supply_regblock): Declare.
9131 * regcache.c (init_register_cache): New.
9132 (new_register_cache): Use it.
9133 (regcache_cpy): New.
9134 (register_cache_size): New.
9135 (supply_regblock): New.
9136 (regcache_read_pc, regcache_write_pc): New.
9138 * tracepoint.c: New.
9140 * Makefile.in (OBS): Add tracepoint.o.
9141 (tracepoint.o): New rule.
9143 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9145 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9147 (i386-mmx.c): Likewise.
9148 (i386-mmx-linux.o): Likewise.
9149 (i386-mmx-linux.c): Likewise.
9151 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9152 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9153 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9154 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9156 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9157 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9158 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9160 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9162 * Makefile.in (clean): Updated.
9164 (i386-avx.c): Likewise.
9165 (i386-avx-linux.o): Likewise.
9166 (i386-avx-linux.c): Likewise.
9167 (amd64-avx.o): Likewise.
9168 (amd64-avx.c): Likewise.
9169 (amd64-avx-linux.o): Likewise.
9170 (amd64-avx-linux.c): Likewise.
9172 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9173 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9174 (srv_amd64_regobj): Add amd64-avx.o.
9175 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9176 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9177 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9178 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9179 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9180 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9181 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9183 * i387-fp.c: Include "i386-xstate.h".
9185 (i387_cache_to_xsave): Likewise.
9186 (i387_xsave_to_cache): Likewise.
9187 (x86_xcr0): Likewise.
9189 * i387-fp.h (i387_cache_to_xsave): Likewise.
9190 (i387_xsave_to_cache): Likewise.
9191 (x86_xcr0): Likewise.
9193 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9194 * linux-crisv32-low.c (target_regsets): Likewise.
9195 * linux-m68k-low.c (target_regsets): Likewise.
9196 * linux-mips-low.c (target_regsets): Likewise.
9197 * linux-ppc-low.c (target_regsets): Likewise.
9198 * linux-s390-low.c (target_regsets): Likewise.
9199 * linux-sh-low.c (target_regsets): Likewise.
9200 * linux-sparc-low.c (target_regsets): Likewise.
9201 * linux-xtensa-low.c (target_regsets): Likewise.
9203 * linux-low.c: Include <sys/uio.h>.
9204 (regsets_fetch_inferior_registers): Support nt_type.
9205 (regsets_store_inferior_registers): Likewise.
9206 (linux_process_qsupported): New.
9207 (linux_target_ops): Add linux_process_qsupported.
9209 * linux-low.h (regset_info): Add nt_type.
9210 (linux_target_ops): Add process_qsupported.
9212 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9214 (init_registers_i386_avx_linux): New.
9215 (init_registers_amd64_avx_linux): Likewise.
9216 (xmltarget_i386_linux_no_xml): Likewise.
9217 (xmltarget_amd64_linux_no_xml): Likewise.
9218 (PTRACE_GETREGSET): Likewise.
9219 (PTRACE_SETREGSET): Likewise.
9220 (x86_fill_xstateregset): Likewise.
9221 (x86_store_xstateregset): Likewise.
9222 (use_xml): Likewise.
9223 (x86_linux_update_xmltarget): Likewise.
9224 (x86_linux_process_qsupported): Likewise.
9225 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9226 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9227 init_registers_i386_linux here. Call
9228 x86_linux_update_xmltarget.
9229 (the_low_target): Add x86_linux_process_qsupported.
9231 * server.c (handle_query): Call target_process_qsupported.
9233 * target.h (target_ops): Add process_qsupported.
9234 (target_process_qsupported): New.
9236 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9238 * inferiors.c (add_thread): Set last_status kind to
9239 TARGET_WAITKIND_IGNORE.
9240 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9241 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9242 (linux_wait_1): Move `thread' local definition to block that uses
9243 it. Don't NULL initialize `event_child'.
9244 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9245 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9246 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9248 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9250 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9251 an extended waitstatus, or by a watchpoint.
9252 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9253 thread was stepping or has been stopped by a watchpoint.
9255 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9257 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9258 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9259 of another, then delete the previous, and validate all
9261 (validate_inserted_breakpoint): New.
9262 (delete_disabled_breakpoints): New.
9263 (validate_breakpoints): New.
9264 (check_mem_read): Validate breakpoints before trusting their
9265 shadow. Delete disabled breakpoints.
9266 (check_mem_write): Validate breakpoints before trusting they
9267 should be inserted. Delete disabled breakpoints.
9268 * mem-break.h (validate_breakpoints):
9269 * server.c (handle_query): Validate breakpoints when we see a
9272 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9274 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9275 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9276 if we could tell there's a GDB breakpoint at stop_pc.
9277 (need_step_over_p): Don't do a step over if we find a GDB
9278 breakpoint at the resume PC.
9280 * mem-break.c (struct raw_breakpoint): New.
9281 (enum bkpt_type): New type `gdb_breakpoint'.
9282 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9283 fields. New field `raw'.
9284 (find_raw_breakpoint_at): New.
9285 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9287 (set_breakpoint_at): Adjust.
9288 (delete_raw_breakpoint): New.
9289 (release_breakpoint): New.
9290 (delete_breakpoint): Rename to...
9291 (delete_breakpoint_1): ... this. Add proc parameter. Use
9292 release_breakpoint. Return ENOENT.
9293 (delete_breakpoint): Reimplement.
9294 (find_breakpoint_at): Delete.
9295 (find_gdb_breakpoint_at): New.
9296 (delete_breakpoint_at): Delete.
9297 (set_gdb_breakpoint_at): New.
9298 (delete_gdb_breakpoint_at): New.
9299 (gdb_breakpoint_here): New.
9300 (set_reinsert_breakpoint): Use release_breakpoint.
9301 (uninsert_breakpoint): Rename to ...
9302 (uninsert_raw_breakpoint): ... this.
9303 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9304 (reinsert_raw_breakpoint): Change parameter type to
9306 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9308 (check_breakpoints): Adjust. Use release_breakpoint.
9309 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9310 (breakpoint_inserted_here): Ditto.
9311 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9312 Don't trust the breakpoint's shadow if it is not inserted.
9313 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9314 (delete_all_breakpoints): Adjust.
9315 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9316 use delete_breakpoint_1.
9318 * mem-break.h (breakpoints_supported): Delete declaration.
9319 (set_gdb_breakpoint_at): Declare.
9320 (gdb_breakpoint_here): Declare.
9321 (delete_breakpoint_at): Delete.
9322 (delete_gdb_breakpoint_at): Declare.
9324 * server.h (struct raw_breakpoint): Forward declare.
9325 (struct process_info): New field `raw_breakpoints'.
9327 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9332 * linux-low.c (status_pending_p_callback): Fix comment.
9333 (linux_wait_for_event_1): Move most of the internal breakpoint
9334 handling from here...
9335 (linux_wait_1): ... to here.
9336 (count_events_callback): New.
9337 (select_singlestep_lwp_callback): New.
9338 (select_event_lwp_callback): New.
9339 (cancel_breakpoints_callback): New.
9340 (select_event_lwp): New.
9341 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9342 priority to all LWPs that have had events that should be reported
9343 to the client. Cancel breakpoints when about to reporting the
9344 event to the client, not while stopping lwps. No longer cancel
9345 finished single-steps here.
9346 (cancel_finished_single_step): Delete.
9347 (cancel_finished_single_steps): Delete.
9349 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9351 * mem-break.c (enum bkpt_type): New.
9352 (struct breakpoint): New field `type'.
9353 (set_breakpoint_at): Change return type to struct breakpoint
9354 pointer. Set type to `other_breakpoint' by default.
9355 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9356 in the breakpoint list.
9357 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9358 (reinsert_breakpoint): Rename to ...
9359 (reinsert_raw_breakpoint): ... this.
9360 (reinsert_breakpoints_at): Adjust.
9361 * mem-break.h (struct breakpoint): Declare.
9362 (set_breakpoint_at): Change return type to struct breakpoint
9365 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9367 * server.c (handle_query): Assign, not compare.
9369 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9371 Teach linux gdbserver to step-over-breakpoints.
9373 * linux-low.c (can_hardware_single_step): New.
9374 (supports_breakpoints): New.
9375 (handle_extended_wait): If stopping threads, read the stop pc of
9378 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9379 low target doesn't support retrieving the PC.
9380 (add_lwp): Set last_resume_kind to resume_continue.
9381 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9382 (linux_attach): Don't clear stop_expected. Set the lwp's
9383 last_resume_kind to resume_stop.
9384 (linux_detach_one_lwp): Don't check for removed breakpoints.
9385 (check_removed_breakpoint): Delete.
9386 (status_pending_p): Rename to ...
9387 (status_pending_p_callback): ... this. Don't check for removed
9388 breakpoints. Don't consider threads that are stopped from GDB's
9390 (linux_wait_for_lwp): Always read the stop_pc here.
9391 (cancel_breakpoint): New.
9392 (step_over_bkpt): New global.
9393 (linux_wait_for_event_1): Implement stepping over breakpoints.
9394 (gdb_wants_lwp_stopped): New.
9395 (gdb_wants_all_stopped): New.
9396 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9397 single-step traps here. Store the thread's last reported target
9399 (send_sigstop): Don't clear stop_expected. Always set it,
9401 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9402 (cancel_finished_single_step): New.
9403 (cancel_finished_single_steps): New.
9404 (wait_for_sigstop): Don't cancel finished single-step traps here.
9405 (linux_resume_one_lwp): Don't check for removed breakpoints.
9406 Don't set `step' on non-hardware step archs.
9407 (linux_set_resume_request): Ignore resume_stop requests if already
9408 stopping or stopped. Set the lwp's last_resume_kind.
9409 (resume_status_pending_p): Don't check for removed breakpoints.
9410 (need_step_over_p): New.
9411 (start_step_over): New.
9412 (finish_step_over): New.
9413 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9414 requests. Clear the thread's last reported target waitstatus.
9415 Don't use the `suspended' flag. Don't consider pending breakpoints.
9416 (linux_resume): Start a step-over if necessary.
9417 (proceed_one_lwp): New.
9418 (proceed_all_lwps): New.
9419 (unstop_all_lwps): New.
9420 * linux-low.h (struct lwp_info): Rewrite comment for the
9421 `suspended' flag. Add the `stop_pc' field. Delete the
9422 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9423 Add `'last_resume_kind' and `need_step_over' fields.
9424 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9425 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9426 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9427 (set_raw_breakpoint_at): New.
9428 (set_breakpoint_at): Rewrite to use it.
9429 (reinsert_breakpoint_handler): Delete.
9430 (set_reinsert_breakpoint): New.
9431 (reinsert_breakpoint_by_bp): Delete.
9432 (delete_reinsert_breakpoints): New.
9433 (uninsert_breakpoint): Rewrite.
9434 (uninsert_breakpoints_at): New.
9435 (reinsert_breakpoint): Rewrite.
9436 (reinsert_breakpoints_at): New.
9437 (check_breakpoints): Rewrite.
9438 (breakpoint_here): New.
9439 (breakpoint_inserted_here): New.
9440 (check_mem_read): Adjust.
9441 * mem-break.h (breakpoints_supported, breakpoint_here)
9442 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9443 (reinsert_breakpoint_by_bp): Delete declaration.
9444 (delete_reinsert_breakpoints): Declare.
9445 (reinsert_breakpoint): Delete declaration.
9446 (reinsert_breakpoints_at): Declare.
9447 (uninsert_breakpoint): Delete declaration.
9448 (uninsert_breakpoints_at): Declare.
9449 (check_breakpoints): Adjust prototype.
9450 * server.h: Adjust include order.
9451 (struct thread_info): Declare here. Add a `last_status' field.
9453 2010-03-23 Michael Snyder <msnyder@vmware.com>
9455 * server.c (crc32): New function.
9456 (handle_query): Add handling for 'qCRC:' request.
9458 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9460 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9461 lwp had been stopped by a watchpoint.
9463 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9465 * server.h (internal_error): Declare.
9466 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9467 * utils.c (internal_error): New function.
9469 2010-03-15 Andreas Schwab <schwab@redhat.com>
9471 * configure.srv: Fix typo setting srv_regobj.
9473 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9475 * linux-low.c (fetch_register): Avoid passing a non string literal
9477 (usr_store_inferior_registers): Ditto.
9479 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9481 * linux-low.c (linux_write_memory): Bail out early if peeking
9484 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9486 * linux-low.h (struct lwp_info): New fields
9487 `stopped_by_watchpoint' and `stopped_data_address'.
9488 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9489 here, and cache them in the lwp object.
9490 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9492 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9494 (linux_stopped_by_watchpoint): Rewrite.
9495 (linux_stopped_data_address): Rewrite.
9497 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9499 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9500 switching the current inferior, not before.
9502 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9504 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9505 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9506 i386-linux.c and amd64-linux.c.
9507 (reg-i386.o): Removed.
9508 (reg-i386.c): Likewise.
9509 (reg-i386-linux.o): Likewise.
9510 (reg-i386-linux.c): Likewise.
9511 (reg-x86-64.o): Likewise.
9512 (reg-x86-64.c): Likewise.
9513 (reg-x86-64-linux.o): Likewise.
9514 (reg-x86-64-linux.c): Likewise.
9517 (i386-linux.o): Likewise.
9518 (i386-linux.c): Likewise.
9519 (amd64.o): Likewise.
9520 (amd64.c): Likewise.
9521 (amd64-linux.o): Likewise.
9522 (amd64-linux.c): Likewise.
9524 * configure.srv (srv_i386_regobj): New.
9525 (srv_i386_linux_regobj): Likewise.
9526 (srv_amd64_regobj): Likewise.
9527 (srv_amd64_linux_regobj): Likewise.
9528 (srv_i386_32bit_xmlfiles): Likewise.
9529 (srv_i386_64bit_xmlfiles): Likewise.
9530 (srv_i386_xmlfiles): Likewise.
9531 (srv_amd64_xmlfiles): Likewise.
9532 (srv_i386_linux_xmlfiles): Likewise.
9533 (srv_amd64_linux_xmlfiles): Likewise.
9534 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9535 srv_xmlfiles to $srv_i386_xmlfiles.
9536 (i[34567]86-*-mingw32ce*): Likewise.
9537 (i[34567]86-*-mingw*): Likewise.
9538 (i[34567]86-*-nto*): Likewise.
9539 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9540 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9541 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9542 (x86_64-*-linux*): Likewise.
9544 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9545 (init_registers_amd64_linux): New.
9546 (x86_arch_setup): Replace init_registers_x86_64_linux with
9547 init_registers_amd64_linux.
9549 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9551 * configure.ac: Check for libdl. If it is not available link against
9552 static libthread_db.
9553 * configure: Regenerate.
9555 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9559 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9560 handing a read watchpoint.
9561 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9563 2010-02-12 Doug Evans <dje@google.com>
9565 * linux-low.c (linux_supports_tracefork_flag): Document.
9566 (linux_look_up_symbols): Add comment.
9568 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9570 * regcache.c (supply_register): Clear regcache if buf is NULL.
9572 2010-02-02 Nicolas Roche <roche@sourceware.org>
9573 Joel Brobecker <brobecker@adacore.com>
9575 * inferiors.c (find_inferior): Add function documentation.
9576 (unloaded_dll): Handle the case where the unloaded dll has not
9577 been previously registered in the dll list.
9579 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9581 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9582 (thumb2_breakpoint): New.
9583 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9585 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9587 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9588 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9591 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9593 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9595 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9597 * linux-s390-low.c (s390_collect_ptrace_register)
9598 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9600 2010-01-21 Doug Evans <dje@google.com>
9602 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9603 (PTRACE_ARG4_TYPE): New macro.
9604 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9605 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9606 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9607 (usr_store_inferior_registers): Ditto.
9608 (linux_read_memory, linux_write_memory): Ditto.
9609 (linux_test_for_tracefork): Ditto.
9611 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9612 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9614 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9616 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9619 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9621 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9622 prototype to take a regcache. Adjust.
9624 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9626 * regcache.h (struct thread_info): Forward declare.
9627 (struct regcache): New.
9628 (new_register_cache): Adjust prototype.
9629 (get_thread_regcache): Declare.
9630 (free_register_cache): Adjust prototype.
9631 (registers_to_string, registers_from_string): Ditto.
9632 (supply_register, supply_register_by_name, collect_register)
9633 (collect_register_as_string, collect_register_by_name): Ditto.
9634 * regcache.c (struct inferior_regcache_data): Delete.
9635 (get_regcache): Rename to ...
9636 (get_thread_regcache): ... this. Adjust. Switch inferior before
9638 (regcache_invalidate_one): Adjust.
9639 (regcache_invalidate): Fix prototype.
9640 (new_register_cache): Return the new register cache.
9641 (free_register_cache): Change prototype.
9642 (realloc_register_cache): Adjust.
9643 (registers_to_string): Change prototype to take a regcache. Adjust.
9644 (registers_from_string): Ditto.
9645 (register_data): Ditto.
9646 (supply_register): Ditto.
9647 (supply_register_by_name): Ditto.
9648 (collect_register): Ditto.
9649 (collect_register_as_string): Ditto.
9650 (collect_register_by_name): Ditto.
9651 * server.c (process_serial_event): Adjust.
9652 * linux-low.h (regset_fill_func, regset_store_func): Change
9654 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9656 * linux-low.c (get_stop_pc): Adjust.
9657 (check_removed_breakpoint): Adjust.
9658 (linux_wait_for_event): Adjust.
9659 (linux_resume_one_lwp): Adjust.
9660 (fetch_register): Add regcache parameter. Adjust.
9661 (usr_store_inferior_registers): Ditto.
9662 (regsets_fetch_inferior_registers): Ditto.
9663 (regsets_store_inferior_registers): Ditto.
9664 (linux_fetch_registers, linux_store_registers): Ditto.
9665 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9667 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9669 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9670 prototype to take a regcache.
9671 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9672 * remote-utils.c (convert_ascii_to_int, outreg)
9673 (prepare_resume_reply): Change prototype to take a regcache.
9675 * target.h (struct target_ops) <fetch_registers, store_registers>:
9676 Change prototype to take a regcache.
9677 (fetch_inferior_registers, store_inferior_registers): Change
9678 prototype to take a regcache. Adjust.
9679 * proc-service.c (ps_lgetregs): Adjust.
9680 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9681 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9682 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9683 take a regcache. Adjust.
9684 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9685 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9686 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9687 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9688 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9689 (cris_cannot_fetch_register):
9690 (cris_breakpoint_at): Change prototype to take a regcache.
9692 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9693 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9694 to take a regcache. Adjust.
9695 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9697 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9698 take a regcache. Adjust.
9699 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9700 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9701 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9702 * linux-mips-low.c (mips_get_pc):
9703 (mips_set_pc): Change prototype to take a regcache. Adjust.
9704 (mips_reinsert_addr): Adjust.
9705 (mips_collect_register): Change prototype to take a regcache.
9707 (mips_supply_register):
9708 (mips_collect_register_32bit, mips_supply_register_32bit)
9709 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9710 (mips_store_fpregset): Ditto.
9711 * linux-ppc-low.c (ppc_supply_ptrace_register)
9712 (ppc_supply_ptrace_register): Ditto.
9713 (parse_spufs_run): Adjust.
9714 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9715 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9716 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9717 take a regcache. Adjust.
9718 * linux-s390-low.c (s390_collect_ptrace_register)
9719 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9720 (s390_set_pc): Change prototype to take a regcache. Adjust.
9721 (s390_arch_setup): Adjust.
9722 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9723 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9724 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9725 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9726 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9728 (sparc_breakpoint_at): Adjust.
9729 * linux-xtensa-low.c (xtensa_fill_gregset):
9730 (xtensa_store_gregset):
9731 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9732 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9733 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9734 prototype to take a regcache. Adjust.
9735 * win32-arm-low.c (arm_fetch_inferior_register)
9736 (arm_store_inferior_register): Change prototype to take a
9738 * win32-i386-low.c (i386_fetch_inferior_register)
9739 (i386_store_inferior_register): Change prototype to take a
9741 * win32-low.c (child_fetch_inferior_registers)
9742 (child_store_inferior_registers): Change prototype to take a
9744 (win32_wait): Adjust.
9745 (win32_fetch_inferior_registers): Change prototype to take a
9747 (win32_store_inferior_registers): Adjust.
9748 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9749 store_inferior_register>: Change prototype to take a regcache.
9751 2010-01-20 Doug Evans <dje@google.com>
9753 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9755 (linux_wait_for_event1, linux_init_signals): Ditto.
9756 (W_STOPCODE): Provide definition if missing.
9758 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9760 * linux-low.c (linux_core_of_thread): New.
9761 (compare_ints, show_process, list_threads): New.
9762 (linux_qxfer_osdata): Report threads and cores.
9763 (linux_target_op): Register linux_core_of_thread.
9764 * remote-utils.c (prepare_resume_reply): Report the core.
9765 (buffer_xml_printf): Support %d specifier.
9766 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9768 (handle_query): Handle qXfer:threads. Announce availability
9770 * target.h (struct target_ops): New field core_of_thread.
9772 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9774 * Makefile.in (clean): Remove new generated files.
9775 (reg-s390.o, reg-s390.c): Remove rules.
9776 (reg-s390x.o, reg-s390x.c): Likewise.
9777 (s390-linux32.o, s390-linux32.c): Add rules.
9778 (s390-linux64.o, s390-linux64.c): Likewise.
9779 (s390x-linux64.o, s390x-linux64.c): Likewise.
9780 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9781 * linux-s390-low.c: Include <elf.h>.
9782 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9783 (init_registers_s390): Remove prototype.
9784 (init_registers_s390x): Likewise.
9785 (init_registers_s390_linux32): Add prototype.
9786 (init_registers_s390_linux64): Likewise.
9787 (init_registers_s390x_linux64): Likewise.
9788 (s390_num_regs_3264): New define.
9789 (s390_regmap_3264): New global variable.
9790 (s390_cannot_fetch_register): Remove obsolete check.
9791 (s390_cannot_store_register): Likewise.
9792 (s390_collect_ptrace_register): Handle upper/lower register halves.
9793 (s390_supply_ptrace_register): Likewise.
9794 (s390_fill_gregset): Update to register number changes.
9795 (s390_get_hwcap): New routine.
9796 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9797 Install appropriate regmap and register set.
9799 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9801 * server.c (gdbserver_version): Update copyright year to 2010.
9802 * gdbreplay.c (gdbreplay_version): Likewise.
9804 2009-12-28 Doug Evans <dje@google.com>
9806 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9807 elf/external.h. Include <elf.h> instead but only if necessary.
9809 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9811 * linux-low.c (linux_remove_process): Remove `detaching'
9812 parameter. Don't release/detach from thread_db here.
9813 (linux_kill): Release/detach from thread_db here, ...
9814 (linux_detach): ... and here, before actually detaching.
9815 (linux_wait_1): ... and here, when a process exits.
9816 * thread-db.c (any_thread_of): New.
9817 (thread_db_free): Switch the current inferior to a thread of the
9820 2009-12-21 Doug Evans <dje@google.com>
9822 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9824 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9825 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9826 warning ifndef __NR_tkill. Move setting of errno there too.
9827 Delete unnecessary resetting of errno after syscall.
9828 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9830 * configure.ac: Check for dladdr.
9831 * config.in: Regenerate.
9832 * configure: Regenerate.
9833 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9834 (try_thread_db_load): Update.
9836 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9838 2009-12-18 Doug Evans <dje@google.com>
9840 * event-loop.c: Include unistd.h if it exists.
9842 * linux-low.c (my_waitpid): Move definition away from being in
9843 between linux_tracefork_child/linux_test_for_tracefork.
9845 * gdb_proc_service.h (psaddr_t): Fix type.
9846 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9847 signature to match glibc.
9849 2009-12-16 Doug Evans <dje@google.com>
9851 * linux-low.c (linux_read_memory): Fix argument to read.
9853 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9855 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9856 events, don't leave current_inferior pointing at null.
9858 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9860 * win32-low.c (LOG): Delete.
9861 (OUTMSG): Output to stderr.
9862 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9863 on compile time LOG macro.
9864 (win32_wait): Fix debug output.
9866 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9868 * win32-low.c (win32_add_one_solib): If the dll name is
9869 "ntdll.dll", prepend the system directory to the dll path.
9871 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9873 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9875 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9876 Vladimir Prus <vladimir@codesourcery.com>
9878 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9879 * configure.ac: Check for __mcoldfire__ and set
9880 gdb_cv_m68k_is_coldfire.
9881 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9882 reg-cf.o and reg-m68k.o.
9883 * configure: Regenerated.
9885 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9887 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9888 Pass it to thread_db_free.
9889 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9890 proper `detaching' argument to linux_remove_process.
9891 * linux-low.h (thread_db_free): Add `detaching' parameter.
9892 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9894 (thread_db_free): Add `detaching' parameter. Only
9895 call td_ta_clear_event if detaching from process.
9897 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9899 * thread-db.c (thread_db_free): Fix typo.
9901 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9904 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9906 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9908 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9909 with an i686 compiler.
9910 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9912 * configure: Rebuilt.
9914 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9918 * server.c (handle_search_memory_1): Correct read_addr initialization
9919 in loop for searching subsequent chunks.
9921 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9923 * configure.ac: New --with-libthread-db option.
9924 * thread-db.c: Allow direct dependence on libthread_db.
9925 (thread_db_free): Adjust.
9926 * config.in: Regenerate.
9927 * configure: Likewise.
9929 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9932 * thread-db.c (attach_thread): New function.
9933 (maybe_attach_thread): Return success/failure.
9934 (find_new_threads_callback): Adjust.
9935 (thread_db_find_new_threads): Loop until no new threads.
9937 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9939 * proc-service.c (ps_lgetregs): Formatting.
9941 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9943 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9944 * configure.ac: Adjust.
9945 * linux-low.h (struct process_info_private): Move members to struct
9947 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9948 * linux-low.c (linux_remove_process): Adjust.
9949 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9950 * server.c (handle_query): Move code ...
9951 (handle_monitor_command): ... here. New function.
9952 * target.h (struct target_ops): New member.
9953 * thread-db.c (struct thread_db): New.
9954 (libthread_db_search_path): New variable.
9955 (thread_db_create_event, thread_db_enable_reporting)
9956 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9957 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9958 (try_thread_db_load_1, dladdr_to_soname): New functions.
9959 (try_thread_db_load, thread_db_load_search): New functions.
9960 (thread_db_init): Search for libthread_db.
9961 (thread_db_free): New function.
9962 (thread_db_handle_monitor_command): Likewise.
9963 * config.in: Regenerate.
9964 * configure: Regenerate.
9966 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9968 * spu-low.c (spu_kill): Wait for inferior to terminate.
9969 Call clear_inferiors.
9970 (spu_detach): Call clear_inferiors.
9972 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9974 * aclocal.m4: Regenerate.
9975 * config.in: Likewise.
9976 * configure: Likewise.
9978 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9980 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9981 (parse_spufs_run): New function.
9982 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9983 (ppc_breakpoint_at): Handle SPU breakpoints.
9985 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9987 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9988 (SPUFS_MAGIC): Define.
9989 (spu_enumerate_spu_ids): New function.
9990 (linux_qxfer_spu): New function.
9991 (linux_target_ops): Install linux_qxfer_spu.
9993 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9995 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9996 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9997 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9998 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9999 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10000 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10001 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10002 (init_registers_powerpc_cell32l): Add prototype.
10003 (init_registers_powerpc_cell64l): Likewise.
10004 (ppc_arch_setup): Detect Cell/B.E. architecture.
10006 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10008 * Makefile.in (datarootdir): New variable.
10010 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10012 * linux-low.c (linux_write_memory): Update debugging output.
10013 * Makefile.in (clean): Add new descriptions.
10014 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10015 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10016 * configure.srv: Add new files for arm*-*-linux*.
10017 * linux-arm-low.c: Add new declarations.
10018 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10019 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10020 (HWCAP_VFPv3D16): New.
10021 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10022 instead of __IWMMXT__.
10023 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10024 (arm_arch_setup): New.
10025 (target_regsets): Remove #ifdef. Add VFP regset.
10026 (the_low_target): Use arm_arch_setup.
10028 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10030 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10031 the main thread again.
10033 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10035 Adding Neutrino gdbserver.
10036 * configure: Regenerated.
10037 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10038 * configure.srv (i[34567]86-*-nto*): New target.
10039 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10040 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10041 (nto_comctrl) [__QNX__]: New function.
10042 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10044 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10046 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10049 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10050 Pedro Alves <pedro@codesourcery.com>
10052 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10053 don't support CONTEXT_EXTENDED_REGISTERS.
10054 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10055 (the_low_target): Install them.
10056 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10057 failing with ERROR_PIPE_NOT_CONNECTED.
10059 2009-06-30 Doug Evans <dje@google.com>
10060 Pierre Muller <muller@ics.u-strasbg.fr>
10062 Add h/w watchpoint support to x86-linux, win32-i386.
10063 * Makefile.in (SFILES): Add i386-low.c
10064 (i386_low_h): Define.
10065 (i386-low.o): Add dependencies.
10066 (linux-x86-low.o): Add i386-low.h dependency.
10067 (win32-i386-low.o): Ditto.
10068 * i386-low.c: New file.
10069 * i386-low.h: New file.
10070 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10071 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10072 * linux-low.c (linux_add_process): Initialize arch_private.
10073 (linux_remove_process): Free arch_private.
10074 (add_lwp): Initialize arch_private.
10075 (delete_lwp): Free arch_private.
10076 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10078 * linux-low.h (process_info_private): New member arch_private.
10079 (lwp_info): New member arch_private.
10080 (linux_target_ops): New members new_process, new_thread,
10082 (ptid_of): New macro.
10083 * linux-x86-low.c: Include stddef.h, i386-low.h.
10084 (arch_process_info): New struct.
10085 (arch_lwp_info): New struct.
10086 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10087 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10088 (i386_dr_low_get_status): New function.
10089 (x86_insert_point, x86_remove_point): New functions.
10090 (x86_stopped_by_watchpoint): New function.
10091 (x86_stopped_data_address): New function.
10092 (x86_linux_new_process, x86_linux_new_thread): New functions.
10093 (x86_linux_prepare_to_resume): New function.
10094 (the_low_target): Add entries for insert_point, remove_point,
10095 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10097 * server.c (debug_hw_points): New global.
10098 (monitor_show_help): Document set debug-hw-points.
10099 (handle_query): Process "set debug-hw-points".
10100 * server.h (debug_hw_points): Declare.
10101 (paddress): Declare.
10102 * utils.c (NUMCELLS, CELLSIZE): New macros.
10103 (get_sell, xsnprintf, paddress): New functions.
10104 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10105 remove_point, stopped_by_watchpoint, stopped_data_address.
10106 * win32-i386-low.c: Include i386-low.h.
10107 (debug_reg_state): Replaces dr.
10108 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10109 (i386_dr_low_get_status): New function.
10110 (i386_insert_point, i386_remove_point): New functions.
10111 (i386_stopped_by_watchpoint): New function.
10112 (i386_stopped_data_address): New function.
10113 (i386_initial_stuff): Update.
10114 (get_thread_context,set_thread_context,i386_thread_added): Update.
10115 (the_low_target): Add entries for insert_point,
10116 remove_point, stopped_by_watchpoint, stopped_data_address.
10117 * win32-low.c (win32_insert_watchpoint): New function.
10118 (win32_remove_watchpoint): New function.
10119 (win32_stopped_by_watchpoint): New function.
10120 (win32_stopped_data_address): New function.
10121 (win32_target_ops): Add entries for insert_watchpoint,
10122 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10123 * win32-low.h (win32_target_ops): New members insert_point,
10124 remove_point, stopped_by_watchpoint, stopped_data_address.
10126 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10128 * server.c (process_serial_event): Re-return unsupported, not
10129 error, if the type isn't recognized. Re-allow supporting only
10130 insert or remove packets. Also call require_running for
10131 breakpoints. Add missing break statement to default case. Tidy.
10132 * target.h (struct target_ops): Rename insert_watchpoint to
10133 insert_point, and remove_watchpoint to remove_point.
10135 * linux-low.h (struct linux_target_ops): Likewise.
10136 * linux-low.c (linux_insert_watchpoint): Rename to ...
10137 (linux_insert_point): ... this. Adjust.
10138 (linux_remove_watchpoint): Rename to ...
10139 (linux_remove_point): ... this. Adjust.
10140 (linux_target_ops): Adjust.
10141 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10142 (cris_insert_point): ... this.
10143 (cris_remove_watchpoint): Rename to ...
10144 (cris_remove_point): ... this.
10145 (the_low_target): Adjust.
10147 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10149 * server.c (handle_v_kill): Pass signal_pid to
10150 kill_inferior if multi_process is zero.
10152 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10154 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10155 * target.h (target_ops): Comment for *_watchpoint to make it clear
10156 the functions can get types '0' and '1'.
10158 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10160 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10161 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10162 * regcache.c (get_regcache): Likewise.
10163 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10164 * win32-low.c (child_fetch_inferior_registers): Remove check for
10167 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10168 Pedro Alves <pedro@codesourcery.com>
10170 * target.h (struct target_ops) <supports_multi_process>: New
10172 (target_supports_multi_process): New.
10173 * server.c (handle_query): Even if GDB reports support, only
10174 enable multi-process if the target also supports it. Report
10175 multi-process support only if the target backend supports it.
10176 * linux-low.c (linux_supports_multi_process): New function.
10177 (linux_target_ops): Install it as target_supports_multi_process
10180 2009-05-24 Doug Evans <dje@google.com>
10182 Global renaming of find_thread_pid to find_thread_ptid.
10183 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10184 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10185 All callers updated.
10187 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10188 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10191 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10192 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10193 (linux_resume_one_lwp): Ditto.
10195 2009-05-23 Doug Evans <dje@google.com>
10197 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10198 from struct inferior_list_entry * to struct lwp_info *.
10199 All callers updated.
10201 2009-05-13 Doug Evans <dje@google.com>
10203 * linux-x86-low.c: Don't include assert.h.
10204 (x86_siginfo_fixup): Use fatal, not assert.
10205 (x86_arch_setup): Fix comment.
10207 2009-05-12 Doug Evans <dje@google.com>
10209 Biarch support for i386/amd64 gdbserver.
10210 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10211 Add linux-x86-low.c.
10212 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10213 (linux-x86-low.o): Add.
10214 * linux-x86-64-low.c: Delete.
10215 * linux-i386-low.c: Delete.
10216 * linux-x86-low.c: New file.
10217 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10219 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10221 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10222 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10223 (linux_child_pid_to_exec_file): New function.
10224 (elf_64_header_p, elf_64_file_p): New functions.
10225 (siginfo_fixup): New function.
10226 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10227 give target a chance to convert layout.
10228 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10229 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10231 2009-05-07 Doug Evans <dje@google.com>
10233 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10234 (regsets_store_inferior_registers): Ditto.
10236 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10240 * linux-low.c (must_set_ptrace_flags): Delete.
10241 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10243 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10244 `lwp->must_set_ptrace_flags' instead.
10245 (linux_wait_for_event_1): Set ptrace options here.
10246 (linux_wait_1): ... not here.
10248 2009-04-30 Doug Evans <dje@google.com>
10250 * inferiors.c (started_inferior_callback): New function.
10251 (attached_inferior_callback): New function.
10252 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10253 * server.c (print_started_pid, print_attached_pid): New functions.
10254 (detach_or_kill_for_exit): New function.
10255 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10256 * server.h (have_started_inferiors_p): Declare.
10257 (have_attached_inferiors_p): Declare.
10259 * inferiors.c (remove_process): Fix memory leak, free process.
10260 * linux-low.c (linux_remove_process): New function.
10261 (linux_kill): Call it instead of remove_process.
10262 (linux_detach, linux_wait_1): Ditto.
10264 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10266 * configure.srv: Add x86 Windows CE target.
10268 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10270 * inferiors.c (get_thread_process): Make global.
10271 * server.h (get_thread_process): Add prototype.
10272 * thread-db.c (find_one_thread): Use get_thread_process
10273 instead of current_process.
10274 (thread_db_get_tls_address): Do not crash if called when
10275 thread layer is not yet initialized.
10277 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10279 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10280 * spu-low.c (current_tid): Rename to ...
10281 (current_ptid): ... this.
10282 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10283 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10284 ptid_get_lwp (current_ptid) instead of current_tid.
10285 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10286 instead of current_tid. Use find_process_pid to verify pid
10287 argument is valid. Pass proper argument to remove_process.
10288 (spu_thread_alive): Compare current_ptid instead of current_tid.
10289 (spu_resume): Likewise.
10291 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10293 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10296 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10298 Implement the multiprocess extensions, and add linux multiprocess
10301 * server.h (ULONGEST): Declare.
10302 (struct ptid, ptid_t): New.
10303 (minus_one_ptid, null_ptid): Declare.
10304 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10305 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10306 (struct inferior_list_entry): Change `id' type from unsigned from
10308 (struct sym_cache, struct breakpoint, struct
10309 process_info_private): Forward declare.
10310 (struct process_info): Declare.
10311 (current_process): Declare.
10312 (all_processes): Declare.
10313 (initialize_inferiors): Declare.
10314 (add_thread): Adjust to use ptid_t.
10315 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10316 (add_process, remove_process, find_thread_pid): Declare.
10317 (find_inferior_id): Adjust to use ptid_t.
10318 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10319 (multi_process): Declare.
10320 (push_event): Adjust to use ptid_t.
10321 (read_ptid, write_ptid): Declare.
10322 (prepare_resume_reply): Adjust to use ptid_t.
10323 (clear_symbol_cache): Declare.
10324 * inferiors.c (all_processes): New.
10325 (null_ptid, minus_one_ptid): New.
10326 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10327 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10328 (add_thread): Change unsigned long to ptid. Remove gdb_id
10330 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10331 (gdb_id_to_thread): Rename to ...
10332 (find_thread_pid): ... this. Change unsigned long to ptid.
10333 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10334 (loaded_dll, pull_pid_from_list): Adjust.
10335 (add_process, remove_process, find_process_pid)
10336 (get_thread_process, current_process, initialize_inferiors): New.
10337 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10338 (struct target_waitstatus) <related_pid>: Ditto.
10339 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10340 return type to int.
10341 (struct target_ops) <join>: Add `pid' argument.
10342 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10343 (struct target_ops) <wait>: Add `ptid' field. Change return type
10345 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10346 (mywait): Add `ptid' argument. Change return type to ptid_t.
10347 (target_pid_to_str): Declare.
10348 * target.c (set_desired_inferior): Adjust to use ptids.
10349 (mywait): Add new `ptid' argument. Adjust.
10350 (target_pid_to_str): New.
10351 * mem-break.h (free_all_breakpoints): Declare.
10352 * mem-break.c (breakpoints): Delelete.
10353 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10354 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10355 to use per-process breakpoint list.
10356 (free_all_breakpoints): New.
10357 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10358 (symbol_cache, all_symbols_looked_up): Delete.
10360 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10362 (prepare_resume_reply): Change ptid argument's type from unsigned
10363 long to ptid_t. Adjust. Implement W;process and X;process.
10364 (free_sym_cache, clear_symbol_cache): New.
10365 (look_up_one_symbol): Adjust to per-process symbol cache. *
10366 * server.c (cont_thread, general_thread, step_thread): Change type
10368 (attached): Delete.
10369 (multi_process): New.
10370 (last_ptid): Change type to ptid_t.
10371 (struct vstop_notif) <ptid>: Change type to ptid_t.
10372 (queue_stop_reply, push_event): Change `ptid' argument's type to
10374 (discard_queued_stop_replies): Add `pid' argument.
10375 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10376 changes. Don't reference the `attached' global.
10377 (attach_inferior): Adjust to mywait interface changes.
10378 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10379 features. Handle and report "multiprocess+". Handle
10381 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10383 (handle_v_kill): New.
10384 (handle_v_stopped): Adjust to use target_pid_to_str.
10385 (handle_v_requests): Allow multiple attaches and runs when
10386 multiprocess extensions are in effect. Handle "vKill".
10387 (myresume): Adjust to use ptids.
10388 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10389 (handle_status): Adjust to discard_queued_stop_replies interface
10391 (first_thread_of, kill_inferior_callback)
10392 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10393 (main): Call initialize_inferiors. Adjust to use ptids, killing
10394 and detaching from all inferiors. Handle multiprocess packet
10396 * linux-low.h: Include gdb_proc_service.h.
10397 (struct process_info_private): New.
10398 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10399 <lwpid_of>: Use ptid_get_lwp.
10400 (get_lwp_thread): Adjust.
10401 (struct lwp_info): Add `dead' member.
10402 (find_lwp_pid): Declare.
10403 * linux-low.c (thread_db_active): Delete.
10404 (new_inferior): Adjust comment.
10405 (inferior_pid): Delete.
10406 (linux_add_process): New.
10407 (handle_extended_wait): Adjust.
10408 (add_lwp): Change unsigned long to ptid.
10409 (linux_create_inferior): Add process to processes table. Adjust
10410 to use ptids. Don't set new_inferior here.
10411 (linux_attach_lwp): Rename to ...
10412 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10413 it. Adjust to use ptids.
10414 (linux_attach_lwp): New.
10415 (linux_attach): Add process to processes table. Don't set
10417 (struct counter): New.
10418 (second_thread_of_pid_p, last_thread_of_process_p): New.
10419 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10420 multiple processes.
10421 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10422 processes. Remove process from process table.
10423 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10424 to multiple processes.
10425 (any_thread_of): New.
10426 (linux_detach): Add `pid' argument, and handle it. Remove process
10427 from processes table.
10428 (linux_join): Add `pid' argument. Handle it.
10429 (linux_thread_alive): Change unsighed long argument to ptid_t.
10430 Consider dead lwps as not being alive.
10431 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10432 threads we're not interested in.
10433 (same_lwp, find_lwp_pid): New.
10434 (linux_wait_for_lwp): Change `pid' argument's type from int to
10436 (linux_wait_for_event): Rename to ...
10437 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10438 from int to ptid_t. Adjust.
10439 (linux_wait_for_event): New.
10440 (linux_wait_1): Add `ptid' argument. Change return type to
10441 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10442 that exit from the process table.
10443 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10445 (mark_lwp_dead): New.
10446 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10447 stopping all threads, mark its main lwp as dead.
10448 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10450 (fetch_register, usr_store_inferior_registers)
10451 (regsets_fetch_inferior_registers)
10452 (regsets_store_inferior_registers, linux_read_memory)
10453 (linux_write_memory): Inline `inferior_pid'.
10454 (linux_look_up_symbols): Adjust to use per-process
10455 `thread_db_active'.
10456 (linux_request_interrupt): Adjust to use ptids.
10457 (linux_read_auxv): Inline `inferior_pid'.
10458 (initialize_low): Don't reference thread_db_active.
10459 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10460 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10461 (ps_getpid): Return the pid of the current inferior.
10462 * thread-db.c (proc_handle, thread_agent): Delete.
10463 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10465 (find_one_thread): Change argument type to ptid_t. Adjust to
10467 (maybe_attach_thread): Adjust to per-process data and ptids.
10468 (thread_db_find_new_threads): Ditto.
10469 (thread_db_init): Ditto.
10470 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10471 processes table. Adjust to use ptids.
10472 (spu_kill, spu_detach): Adjust interface. Remove process from
10474 (spu_join, spu_thread_alive): Adjust interface.
10475 (spu_wait): Adjust interface. Remove process from processes
10476 table. Adjust to use ptids.
10477 * win32-low.c (current_inferior_tid): Delete.
10478 (current_inferior_ptid): New.
10479 (debug_event_ptid): New.
10480 (thread_rec): Take a ptid. Adjust.
10481 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10482 (child_delete_thread): Ditto.
10483 (do_initial_child_stuff): Add `attached' argument. Add process to
10485 (child_fetch_inferior_registers, child_store_inferior_registers):
10487 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10488 (win32_attach): Pass 1 to do_initial_child_stuff.
10489 (win32_kill): Adjust interface. Remove process from processes
10491 (win32_detach): Ditto.
10492 (win32_join): Adjust interface.
10493 (win32_thread_alive): Take a ptid.
10494 (win32_resume): Adjust to use ptids.
10495 (get_child_debug_event): Ditto.
10496 (win32_wait): Adjust interface. Remove exiting process from
10499 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10501 Non-stop mode support.
10503 * server.h (non_stop): Declare.
10504 (gdb_client_data, handler_func): Declare.
10505 (delete_file_handler, add_file_handler, start_event_loop):
10507 (handle_serial_event, handle_target_event, push_event)
10508 (putpkt_notif): Declare.
10509 * target.h (enum resume_kind): New.
10510 (struct thread_resume): Replace `step' field by `kind' field.
10511 (TARGET_WNOHANG): Define.
10512 (struct target_ops) <wait>: Add `options' argument.
10513 <supports_non_stop, async, start_non_stop>: New fields.
10514 (target_supports_non_stop, target_async): New.
10515 (start_non_stop): Declare.
10516 (mywait): Add `options' argument.
10517 * target.c (mywait): Add `options' argument. Print child exit
10518 notifications here.
10519 (start_non_stop): New.
10520 * server.c (non_stop, own_buf, mem_buf): New globals.
10521 (struct vstop_notif): New.
10522 (notif_queue): New global.
10523 (queue_stop_reply, push_event, discard_queued_stop_replies)
10524 (send_next_stop_reply): New.
10525 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10527 (attach_inferior): In non-stop mode, don't wait for the target
10529 (handle_general_set): Handle QNonStop.
10530 (handle_query): When handling qC, return the current general
10531 thread, instead of the first thread of the list.
10532 (handle_query): If the backend supports non-stop mode, include
10533 QNonStop+ in the qSupported query response.
10534 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10536 (handle_v_attach, handle_v_run): Handle non-stop mode.
10537 (handle_v_stopped): New.
10538 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10539 (myresume): Adjust to use resume_kind. Handle non-stop.
10540 (queue_stop_reply_callback): New.
10541 (handle_status): Handle non-stop mode.
10542 (main): Clear non_stop flag on reconnection. Use the event-loop.
10543 Refactor serial protocol handling from here ...
10544 (process_serial_event): ... to this new function. When GDB
10545 selects any thread, select one here. In non-stop mode, wait until
10546 GDB acks all pending events before exiting.
10547 (handle_serial_event, handle_target_event): New.
10548 * remote-utils.c (remote_open): Install remote_desc in the event
10550 (remote_close): Remove remote_desc from the event loop.
10551 (putpkt_binary): Rename to...
10552 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10553 (putpkt_binary): New as wrapper around putpkt_binary_1.
10554 (putpkt_notif): New.
10555 (prepare_resume_reply): In non-stop mode, don't change the
10557 * event-loop.c: New.
10558 * Makefile.in (OBJ): Add event-loop.o.
10559 (event-loop.o): New rule.
10561 * linux-low.h (pid_of): Moved here.
10563 (get_lwp_thread): Use lwpid_of.
10564 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10565 * linux-low.c (pid_of): Delete.
10566 (inferior_pid): Use lwpid_of.
10567 (linux_event_pipe): New.
10568 (target_is_async_p): New.
10570 (handle_extended_wait): Use lwpid_of.
10571 (add_lwp): Don't set lwpid field.
10572 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10573 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10574 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10575 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10576 first. Adjust to linux_wait_for_event interface changes. Use
10578 (linux_detach): Don't delete the main lwp here.
10579 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10580 (status_pending_p): Don't consider explicitly suspended lwps.
10581 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10582 pointer. Add OPTIONS argument. Change return type to int. Use
10583 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10584 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10585 pointer. Add status pointer argument. Return a pid instead of a
10586 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10587 changes. In non-stop mode, don't switch to a random thread.
10588 (linux_wait): Rename to...
10589 (linux_wait_1): ... this. Add target_options argument, and handle
10590 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10591 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10592 clean exit and signal exit code. Don't stop all threads in
10593 non-stop mode. In all-stop mode, only stop all threads when
10594 reporting a stop to GDB. Handle explicit thread stop requests.
10595 (async_file_flush, async_file_mark): New.
10597 (send_sigstop): Use lwpid_of.
10598 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10599 interface changes. In non-stop mode, don't switch to a random
10601 (linux_resume_one_lwp): Use lwpid_of.
10602 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10603 (linux_resume_one_thread): ... this. Handle resume_stop. In
10604 non-stop mode, don't look for pending flag in all threads.
10605 (resume_status_pending_p): Don't consider explicitly suspended
10607 (my_waitpid): Reimplement. Emulate __WALL.
10608 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10610 (sigchld_handler, linux_supports_non_stop, linux_async)
10611 (linux_start_non_stop): New.
10612 (linux_target_ops): Register linux_supports_non_stop, linux_async
10613 and linux_start_non_stop.
10614 (initialize_low): Install SIGCHLD handler.
10615 * thread-db.c (thread_db_create_event, find_one_thread)
10616 (thread_db_get_tls_address): Use lwpid_of.
10617 * win32-low.c (win32_detach): Adjust to use resume_kind.
10618 (win32_wait): Add `options' argument.
10619 * spu-low.c (spu_resume): Adjust to use resume_kind.
10620 (spu_wait): Add `options' argument.
10622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10624 Decouple target code from remote protocol.
10626 * target.h (enum target_waitkind): New.
10627 (struct target_waitstatus): New.
10628 (struct target_ops) <wait>: Return an unsigned long. Take a
10629 target_waitstatus pointer instead of a char pointer.
10630 (mywait): Likewise.
10631 * target.c (mywait): Change prototype to return an unsigned long.
10632 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10633 * server.h (thread_from_wait, old_thread_from_wait): Delete
10635 (prepare_resume_reply): Change prototype to take a
10637 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10638 (last_status, last_ptid): New.
10639 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10640 pid instead of a signal.
10641 (attach_inferior): Remove "status" and "signal" parameters.
10643 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10645 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10646 (handle_v_requests, myresume): Remove "status" and "signal"
10647 parameters. Adjust.
10648 (handle_status): New.
10649 (main): Delete local `status'. Adjust.
10650 * remote-utils.c: Include target.h.
10651 (prepare_resume_reply): Change prototype to take a
10652 target_waitstatus. Adjust.
10654 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10656 * spu-low.c (spu_wait): Adjust.
10657 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10659 (win32_wait): Adjust.
10661 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10663 * target.h (struct thread_resume): Delete leave_stopped member.
10664 (struct target_ops): Add a `n' argument to the `resume' callback.
10665 * server.c (start_inferior): Adjust.
10666 (handle_v_cont, myresume): Adjust.
10667 * linux-low.c (check_removed_breakpoint): Adjust to resume
10668 interface change, and to removed leave_stopped field.
10669 (resume_ptr): Delete.
10670 (struct thread_resume_array): New.
10671 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10672 resume interface change.
10673 (linux_continue_one_thread, linux_queue_one_thread)
10674 (resume_status_pending_p): Check if the resume field is NULL
10675 instead of checking the leave_stopped member.
10676 (linux_resume): Adjust to the target resume interface change.
10677 * spu-low.c (spu_resume): Adjust to the target resume interface
10679 * win32-low.c (win32_detach, win32_resume): Ditto.
10681 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10683 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10685 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10687 (linux_continue_one_thread): Only preserve the stepping flag if
10688 there's a pending breakpoint.
10690 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10692 * server.c (main): After the inferior having exited, call
10693 remote_close before exiting gdbserver.
10695 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10697 Fix size of FPSCR in Power 7 processors.
10698 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10699 (PPC_FEATURE_HAS_DFP): New #define.
10700 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10703 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10705 * server.c (handle_query) Whitespace and formatting.
10707 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10709 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10710 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10711 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10712 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10713 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10714 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10715 Makefile.in, configure.ac: Fix whitespace throughout.
10716 * configure: Regenerate.
10718 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10720 * inferiors.c (find_inferior): Make it safe for the callback
10721 function to delete the currently iterated inferior.
10723 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10725 * Makefile.in (linuw_low_h): Move higher.
10726 (thread-db.o): Depend on $(linux_low_h).
10728 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10730 Rename "process" to "lwp" throughout.
10732 * linux-low.c (all_processes): Rename to...
10733 (all_lwps): ... this.
10734 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10735 (add_process): Rename to ...
10736 (add_lwp): ... this. Adjust.
10737 (linux_create_inferior): Adjust.
10738 (linux_attach_lwp): Adjust.
10739 (linux_attach): Adjust.
10740 (linux_kill_one_process): Rename to ...
10741 (linux_kill_one_lwp): ... this. Adjust.
10742 (linux_kill): Adjust.
10743 (linux_detach_one_process): Rename to ...
10744 (linux_detach_one_lwp): ... this. Adjust.
10745 (linux_detach): Adjust.
10746 (check_removed_breakpoint): Adjust.
10747 (status_pending_p): Adjust.
10748 (linux_wait_for_process): Rename to ...
10749 (linux_wait_for_lwp): ... this. Adjust.
10750 (linux_wait_for_event): Adjust.
10751 (send_sigstop): Adjust.
10752 (wait_for_sigstop): Adjust.
10753 (stop_all_processes): Rename to ...
10754 (stop_all_lwps): ... this.
10755 (linux_resume_one_process): Rename to ...
10756 (linux_resume_one_lwp): ... this. Adjust.
10757 (linux_set_resume_request, linux_continue_one_thread)
10758 (linux_queue_one_thread, resume_status_pending_p)
10759 (usr_store_inferior_registers, regsets_store_inferior_registers)
10760 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10762 * linux-low.h (get_process): Rename to ...
10763 (get_lwp): ... this. Adjust.
10764 (get_thread_process): Rename to ...
10765 (get_thread_lwp): ... this. Adjust.
10766 (get_process_thread): Rename to ...
10767 (get_lwp_thread): ... this. Adjust.
10768 (struct process_info): Rename to ...
10769 (struct lwp_info): ... this.
10770 (all_processes): Rename to ...
10771 (all_lwps): ... this.
10772 * proc-service.c (ps_lgetregs): Adjust.
10773 * thread-db.c (thread_db_create_event, find_one_thread)
10774 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10776 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10778 * server.c (handle_query): Handle "qAttached".
10780 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10782 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10783 GPLv3, update license URL.
10785 2009-03-01 Doug Evans <dje@google.com>
10787 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10788 (server_h): Add gdb_signals.h.
10789 (signals.o): Update.
10790 * server.h (target_signal_from_host,target_signal_to_host_p)
10791 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10793 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10795 * remote-utils.c (getpkt): Also generate remote-debug
10796 information if noack_mode is set.
10798 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10800 * server.c (handle_query): Report qXfer:siginfo:read and
10801 qXfer:siginfo:write as supported and handle them.
10802 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10803 * linux-low.c (linux_xfer_siginfo): New.
10804 (linux_target_ops): Set it.
10806 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10808 * server.c (gdbserver_usage): Mention --remote-debug.
10809 (main): Accept '--remote-debug' switch.
10811 2009-01-18 Doug Evans <dje@google.com>
10813 * regcache.c (new_register_cache): No need to check result of xcalloc.
10814 * server.c (handle_search_memory): Back out calls to xmalloc,
10815 result is checked and error is returned to user upon failure.
10816 (handle_query): Ditto. Add more checks for result of malloc.
10817 (handle_v_cont): Check result of malloc, report error back to
10819 (handle_v_run): Ditto. Call freeargv.
10820 * server.h (freeargv): Declare.
10821 * utils.c (freeargv): New fn.
10823 2009-01-15 Doug Evans <dje@google.com>
10825 * gdbreplay.c (perror_with_name): Make arg const char *.
10826 * server.h (target_signal_to_name): Make return type const char *.
10827 * thread-db.c (thread_db_err_str): Make return type const char *.
10828 * utils.c (perror_with_name): Make arg const char *.
10830 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10832 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10833 when handling a EXIT_PROCESS_DEBUG_EVENT.
10835 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10837 * gdbreplay.c (gdbreplay_version): Update copyright year.
10838 * server.c (gdbserver_version): Likewise.
10840 2009-01-05 Doug Evans <dje@google.com>
10842 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10843 (handle_extended_wait): Improve comment.
10845 2008-12-13 Doug Evans <dje@google.com>
10847 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10848 * server.h (ATTR_MALLOC): New macro.
10849 (xmalloc,xcalloc,xstrdup): Declare.
10850 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10851 * inferiors.c: Ditto.
10852 * linux-low.c: Ditto.
10853 * mem-break.c: Ditto.
10854 * regcache.c: Ditto.
10855 * remote-utils.c: Ditto.
10858 * win32-low.c: Ditto.
10860 2008-12-12 Doug Evans <dje@google.com>
10862 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10863 in debugging printf.
10865 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10867 2008-12-09 Doug Evans <dje@google.com>
10869 * linux-low.h (struct process_info): Delete member tid, unused.
10870 * thread-db.c (find_one_thread): Update.
10871 (maybe_attach_thread): Update.
10873 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10875 * target.h (struct target_ops): Add qxfer_osdata member.
10876 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10878 (linux_qxfer_osdata): New functions.
10879 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10881 * server.c (handle_query): Handle "qXfer:osdata:read:".
10882 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10883 (buffer_xml_printf): New functions.
10884 * server.h (struct buffer): New.
10885 (buffer_grow_str, buffer_grow_str0): New macros.
10886 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10887 (buffer_xml_printf): Declare.
10889 2008-11-24 Doug Evans <dje@google.com>
10891 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10893 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10895 * server.c (handle_v_run): Always use the supplied argument list.
10897 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10899 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10900 (xtensa_regmap_table): Add entry for scompare1.
10902 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10904 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10905 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10906 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10907 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10908 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10909 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10910 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10911 XML target descriptions.
10912 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10913 when inferior is running on an ISA 2.05 or later processor. Add
10914 special case to return offset for full 64-bit slot of FPSCR when
10917 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10919 * Makefile.in (SFILES, clean): Added sparc64 files.
10920 (reg-sparc64.o, reg-sparc64.c): New.
10921 * configure.srv (sparc*-*-linux*): New configuration.
10922 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10923 syscall arguments for SPARC.
10924 (regsets_store_inferior_registers): Likewise.
10925 * linux-sparc-low.c: New file.
10927 2008-10-21 Doug Evans <dje@google.com>
10929 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10930 (READLINE_DIR,READLINE_DEP): Delete.
10931 (INTERNAL_CFLAGS): Update.
10932 (LINTFLAGS): Update.
10934 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10936 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10937 whole argv from the last run, not just argv[0].
10939 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10941 * regcache.c (new_register_cache): Return NULL if the register
10942 cache size isn't known yet.
10943 (free_register_cache): Avoid dereferencing a NULL regcache.
10945 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10947 * configure.srv: Merge MIPS and MIPS64.
10949 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10951 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10953 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10955 * Makefile.in: Add required vsx dependencies.
10957 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10958 Declare init_registers_powerpc_vsx32l.
10959 Declare init_registers_powerpc_vsx64l.
10960 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10961 (ppc_arch_setup): Check for VSX in hwcap.
10962 (ppc_fill_vsxregset): New function.
10963 (ppc_store_vsxregset): New function.
10964 Add new VSX entry in regset_info target_regsets.
10966 * configure.srv: Add new VSX dependencies.
10968 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10970 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10971 (remote_open): Set or clear transport_is_reliable.
10972 (putpkt_binary): Don't expect acks in noack mode.
10973 (getpkt): Don't send ack/nac in noack mode.
10974 * server.c (handle_general_set): Handle QStartNoAckMode.
10975 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10977 (main): Reset noack_mode on every connection.
10978 * server.h (noack_mode): Declare.
10980 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10982 * Makefile.in (GDBREPLAY_OBS): New variable.
10983 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10985 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10986 Daniel Jacobowitz <dan@codesourcery.com>
10988 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10989 (usr_store_inferior_registers): Likewise.
10990 (regsets_store_inferior_registers): Likewise.
10992 2008-07-31 Rolf Jansen <rj@surtec.com>
10993 Pedro Alves <pedro@codesourcery.com>
10995 * configure.ac: Check for memmem declaration.
10996 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10997 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10998 (disable_packet_qfThreadInfo): Unconditionally compile.
10999 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11000 * configure, config.in: Regenerate.
11002 2008-07-28 Doug Kwan <dougkwan@google.com>
11004 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11005 (linux_write_memory): Remove declaration of errno.
11007 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11009 * linux-low.c (handle_extended_wait): Do not use "status"
11010 variable uninitialized.
11012 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11014 * server.c (handle_v_attach): Inhibit reporting dll changes.
11016 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11018 * remote-utils.c (prepare_resume_reply): If requested, don't
11019 output "thread:TID" in the T stop reply.
11021 * server.c (disable_packet_vCont, disable_packet_Tthread)
11022 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11023 (handle_query): If requested, disable support for qC, qfThreadInfo
11025 (handle_v_requests): If requested, disable support for vCont.
11026 (gdbserver_show_disableable): New.
11027 (main): Handle --disable-packet and --disable-packet=LIST.
11029 * server.h (disable_packet_vCont, disable_packet_Tthread)
11030 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11032 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11034 * server.c (gdbserver_usage): Mention --version.
11036 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11038 * Makefile.in (gdbreplay.o): New rule.
11040 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11042 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11043 message, not gdbserver.
11045 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11046 Nathan Sidwell <nathan@codesourcery.com>
11047 Joseph Myers <joseph@codesourcery.com>
11049 * acinclude.m4: Include ../../config/acx.m4.
11050 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11051 * configure, config.in: Regenerate.
11052 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11053 * server.c (gdbserver_version): Print PKGVERSION.
11054 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11055 (main): Adjust gdbserver_usage calls.
11056 * gdbreplay.c (version, host_name): Add declarations.
11057 (gdbreplay_version, gdbreplay_usage): New.
11058 (main): Accept --version and --help options.
11060 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11062 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11063 (arm_breakpoint_at): Handle Thumb.
11064 (the_low_target): Add comment.
11066 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11068 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11070 2008-05-09 Doug Evans <dje@google.com>
11072 * server.h (decode_search_memory_packet): Declare.
11073 * remote-utils.c (decode_search_memory_packet): New fn.
11074 * server.c (handle_search_memory_1): New fn.
11075 (handle_search_memory): New fn.
11076 (handle_query): Process qSearch:memory packets.
11078 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11080 * regcache.c (registers_length): Remove.
11081 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11082 full register packet.
11083 * regcache.h (registers_length): Remove prototype.
11084 * server.h (PBUFSIZ): Define to 16384.
11086 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11088 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11089 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11090 powerpc-64l.o, and powerpc-altivec64l.o.
11091 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11092 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11093 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11094 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11095 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11098 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11099 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11100 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11101 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11102 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11103 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11104 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11105 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11106 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11107 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11110 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11111 (init_registers_powerpc_32l): ... this new prototype.
11112 (init_registers_powerpc_32): Remove, replace by ...
11113 (init_registers_powerpc_altivec32l): ... this new prototype.
11114 (init_registers_powerpc_e500): Remove, replace by ...
11115 (init_registers_powerpc_e500l): ... this new prototype.
11116 (init_registers_ppc64): Remove, replace by ...
11117 (init_registers_powerpc_64l): ... this new prototype.
11118 (init_registers_powerpc_64): Remove, replace by ...
11119 (init_registers_powerpc_altivec64l): ... this new prototype.
11120 (ppc_num_regs): Set to 73.
11121 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11122 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11123 (ppc_cannot_store_register): Handle orig_r3 and trap.
11124 (ppc_arch_setup): Update init_registers_... calls.
11125 (ppc_fill_gregset): Handle orig_r3 and trap.
11127 * inferiors.c (clear_inferiors): Reset current_inferior.
11129 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11131 * acinclude.m4: Add override.m4.
11132 * configure: Regenerate.
11134 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11136 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11137 initial call to init_register_ppc64.
11139 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11141 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11142 single powerpc*-*-linux* case.
11143 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11145 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11147 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11148 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11150 * linux-ppc-low.c: Include <elf.h>.
11151 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11152 (ppc_hwcap): New global variable.
11153 (ppc_regmap): Remove __SPE__ #ifdef sections.
11154 (ppc_regmap_e500): New global variable.
11155 (ppc_cannot_store_register): Update __SPE__ special case.
11156 (ppc_get_hwcap): New function.
11157 (ppc_arch_setup): Use it to determine whether inferior supports
11158 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11159 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11160 Do not access registers if target does not support AltiVec.
11161 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11162 Do not access registers if target does not support SPE.
11163 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11165 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11167 * linux-low.c (disabled_regsets, num_regsets): New.
11168 (use_regsets_p): Delete.
11169 (linux_wait_for_process): Clear disabled_regsets.
11170 (regsets_fetch_inferior_registers): Check and set it.
11171 (regsets_store_inferior_registers): Likewise.
11172 (linux_fetch_registers, linux_store_registers): Do not use
11174 (initialize_low): Allocate disabled_regsets.
11176 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11178 * Makefile.in (LIBOBJS): New.
11179 (OBS): Use LIBOBJS.
11180 (memmem.o): New rule.
11181 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11182 * configure: Regenerated.
11184 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11186 * server.c (handle_query): Never return "unsupported" for
11187 qXfer:features:read queries.
11189 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11191 * server.c (get_features_xml): Fix inverted condition.
11192 (handle_query): Always support qXfer:feature:read.
11194 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11196 * server.c (wrapper_argv): New.
11197 (start_inferior): Handle wrapper_argv. If set, expect an extra
11199 (gdbserver_usage): Document --wrapper.
11200 (main): Parse --wrapper.
11202 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11204 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11205 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11206 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11207 (ppc_set_pc): Likewise.
11208 (ppc_arch_setup): New function.
11209 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11210 of collect_register.
11211 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11213 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11215 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11216 instead of linux-ppc64-low.o.
11217 * linux-ppc64-low.c: Remove file.
11218 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11219 (linux-ppc64-low.o): Remove rule.
11221 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11222 (init_registers_powerpc_64): Likewise.
11223 (ppc_regmap): Conditionally define depending on __powerpc64__.
11224 (ppc_cannot_store_register): Do not special-case "fpscr" when
11225 compiled on __powerpc64__.
11226 (ppc_collect_ptrace_register): New function.
11227 (ppc_supply_ptrace_register): New function.
11228 (ppc_breakpoint): Change type to "unsigned int".
11229 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11230 (the_low_target): Conditionally provide initializers for the
11231 arch_setup member depending on __powerpc64__. Install
11232 collect_ptrace_register and supply_ptrace_register members.
11234 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11236 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11237 * server.c (gdbserver_xmltarget): Define.
11238 (get_features_xml): Use it to replace "target.xml" and arch_string.
11240 * configure.srv: Remove srv_xmltarget. Add XML files that were
11241 mentioned there to srv_xmlfiles instead. Remove conditional tests
11242 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11243 srv_xmlfiles and srv_regobj to include all possible choices.
11244 * configure.ac (srv_xmltarget): Remove.
11245 (srv_xmlfiles): Do not add "target.xml".
11246 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11247 checks for supplementary target information.
11248 * configure: Regenerate.
11249 * Makefile.in (XML_TARGET): Remove.
11250 (target.xml): Remove rule.
11251 (clean): Do not clean up target.xml.
11252 (.PRECIOUS): Do not mention target.xml.
11254 * target.h (struct target_ops): Remove arch_string member.
11255 * linux-low.c (linux_arch_string): Remove.
11256 (linux_target_ops): Remove arch_string initializer.
11257 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11258 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11259 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11260 * spu-low.c (spu_arch_string): Remove.
11261 (spu_target_ops): Remove arch_string initializer.
11262 * win32-low.c (win32_arch_string): Remove.
11263 (win32_target_ops): Remove arch_string initializer.
11264 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11265 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11266 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11268 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11270 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11271 by collect_ptrace_register and supply_ptrace_register hooks.
11272 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11273 instead of checking for the_low_target.left_pad_xfer.
11274 (usr_store_inferior_registers): Use collect_ptrace_register callback
11275 instead of checking for the_low_target.left_pad_xfer.
11277 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11278 (s390_supply_ptrace_register): Likewise.
11279 (s390_fill_gregset): Call s390_collect_ptrace_register.
11280 (the_low_target): Update.
11282 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11283 (ppc_supply_ptrace_register): Likewise.
11284 (the_low_target): Update.
11286 * linux-i386-low.c (the_low_target): Update.
11287 * linux-x86-64-low.c (the_low_target): Update.
11289 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11291 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11292 reg-s390.o and reg-s390x.o.
11294 * linux-low.c (new_inferior): New global variable.
11295 (linux_create_inferior, linux_attach): Set it.
11296 (linux_wait_for_process): Call the_low_target.arch_setup after the
11297 target has stopped for the first time.
11298 (initialize_low): Do not call the_low_target.arch_setup.
11300 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11301 (s390_set_pc): Likewise.
11302 (s390_arch_setup): New function.
11303 (the_low_target): Use s390_arch_setup as arch_setup routine.
11305 * regcache.c (realloc_register_cache): New function.
11306 (set_register_cache): Call it for each existing regcache.
11308 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11310 * server.h (init_registers): Remove prototype.
11312 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11313 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11314 instead of init_registers ().
11315 * linux-arm-low.c (init_registers_arm): Add prototype.
11316 (init_registers_arm_with_iwmmxt): Likewise.
11317 (the_low_target): Add initializer for arch_setup field.
11318 * linux-cris-low.c (init_registers_cris): Add prototype.
11319 (the_low_target): Add initializer for arch_setup field.
11320 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11321 (the_low_target): Add initializer for arch_setup field.
11322 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11323 (the_low_target): Add initializer for arch_setup field.
11324 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11325 (the_low_target): Add initializer for arch_setup field.
11326 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11327 (the_low_target): Add initializer for arch_setup field.
11328 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11329 (the_low_target): Add initializer for arch_setup field.
11330 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11331 (init_registers_mips64_linux): Likewise.
11332 (the_low_target): Add initializer for arch_setup field.
11333 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11334 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11335 (the_low_target): Add initializer for arch_setup field.
11336 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11337 (init_registers_powerpc_64): Likewise.
11338 (the_low_target): Add initializer for arch_setup field.
11339 * linux-s390-low.c (init_registers_s390): Add prototype.
11340 (init_registers_s390x): Likewise.
11341 (the_low_target): Add initializer for arch_setup field.
11342 * linux-sh-low.c (init_registers_sh): Add prototype.
11343 (the_low_target): Add initializer for arch_setup field.
11344 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11345 (the_low_target): Add initializer for arch_setup field.
11346 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11347 (the_low_target): Add initializer for arch_setup field.
11349 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11350 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11351 instead of init_registers ().
11352 * win32-arm-low.c (init_registers_arm): Add prototype.
11353 (the_low_target): Add initializer for arch_setup field.
11354 * win32-i386-low.c (init_registers_i386): Add prototype.
11355 (the_low_target): Add initializer for arch_setup field.
11357 * spu-low.c (init_registers_spu): Add prototype.
11358 (initialize_low): Call initialie_registers_spu () instead of
11359 initialize_registers ().
11361 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11363 * server.c (handle_v_requests): When handling the vRun and vAttach
11364 packets, if already debugging a process, don't kill it. Return an
11367 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11369 * server.c (handle_query): Correct length check.
11371 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11373 * win32-low.c (do_initial_child_stuff): Add process handle
11374 parameter. Set current_process_handle and current_process_id from the
11375 parameters. Clear globals.
11376 (win32_create_inferior): Don't set current_process_handle and
11377 current_process_id here. Instead pass them on the call to
11378 do_initial_child_stuff.
11379 (win32_attach): Likewise.
11380 (win32_clear_inferiors): New.
11381 (win32_kill): Don't close the current process handle or the
11382 current thread handle here. Instead call win32_clear_inferiors.
11383 (win32_detach): Don't open a new handle to the process. Call
11384 win32_clear_inferiors.
11385 (win32_join): Don't rely on current_process_handle; open a new
11386 handle using the process id.
11387 (win32_wait): Call win32_clear_inferiors when the inferior process
11390 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11392 * server.c (monitor_show_help): Add "exit".
11394 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11396 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11397 (clean): Add reg-xtensa.c.
11398 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11399 * configure.srv (xtensa*-*-linux*) New target.
11400 * linux-xtensa-low.c: New.
11401 * xtensa-xtregs.c: New.
11403 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11405 * hostio.c: Don't include errno.h.
11406 (errno_to_fileio_errno): Move to hostio-errno.
11407 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11408 error number outputting to the target->hostio_last_error callback.
11409 (hostio_packet_error): Use FILEIO_EINVAL directly.
11410 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11411 calls to hostio_error.
11412 * hostio-errno.c: New.
11413 * server.h (hostio_last_error_from_errno): Declare.
11414 * target.h (target_ops): Add hostio_last_error member.
11415 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11416 as hostio_last_error handler.
11417 * spu-low.c (spu_target_ops): Likewise.
11418 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11419 (wince_hostio_last_error): New functions.
11420 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11421 as hostio_last_error handler.
11422 (win32_target_ops) [!_WIN32_WCE]: Register
11423 hostio_last_error_from_errno as hostio_last_error handler.
11424 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11425 (hostio-errno.o): New rule.
11426 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11427 * configure.srv (srv_hostio_err_objs): New variable. Default to
11429 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11430 * configure: Regenerate.
11432 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11434 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11435 (linux_kill, linux_detach): Clean up the process list.
11436 * remote-utils.c (remote_open): Improve port number parsing.
11437 (putpkt_binary, input_interrupt): Only send interrupts if the target
11439 * server.c (extended_protocol): Make static.
11440 (attached): Define earlier.
11441 (exit_requested, response_needed, program_argv): New variables.
11442 (target_running): New.
11443 (start_inferior): Clear attached here.
11444 (attach_inferior): Set attached here.
11445 (require_running): Define.
11446 (handle_query): Use require_running and target_running. Implement
11448 (handle_v_attach, handle_v_run): New.
11449 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11450 (gdbserver_usage): Update.
11451 (main): Redo argument parsing. Handle --debug and --multi. Handle
11452 --attach along with other options or after the port. Save
11453 program_argv. Support no initial program. Resynchronize
11454 communication with GDB after an error. Handle "monitor exit".
11455 Use require_running and target_running. Always allow the extended
11456 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11457 restart in extended mode.
11458 * README: Refer to the GDB manual. Update --attach usage.
11460 2007-12-20 Andreas Schwab <schwab@suse.de>
11462 * linux-low.c (STACK_SIZE): Define.
11463 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11464 (linux_test_for_tracefork): Likewise.
11466 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11468 * linux-low.c (linux_wait_for_event): Update messages. Do not
11469 reinsert auto-delete breakpoints.
11470 * mem-break.c (struct breakpoint): Change return type of handler to
11472 (set_breakpoint_at): Update handler type.
11473 (reinsert_breakpoint_handler): Return 1 instead of calling
11475 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11477 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11478 * mem-break.h (set_breakpoint_at): Update handler type.
11479 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11480 * win32-low.c (auto_delete_breakpoint): New.
11481 (get_child_debug_event): Use it.
11483 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11485 * configure.ac: Check for pread and pwrite.
11486 * hostio.c (handle_pread): Fall back to lseek and read.
11487 (handle_pwrite): Fall back to lseek and write.
11488 * config.in, configure: Regenerated.
11490 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11492 * server.c (myresume): Add own_buf argument.
11493 (main): Update calls.
11495 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11497 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11498 * remote-utils.c (remote_open): Do not call disable_async_io.
11499 (block_async_io): Delete.
11500 (unblock_async_io): Make static.
11501 (initialize_async_io): New.
11502 * server.c (handle_v_cont): Handle async I/O here.
11503 (myresume): Likewise. Move other common resume tasks here...
11504 (main): ... from here. Call initialize_async_io. Disable async
11505 I/O before the main loop.
11506 * server.h (initialize_async_io): Declare.
11507 (block_async_io, unblock_async_io): Delete prototypes.
11508 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11510 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11512 * remote-utils.c (readchar): Allow binary data in received messages.
11514 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11516 * win32-low.c (attaching): New global.
11517 (win32_create_inferior): Clear the `attaching' global.
11518 (win32_attach): Set the `attaching' global.
11519 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11520 attaching. Only set a breakpoint at the entry point if not
11523 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11525 * server.c (main): Don't report dll events on the initial
11526 connection on attaches.
11528 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11530 * server.c (main): Relax numerical bases supported for the pid of
11531 the --attach command line argument.
11533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11535 * win32-low.c (win32_attach): Call OpenProcess before
11536 DebugActiveProcess, not after. Add last error output to error
11539 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11541 * win32-low.c (win32_get_thread_context)
11542 (win32_set_thread_context): New functions.
11543 (thread_rec): Use win32_get_thread_context.
11544 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11545 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11548 2007-12-03 Leo Zayas
11549 Pedro Alves <pedro_alves@portugalmail.pt>
11551 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11553 (child_add_thread): Minor cleanup.
11554 (child_continue): Resume artificially suspended threads before
11555 calling ContinueDebugEvent.
11556 (suspend_one_thread): New.
11557 (fake_breakpoint_event): New.
11558 (get_child_debug_event): Change return type to int. Check here if
11559 gdb sent an interrupt request. If a soft interrupt was requested,
11560 fake a breakpoint event. Return 0 if there is no event to handle,
11562 (win32_wait): Don't check here if gdb sent an interrupt request.
11563 Ensure there is a valid event to handle.
11564 (win32_request_interrupt): Add soft interruption method as last
11567 2007-12-03 Leo Zayas
11568 Pedro Alves <pedro_alves@portugalmail.pt>
11570 * win32-low.h (win32_thread_info): Add descriptions to the
11571 structure members. Replace `suspend_count' counter by a
11573 * win32-low.c (thread_rec): Update condition of when to get the
11574 context from the inferior. Rely on ContextFlags being set if it
11575 has already been retrieved. Only suspend the inferior thread if
11576 we haven't already. Warn if that fails.
11577 (continue_one_thread): s/suspend_count/suspended/. Only call
11578 ResumeThread once. Warn if that fails.
11580 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11582 * win32-low.c (win32_wait): Don't read from the inferior when it
11583 has already exited.
11585 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11587 * Makefile.in (win32_low_h): New variable.
11588 (win32-low.o): Add dependency on $(win32_low_h).
11589 (win32-arm-low.o, win32-i386-low.o): New rules.
11591 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11593 * hostio.c: Correct copyright year.
11595 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11597 * Makefile.in (OBS): Add hostio.o.
11598 (hostio.o): New rule.
11599 * server.h (handle_vFile): Declare.
11600 * hostio.c: New file.
11601 * server.c (handle_v_requests): Take packet_len and new_packet_len
11602 for binary packets. Call handle_vFile.
11603 (main): Update call to handle_v_requests.
11605 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11607 * linux-low.c: Include <sched.h>.
11609 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11611 * linux-low.c (linux_tracefork_grandchild): New.
11612 (linux_tracefork_child): Use clone.
11613 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11615 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11617 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11619 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11621 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11623 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11625 * inferiors.c (change_inferior_id): Delete.
11626 (add_pid_to_list, pull_pid_from_list): New.
11627 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11628 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11629 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11630 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11631 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11632 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11633 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11634 (using_threads): Always set to 1.
11635 (handle_extended_wait): New.
11636 (add_process): Do not set TID.
11637 (linux_create_inferior): Set must_set_ptrace_flags.
11638 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11639 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11640 (linux_thread_alive): Rename TID argument to LWPID.
11641 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11642 (linux_wait_for_event): Do not use TID or check using_threads. Update
11643 call to dead_thread_notify. Call handle_extended_wait.
11644 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11645 (send_sigstop): Delete sigstop_sent.
11646 (wait_for_sigstop): Avoid TID.
11647 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11648 (linux_test_for_tracefork): New.
11649 (linux_lookup_signals): Use thread_db_active and
11650 linux_supports_tracefork_flag.
11651 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11652 * linux-low.h (get_process_thread): Avoid TID.
11653 (struct process_ifo): Move thread_known and tid to the end. Remove
11655 (linux_attach_lwp, thread_db_init): Update prototypes.
11656 * server.h (change_inferior_id): Delete prototype.
11657 (add_pid_to_list, pull_pid_from_list): New prototypes.
11658 * thread-db.c (thread_db_use_events): New.
11659 (find_first_thread): Rename to...
11660 (find_one_thread): ...this. Update callers and messages. Do not
11661 call fatal. Check thread_db_use_events. Do not call
11662 change_inferior_id or new_thread_notify.
11663 (maybe_attach_thread): Update. Do not call new_thread_notify.
11664 (thread_db_init): Set thread_db_use_events. Check use_events.
11665 * utils.c (fatal, warning): Correct message prefix.
11667 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11669 * Makefile.in (clean): Remove new files.
11670 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11671 (powerpc-64.o, powerpc-64.c): New rules.
11672 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11673 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11675 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11677 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11678 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11679 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11680 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11681 (target_regsets): Add AltiVec and SPE register sets.
11682 * configure.ac: Check for AltiVec and SPE.
11683 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11684 (ppc_fill_vrregset, ppc_store_vrregset): New.
11685 (target_regsets): Add AltiVec register set.
11686 * configure: Regenerated.
11688 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11690 * linux-low.c (O_LARGEFILE): Define.
11691 (linux_read_memory): Use /proc/PID/mem.
11692 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11693 * configure, config.in: Regenerated.
11695 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11697 * linux-low.c (linux_wait_for_event): Do not pass signals while
11700 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11702 * win32-low.c (create_process): New.
11703 (win32_create_inferior): Use create_process instead of
11704 CreateProcess. If create_process failed retry appending an ".exe"
11705 suffix. Store the GetLastError result immediatelly after
11706 create_process calls and use it on the call to error.
11708 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11710 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11712 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11714 * configure.ac: Switch license to GPLv3.
11716 2007-08-01 Michael Snyder <msnyder@access-company.com>
11718 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11720 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11722 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11724 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11725 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11726 CloseToolhelp32Snapshot.
11727 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11728 CloseToolhelp32Snapshot.
11730 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11732 * server.c (main): Check for inferior exit before main loop.
11734 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11736 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11737 instead of on tmp_desc.
11739 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11740 Daniel Jacobowitz <dan@codesourcery.com>
11742 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11743 (add_thread): Minor cleanups.
11744 (clear_inferiors): Move lower in the file. Clear the DLL
11746 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11747 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11748 (xml_escape_text): New.
11749 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11751 (handle_v_cont): Report errors.
11752 (gdbserver_version): Update.
11753 (main): Correct size of own_buf. Do not report initial DLL events.
11754 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11755 (unloaded_dll, xml_escape_text): New.
11756 * win32-low.c (enum target_waitkind): Update comments.
11757 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11758 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11759 (win32_EnumProcessModules, win32_GetModuleInformation)
11760 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11761 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11762 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11763 (win32_Module32First, win32_Module32Next, load_toolhelp)
11764 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11765 (get_child_debug_event): Handle DLL events.
11766 (win32_wait): Likewise.
11768 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11770 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11771 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11773 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11775 * win32-low.c (handle_output_debug_string): Ignore event if not
11778 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11780 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11782 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11784 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11786 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11788 * inferiors.c (change_inferior_id): Add comment.
11789 * linux-low.c (check_removed_breakpoint): Add an early
11790 prototype. Improve debug output.
11791 (linux_attach): Doc update.
11792 (linux_detach_one_process, linux_detach): Clean up before releasing
11794 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11795 * linux-low.h (struct process_info): Doc improvement.
11796 * mem-break.c (delete_all_breakpoints): New.
11797 * mem-break.h (delete_all_breakpoints): New prototype.
11798 * thread-db.c (find_first_thread): New.
11799 (thread_db_create_event): Call it instead of
11800 thread_db_find_new_threads. Clean up unused variables.
11801 (maybe_attach_thread): Remove first thread handling.
11802 (thread_db_find_new_threads): Use find_first_thread.
11803 (thread_db_get_tls_address): Likewise.
11805 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11807 * thread-db.c (thread_db_find_new_threads): Add prototype.
11808 (thread_db_create_event): Check for the main thread before adding
11810 (maybe_attach_thread): Only enable event reporting if TID == 0.
11811 (thread_db_get_tls_address): Check for new threads.
11813 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11815 * linux-low.c (linux_create_inferior): Try execv before execvp.
11816 * spu-low.c (spu_create_inferior): Likewise.
11818 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11820 * linux-low.c (linux_create_inferior): Change execv to execvp.
11821 * spu-low.c (spu_create_inferior): Likewies.
11823 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11825 * Makefile.in (clean): Clean new files instead of deleted ones.
11826 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11827 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11829 * configure.srv: Specify XML files and new regformats for MIPS and
11831 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11832 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11833 an entry for the restart register.
11834 (mips_cannot_fetch_register, mips_cannot_store_register)
11835 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11836 register names to match the XML descriptions.
11837 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11838 restart register instead of $0.
11840 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11841 Markus Deuling <deuling@de.ibm.com>
11843 * remote-utils.c (decode_xfer_write): New function.
11844 * server.h (decode_xfer_write): Add prototype.
11845 * server.c (handle_query): Add PACKET_LEN argument. Support
11846 qXfer:spu:read and qXfer:spu:write packets.
11847 (main): Pass packet_len to handle_query.
11848 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11849 * target.h (target_ops): Add qxfer_spu.
11851 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11853 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11854 accessing non-seekable spufs files.
11856 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11858 * server.c (handle_query): Add reply for qC packet.
11860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11861 Leo Zayas <lerele@champenstudios@com>
11863 * server.h (check_remote_input_interrupt_request): New function.
11864 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11865 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11866 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11867 (check_remote_input_interrupt_request): New function.
11868 * server.h (check_remote_input_interrupt_request): Declare.
11869 * win32-low.c (winapi_DebugBreakProcess,
11870 winapi_GenerateConsoleCtrlEvent): New typedefs.
11871 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11873 (win32_wait): Check for remote interrupt request
11874 with check_remote_input_interrupt_request.
11875 (win32_request_interrupt): New function.
11876 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11878 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11880 * win32-low.c (debug_registers_changed,
11881 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11882 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11883 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11884 (thread_rec): Get context using the low target.
11885 (child_add_thread): Call thread_added on the low target,
11886 which does the same thing.
11888 (do_initial_child_stuff): Remove debug registers references.
11889 Set context using the low target. Resume threads after
11890 setting the contexts.
11891 (child_continue): Remove dead variable. Remove debug
11892 registers references.
11893 (child_fetch_inferior_registers): Go through the low target.
11894 (do_child_store_inferior_registers): Remove.
11895 (child_store_inferior_registers): Go through the low target.
11896 (win32_resume): Remove debug registers references.
11897 Set context using the low target.
11898 (handle_exception): Change return type to void. Don't record
11899 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11900 first chance exception.
11901 (get_child_debug_event): Change return type to void. Remove
11902 goto loop. Always return after waiting for debug event.
11903 (win32_wait): Convert to switch statement. Handle spurious
11906 * win32-i386-low.c (debug_registers_changed,
11907 debug_registers_used): New.
11908 (initial_stuff): Rename to ...
11909 (i386_initial_stuff): ... this. Clear debug registers
11911 (store_debug_registers): Delete.
11912 (i386_get_thread_context): New.
11913 (load_debug_registers): Delete.
11914 (i386_set_thread_context): New.
11915 (i386_thread_added): New.
11916 (single_step): Rename to ...
11917 (i386_single_step): ... this.
11918 (do_fetch_inferior_registers): Rename to ...
11919 (i386_fetch_inferior_register): ... this.
11920 (i386_store_inferior_register): New.
11921 (the_low_target): Adapt to new interface.
11923 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11924 (arm_get_thread_context): New.
11925 (arm_set_thread_context): New.
11927 (do_fetch_inferior_registers): Rename to ...
11928 (arm_fetch_inferior_register): ... this.
11929 (arm_store_inferior_register): New.
11930 (arm_wince_breakpoint): Reimplement as unsigned long.
11931 (arm_wince_breakpoint_len): Define.
11932 (the_low_target): Adapt to new interface.
11934 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11935 load_debug_registers. Add get_thread_context, set_thread_context,
11936 thread_added and store_inferior_register. Rename
11937 fetch_inferior_registers to fetch_inferior_register.
11938 (regptr): Remove declaration.
11940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11942 * linux-low.c (linux_detach): Change return type to int. Return 0.
11943 * spu-low.c (spu_detach): Likewise.
11945 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11947 * target.h (target_ops): Change return type of detach to int.
11949 (join_inferior): New.
11950 * server.c (main): Don't skip detach support on mingw32.
11951 If the inferior doesn't support detaching return error.
11952 Call join_inferior instead of using waitpid.
11953 * linux-low.c (linux_join): New.
11954 (linux_target_op): Add linux_join.
11955 * spu-low.c (spu_join): New.
11956 (spu_target_ops): Add spu_join.
11957 * win32-low.c (win32_detach): Adapt to new interface.
11958 Reopen current_process_handle before detaching. Issue a child
11959 resume before detaching.
11961 (win32_target_op): Add win32_join.
11963 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11965 * win32-low.c (win32-attach): Fix return value.
11966 * target.h (target_ops): Describe ATTACH return values.
11968 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11970 * win32-low.c (GETPROCADDRESS): Define.
11971 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11972 (winapi_DebugSetProcessKillOnExit): Likewise.
11973 (win32_create_inferior): Force usage of ansi CreateProcessA.
11974 (win32_attach): Use GETPROCADDRESS.
11975 (win32_detach): Likewise.
11977 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11979 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11981 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11983 * win32-low.c: Commit leftover changes from 2007-03-29.
11985 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11987 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11988 fields short instead of int. Add explicit padding.
11989 (i387_cache_to_fsave): Remove unnecessary casts.
11990 (i387_fsave_to_cache): Doc fix.
11991 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11993 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11995 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11996 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11998 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12000 * configure.srv (arm*-*-mingw32ce*): Move near the other
12003 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12005 * configure.ac: Add errno checking.
12006 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12007 sys/file.h and malloc.h.
12008 (AC_CHECK_DECLS): Add perror.
12009 (srv_mingwce): Handle.
12010 * configure.srv (i[34567]86-*-cygwin*): Add
12011 win32-i386-low.o to srv_tgtobj.
12012 (i[34567]86-*-mingw*): Likewise.
12013 (arm*-*-mingw32ce*): Add case.
12014 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12015 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12016 [__MINGW32CE__] (strerror): New function.
12017 [__MINGW32CE__] (errno): Define to GetLastError.
12018 [__MINGW32CE__] (COUNTOF): New macro.
12019 (remote_open): Remove extra close call.
12020 * mem-break.c (delete_breakpoint_at): New function.
12021 * mem-break.h (delete_breakpoint_at): Declare.
12022 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12023 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12024 [USE_WIN32API] (read, write): Add char* casts.
12025 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12026 * server.h: Include wincecompat.h on Windows CE.
12027 [HAVE_ERRNO_H]: Check.
12028 (perror): Declare if not declared.
12029 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12030 (perror_with_name): Remove errno declaration.
12031 * wincecompat.h: New.
12032 * wincecompat.c: New.
12033 * win32-low.h: New.
12034 * win32-arm-low.c: New.
12035 * win32-i386-low.c: New.
12036 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12037 (OUTMSG2): Make it safe.
12039 (COUNTOF): New macro.
12040 (NUM_REGS): Get it from the low target.
12041 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12042 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12043 (thread_rec): Let low target handle debug registers.
12044 (child_add_thread): Likewise.
12045 (child_init_thread_list): Likewise.
12046 (continue_one_thread): Likewise.
12048 (do_child_fetch_inferior_registers): Move to ...
12049 * win32-i386-low.c: ... here, and rename to ...
12050 (do_fetch_inferior_registers): ... this.
12051 * win32-low.c (child_fetch_inferior_registers):
12052 Go through the low target.
12053 (do_child_store_inferior_registers): Use regptr.
12054 (strwinerror): New function.
12055 (win32_create_inferior): Handle Windows CE.
12056 Use strwinerror instead of strerror on Windows error
12057 codes. Add program to the error output.
12058 Don't close the main thread handle on Windows CE.
12059 (win32_attach): Use coredll.dll on Windows CE.
12060 (win32_kill): Close current process and current
12062 (win32_detach): Use coredll.dll on Windows CE.
12063 (win32_resume): Let low target handle debug registers, and
12065 (handle_exception): Add/Remove initial breakpoint. Avoid
12066 non-existant WSTOPSIG on Windows CE.
12067 (win32_read_inferior_memory): Cast to remove warning.
12068 (win32_arch_string): Go through the low target.
12069 (initialize_low): Call set_breakpoint_data with the low
12070 target's breakpoint.
12071 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12072 FOP_REGNUM, mappings): Move to ...
12073 * win32-i386-low.c: ... here.
12074 * win32-low.c (win32_thread_info): Move to ...
12075 * win32-low.h: ... here.
12076 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12077 win32-arm-low.c and wincecompat.c.
12078 (all:): Add $EXEEXT.
12079 (install-only:): Likewise.
12080 (gdbserver:): Likewise.
12081 (gdbreplay:): Likewise.
12082 * config.in: Regenerate.
12083 * configure: Regenerate.
12085 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12087 * win32-low.c: Rename typedef thread_info to
12088 win32_thread_info throughout.
12090 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12092 * win32-i386-low.c: Rename to ...
12093 * win32-low.c: ... this.
12094 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12095 * Makefile.in: Likewise.
12097 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12099 * remote-utils.c (monitor_output): Constify msg parameter.
12100 * server.h (monitor_output): Likewise.
12101 * win32-i386-low.c (handle_output_debug_string): New.
12102 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12103 handle_output_debug_string.
12104 (get_child_debug_event): Likewise.
12106 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12108 * server.c (main): Correct strtoul check.
12110 2007-03-27 Jon Ringle <jon@ringle.org>
12112 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12114 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12116 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12118 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12120 * terminal.h: Check HAVE_SGTTY_H.
12122 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12124 * remote-utils.c (remote_open): Print out the assigned port number.
12126 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12128 * remote-utils.c (monitor_output): New function.
12129 * server.c (debug_threads): Define here.
12130 (monitor_show_help): New function.
12131 (handle_query): Handle qRcmd.
12132 (main): Do not handle 'd' packet.
12133 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12134 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12137 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12139 * Makefile.in (EXEEXT): New.
12140 (clean): Use $(EXEEXT).
12142 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12144 * target.h (target_ops): Rename send_signal to request_interrupt,
12145 and remove enum target_signal parameter.
12146 * linux-low.c (linux_request_interrupt): Rename from
12147 linux_send_signal, and always send SIGINT.
12148 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12149 and always send SIGINT.
12150 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12152 (input_interrupt): Likewise.
12154 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12156 * server.c (get_features_xml): Check if target implemented
12158 * win32-i386-low.c (win32_arch_string): New.
12159 (win32_target_ops): Add win32_arch_string as arch_string member.
12161 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12163 * spu-low.c (spu_arch_string): New.
12164 (spu_target_ops): Add spu_arch_string.
12166 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12168 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12169 * configure.ac: Do not check for terminal.h.
12170 * configure, config.in: Regenerated.
12172 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12174 * Makefile.in (OBS): Add $(XML_BUILTIN).
12175 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12177 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12178 (arm-with-iwmmxt.c): New.
12179 * config.in, configure: Regenerate.
12180 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12181 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12182 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12183 (arm*-*-linux*): Add iWMMXt and regset support.
12184 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12185 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12186 (arm_store_wmmxregset, target_regsets): New.
12187 * server.c (get_features_xml): Take annex argument. Check builtin
12189 (handle_query): Handle multiple annexes.
12191 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12193 * remote-utils.c [USE_WIN32API] (read, write): Define.
12194 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12197 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12199 * linux-i386-low.c (the_low_target): Set arch_string.
12200 * linux-x86-64-low.c (the_low_target): Likewise.
12201 * linux-low.c (linux_arch_string): New.
12202 (linux_target_ops): Add it.
12203 * linux-low.h (struct linux_target_ops): Add arch_string.
12204 * server.c (write_qxfer_response): Use const void * for DATA.
12205 (get_features_xml): New.
12206 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12207 * target.h (struct target_ops): Add arch_string method.
12209 2007-01-03 Denis Pilat <denis.pilat@st.com>
12210 Daniel Jacobowitz <dan@codesourcery.com>
12212 * linux-low.c (linux_kill): Handle being called with no threads.
12213 * win32-i386-low.c (win32_kill): Likewise.
12214 (get_child_debug_event): Clear current_process_handle.
12216 2006-12-30 Denis PILAT <denis.pilat@st.com>
12217 Daniel Jacobowitz <dan@codesourcery.com>
12219 * remote-utils.c (remote_open): Check the type of specified
12220 serial port devices before opening them.
12221 * server.c (main): Kill the inferior if an error occurs during
12222 the first remote_open.
12224 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12226 * README: Update supported targets.
12228 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12230 * Makefile.in (clean): Remove reg-mips64.c.
12231 (reg-mips64.c, reg-mips64.o): New rules.
12232 * configure.srv: Handle mips64. Include regset support for mips.
12233 * linux-mips-low.c (union mips_register): New.
12234 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12235 (mips_breakpoint, mips_breakpoint_at): Use int.
12236 (mips_collect_register, mips_supply_register)
12237 (mips_collect_register_32bit, mips_supply_register_32bit)
12238 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12239 (mips_store_fpregset, target_regsets): New.
12240 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12242 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12244 * configure.srv: Add target "spu*-*-*".
12245 * Makefile.in (clean): Remove reg-spu.c.
12246 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12247 * spu-low.c: New file.
12249 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12251 * configure.ac: Correct td_thr_tls_get_addr test.
12252 * configure: Regenerated.
12254 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12256 * linux-low.c (linux_wait_for_event): Reformat. Use the
12257 pass_signals array.
12258 * remote-utils.c (decode_address_to_semicolon): New.
12259 * server.c (pass_signals, handle_general_set): New.
12260 (handle_query): Mention QPassSignals for qSupported.
12261 (main): Call handle_general_set.
12262 * server.h (pass_signals, decode_address_to_semicolon): New.
12264 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12266 * server.c (handle_query): Correct error handling for read_auxv.
12268 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12270 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12271 and srv_linux_thread_db to yes.
12272 * linux-s390-low.c (s390_fill_gregset): New function.
12273 (target_regsets): Define data structure.
12275 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12277 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12278 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12279 * config.in, configure: Regenerated.
12280 * inferiors.c (gdb_id_to_thread): New function.
12281 (gdb_id_to_thread_id): Use it.
12282 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12283 * linux-low.h (struct process_info): Add th member.
12284 (thread_db_get_tls_address): New prototype.
12285 * remote-utils.c (decode_address): Make non-static.
12286 * server.c (handle_query): Handle qGetTLSAddr.
12287 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12288 * target.h (struct target_ops): Add get_tls_address.
12289 * thread-db.c (maybe_attach_thread): Save the thread handle.
12290 (thread_db_get_tls_address): New.
12292 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12294 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12295 (linux_resume_one_process): Take a siginfo_t *. Update all
12296 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12297 (struct pending_signals): Add a siginfo_t.
12298 (linux_wait_for_process): Always set last_status.
12299 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12300 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12301 * linux-low.h (struct process_info): Add last_status.
12303 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12305 * remote-utils.c (try_rle): New function.
12306 (putpkt_binary): Use it.
12308 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12310 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12311 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12312 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12313 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12314 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12317 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12319 * server.c (terminal_fd): New variable.
12320 (old_foreground_pgrp): Likewise.
12321 (restore_old_foreground_pgrp): New function.
12322 (start_inferior): Record the terminal file descriptor in terminal_fd
12323 and its original foreground group in old_foreground_pgrp. Register
12324 restore_old_foreground_pgrp with atexit().
12326 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12328 * server.c (handle_query): Correct qPart to qXfer.
12330 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12332 * configure.ac: Check for more headers which are missing on
12333 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12334 * configure.srv: Add Cygwin and mingw32.
12335 * remote-utils.c: Don't include headers unconditionally which
12336 are missing on mingw32. Include <winsock.h> for mingw32.
12337 (remote_open): Adjust for mingw32 support. Flush
12338 standard error after writing to it.
12339 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12340 (unblock_async_io, enable_async_io, disable_async_io)
12341 (readchar, getpkt): Update for Winsock support.
12342 (prepare_resume_reply): Expect a protocol signal number.
12343 * server.c: Disable <sys/wait.h> on mingw32.
12344 (start_inferior): Adjust for mingw32 support. Flush
12345 standard error after writing to it.
12346 (attach_inferior): Likewise. Use protocol signal
12348 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12350 * win32-i386-low.c: New file.
12351 * Makefile.in (XM_CLIBS): Set.
12352 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12353 (win32-i386-low.o): New dependency rule.
12354 * linux-low.c (linux_wait): Use target signal numbers.
12355 * target.h (struct target_ops): Doc fix.
12356 * server.h (target_signal_to_name): New prototype.
12357 * gdbreplay.c: Don't include headers unconditionally which
12358 are missing on mingw32. Include <winsock.h> for mingw32.
12359 (remote_close, remote_open): Adjust for Winsock support.
12360 * configure, config.in: Regenerated.
12362 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12364 * server.c (decode_xfer_read, write_qxfer_response): New.
12365 (handle_query): Take a packet length argument. Handle
12366 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12367 the qSupported response.
12368 (main): Update call to handle_query.
12370 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12372 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12373 (putpkt_binary): Renamed from putpkt and adjusted for binary
12375 (putpkt): New wrapper for putpkt_binary.
12376 (readchar): Don't mask off the high bit.
12377 (decode_X_packet): New function.
12378 * server.c (main): Call putpkt_binary if a handler sets the packet
12379 length. Save the length of the incoming packet. Handle 'X'.
12380 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12382 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12384 * server.c (handle_query): Handle qSupported.
12386 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12388 * remote-utils.c (all_symbols_looked_up): New variable.
12389 (look_up_one_symbol): Check it.
12390 * server.h (look_up_one_symbol): New declaration.
12391 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12393 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12395 * Makefile.in (linux-arm-low.o): Update dependencies.
12396 * linux-arm-low.c: Include "gdb_proc_service.h".
12397 (PTRACE_GET_THREAD_AREA): Define.
12398 (ps_get_thread_area): New function.
12400 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12402 * configure.srv (m68k*-*-uclinux*): New target.
12403 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12404 (linux_resume_one_process): Remove extraneous cast.
12405 (linux_read_offsets): New.
12406 (linux_target_op): Add linux_read_offsets on mmuless systems.
12407 * server.c (handle_query): Add qOffsets logic.
12408 * target.h (struct target_ops): Add read_offsets.
12410 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12412 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12413 (PTRACE_GET_THREAD_AREA): Define.
12414 (ps_get_thread_area): New function.
12415 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12416 (linux-x86-64-low.o): Update.
12418 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12420 * configure.ac: Remove checks for prfpregset_t.
12421 * gdb_proc_service.h: New file.
12422 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12423 new "gdb_proc_service.h".
12424 * proc-service.c: Likewise.
12425 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12426 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12427 * Makefile.in (gdb_proc_service_h): Updated.
12428 * configure, config.in: Regenerated.
12430 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12432 * remote-utils.c (prepare_resume_reply): Move declaration
12433 of gdb_id_from_wait to the top of the block.
12435 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12437 * linux-low.c (regsets_store_inferior_registers): Read the regset
12438 from the target before filling it.
12440 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12442 * server.c (attach_inferior): Return SIGTRAP for a successful
12445 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12447 * Makefile.in (OBS): Add version.o.
12448 (STAGESTUFF): Delete.
12449 (version.o): Add dependencies.
12450 (version.c): Replace rule.
12451 (clean): Remove version.c.
12452 * server.c (gdbserver_version): New.
12453 (gdbserver_usage): Use printf.
12454 (main): Handle --version and --help.
12455 * server.h (version, host_name): Add declarations.
12457 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12469 * linux-x86-64-low.c:
12471 * linux-s390-low.c:
12472 * linux-ppc64-low.c:
12474 * linux-mips-low.c:
12475 * linux-m68k-low.c:
12476 * linux-m32r-low.c:
12479 * linux-ia64-low.c:
12480 * linux-i386-low.c:
12481 * linux-crisv32-low.c:
12493 * gdbserver.1: Add (C) after Copyright. Update the FSF
12496 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12498 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12499 (arm_breakpoint_at): Recognize both breakpoints.
12500 (the_low_target): Use the correct breakpoint instruction.
12502 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12504 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12505 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12506 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12507 (the_low_target): Update.
12509 2005-10-25 Andreas Schwab <schwab@suse.de>
12511 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12513 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12514 (ia64_num_regs): Reduce to 462.
12516 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12518 * acinclude.m4: Correct quoting.
12519 * aclocal.m4: Regenerated.
12521 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12522 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12523 (thread_db_init): Call thread_db_err_str.
12524 * configure.ac: Check for TD_VERSION.
12525 * config.in, configure: Regenerated.
12527 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12529 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12531 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12533 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12534 is not available. Define HAVE_PTRACE_GETREGS if it is.
12535 * config.in, configure: Regenerated.
12536 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12537 * linux-i386-low.c, linux-m68k-low.c: Update to use
12538 HAVE_PTRACE_GETREGS.
12539 * linux-low.c (regsets_fetch_inferior_registers)
12540 (regsets_store_inferior_registers): Only return 0 if we processed
12542 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12543 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12545 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12547 * inferiors.c (struct thread_info): Add gdb_id.
12548 (add_thread): Add gdb_id argument.
12549 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12550 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12551 calls to add_thread.
12552 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12553 * server.c (handle_query): Use thread_to_gdb_id.
12554 (handle_v_cont, main): Use gdb_id_to_thread_id.
12555 * server.h (add_thread): Update prototype.
12556 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12559 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12561 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12562 left-padded registers.
12563 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12564 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12566 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12568 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12569 * configure: Regenerate.
12570 * config.in: Regenerate.
12571 * server.h (NEED_DECLARATION_STRERROR):
12572 Replace with !HAVE_DECL_STRERROR.
12574 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12576 * linux-low.c (linux_wait, linux_send_signal): Don't test
12577 an unsigned long variable for > 0 if it could be MAX_ULONG.
12578 * server.c (myresume): Likewise.
12579 * target.c (set_desired_inferior): Likewise.
12581 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12583 * configure.ac: Simplify and improve check for socklen_t.
12584 * configure, config.in: Regenerate.
12586 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12588 * acconfig.h: Remove.
12589 * configure.ac: Add a test for socklen_t. Use three-argument
12590 AC_DEFINE throughout.
12591 * config.in: Regenerated using autoheader 2.59.
12592 * configure: Regenerated.
12594 * gdbreplay.c (socklen_t): Provide a default.
12595 (remote_open): Use socklen_t.
12596 * remote-utils.c (socklen_t): Provide a default.
12597 (remote_open): Use socklen_t.
12598 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12601 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12603 * linux-low.c (linux_read_memory, linux_write_memory)
12604 (linux_read_auxv): Likewise.
12605 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12606 (check_mem_write): Likewise.
12607 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12609 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12610 (registers_from_string, register_data): Likewise.
12611 * server.c (handle_query, main): Likewise.
12612 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12613 (decode_M_packet): Likewise.
12614 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12615 * target.h (struct target_ops): Update read_memory, write_memory,
12617 (read_inferior_memory, write_inferior_memory): Update.
12618 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12619 to unsigned char *.
12620 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12621 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12622 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12623 linux-s390-low.c, linux-sh-low.c: Update for changes in
12624 read_inferior_memory and the_low_target->breakpoint.
12626 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12628 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12629 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12630 * configure.srv: Add powerpc64-*-linux*.
12631 * linux-ppc64-low.c: New file.
12633 2005-05-23 Orjan Friberg <orjanf@axis.com>
12635 * linux-cris-low.c: New file with support for CRIS.
12636 * linux-crisv32-low.c: Ditto for CRISv32.
12637 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12638 (clean): Add reg-cris.c and reg-crisv32.c.
12639 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12640 reg-crisv32.o, and reg-crisv32.c to make rules.
12641 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12642 recognized targets.
12644 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12646 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12647 of sizeof (PTRACE_XFER_TYPE).
12648 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12650 2005-05-12 Orjan Friberg <orjanf@axis.com>
12652 * target.h (struct target_ops): Add insert_watchpoint,
12653 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12654 pointers for hardware watchpoint support.
12655 * linux-low.h (struct linux_target_ops): Ditto.
12656 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12657 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12658 to linux_target_ops.
12659 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12661 * server.c (main): Recognize 'Z' and 'z' packets.
12663 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12665 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12666 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12667 (the_low_target): Add new members.
12669 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12671 * proc-service.c (ps_lgetregs): Search all_processes instead of
12674 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12676 * server.c (start_inferior): Change return type to int.
12677 (attach_inferior): Change sigptr to int *.
12678 (handle_v_cont, handle_v_requests): Change signal to int *.
12679 (main): Change signal to int.
12681 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12683 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12684 * configure.srv: Add m32r*-*-linux*.
12685 * linux-m32r-low.c: New file.
12687 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12689 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12691 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12693 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12694 Take unsigned long arguments for PIDs.
12695 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12696 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12697 (wait_for_sigstop, linux_resume_one_process)
12698 (regsets_fetch_inferior_registers, linux_send_signal)
12699 (linux_read_auxv): Likewise. Update the types of variables holding
12700 PIDs. Update format string specifiers.
12701 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12702 * remote-utils.c (prepare_resume_reply): Likewise.
12703 * server.c (cont_thread, general_thread, step_thread)
12704 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12706 (handle_query): Update format specifiers.
12707 (handle_v_cont, main): Use strtoul for thread IDs.
12708 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12709 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12710 (general_thread, step_thread, thread_from_wait)
12711 (old_thread_from_wait): Update.
12712 * target.h (struct thread_resume): Use unsigned long for THREAD.
12713 (struct target_ops): Use unsigned long for arguments to attach and
12716 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12718 * acinclude.m4: Include bfd/bfd.m4 directly.
12719 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12720 <agriffis@toolchain.org>.
12721 * aclocal.m4, configure: Regenerated.
12723 2005-01-07 Andrew Cagney <cagney@gnu.org>
12725 * configure.ac: Rename configure.in, require autoconf 2.59.
12726 * configure: Re-generate.
12728 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12730 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12731 LIBS when finished.
12732 * aclocal.m4: Regenerated.
12733 * configure: Regenerated.
12735 2004-11-21 Andreas Schwab <schwab@suse.de>
12737 * linux-m68k-low.c (m68k_num_gregs): Define.
12738 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12739 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12740 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12741 (m68k_breakpoint_at): New. Add to the_low_target.
12743 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12744 srv_linux_thread_db to yes.
12746 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12748 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12749 (ARCH_SET_FS): Likewise.
12750 (ARCH_GET_FS): Likewise.
12751 (ARCH_GET_GS): Likewise.
12753 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12755 * linux-i386-low.c (ps_get_thread_area): New.
12756 * linux-x86-64-low.c (ps_get_thread_area): New.
12757 * linux-low.c: Include <sys/syscall.h>.
12758 (linux_kill_one_process): Don't kill the first thread here.
12759 (linux_kill): Kill the first thread here.
12760 (kill_lwp): New function.
12761 (send_sigstop, linux_send_signal): Use it.
12762 * proc-service.c: Clean up #ifdefs.
12763 (fpregset_info): Delete.
12764 (ps_lgetregs): Update and enable implementation.
12765 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12767 * remote-utils.c (struct sym_cache, symbol_cache): New.
12768 (input_interrupt): Print a clearer message.
12769 (async_io_enabled): New variable.
12770 (enable_async_io, disable_async_io): Use it. Update comments.
12771 (look_up_one_symbol): Use the symbol cache.
12772 * thread-db.c (thread_db_look_up_symbols): New function.
12773 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12775 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12777 * configure.in: Test for -rdynamic.
12778 * configure: Regenerated.
12779 * Makefile (INTERNAL_LDFLAGS): New.
12780 (gdbserver, gdbreplay): Use it.
12782 2004-09-02 Andrew Cagney <cagney@gnu.org>
12784 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12786 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12788 * linux-low.c (linux_wait): Clear all_processes list also.
12790 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12792 * linux-low.c: Include <errno.h>. Remove extern declaration of
12795 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12797 * gdbreplay.c, server.h, utils.c: Update copyright years.
12799 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12801 * server.c (main): Print child status or termination signal from
12802 variable 'signal', not 'sig'.
12804 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12806 * linux-low.c (linux_read_memory): Change return type to
12807 int. Check for and return error from ptrace().
12808 * target.c (read_inferior_memory): Change return type to int. Pass
12809 back return status from the_target->read_memory().
12810 * target.h (struct target_ops): Adapt *read_memory() prototype.
12812 (read_inferior_memory): Adapt prototype.
12813 * server.c (main): Return an error packet if
12814 read_inferior_memory() returns an error.
12816 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12818 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12819 Unify with other clean targets.
12821 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12823 * server.c (handle_v_cont): Call set_desired_inferior.
12825 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12827 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12829 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12831 * linux-low.c (linux_wait): Unblock async I/O.
12832 (linux_resume): Block and enable async I/O.
12833 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12834 * server.h (block_async_io, unblock_async_io): Add prototypes.
12836 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12838 * remote-utils.c (remote_open): Print a status notice after
12839 opening a TCP port.
12840 * server.c (attach_inferior): Print a status notice after
12843 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12845 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12847 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12849 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12851 * server.c, target.h: Update copyright years.
12853 2004-02-25 Roland McGrath <roland@redhat.com>
12855 * target.h (struct target_ops): New member `read_auxv'.
12856 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12857 * linux-low.c (linux_read_auxv): New function.
12858 (linux_target_ops): Initialize `read_auxv' member to that.
12860 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12862 Committed by Jim Blandy <jimb@redhat.com>.
12864 * linux-s390-low.c (s390_num_regs): Update.
12865 (s390_regmap): Remove control registers. Use __s390x__ predefine
12866 instead of GPR_SIZE to distiguish s390 and s390x targets.
12868 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12870 * linux-low.c: Update copyright year.
12871 (check_removed_breakpoint): Clear pending_is_breakpoint.
12872 (linux_set_resume_request, linux_queue_one_thread)
12873 (resume_status_pending_p): New functions.
12874 (linux_continue_one_thread): Use process->resume.
12875 (linux_resume): Only resume threads if there are no pending events.
12876 * linux-low.h (struct process_info): Add resume request
12879 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12881 * regcache.c (new_register_cache): Clear the allocated register
12882 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12884 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12886 * linux-low.c (linux_resume): Take a struct thread_resume *
12888 (linux_wait): Update call.
12889 (resume_ptr): New static variable.
12890 (linux_continue_one_thread): Renamed from
12891 linux_continue_one_process. Use resume_ptr.
12892 (linux_resume): Use linux_continue_one_thread.
12893 * server.c (handle_v_cont, handle_v_requests): New functions.
12894 (myresume): New function.
12895 (main): Handle 'v' case.
12896 * target.h (struct thread_resume): New type.
12897 (struct target_ops): Change argument of "resume" to struct
12899 (myresume): Delete macro.
12901 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12903 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12904 (uninstall): Support DESTDIR.
12906 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12908 * configure.srv: Add xscale*linux copy of arm*linux entry.
12910 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12912 * linux-arm-low.c (arm_reinsert_addr): New function.
12913 (the_low_target): Add arm_reinsert_addr.
12915 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12917 * mem-break.c: Remove whitespace at end of file.
12919 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12921 * configure.in: Check whether we need to prototype strerror.
12922 * server.h: Optionally prototype strerror.
12923 * gdbreplay.c (perror_with_name): Use strerror.
12924 * linux-low.c (linux_attach_lwp): Use strerror.
12925 * utils.c (perror_with_name): Use strerror.
12926 * config.in, configure: Regenerated.
12928 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12930 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12931 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12933 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12935 * Makefile.in (SFILES): Update.
12936 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12937 low-sun3.c: Remove files.
12939 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12941 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12942 (linux_detach_one_process, linux_detach): New functions.
12943 (linux_target_ops): Add linux_detach.
12944 * server.c (main): Handle 'D' packet.
12945 * target.h (struct target_ops): Add "detach" member.
12946 (detach_inferior): Define.
12948 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12950 From Kelley Cook <kelleycook@wideopenwest.com>:
12951 * configure.srv: Accept i[34567]86 variants.
12953 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12955 * linux-low.c (linux_wait_for_event): Correct comment typos.
12956 (linux_resume_one_process): Call check_removed_breakpoint.
12957 (linux_send_signal): New function.
12958 (linux_target_ops): Add linux_send_signal.
12959 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12961 * target.h (struct target_ops): Add send_signal.
12963 2003-05-29 Jim Blandy <jimb@redhat.com>
12965 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12966 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12967 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12968 away part of the register's value.
12970 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12972 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12973 (linux_wait_for_event, linux_init_signals): Likewise.
12975 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12977 * configure.in: Check for stdlib.h.
12978 * configure: Regenerated.
12979 * config.in: Regenerated.
12981 2003-01-04 Andreas Schwab <schwab@suse.de>
12983 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12985 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12987 * Makefile.in: Remove obsolete code.
12989 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12991 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12992 defined(PT_FPR0_HI).
12994 2002-11-17 Stuart Hughes <seh@zee2.com>
12996 * linux-arm-low.c (arm_num_regs): Increase.
12997 (arm_regmap): Include status register.
12999 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13001 * linux-low.c (register_addr): Remove incorrect -1 check.
13003 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13005 * linux-low.c (linux_create_inferior): Call setpgid. Return
13007 (unstopped_p, linux_signal_pid): Remove.
13008 (linux_target_ops): Remove linux_signal_pid.
13009 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13010 global instead of target method.
13011 * target.h (struct target_ops): Remove signal_pid. Update comment
13012 for create_inferior.
13013 * server.c (signal_pid): New variable.
13014 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13015 gdbserver. Set the child to be the foreground process group.
13016 (attach_inferior): Set signal_pid.
13018 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13020 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13022 2002-08-20 Jim Blandy <jimb@redhat.com>
13024 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13027 2002-08-01 Andrew Cagney <cagney@redhat.com>
13029 * Makefile.in: Make chill references obsolete.
13031 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13033 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13034 * configure: Regenerate.
13035 * config.in: Regenerate.
13037 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13039 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13040 (perror_with_name, remote_close, remote_open, expect, play): Static.
13042 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13044 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13045 byte offsets instead of an array of indexes.
13046 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13048 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13050 * regcache.c: Add comment.
13052 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13054 * thread-db.c: New file.
13055 * proc-service.c: New file.
13056 * acinclude.m4: New file.
13057 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13058 proc-service.o, and thread-db.o.
13059 (linux-low.o): Add USE_THREAD_DB.
13060 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13061 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13062 * aclocal.m4: Regenerated.
13063 * config.in: Regenerated.
13064 * configure: Regenerated.
13065 * configure.in: Check for proc_service.h, sys/procfs.h,
13066 thread_db.h, and linux/elf.h headrs.
13067 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13068 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13069 Check for -lthread_db and thread support.
13070 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13071 PowerPC, and SuperH.
13072 * i387-fp.c: Constify arguments.
13073 * i387-fp.h: Likewise.
13074 * inferiors.c: (struct thread_info): Renamed from
13075 `struct inferior_info'. Remove PID member. Use generic inferior
13076 list header. All uses updated.
13077 (inferiors, signal_pid): Removed.
13078 (all_threads): New variable.
13079 (get_thread): Define.
13080 (add_inferior_to_list): New function.
13081 (for_each_inferior): New function.
13082 (change_inferior_id): New function.
13083 (add_inferior): Removed.
13084 (remove_inferior): New function.
13085 (add_thread): New function.
13086 (free_one_thread): New function.
13087 (remove_thread): New function.
13088 (clear_inferiors): Use for_each_inferior and free_one_thread.
13089 (find_inferior): New function.
13090 (find_inferior_id): New function.
13091 (inferior_target_data): Update argument type.
13092 (set_inferior_target_data): Likewise.
13093 (inferior_regcache_data): Likewise.
13094 (set_inferior_regcache_data): Likewise.
13095 * linux-low.c (linux_bp_reinsert): Remove.
13096 (all_processes, stopping_threads, using_thrads)
13097 (struct pending_signals, debug_threads, pid_of): New.
13098 (inferior_pid): Replace with macro.
13099 (struct inferior_linux_data): Remove.
13100 (get_stop_pc, add_process): New functions.
13101 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13102 Use add_process and add_thread.
13103 (linux_attach_lwp): New function, based on old linux_attach. Use
13104 add_process and add_thread. Set stop_expected for new threads.
13105 (linux_attach): New function.
13106 (linux_kill_one_process): New function.
13107 (linux_kill): Kill all LWPs.
13108 (linux_thread_alive): Use find_inferior_id.
13109 (check_removed_breakpoints, status_pending_p): New functions.
13110 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13111 Update. Use WNOHANG. Wait for cloned processes also. Update process
13112 struct for the found process.
13113 (linux_wait_for_event): New function.
13114 (linux_wait): Use it. Support LWPs.
13115 (send_sigstop, wait_for_sigstop, stop_all_processes)
13116 (linux_resume_one_process, linux_continue_one_process): New functions.
13117 (linux_resume): Support LWPs.
13118 (REGISTER_RAW_SIZE): Remove.
13119 (fetch_register): Use register_size instead. Call supply_register.
13120 (usr_store_inferior_registers): Likewise. Call collect_register.
13121 Fix recursive case.
13122 (regsets_fetch_inferior_registers): Improve error message.
13123 (regsets_store_inferior_registers): Add debugging.
13124 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13125 (unstopped_p, linux_signal_pid): New functions.
13126 (linux_target_ops): Add linux_signal_pid.
13127 (linux_init_signals): New function.
13128 (initialize_low): Call it. Initialize using_threads.
13129 * regcache.c (inferior_regcache_data): Add valid
13131 (get_regcache): Fetch registers lazily. Add fetch argument
13132 and update all callers.
13133 (regcache_invalidate_one, regcache_invalidate): New
13135 (new_register_cache): Renamed from create_register_cache.
13136 Return the new regcache.
13137 (free_register_cache): Change argument to a void *.
13138 (registers_to_string, registers_from_string): Call get_regcache
13139 with fetch flag set.
13140 (register_data): Make static. Pass fetch flag to get_regcache.
13141 (supply_register): Call get_regcache with fetch flag clear.
13142 (collect_register): Call get_regcache with fetch flag set.
13143 (collect_register_as_string): New function.
13144 * regcache.h: Update.
13145 * remote-utils.c (putpkt): Flush after debug output and use
13147 Handle input interrupts while waiting for an ACK.
13148 (input_interrupt): Use signal_pid method.
13149 (getpkt): Flush after debug output and use stderr.
13150 (outreg): Use collect_register_as_string.
13151 (new_thread_notify, dead_thread_notify): New functions.
13152 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13153 and general_thread.
13154 (look_up_one_symbol): Flush after debug output.
13155 * server.c (step_thread, server_waiting): New variables.
13156 (start_inferior): Don't use signal_pid. Update call to mywait.
13157 (attach_inferior): Update call to mywait.
13158 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13159 (main): Don't fetch/store registers explicitly. Use
13160 set_desired_inferior. Support proposed ``Hs'' packet. Update
13162 * server.h: Update.
13163 (struct inferior_list, struct_inferior_list_entry): New.
13164 * target.c (set_desired_inferior): New.
13165 (write_inferior_memory): Constify.
13166 (mywait): New function.
13167 * target.h: Update.
13168 (struct target_ops): New signal_pid method.
13169 (mywait): Removed macro, added prototype.
13171 * linux-low.h (regset_func): Removed.
13172 (regset_fill_func, regset_store_func): New.
13173 (enum regset_type): New.
13174 (struct regset_info): Add type field. Use new operation types.
13175 (struct linux_target_ops): stop_pc renamed to get_pc.
13176 Add decr_pc_after_break and breakpoint_at.
13177 (get_process, get_thread_proess, get_process_thread)
13178 (strut process_info, all_processes, linux_attach_lwp)
13179 (thread_db_init): New.
13181 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13182 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13183 (the_low_target): Add new members.
13184 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13185 (i386_store_fpxregset): Constify.
13186 (target_regsets): Add new kind identifier.
13187 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13188 (i386_set_pc): Add debugging.
13189 (i386_breakpoint_at): New function.
13190 (the_low_target): Add new members.
13191 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13192 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13193 (mips_breakpoint_at): New.
13194 (the_low_target): Add new members.
13195 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13196 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13197 (the_low_target): Add new members.
13198 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13199 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13200 (the_low_target): Add new members.
13201 * linux-x86-64-low.c (target_regsets): Add new kind
13204 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13206 From Martin Pool <mbp@samba.org>:
13207 * server.c (gdbserver_usage): New function.
13210 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13212 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13213 stop_at -> stop_pc.
13215 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13217 * Makefile.in: Remove obsolete code.
13219 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13221 * linux-low.c (regsets_fetch_inferior_registers),
13222 (regsets_store_inferior_registers): Removed cast to int from
13224 * regcache.h: Added declaration of struct inferior_info.
13226 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13228 * inferiors.c (struct inferior_info): Add regcache_data.
13229 (add_inferior): Call create_register_cache.
13230 (clear_inferiors): Call free_register_cache.
13231 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13232 * regcache.c (struct inferior_regcache_data): New.
13233 (registers): Remove.
13234 (get_regcache): New function.
13235 (create_register_cache, free_register_cache): New functions.
13236 (set_register_cache): Don't initialize the register cache here.
13237 (registers_to_string, registers_from_string, register_data): Call
13239 * regcache.h: Add prototypes.
13240 * server.h: Likewise.
13242 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13244 * mem-break.c: New file.
13245 * mem-break.h: New file.
13246 * Makefile.in: Add mem-break.o rule; update server.h
13248 * inferiors.c (struct inferior_info): Add target_data
13250 (clear_inferiors): Free target_data member if set.
13251 (inferior_target_data, set_inferior_target_data): New functions.
13252 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13253 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13254 * linux-low.c (linux_bp_reinsert): New variable.
13255 (struct inferior_linux_data): New.
13256 (linux_create_inferior): Use set_inferior_target_data.
13257 (linux_attach): Likewise. Call add_inferior.
13258 (linux_wait_for_one_inferior): New function.
13259 (linux_wait): Call it.
13260 (linux_write_memory): Add const.
13261 (initialize_low): Call set_breakpoint_data.
13262 * linux-low.h (struct linux_target_ops): Add breakpoint
13264 * server.c (attach_inferior): Remove extra add_inferior
13266 * server.h: Include mem-break.h. Update inferior.c
13268 * target.c (read_inferior_memory)
13269 (write_inferior_memory): New functions.
13270 * target.h (read_inferior_memory)
13271 (write_inferior_memory): Change macros to prototypes.
13272 (struct target_ops): Update comments. Add const to write_memory
13275 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13277 * linux-low.c (usr_store_inferior_registers): Support
13278 registers which are allowed to fail to store.
13279 * linux-low.h (linux_target_ops): Likewise.
13280 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13281 (ppc_cannot_store_register): FPSCR may not be storable.
13283 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13285 * server.h: Include <string.h> if HAVE_STRING_H.
13286 * ChangeLog: Correct paths in last ChangeLog entry.
13288 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13290 * linux-low.h: Remove obsolete prototypes.
13291 (struct linux_target_ops): New.
13292 (extern the_low_target): New.
13293 * linux-low.c (num_regs, regmap): Remove declarations.
13294 (register_addr): Use the_low_target explicitly.
13295 (fetch_register): Likewise.
13296 (usr_fetch_inferior_registers): Likewise.
13297 (usr_store_inferior_registers): Likewise.
13298 * linux-arm-low.c (num_regs): Remove.
13299 (arm_num_regs): Define.
13300 (arm_regmap): Renamed from regmap, made static.
13301 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13303 (arm_cannot_store_register): Renamed from cannot_store_register,
13305 (the_low_target): New.
13306 * linux-i386-low.c (num_regs): Remove.
13307 (i386_num_regs): Define.
13308 (i386_regmap): Renamed from regmap, made static.
13309 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13311 (i386_cannot_store_register): Renamed from cannot_store_register,
13313 (the_low_target): New.
13314 * linux-ia64-low.c (num_regs): Remove.
13315 (ia64_num_regs): Define.
13316 (ia64_regmap): Renamed from regmap, made static.
13317 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13319 (ia64_cannot_store_register): Renamed from cannot_store_register,
13321 (the_low_target): New.
13322 * linux-m68k-low.c (num_regs): Remove.
13323 (m68k_num_regs): Define.
13324 (m68k_regmap): Renamed from regmap, made static.
13325 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13327 (m68k_cannot_store_register): Renamed from cannot_store_register,
13329 (the_low_target): New.
13330 * linux-mips-low.c (num_regs): Remove.
13331 (mips_num_regs): Define.
13332 (mips_regmap): Renamed from regmap, made static.
13333 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13335 (mips_cannot_store_register): Renamed from cannot_store_register,
13337 (the_low_target): New.
13338 * linux-ppc-low.c (num_regs): Remove.
13339 (ppc_num_regs): Define.
13340 (ppc_regmap): Renamed from regmap, made static.
13341 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13343 (ppc_cannot_store_register): Renamed from cannot_store_register,
13345 (the_low_target): New.
13346 * linux-s390-low.c (num_regs): Remove.
13347 (s390_num_regs): Define.
13348 (s390_regmap): Renamed from regmap, made static.
13349 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13351 (s390_cannot_store_register): Renamed from cannot_store_register,
13353 (the_low_target): New.
13354 * linux-sh-low.c (num_regs): Remove.
13355 (sh_num_regs): Define.
13356 (sh_regmap): Renamed from regmap, made static.
13357 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13359 (sh_cannot_store_register): Renamed from cannot_store_register,
13361 (the_low_target): New.
13362 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13363 (the_low_target): New.
13365 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13367 * Makefile.in: Add stamp-h target.
13368 * configure.in: Create stamp-h.
13369 * configure: Regenerated.
13371 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13373 * inferiors.c: New file.
13374 * target.c: New file.
13375 * target.h: New file.
13376 * Makefile.in: Add target.o and inferiors.o. Update
13378 * linux-low.c (inferior_pid): New static variable,
13379 moved from server.c.
13380 (linux_create_inferior): Renamed from create_inferior.
13381 Call add_inferior. Return 0 on success instead of a PID.
13382 (linux_attach): Renamed from myattach.
13383 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13384 (linux_thread_alive): Renamed from mythread_alive.
13385 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13387 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13388 (regsets_store_inferior_registers): Correct error message.
13389 Add missing ``return 0''.
13390 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13391 (linux_store_registers): Renamed from store_inferior_registers.
13392 (linux_read_memory): Renamed from read_inferior_memory.
13393 (linux_write_memory): Renamed from write_inferior_memory.
13394 (linux_target_ops): New structure.
13395 (initialize_low): Call set_target_ops ().
13396 * remote-utils.c (unhexify): New function.
13397 (hexify): New function.
13398 (input_interrupt): Send signals to ``signal_pid''.
13399 * server.c (inferior_pid): Remove.
13400 (start_inferior): Update create_inferior call.
13401 (attach_inferior): Call add_inferior.
13402 (handle_query): New function.
13403 (main): Call handle_query for `q' packets.
13404 * server.h: Include "target.h". Remove obsolete prototypes.
13405 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13407 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13409 * Makefile.in: Add WARN_CFLAGS. Update configury
13411 * configure.in: Check for <string.h>
13412 * configure: Regenerate.
13413 * config.in: Regenerate.
13414 * gdbreplay.c: Include needed system headers.
13415 (remote_open): Remove strchr prototype.
13416 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13417 * regcache.c (supply_register): Change buf argument to const void *.
13418 (supply_register_by_name): Likewise.
13419 (collect_register): Change buf argument to void *.
13420 (collect_register_by_name): Likewise.
13421 * regcache.h: Add missing prototypes.
13422 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13423 * server.c (handle_query): New function.
13424 (attached): New static variable, moved out of main.
13425 (main): Quiet longjmp clobber warnings.
13426 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13427 * utils.c (error): Remove NORETURN.