1 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3 * linux-s390-low.c (s390_supports_z_point_type): New function.
4 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6 2016-02-16 Yao Qi <yao.qi@linaro.org>
8 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9 PC. Get pc from regcache_read_pc.
11 2016-02-12 Yao Qi <yao.qi@linaro.org>
13 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
14 or linux_get_pc_32bit.
15 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
17 2016-02-12 Yao Qi <yao.qi@linaro.org>
19 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
20 arm_linux_get_next_pcs_fixup.
22 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
24 * tracepoint.c (x_tracepoint_action_download): Change
25 write_inferior_data_ptr to write_inferior_data_pointer.
26 (cmd_qtstart): Likewise.
27 (write_inferior_data_ptr): Remove.
28 (download_agent_expr): Change write_inferior_data_ptr to
29 write_inferior_data_pointer.
30 (download_tracepoint_1): Likewise.
31 (download_tracepoint): Likewise.
32 (download_trace_state_variables): Likewise.
34 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
35 Marcin Kościelnicki <koriakin@0x04.net>
37 * tracepoint.c (struct tracepoint_action_ops): Remove.
38 (struct tracepoint_action): Remove ops.
39 (m_tracepoint_action_download, r_tracepoint_action_download)
40 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
41 size and offset accordingly.
42 (m_tracepoint_action_ops, r_tracepoint_action_ops)
43 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
44 (tracepoint_action_send, tracepoint_action_download): New functions.
45 Helpers for trace action handlers.
46 (add_tracepoint_action): Remove setup actions ops.
47 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
49 2016-02-10 Yao Qi <yao.qi@linaro.org>
51 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
53 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
55 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
57 * configure: Regenerate.
59 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
61 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
63 * linux-low.c (siginfo_fixup): Likewise.
64 (linux_xfer_siginfo): Likewise.
65 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
67 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
69 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
71 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
73 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
75 * linux-x86-low.c [__x86_64__]: Include
76 "nat/amd64-linux-siginfo.h".
77 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
78 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
79 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
80 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
81 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
82 (cpt_si_fd, si_timerid, si_overrun): Move from
83 nat/amd64-linux-siginfo.c.
84 * Makefile.in (amd64-linux-siginfo.o:): New rule.
86 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
88 * server.c (skip_to_semicolon): Remove.
89 (process_point_options): Use strchrnul instead of
92 2016-01-26 Yao Qi <yao.qi@linaro.org>
94 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
95 * linux-low.c (install_software_single_step_breakpoints): Don't
96 call regcache_read_pc.
97 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
100 2016-01-26 Yao Qi <yao.qi@linaro.org>
102 * linux-low.c (install_software_single_step_breakpoints): Call
103 regcache_read_pc instead of get_pc.
105 2016-01-26 Yao Qi <yao.qi@linaro.org>
107 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
108 (unblock_async_io): Rename to ...
109 (block_unblock_async_io): ... it. New function.
110 (enable_async_io): Don't install SIGIO handler. Unblock it
112 (disable_async_io): Don't ignore SIGIO. Block it instead.
113 (initialize_async_io): Install SIGIO handler. Don't call
116 2016-01-26 Yao Qi <yao.qi@linaro.org>
118 * remote-utils.c (getpkt): If the buffer isn't empty, and the
119 first character is '\003', call *the_target->request_interrupt.
121 2016-01-25 Yao Qi <yao.qi@linaro.org>
123 * remote-utils.c (new_thread_notify): Remove.
124 (dead_thread_notify): Likewise.
125 * remote-utils.h (new_thread_notify): Remove declaration.
126 (dead_thread_notify): Likewise.
128 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
130 * gdb.trace/pending.exp: Fix expected message on continue.
132 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
134 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
135 it works properly on big-endian machines where sizeof (CORE_ADDR)
138 2016-01-21 Pedro Alves <palves@redhat.com>
140 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
141 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
142 * configure: Regenerate.
144 2016-01-21 Yao Qi <yao.qi@linaro.org>
146 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
147 is_thumb and set it according to CPSR saved on the stack.
148 (get_next_pcs_syscall_next_pc): Pass is_thumb to
149 arm_sigreturn_next_pc.
151 2016-01-18 Yao Qi <yao.qi@linaro.org>
153 * linux-low.c (linux_set_pc_64bit): New function.
154 (linux_get_pc_64bit): New function.
155 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
157 * linux-sparc-low.c (debug_threads): Remove declaration.
158 (sparc_get_pc): Remove.
159 (the_low_target): Use linux_get_pc_64bit instead of
161 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
162 (the_low_target): Use linux_get_pc_64bit and
165 2016-01-18 Yao Qi <yao.qi@linaro.org>
167 * linux-arm-low.c (debug_threads): Remove declaration.
168 (arm_get_pc, arm_set_pc): Remove.
169 (the_low_target): Use linux_get_pc_32bit and
171 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
172 (the_low_target): Use linux_get_pc_32bit and
174 * linux-cris-low.c (debug_threads): Remove declaration.
175 (cris_get_pc, cris_set_pc,): Remove.
176 (the_low_target): Use linux_get_pc_32bit and
178 * linux-crisv32-low.c (debug_threads): Remove declaration.
179 (cris_get_pc, cris_set_pc): Remove.
180 (the_low_target): Use linux_get_pc_32bit and
182 * linux-low.c: Include inttypes.h.
183 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
184 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
185 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
186 (the_low_target): Use linux_get_pc_32bit and
188 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
189 (the_low_target): Use linux_get_pc_32bit and
191 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
192 (the_low_target): Use linux_get_pc_32bit and
194 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
195 (the_low_target): Use linux_get_pc_32bit and
197 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
198 (the_low_target): Use linux_get_pc_32bit and
201 2016-01-18 Gary Benson <gbenson@redhat.com>
203 * configure.ac (AC_FUNC_FORK): New check.
204 * config.in: Regenerate.
205 * configure: Likewise.
207 2016-01-14 Yao Qi <yao.qi@linaro.org>
209 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
210 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
211 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
212 arm_get_next_pcs_ctor.
214 2016-01-12 Josh Stone <jistone@redhat.com>
215 Philippe Waroquiers <philippe.waroquiers@skynet.be>
217 * inferiors.h: Include "gdb_vecs.h".
218 (struct process_info): Add syscalls_to_catch.
219 * inferiors.c (remove_process): Free syscalls_to_catch.
220 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
221 syscall_return stops.
222 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
223 * server.c (handle_general_set): Handle QCatchSyscalls.
224 (handle_query): Report support for QCatchSyscalls.
225 * target.h (struct target_ops): Add supports_catch_syscall.
226 (target_supports_catch_syscall): New macro.
227 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
228 (struct lwp_info): Add syscall_state.
229 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
230 Maintain syscall_state and syscalls_to_catch across exec.
231 (get_syscall_trapinfo): New function, proxy to the_low_target.
232 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
233 (linux_low_filter_event): Toggle syscall_state entry/return for
234 syscall traps, and set it ignored for all others.
235 (gdb_catching_syscalls_p): New function.
236 (gdb_catch_this_syscall_p): New function.
237 (linux_wait_1): Handle SYSCALL_SIGTRAP.
238 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
239 (linux_supports_catch_syscall): New function.
240 (linux_target_ops): Install it.
241 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
242 (the_low_target): Install it.
244 2016-01-12 Mike Frysinger <vapier@gentoo.org>
246 * acinclude.m4: Include new ../warning.m4 file.
247 * configure: Regenerated.
248 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
250 2016-01-12 Mike Frysinger <vapier@gentoo.org>
252 * ax.c (is_goto_target): Mark static.
253 * linux-low.c (register_addr): Likewise.
254 (linux_fetch_registers, linux_store_registers): Likewise.
255 * mem-break.c (any_persistent_commands): Fix old prototype.
256 (add_commands_to_breakpoint): Mark static.
257 * regcache.c (find_register_by_name): Delete unused func.
258 * remote-utils.c (hex_or_minus_one): Mark static.
259 * server.c (monitor_show_help): Mark static.
260 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
261 handle_v_requests): Likewise.
263 2016-01-12 Pedro Alves <palves@redhat.com>
265 Remove use of the registered trademark symbol throughout.
267 2016-01-08 Yao Qi <yao.qi@linaro.org>
269 * remote-utils.c (getpkt): If c is '\003', call target hook
272 2016-01-06 Yao Qi <yao.qi@linaro.org>
274 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
276 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
277 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
278 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
279 (thumb2_breakpoint): Declare.
280 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
282 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
283 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
284 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
286 2016-01-01 Joel Brobecker <brobecker@adacore.com>
288 * gdbreplay.c (gdbreplay_version): Change copyright year in
290 * server.c (gdbserver_version): Likewise.
292 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
294 * server.c (crc32_table): Delete.
295 (crc32): Use libiberty's xcrc32 function.
297 2015-12-22 Joel Brobecker <brobecker@adacore.com>
299 * lynx-low.c (lynx_delete_thread_callback): New function.
300 (lynx_mourn): Properly delete our process and all of its
301 threads. Remove call to clear_inferiors.
303 2015-12-22 Joel Brobecker <brobecker@adacore.com>
305 * target.c (thread_search_callback): Add check that
306 the thread_stopped target callback is not NULL before
309 2015-12-21 Yao Qi <yao.qi@linaro.org>
311 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
314 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
316 * server.c (handle_query): Call target_supports_software_single_step.
318 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
320 * linux-low.c (single_step): New function.
321 (linux_resume_one_lwp_throw): Call single_step.
322 (start_step_over): Likewise.
324 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
326 * Makefile.in (SFILES): Append arch/arm-linux.c,
327 arch/arm-get-next-pcs.c.
328 (arm-linux.o): New rule.
329 (arm-get-next-pcs.o): New rule.
330 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
332 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
333 to linux-aarch32-low.c.
334 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
335 (arm_breakpoint_len, thumb_breakpoint): Likewise.
336 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
337 (thumb2_breakpoint_len): Likewise.
338 (arm_is_thumb_mode): Make non-static.
339 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
340 from linux-aarch32-low.c.
341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
342 (arm_breakpoint_len, thumb_breakpoint): Likewise.
343 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
344 (thumb2_breakpoint_len): Likewise.
345 (arm_is_thumb_mode): New declaration.
346 * linux-arm-low.c: Include arch/arm-linux.h
347 aarch/arm-get-next-pcs.h, sys/syscall.h.
348 (get_next_pcs_ops): New struct.
349 (get_next_pcs_addr_bits_remove): New function.
350 (get_next_pcs_is_thumb): New function.
351 (get_next_pcs_read_memory_unsigned_integer): Likewise.
352 (arm_sigreturn_next_pc): Likewise.
353 (get_next_pcs_syscall_next_pc): Likewise.
354 (arm_gdbserver_get_next_pcs): Likewise.
355 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
357 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
358 * server.h: Include gdb_vecs.h.
360 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
362 * Makefile.in (SFILES): Append common/common-regcache.c.
363 (OBS): Append common-regcache.o.
364 (common-regcache.o): New rule.
365 * regcache.c (init_register_cache): Initialize cache to
367 (regcache_raw_read_unsigned): New function.
368 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
369 register_status enum.
371 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
373 * linux-aarch64-low.c (the_low_targets): Rename
374 breakpoint_reinsert_addr to get_next_pcs.
375 * linux-arm-low.c (the_low_targets): Likewise.
376 * linux-bfin-low.c (the_low_targets): Likewise.
377 * linux-cris-low.c (the_low_targets): Likewise.
378 * linux-crisv32-low.c (the_low_targets): Likewise.
379 * linux-low.c (can_software_single_step): Likewise.
380 (install_software_single_step_breakpoints): New function.
381 (start_step_over): Use install_software_single_step_breakpoints.
382 * linux-low.h: New CORE_ADDR vector.
383 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
385 * linux-mips-low.c (the_low_targets): Likewise.
386 * linux-nios2-low.c (the_low_targets): Likewise.
387 * linux-sparc-low.c (the_low_targets): Likewise.
389 2015-12-17 Pedro Alves <palves@redhat.com>
391 * linux-low.c (linux_kill_one_lwp): Remove references to
393 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
395 (linux_init_signals): Delete.
396 (initialize_low): Adjust.
397 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
399 2015-12-16 Pedro Alves <palves@redhat.com>
401 * configure.ac (compiler warning flags): When testing a
402 -Wno-foo option, check whether -Wfoo works instead.
403 * configure: Regenerate.
405 2015-12-11 Don Breazeal <donb@codesourcery.com>
407 * server.c (process_serial_event): Don't exit from gdbserver
408 in remote mode if there are still active inferiors.
410 2015-12-11 Yao Qi <yao.qi@linaro.org>
412 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
413 arm_breakpoint_at if the process is 32-bit.
415 2015-12-11 Yao Qi <yao.qi@linaro.org>
417 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
420 2015-12-07 Yao Qi <yao.qi@linaro.org>
422 * configure.srv: Append arm.o to srv_tgtobj for
423 aarch64*-*-linux* target.
424 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
425 from linux-arm-low.c.
426 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
427 (arm_breakpoint_len, thumb_breakpoint): Likewise.
428 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
429 (thumb2_breakpoint_len): Likewise.
430 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
431 (arm_breakpoint_kinds): Likewise.
432 (arm_breakpoint_kind_from_pc): Likewise.
433 (arm_sw_breakpoint_from_kind): Likewise.
434 (arm_breakpoint_kind_from_current_state): Likewise.
435 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
436 (arm_sw_breakpoint_from_kind): Declare.
437 (arm_breakpoint_kind_from_current_state): Declare.
438 (arm_breakpoint_at): Declare.
439 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
440 arm_sw_breakpoint_from_kind if process is 32-bit.
441 (aarch64_breakpoint_kind_from_pc): New function.
442 (aarch64_breakpoint_kind_from_current_state): New function.
443 (the_low_target): Initialize fields breakpoint_kind_from_pc
444 and breakpoint_kind_from_current_state.
445 * linux-arm-low.c (arm_breakpoint_kinds): Move to
447 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
448 (arm_breakpoint, arm_breakpoint_len): Likewise.
449 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
450 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
451 (arm_is_thumb_mode): Likewise.
452 (arm_breakpoint_at): Likewise.
453 (arm_breakpoint_kind_from_pc): Likewise.
454 (arm_sw_breakpoint_from_kind): Likewise.
455 (arm_breakpoint_kind_from_current_state): Likewise.
458 2015-08-04 Yao Qi <yao.qi@linaro.org>
460 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
461 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
462 * server.c (extended_protocol): Remove "static".
463 * server.h (extended_protocol): Declare it.
465 2015-12-04 Josh Stone <jistone@redhat.com>
467 * target.h (struct target_ops) <arch_setup>: Rename to ...
468 (struct target_ops) <post_create_inferior>: ... this.
469 (target_arch_setup): Rename to ...
470 (target_post_create_inferior): ... this, calling post_create_inferior.
471 * server.c (start_inferior): Update target_arch_setup calls to
472 target_post_create_inferior.
473 * linux-low.c (linux_low_ptrace_options): Forward declare.
474 (linux_arch_setup): Update its comment for general use.
475 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
476 (struct linux_target_ops): Use linux_post_create_inferior.
477 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
478 to post_create_inferior.
479 * nto-low.c (struct nto_target_ops): Likewise.
480 * spu-low.c (struct spu_target_ops): Likewise.
481 * win32-low.c (struct win32_target_ops): Likewise.
483 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
485 * linux-arm-low.c: Remove duplicate arch/arm.h include.
487 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
489 * linux-arm-low.c (arm_reinsert_addr): Remove function.
490 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
491 * linux-cris-low.c (cris_reinsert_addr> Remove function.
492 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
493 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
494 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
495 * linux-mips-low.c (mips_reinsert_addr): Remove function.
496 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
497 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
498 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
499 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
500 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
502 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
504 * linux-low.c (linux_look_up_symbols): Don't call
505 linux_supports_traceclone.
506 * linux-low.h (thread_db_init): Remove use_events argument.
507 * thread-db.c (thread_db_use_event): Remove global variable.
508 (struct thread_db) <td_thr_event_enable_p>: Remove field.
509 (struct thread_db) <td_create_bp>: Remove field.
510 (thread_db_create_event): Remove function.
511 (thread_db_enable_reporting): Likewise.
512 (find_one_thread): Don't check for thread_db_use_events.
513 (attach_thread): Likewise.
514 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
515 (try_thread_db_load_1): Don't check for thread_db_use_events.
516 (thread_db_init): Remove use_events argument and thread events
518 (remove_thread_event_breakpoints): Remove function.
519 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
521 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
523 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
526 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
527 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
528 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
529 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
531 * linux-crisv32-low.c (cris_supports_hardware_single_step):
533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
534 * linux-low.c (can_hardware_single_step): Use
535 supports_hardware_single_step.
536 (can_software_single_step): New function.
537 (start_step_over): Call can_software_single_step.
538 (linux_supports_hardware_single_step): New function.
539 (struct target_ops) <supports_software_single_step>: Initialize.
540 * linux-low.h (struct linux_target_ops)
541 <supports_hardware_single_step>: Initialize.
542 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
544 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
545 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
546 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
547 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
548 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
549 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
550 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
551 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
553 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
554 (struct linux_target_ops) <tile_supports_hardware_single_step>:
556 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
557 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
558 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
560 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
561 * target.h (struct target_ops): <supports_software_single_step>:
563 (target_supports_software_single_step): New macro.
565 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
567 * linux-low.c (linux_wait_1): Fix pc advance condition.
568 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
569 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
571 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
573 * linux-arm-low.c (arm_is_thumb_mode): New function.
574 (arm_breakpoint_at): Use arm_is_thumb_mode.
575 (arm_breakpoint_kind_from_current_state): New function.
576 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
578 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
579 (linux_breakpoint_kind_from_current_state): New function.
580 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
581 * linux-low.h (struct linux_target_ops)
582 <breakpoint_kind_from_current_state>: New field.
583 * target.h (struct target_ops): Likewise.
584 (target_breakpoint_kind_from_current_state): New macro.
586 2015-11-30 Pedro Alves <palves@redhat.com>
588 * linux-low.c (linux_resume): Wake up the event loop before
591 2015-11-30 Pedro Alves <palves@redhat.com>
593 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
595 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
597 * target.c (struct thread_search): New structure.
598 (thread_search_callback): New function.
599 (prev_general_thread): New global.
600 (prepare_to_access_memory, done_accessing_memory): New functions.
601 * target.h (prepare_to_access_memory, done_accessing_memory):
602 Replace macros with function declarations.
604 2015-11-30 Pedro Alves <palves@redhat.com>
607 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
608 report TARGET_WAITKIND_NO_RESUMED.
609 * remote-utils.c (prepare_resume_reply): Handle
610 TARGET_WAITKIND_NO_RESUMED.
611 * server.c (report_no_resumed): New global.
612 (handle_query) <qSupported>: Handle "no-resumed+". Report
613 "no-resumed+" support.
614 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
615 return error if the client doesn't support no-resumed events.
616 (push_stop_notification): New function.
617 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
618 events if the client supports them.
620 2015-11-30 Pedro Alves <palves@redhat.com>
622 * linux-low.c (thread_still_has_status_pending_p): Don't check
624 (lwp_resumed): New function.
625 (status_pending_p_callback): Return early if the LWP is not
626 supposed to be resumed.
628 2015-11-30 Pedro Alves <palves@redhat.com>
630 * linux-low.c (handle_extended_wait): Assert that the LWP's
631 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
632 thread create events, leave the new child's status pending.
633 (linux_low_filter_event): If GDB wants to hear about thread exit
634 events, leave the LWP marked dead and don't delete it.
635 (linux_wait_for_event_filtered): Don't check for thread exit.
636 (filter_exit_event): New function.
637 (linux_wait_1): Use it, when returning an exit event.
638 (linux_resume_one_lwp_throw): Assert that the LWP's
639 waitstatus is TARGET_WAITKIND_IGNORE.
640 * remote-utils.c (prepare_resume_reply): Handle
641 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
642 * server.c (report_thread_events): New global.
643 (handle_general_set): Handle QThreadEvents.
644 (handle_query) <qSupported>: Handle and report QThreadEvents+;
645 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
646 TARGET_WAITKIND_THREAD_EXITED.
647 * server.h (report_thread_events): Declare.
649 2015-11-30 Pedro Alves <palves@redhat.com>
651 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
652 the thread's last_resume_kind was resume_stop.
654 2015-11-30 Pedro Alves <palves@redhat.com>
656 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
659 2015-11-30 Pedro Alves <palves@redhat.com>
661 * server.c (handle_v_requests): Handle vCtrlC.
663 2015-11-30 Pedro Alves <palves@redhat.com>
665 * gdbthread.h (find_any_thread_of_pid): Declare.
666 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
668 * server.c (handle_query): If current_thread is NULL, look for
669 another thread of the selected process.
671 2015-11-26 Daniel Colascione <dancol@dancol.org>
672 Simon Marchi <simon.marchi@ericsson.com>
674 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
675 * server.c (handle_qxfer_threads_worker): Refactor to include thread
677 * target.h (struct target_ops) <thread_name>: New field.
678 (target_thread_name): New macro.
680 2015-11-23 Joel Brobecker <brobecker@adacore.com>
682 * regcache.h (regcache_invalidate_pid): Add declaration.
683 * regcache.c (regcache_invalidate_pid): New function, extracted
684 from regcache_invalidate.
685 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
686 Add trivial documentation comment.
687 * lynx-low.c: Use regcache_invalidate_pid instead of
690 2015-11-23 Joel Brobecker <brobecker@adacore.com>
692 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
693 and Elf64_auxv_t if the target is Android.
695 2015-11-22 Doug Evans <xdje42@gmail.com>
697 * target.h: #include <sys/types.h>.
699 2015-11-19 Pedro Alves <palves@redhat.com>
701 * linux-low.c (linux_process_qsupported): Change prototype.
703 * linux-low.h (struct linux_target_ops) <process_qsupported>:
705 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
706 and adjust to loop over all features.
707 * server.c (handle_query) <qSupported>: Adjust to call
708 target_process_qsupported once, passing it a vector of unprocessed
710 * target.h (struct target_ops) <process_qsupported>: Change
712 (target_process_qsupported): Adjust.
714 2015-11-19 Pedro Alves <palves@redhat.com>
716 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
718 * configure: Regenerate.
720 2015-11-19 Pedro Alves <palves@redhat.com>
722 * configure: Regenerate.
724 2015-11-19 Yao Qi <yao.qi@linaro.org>
726 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
729 2015-11-19 Yao Qi <yao.qi@linaro.org>
731 * linux-aarch64-low.c (enum aarch64_operand_type): New.
732 (struct aarch64_operand): Move enum out.
734 2015-11-19 Yao Qi <yao.qi@linaro.org>
736 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
737 struct user_fpsimd_state *.
738 (aarch64_store_fpregset): Likewise.
740 2015-11-19 Yao Qi <yao.qi@linaro.org>
742 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
743 struct user_pt_regs *.
744 (aarch64_store_gregset): Likewise.
746 2015-11-18 Pedro Alves <palves@redhat.com>
748 * Makefile.in (all_object_files): Add $IPA_OBJS.
750 2015-11-17 Pedro Alves <palves@redhat.com>
752 * win32-low.c (win32_resume): Use gdb_signal_from_host,
753 GDB_SIGNAL_0 and gdb_signal_to_string.
755 2015-11-17 Pedro Alves <palves@redhat.com>
757 * win32-low.c (handle_output_debug_string): Remove parameter.
758 (win32_kill): Remove our_status local and adjust call to
759 handle_output_debug_string.
760 (get_child_debug_event): Adjust call to
761 handle_output_debug_string.
763 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
765 * linux-mips-low.c (mips_fill_gregset): Add cast.
766 (mips_store_gregset): Likewise.
767 (mips_fill_fpregset): Likewise.
768 (mips_store_fpregset): Likewise.
770 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
772 * linux-mips-low.c (mips_add_watchpoint): Rename private to
775 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
777 * linux-mips-low.c (mips_linux_new_thread): Change type of
778 watch_type to enum target_hw_bp_type.
780 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
782 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
783 Change return type to arm_hwbp_type.
785 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
787 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
788 (arm_store_gregset): Likewise.
789 * linux-arm-low.c (arm_get_hwcap): Likewise.
790 (arm_read_description): Likewise.
792 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
794 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
796 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
798 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
799 (ppc_fill_vsxregset): Likewise.
800 (ppc_store_vsxregset): Likewise.
801 (ppc_fill_vrregset): Likewise.
802 (ppc_store_vrregset): Likewise.
803 (ppc_fill_evrregset): Likewise.
804 (ppc_store_evrregset): Likewise.
806 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
808 * linux-ppc-low.c (ppc_usrregs_info): Remove
810 (ppc_arch_setup): Move lower in file.
812 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
814 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
815 (ps_pdwrite): Likewise.
817 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
819 * linux-arm-low.c (arm_new_thread): Move pointer dereference
820 to after assert checks.
822 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
824 * proc-service.c (ps_pdread): Add/adjust casts.
825 (ps_pdwrite): Add/adjust casts.
827 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
829 * server.c (handle_search_memory_1): Cast return value of
832 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
834 * server.c (write_qxfer_response): Change type of data to
837 2015-10-29 Pedro Alves <palves@redhat.com>
839 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
841 2015-10-29 Pedro Alves <palves@redhat.com>
843 * tracepoint.c (clear_installed_tracepoints): Add casts.
845 2015-10-29 Pedro Alves <palves@redhat.com>
847 * server.c (handle_v_cont, process_serial_event): Add enum
848 gdb_signal casts to signal parsing code.
850 2015-10-29 Pedro Alves <palves@redhat.com>
852 * linux-low.h (NULL_REGSET): Define.
853 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
854 * linux-arm-low.c (arm_regsets): Likewise.
855 * linux-crisv32-low.c (cris_regsets): Likewise.
856 * linux-m68k-low.c (m68k_regsets): Likewise.
857 * linux-mips-low.c (mips_regsets): Likewise.
858 * linux-nios2-low.c (nios2_regsets): Likewise.
859 * linux-ppc-low.c (ppc_regsets): Likewise.
860 * linux-s390-low.c (s390_regsets): Likewise.
861 * linux-sh-low.c (sh_regsets): Likewise.
862 * linux-sparc-low.c (sparc_regsets): Likewise.
863 * linux-tic6x-low.c (tic6x_regsets): Likewise.
864 * linux-tile-low.c (tile_regsets): Likewise.
865 * linux-x86-low.c (x86_regsets): Likewise.
866 * linux-xtensa-low.c (xtensa_regsets): Likewise.
868 2015-10-29 Pedro Alves <palves@redhat.com>
870 * linux-low.h (NULL_REGSET): Define.
871 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
872 * linux-arm-low.c (arm_regsets): Likewise.
873 * linux-crisv32-low.c (cris_regsets): Likewise.
874 * linux-m68k-low.c (m68k_regsets): Likewise.
875 * linux-mips-low.c (mips_regsets): Likewise.
876 * linux-nios2-low.c (nios2_regsets): Likewise.
877 * linux-ppc-low.c (ppc_regsets): Likewise.
878 * linux-s390-low.c (s390_regsets): Likewise.
879 * linux-sh-low.c (sh_regsets): Likewise.
880 * linux-sparc-low.c (sparc_regsets): Likewise.
881 * linux-tic6x-low.c (tic6x_regsets): Likewise.
882 * linux-tile-low.c (tile_regsets): Likewise.
883 * linux-x86-low.c (x86_regsets): Likewise.
884 * linux-xtensa-low.c (xtensa_regsets): Likewise.
886 2015-10-26 Doug Evans <dje@google.com>
888 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
890 2015-10-26 Doug Evans <dje@google.com>
892 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
894 2015-10-26 Doug Evans <dje@google.com>
896 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
898 (attach_thread, find_new_threads_callback): Ditto.
900 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
902 * mem-break.h (set_breakpoint_data): Remove.
904 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
906 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
907 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
908 (initialize_low): Remove set_breakpoint_data call.
909 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
910 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
911 (initialize_low): Remove set_breakpoint_data call.
912 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
913 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
914 (initialize_low): Remove set_breakpoint_data call.
916 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
918 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
919 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
920 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
921 * target.h (target_breakpoint_kind_from_pc): New macro.
923 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
925 * linux-low.c (default_breakpoint_kind_from_pc): New function.
926 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
927 the default breakpoint kind.
929 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
931 * linux-arm-low.c (arm_supports_z_point_type): Add software
934 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
936 * linux-arm-low.c: Refactor breakpoint definitions.
937 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
938 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
940 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
942 * Makefile.in: Add arm.c/o.
943 * configure.srv: Likewise.
944 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
945 (arm_breakpoint_kind_from_pc): New function.
946 (arm_sw_breakpoint_from_kind): Return proper kind.
947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
949 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
951 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
953 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
954 (struct raw_breakpoint) <size>: Remove.
955 (struct raw_breakpoint) <kind>: Add.
956 (bp_size): New function.
957 (bp_opcode): Likewise.
958 (find_raw_breakpoint_at): Adjust for kind.
959 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
960 (remove_memory_breakpoint): Adjust for kind call bp_size.
961 (set_raw_breakpoint_at): Adjust for kind.
962 (set_breakpoint): Likewise.
963 (set_breakpoint_at): Call breakpoint_kind_from_pc.
964 (delete_raw_breakpoint): Adjust for kind.
965 (delete_breakpoint): Likewise.
966 (find_gdb_breakpoint): Likewise.
967 (set_gdb_breakpoint_1): Likewise.
968 (set_gdb_breakpoint): Likewise.
969 (delete_gdb_breakpoint_1): Likewise.
970 (delete_gdb_breakpoint): Likewise.
971 (uninsert_raw_breakpoint): Likewise.
972 (reinsert_raw_breakpoint): Likewise.
973 (set_breakpoint_data): Remove.
974 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
975 (check_mem_read): Adjust for kind call bp_size.
976 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
977 (clone_one_breakpoint): Adjust for kind.
978 * mem-break.h (set_gdb_breakpoint): Likewise.
979 (delete_gdb_breakpoint): Likewise.
980 * server.c (process_serial_event): Likewise.
982 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
984 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
990 (arm_sw_breakpoint_from_kind): New function.
991 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
992 (struct linux_target_ops) <breakpoint>: Remove.
993 (struct linux_target_ops) <breakpoint_len>: Remove.
994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
996 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
997 (struct linux_target_ops) <breakpoint>: Remove.
998 (struct linux_target_ops) <breakpoint_len>: Remove.
999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1001 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1002 (struct linux_target_ops) <breakpoint>: Remove.
1003 (struct linux_target_ops) <breakpoint_len>: Remove.
1004 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1005 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1006 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1007 and sw_breakpoint_from_kind to increment the pc.
1008 (linux_breakpoint_kind_from_pc): New function.
1009 (linux_sw_breakpoint_from_kind): New function.
1010 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1011 (initialize_low): Call breakpoint_kind_from_pc and
1012 sw_breakpoint_from_kind to replace breakpoint_data/len.
1013 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1015 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1016 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1017 (struct linux_target_ops) <breakpoint>: Remove.
1018 (struct linux_target_ops) <breakpoint_len>: Remove.
1019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1021 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1022 (struct linux_target_ops) <breakpoint>: Remove.
1023 (struct linux_target_ops) <breakpoint_len>: Remove.
1024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1026 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1027 (struct linux_target_ops) <breakpoint>: Remove.
1028 (struct linux_target_ops) <breakpoint_len>: Remove.
1029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1030 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1031 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1032 (struct linux_target_ops) <breakpoint>: Remove.
1033 (struct linux_target_ops) <breakpoint_len>: Remove.
1034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1036 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1037 (struct linux_target_ops) <breakpoint>: Remove.
1038 (struct linux_target_ops) <breakpoint_len>: Remove.
1039 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1040 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1041 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1042 (struct linux_target_ops) <breakpoint>: Remove.
1043 (struct linux_target_ops) <breakpoint_len>: Remove.
1044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1046 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1047 (struct linux_target_ops) <breakpoint>: Remove.
1048 (struct linux_target_ops) <breakpoint_len>: Remove.
1049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1050 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1051 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1052 (struct linux_target_ops) <breakpoint>: Remove.
1053 (struct linux_target_ops) <breakpoint_len>: Remove.
1054 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1056 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1057 (struct linux_target_ops) <breakpoint>: Remove.
1058 (struct linux_target_ops) <breakpoint_len>: Remove.
1059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1061 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1062 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1063 (struct linux_target_ops) <breakpoint>: Remove.
1064 (struct linux_target_ops) <breakpoint_len>: Remove.
1065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1067 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1068 (struct linux_target_ops) <breakpoint>: Remove.
1069 (struct linux_target_ops) <breakpoint_len>: Remove.
1070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1073 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1075 * linux-cris-low.c (cris_get_pc): Remove void arg.
1077 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1079 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1082 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1084 * inferiors.c (thread_pid_matches_callback): New function.
1085 (find_thread_process): New function.
1086 (remove_thread): Reset current_thread.
1087 (remove_process): Assert threads have been removed first.
1089 2015-10-15 Yao Qi <yao.qi@linaro.org>
1091 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1093 (aarch64_remove_point): Likewise.
1094 * regcache.c (regcache_register_size): New function.
1096 2015-10-12 Yao Qi <yao.qi@linaro.org>
1098 * linux-aarch64-low.c: Update all callers as emit_load_store
1099 is renamed to aarch64_emit_load_store.
1101 2015-10-12 Yao Qi <yao.qi@linaro.org>
1103 * linux-aarch64-low.c: Update all callers of function renaming
1104 from emit_insn to aarch64_emit_insn.
1106 2015-10-12 Yao Qi <yao.qi@linaro.org>
1108 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1109 arch/aarch64-insn.h.
1110 (struct aarch64_memory_operand): Likewise.
1112 (emit_insn): Move to arch/aarch64-insn.c.
1113 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1114 (emit_load_store): Move to arch/aarch64-insn.c.
1115 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1116 (can_encode_int32): Remove.
1118 2015-10-12 Yao Qi <yao.qi@linaro.org>
1120 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1121 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1122 (aarch64_relocate_instruction): Likewise.
1123 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1124 (struct aarch64_insn_visitor): Likewise.
1126 2015-10-12 Yao Qi <yao.qi@linaro.org>
1128 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1129 (struct aarch64_insn_visitor): New.
1130 (struct aarch64_insn_relocation_data): New.
1131 (aarch64_ftrace_insn_reloc_b): New function.
1132 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1133 (aarch64_ftrace_insn_reloc_cb): Likewise.
1134 (aarch64_ftrace_insn_reloc_tb): Likewise.
1135 (aarch64_ftrace_insn_reloc_adr): Likewise.
1136 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1137 (aarch64_ftrace_insn_reloc_others): Likewise.
1139 (aarch64_relocate_instruction): Use visitor.
1141 2015-10-12 Yao Qi <yao.qi@linaro.org>
1143 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1144 int. Add argument buf.
1145 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1146 aarch64_relocate_instruction.
1148 2015-10-12 Yao Qi <yao.qi@linaro.org>
1150 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1151 argument insn. Remove local variable insn. Don't call
1153 (aarch64_install_fast_tracepoint_jump_pad): Call
1156 2015-09-30 Yao Qi <yao.qi@linaro.org>
1158 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1159 (emit_load_store_pair): Likewise.
1161 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1163 * dll.c (match_dll): Add cast(s).
1164 (unloaded_dll): Likewise.
1165 * linux-low.c (second_thread_of_pid_p): Likewise.
1166 (delete_lwp_callback): Likewise.
1167 (count_events_callback): Likewise.
1168 (select_event_lwp_callback): Likewise.
1169 (linux_set_resume_request): Likewise.
1170 * server.c (accumulate_file_name_length): Likewise.
1171 (emit_dll_description): Likewise.
1172 (handle_qxfer_threads_worker): Likewise.
1173 (visit_actioned_threads): Likewise.
1174 * thread-db.c (any_thread_of): Likewise.
1175 * tracepoint.c (same_process_p): Likewise.
1176 (match_blocktype): Likewise.
1177 (build_traceframe_info_xml): Likewise.
1179 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1181 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1183 (gdb_unparse_agent_expr): Likewise.
1184 * hostio.c (require_data): Likewise.
1185 (handle_pread): Likewise.
1186 * linux-low.c (disable_regset): Likewise.
1187 (fetch_register): Likewise.
1188 (store_register): Likewise.
1189 (get_dynamic): Likewise.
1190 (linux_qxfer_libraries_svr4): Likewise.
1191 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1192 (set_fast_tracepoint_jump): Likewise.
1193 (uninsert_fast_tracepoint_jumps_at): Likewise.
1194 (reinsert_fast_tracepoint_jumps_at): Likewise.
1195 (validate_inserted_breakpoint): Likewise.
1196 (clone_agent_expr): Likewise.
1197 * regcache.c (init_register_cache): Likewise.
1198 * remote-utils.c (putpkt_binary_1): Likewise.
1199 (decode_M_packet): Likewise.
1200 (decode_X_packet): Likewise.
1201 (look_up_one_symbol): Likewise.
1202 (relocate_instruction): Likewise.
1203 (monitor_output): Likewise.
1204 * server.c (handle_search_memory): Likewise.
1205 (handle_qxfer_exec_file): Likewise.
1206 (handle_qxfer_libraries): Likewise.
1207 (handle_qxfer): Likewise.
1208 (handle_query): Likewise.
1209 (handle_v_cont): Likewise.
1210 (handle_v_run): Likewise.
1211 (captured_main): Likewise.
1212 * target.c (write_inferior_memory): Likewise.
1213 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1214 * tracepoint.c (init_trace_buffer): Likewise.
1215 (add_tracepoint_action): Likewise.
1216 (add_traceframe): Likewise.
1217 (add_traceframe_block): Likewise.
1218 (cmd_qtdpsrc): Likewise.
1219 (cmd_qtdv): Likewise.
1220 (cmd_qtstatus): Likewise.
1221 (response_source): Likewise.
1222 (response_tsv): Likewise.
1223 (cmd_qtnotes): Likewise.
1224 (gdb_collect): Likewise.
1225 (initialize_tracepoint): Likewise.
1227 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1229 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1230 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1231 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1233 (enum aarch64_condition_codes): New enum.
1234 (w0): New static global.
1237 (struct aarch64_memory_operand) <type>: New
1238 MEMORY_OPERAND_POSTINDEX type.
1239 (postindex_memory_operand): New helper function.
1240 (emit_ret): New function.
1241 (emit_load_store_pair): New function, factored out of emit_stp
1242 with support for MEMORY_OPERAND_POSTINDEX.
1243 (emit_stp): Rewrite using emit_load_store_pair.
1244 (emit_ldp): New function.
1245 (emit_load_store): Likewise.
1246 (emit_ldr): Mention post-index instruction in comment.
1247 (emit_ldrh): New function.
1248 (emit_ldrb): New function.
1249 (emit_ldrsw): Mention post-index instruction in comment.
1250 (emit_str): Likewise.
1251 (emit_subs): New function.
1252 (emit_cmp): Likewise.
1253 (emit_and): Likewise.
1254 (emit_orr): Likewise.
1255 (emit_orn): Likewise.
1256 (emit_eor): Likewise.
1257 (emit_mvn): Likewise.
1258 (emit_lslv): Likewise.
1259 (emit_lsrv): Likewise.
1260 (emit_asrv): Likewise.
1261 (emit_mul): Likewise.
1262 (emit_sbfm): Likewise.
1263 (emit_sbfx): Likewise.
1264 (emit_ubfm): Likewise.
1265 (emit_ubfx): Likewise.
1266 (emit_csinc): Likewise.
1267 (emit_cset): Likewise.
1268 (emit_nop): Likewise.
1269 (emit_ops_insns): New helper function.
1270 (emit_pop): Likewise.
1271 (emit_push): Likewise.
1272 (aarch64_emit_prologue): New function.
1273 (aarch64_emit_epilogue): Likewise.
1274 (aarch64_emit_add): Likewise.
1275 (aarch64_emit_sub): Likewise.
1276 (aarch64_emit_mul): Likewise.
1277 (aarch64_emit_lsh): Likewise.
1278 (aarch64_emit_rsh_signed): Likewise.
1279 (aarch64_emit_rsh_unsigned): Likewise.
1280 (aarch64_emit_ext): Likewise.
1281 (aarch64_emit_log_not): Likewise.
1282 (aarch64_emit_bit_and): Likewise.
1283 (aarch64_emit_bit_or): Likewise.
1284 (aarch64_emit_bit_xor): Likewise.
1285 (aarch64_emit_bit_not): Likewise.
1286 (aarch64_emit_equal): Likewise.
1287 (aarch64_emit_less_signed): Likewise.
1288 (aarch64_emit_less_unsigned): Likewise.
1289 (aarch64_emit_ref): Likewise.
1290 (aarch64_emit_if_goto): Likewise.
1291 (aarch64_emit_goto): Likewise.
1292 (aarch64_write_goto_address): Likewise.
1293 (aarch64_emit_const): Likewise.
1294 (aarch64_emit_call): Likewise.
1295 (aarch64_emit_reg): Likewise.
1296 (aarch64_emit_pop): Likewise.
1297 (aarch64_emit_stack_flush): Likewise.
1298 (aarch64_emit_zero_ext): Likewise.
1299 (aarch64_emit_swap): Likewise.
1300 (aarch64_emit_stack_adjust): Likewise.
1301 (aarch64_emit_int_call_1): Likewise.
1302 (aarch64_emit_void_call_2): Likewise.
1303 (aarch64_emit_eq_goto): Likewise.
1304 (aarch64_emit_ne_goto): Likewise.
1305 (aarch64_emit_lt_goto): Likewise.
1306 (aarch64_emit_le_goto): Likewise.
1307 (aarch64_emit_gt_goto): Likewise.
1308 (aarch64_emit_ge_got): Likewise.
1309 (aarch64_emit_ops_impl): New static global variable.
1310 (aarch64_emit_ops): New target function, return
1311 &aarch64_emit_ops_impl.
1312 (struct linux_target_ops): Install it.
1314 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1316 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1317 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1319 * linux-aarch64-ipa.c: New file.
1320 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1322 (aarch64_get_thread_area): New target method.
1323 (extract_signed_bitfield): New helper function.
1324 (aarch64_decode_ldr_literal): New function.
1325 (enum aarch64_opcodes): New enum.
1326 (struct aarch64_register): New struct.
1327 (struct aarch64_operand): New struct.
1328 (x0): New static global.
1337 (aarch64_register): New helper function.
1338 (register_operand): Likewise.
1339 (immediate_operand): Likewise.
1340 (struct aarch64_memory_operand): New struct.
1341 (offset_memory_operand): New helper function.
1342 (preindex_memory_operand): Likewise.
1343 (enum aarch64_system_control_registers): New enum.
1344 (ENCODE): New macro.
1345 (emit_insn): New helper function.
1346 (emit_b): New function.
1347 (emit_bcond): Likewise.
1348 (emit_cb): Likewise.
1349 (emit_tb): Likewise.
1350 (emit_blr): Likewise.
1351 (emit_stp): Likewise.
1352 (emit_ldp_q_offset): Likewise.
1353 (emit_stp_q_offset): Likewise.
1354 (emit_load_store): Likewise.
1355 (emit_ldr): Likewise.
1356 (emit_ldrsw): Likewise.
1357 (emit_str): Likewise.
1358 (emit_ldaxr): Likewise.
1359 (emit_stxr): Likewise.
1360 (emit_stlr): Likewise.
1361 (emit_data_processing_reg): Likewise.
1362 (emit_data_processing): Likewise.
1363 (emit_add): Likewise.
1364 (emit_sub): Likewise.
1365 (emit_mov): Likewise.
1366 (emit_movk): Likewise.
1367 (emit_mov_addr): Likewise.
1368 (emit_mrs): Likewise.
1369 (emit_msr): Likewise.
1370 (emit_sevl): Likewise.
1371 (emit_wfe): Likewise.
1372 (append_insns): Likewise.
1373 (can_encode_int32_in): New helper function.
1374 (aarch64_relocate_instruction): New function.
1375 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1376 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1377 (struct linux_target_ops): Install aarch64_get_thread_area,
1378 aarch64_install_fast_tracepoint_jump_pad and
1379 aarch64_get_min_fast_tracepoint_insn_len.
1381 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1383 * Makefile.in (aarch64-insn.o): New rule.
1384 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1386 2015-09-21 Yao Qi <yao.qi@linaro.org>
1388 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1390 2015-09-21 Yao Qi <yao.qi@linaro.org>
1392 * tracepoint.c (max_jump_pad_size): Remove.
1394 2015-09-18 Yao Qi <yao.qi@linaro.org>
1396 * linux-aarch64-low.c: Don't include sys/uio.h.
1397 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1399 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1401 * tracepoint.c (eval_result_type): Change prototype.
1402 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1404 2015-09-15 Pedro Alves <palves@redhat.com>
1406 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1407 Check whether to report exec events instead of checking whether
1408 multiprocess is enabled.
1410 2015-09-15 Pedro Alves <palves@redhat.com>
1413 * remote-utils.c (prepare_resume_reply): Merge
1414 TARGET_WAITKIND_VFORK_DONE switch case with the
1415 TARGET_WAITKIND_FORKED case.
1417 2015-09-15 Yao Qi <yao.qi@linaro.org>
1419 * server.c (handle_query): Check string comparison using
1420 "else if" instead of "if".
1422 2015-09-15 Yao Qi <yao.qi@linaro.org>
1424 * server.c (vCont_supported): New global variable.
1425 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1426 matches. Append ";vContSupported+" to own_buf.
1427 (handle_v_requests): Append ";s;S" to own_buf if target supports
1428 hardware single step or vCont_supported is false.
1429 (capture_main): Set vCont_supported to zero.
1431 2015-09-15 Yao Qi <yao.qi@linaro.org>
1433 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1435 (linux_supports_hardware_single_step): ... New function.
1436 (linux_target_ops): Update.
1437 * lynx-low.c (lynx_target_ops): Set field
1438 supports_hardware_single_step to target_can_do_hardware_single_step.
1439 * nto-low.c (nto_target_ops): Likewise.
1440 * spu-low.c (spu_target_ops): Likewise.
1441 * win32-low.c (win32_target_ops): Likewise.
1442 * target.c (target_can_do_hardware_single_step): New function.
1443 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1444 Remove. <supports_hardware_single_step>: New field.
1445 (target_supports_conditional_breakpoints): Remove.
1446 (target_supports_hardware_single_step): New macro.
1447 (target_can_do_hardware_single_step): Declare.
1448 * server.c (handle_query): Use target_supports_hardware_single_step
1449 instead of target_supports_conditional_breakpoints.
1451 2015-09-15 Yao Qi <yao.qi@linaro.org>
1453 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1455 (struct linux_target_ops the_low_target): Install
1456 aarch64_linux_siginfo_fixup.
1458 2015-09-11 Don Breazeal <donb@codesourcery.com>
1459 Luis Machado <lgustavo@codesourcery.com>
1461 * linux-low.c (linux_mourn): Static declaration.
1462 (linux_arch_setup): Move in front of
1463 handle_extended_wait.
1464 (linux_arch_setup_thread): New function.
1465 (handle_extended_wait): Handle exec events. Call
1466 linux_arch_setup_thread. Make event_lwp argument a
1467 pointer-to-a-pointer.
1468 (check_zombie_leaders): Do not check stopped threads.
1469 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1470 (linux_low_filter_event): Add lwp and thread for exec'ing
1471 non-leader thread if leader thread has been deleted.
1472 Refactor code into linux_arch_setup_thread and call it.
1473 Pass child lwp pointer by reference to handle_extended_wait.
1474 (linux_wait_for_event_filtered): Update comment.
1475 (linux_wait_1): Prevent clobbering exec event status.
1476 (linux_supports_exec_events): New function.
1477 (linux_target_ops) <supports_exec_events>: Initialize new member.
1478 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1480 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1481 * server.c (report_exec_events): New global variable.
1482 (handle_query): Handle qSupported query for exec-events feature.
1483 (captured_main): Initialize report_exec_events.
1484 * server.h (report_exec_events): Declare new global variable.
1485 * target.h (struct target_ops) <supports_exec_events>: New
1487 (target_supports_exec_events): New macro.
1488 * win32-low.c (win32_target_ops) <supports_exec_events>:
1489 Initialize new member.
1491 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1493 * linux-low.c (linux_low_enable_btrace): Remove.
1494 (linux_target_ops): Replace linux_low_enable_btrace with
1495 linux_enable_btrace.
1497 2015-09-03 Yao Qi <yao.qi@linaro.org>
1499 * linux-aarch64-low.c (aarch64_insert_point): Call
1500 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1503 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1505 * linux-low.c (check_stopped_by_breakpoint): Use
1506 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1508 2015-08-27 Pedro Alves <palves@redhat.com>
1510 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1512 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1514 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1515 the XNEW-family equivalent.
1516 (compile_bytecodes): Likewise.
1517 * dll.c (loaded_dll): Likewise.
1518 * event-loop.c (append_callback_event): Likewise.
1519 (create_file_handler): Likewise.
1520 (create_file_event): Likewise.
1521 * hostio.c (handle_open): Likewise.
1522 * inferiors.c (add_thread): Likewise.
1523 (add_process): Likewise.
1524 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1525 * linux-arm-low.c (arm_new_process): Likewise.
1526 (arm_new_thread): Likewise.
1527 * linux-low.c (add_to_pid_list): Likewise.
1528 (linux_add_process): Likewise.
1529 (handle_extended_wait): Likewise.
1530 (add_lwp): Likewise.
1531 (enqueue_one_deferred_signal): Likewise.
1532 (enqueue_pending_signal): Likewise.
1533 (linux_resume_one_lwp_throw): Likewise.
1534 (linux_resume_one_thread): Likewise.
1535 (linux_read_memory): Likewise.
1536 (linux_write_memory): Likewise.
1537 * linux-mips-low.c (mips_linux_new_process): Likewise.
1538 (mips_linux_new_thread): Likewise.
1539 (mips_add_watchpoint): Likewise.
1540 * linux-x86-low.c (initialize_low_arch): Likewise.
1541 * lynx-low.c (lynx_add_process): Likewise.
1542 * mem-break.c (set_raw_breakpoint_at): Likewise.
1543 (set_breakpoint): Likewise.
1544 (add_condition_to_breakpoint): Likewise.
1545 (add_commands_to_breakpoint): Likewise.
1546 (clone_agent_expr): Likewise.
1547 (clone_one_breakpoint): Likewise.
1548 * regcache.c (new_register_cache): Likewise.
1549 * remote-utils.c (look_up_one_symbol): Likewise.
1550 * server.c (queue_stop_reply): Likewise.
1551 (start_inferior): Likewise.
1552 (queue_stop_reply_callback): Likewise.
1553 (handle_target_event): Likewise.
1554 * spu-low.c (fetch_ppc_memory): Likewise.
1555 (store_ppc_memory): Likewise.
1556 * target.c (set_target_ops): Likewise.
1557 * thread-db.c (thread_db_load_search): Likewise.
1558 (try_thread_db_load_1): Likewise.
1559 * tracepoint.c (add_tracepoint): Likewise.
1560 (add_tracepoint_action): Likewise.
1561 (create_trace_state_variable): Likewise.
1562 (cmd_qtdpsrc): Likewise.
1563 (cmd_qtro): Likewise.
1564 (add_while_stepping_state): Likewise.
1565 * win32-low.c (child_add_thread): Likewise.
1566 (get_image_name): Likewise.
1568 2015-08-25 Yao Qi <yao.qi@linaro.org>
1570 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1572 2015-08-25 Yao Qi <yao.qi@linaro.org>
1574 * Makefile.in (aarch64-linux.o): New rule.
1575 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1577 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1578 (aarch64_init_debug_reg_state): Make it extern.
1579 (aarch64_linux_prepare_to_resume): Remove.
1581 2015-08-25 Yao Qi <yao.qi@linaro.org>
1583 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1584 lwp_arch_private_info and ptid_of_lwp.
1586 2015-08-25 Yao Qi <yao.qi@linaro.org>
1588 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1589 Find proc_info by find_process_pid. All callers updated.
1591 2015-08-25 Yao Qi <yao.qi@linaro.org>
1593 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1595 (debug_reg_change_callback): Remove.
1596 (aarch64_notify_debug_reg_change): Remove.
1598 2015-08-25 Yao Qi <yao.qi@linaro.org>
1600 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1601 Call current_lwp_ptid.
1603 2015-08-25 Yao Qi <yao.qi@linaro.org>
1605 * linux-aarch64-low.c (debug_reg_change_callback): Use
1608 2015-08-25 Yao Qi <yao.qi@linaro.org>
1610 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1612 2015-08-25 Yao Qi <yao.qi@linaro.org>
1614 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1616 2015-08-25 Yao Qi <yao.qi@linaro.org>
1618 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1621 2015-08-25 Yao Qi <yao.qi@linaro.org>
1623 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1625 (debug_reg_change_callback): Remove argument entry and add argument
1626 lwp. Remove local variable thread. Don't print thread id in the
1627 debugging output. Don't check whether pid of thread equals to pid.
1628 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1629 iterate_over_lwps instead find_inferior.
1631 2015-08-24 Pedro Alves <palves@redhat.com>
1633 * inferiors.c (get_first_process): New function.
1634 * inferiors.h (get_first_process): New declaration.
1635 * remote-utils.c (read_ptid): Default to the first process in the
1636 list, instead of to the current thread's process.
1638 2015-08-24 Pedro Alves <palves@redhat.com>
1640 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1641 * event-loop.c: Likewise.
1642 * remote-utils.c: Likewise.
1643 * tracepoint.c: Likewise.
1645 2015-08-24 Pedro Alves <palves@redhat.com>
1647 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1650 2015-08-21 Pedro Alves <palves@redhat.com>
1652 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1653 instead of literal 1.
1655 2015-08-21 Pedro Alves <palves@redhat.com>
1657 * tdesc.c (default_description): Explicitly zero-initialize.
1659 2015-08-21 Pedro Alves <palves@redhat.com>
1662 * inferiors.c (remove_thread): Discard any pending stop reply for
1664 * server.c (remove_all_on_match_pid): Rename to ...
1665 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1667 (discard_queued_stop_replies): Change parameter to a ptid. Now
1669 (handle_v_kill, kill_inferior_callback, captured_main)
1670 (process_serial_event): Adjust.
1671 * server.h (discard_queued_stop_replies): Declare.
1673 2015-08-21 Pedro Alves <palves@redhat.com>
1675 * linux-low.c (wait_for_sigstop): Always switch to no thread
1676 selected if the previously current thread dies.
1677 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1678 process instead of the current thread's.
1679 * remote-utils.c (input_interrupt): Don't check if there's no
1681 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1682 current thread to the general thread fails, error out.
1683 (handle_qxfer_auxv, handle_qxfer_libraries)
1684 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1685 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1686 (handle_query): Check if there's a thread selected instead of
1687 checking whether there's any thread in the thread list.
1688 (handle_qxfer_threads, handle_qxfer_btrace)
1689 (handle_qxfer_btrace_conf): Don't error out early if there's no
1690 thread in the thread list.
1691 (handle_v_cont, myresume): Don't set the current thread to the
1693 (process_serial_event) <Hg handling>: Also set thread_id if the
1694 previous general thread is still alive.
1695 (process_serial_event) <g/G handling>: If setting the current
1696 thread to the general thread fails, error out.
1697 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1698 thread's lwp instead of the current thread's.
1699 * target.c (set_desired_thread): If the desired thread was not
1700 found, leave the current thread pointing to NULL. Return an int
1701 (boolean) indicating success.
1702 * target.h (set_desired_thread): Change return type to int.
1704 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1706 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1707 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1709 (ps_get_thread_area): New function.
1711 2015-08-19 Gary Benson <gbenson@redhat.com>
1713 * hostio.c (handle_pread): Do not attempt to read more data
1714 than hostio_reply_with_data can fit in a packet.
1716 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1718 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1720 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1722 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1724 2015-08-06 Pedro Alves <palves@redhat.com>
1726 * tracepoint.c (expr_eval_result): Now an int.
1728 2015-08-06 Pedro Alves <palves@redhat.com>
1730 * gdbthread.h (struct regcache): Forward declare.
1731 (struct thread_info) <regcache_data>: Now a struct regcache
1733 * inferiors.c (inferior_regcache_data)
1734 (set_inferior_regcache_data): Now work with struct regcache
1736 * inferiors.h (struct regcache): Forward declare.
1737 (inferior_regcache_data, set_inferior_regcache_data): Now work
1738 with struct regcache pointers.
1739 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1740 (free_register_cache_thread): Remove struct regcache pointer
1743 2015-08-06 Pedro Alves <palves@redhat.com>
1745 * server.c (captured_main): On error, print the exception message
1746 to stderr, and if run_once is set, throw a quit.
1748 2015-08-06 Pedro Alves <palves@redhat.com>
1750 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1753 2015-08-06 Pedro Alves <palves@redhat.com>
1755 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1756 reading beyond the passed in buffer length.
1758 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1760 * tracepoint.c (symbol_list) <required>: Remove.
1762 2015-08-06 Pedro Alves <palves@redhat.com>
1764 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1765 count if stopping and suspending threads.
1766 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1767 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1768 (linux_detach): Complete an ongoing step-over.
1769 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1771 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1772 (linux_wait_1): If passing a signal to the inferior after
1773 finishing a step-over, unsuspend and re-resume all lwps. If we
1774 see a single-step event but the thread should be continuing, don't
1775 pass the trap to gdb.
1776 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1777 internal_error instead of gdb_assert.
1778 (enqueue_pending_signal): New function.
1779 (check_ptrace_stopped_lwp_gone): Add debug output.
1780 (start_step_over): Use internal_error instead of gdb_assert.
1781 (complete_ongoing_step_over): New function.
1782 (linux_resume_one_thread): Don't resume a suspended thread.
1783 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1786 2015-08-06 Pedro Alves <palves@redhat.com>
1788 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1789 (linux_thread_alive): Use lwp_is_marked_dead.
1790 (extended_event_reported): Delete.
1791 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1792 instead of extended_event_reported.
1793 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1795 (lwp_is_marked_dead): New function.
1796 (lwp_running): Use lwp_is_marked_dead.
1797 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1800 2015-08-06 Pedro Alves <palves@redhat.com>
1802 * linux-low.c (linux_wait_1): Move fork event output out of the
1803 !report_to_gdb check. Pass event_child->waitstatus to
1804 target_waitstatus_to_string instead of ourstatus.
1806 2015-08-04 Yao Qi <yao.qi@linaro.org>
1808 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1809 if current_thread is 32 bit.
1811 2015-08-04 Yao Qi <yao.qi@linaro.org>
1813 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1814 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1815 * server.c (extended_protocol): Remove "static".
1816 * server.h (extended_protocol): Declare it.
1818 2015-08-04 Yao Qi <yao.qi@linaro.org>
1820 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1821 both aarch64 and aarch32.
1822 (aarch64_set_pc): Likewise.
1824 2015-08-04 Yao Qi <yao.qi@linaro.org>
1826 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1827 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1828 arm-with-neon.xml to srv_xmlfiles.
1829 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1830 (is_64bit_tdesc): New function.
1831 (aarch64_linux_read_description): New function.
1832 (aarch64_arch_setup): Call aarch64_linux_read_description.
1833 (regs_info): Rename to regs_info_aarch64.
1834 (aarch64_regs_info): Return right regs_info.
1835 (initialize_low_arch): Call initialize_low_arch_aarch32.
1837 2015-08-04 Yao Qi <yao.qi@linaro.org>
1839 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1840 * linux-aarch32-low.c: New file.
1841 * linux-aarch32-low.h: New file.
1842 * linux-arm-low.c (arm_fill_gregset): Move it to
1843 linux-aarch32-low.c.
1844 (arm_store_gregset): Likewise.
1845 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1846 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1847 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1848 (regs_info): Rename to regs_info_arm.
1849 (arm_regs_info): Return regs_info_aarch32 if
1850 have_ptrace_getregset is 1 and target description is
1851 arm_with_neon or arm_with_vfpv3.
1852 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1853 Call initialize_low_arch_aarch32 instead.
1855 2015-08-04 Yao Qi <yao.qi@linaro.org>
1857 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1858 * linux-low.c: ... here.
1859 * linux-low.h (have_ptrace_getregset): Declare it.
1861 2015-08-04 Pedro Alves <palves@redhat.com>
1863 * thread-db.c (struct thread_db): Use new typedefs.
1864 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1866 (disable_thread_event_reporting): Cast result of dlsym to
1867 destination function pointer type.
1868 (thread_db_mourn): Use td_ta_delete_ftype.
1870 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1872 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1874 (CDX_BREAKPOINT): Define for R2.
1875 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1876 (the_low_target): Add comments.
1878 2015-07-30 Yao Qi <yao.qi@linaro.org>
1880 * linux-arm-low.c (arm_hwcap): Remove it.
1881 (arm_read_description): New local variable arm_hwcap. Don't
1882 set arm_hwcap to zero.
1884 2015-07-30 Yao Qi <yao.qi@linaro.org>
1886 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1887 Use regcache->tdesc instead.
1888 (arm_store_wmmxregset): Likewise.
1889 (arm_fill_vfpregset): Likewise.
1890 (arm_store_vfpregset): Likewise.
1892 2015-07-30 Yao Qi <yao.qi@linaro.org>
1894 * linux-arm-low.c: Include arch/arm.h.
1895 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1896 (arm_store_gregset): Likewise.
1898 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1900 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1901 ptrace's 4th parameter.
1903 2015-07-27 Yao Qi <yao.qi@linaro.org>
1905 * configure.srv (case aarch64*-*-linux*): Don't set
1908 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1910 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1912 * linux-arm-low.c: Likewise.
1913 * linux-cris-low.c: Likewise.
1914 * linux-crisv32-low.c: Likewise.
1915 * linux-low.c: Likewise.
1916 * linux-m68k-low.c: Likewise.
1917 * linux-mips-low.c: Likewise.
1918 * linux-nios2-low.c: Likewise.
1919 * linux-s390-low.c: Likewise.
1920 * linux-sparc-low.c: Likewise.
1921 * linux-tic6x-low.c: Likewise.
1922 * linux-tile-low.c: Likewise.
1923 * linux-x86-low.c: Likewise.
1925 2015-07-24 Pedro Alves <palves@redhat.com>
1927 * config.in: Regenerate.
1928 * configure: Regenerate.
1930 2015-07-24 Pedro Alves <palves@redhat.com>
1932 * acinclude.m4: Include ../ptrace.m4.
1933 * configure.ac: Call GDB_AC_PTRACE.
1934 * config.in, configure: Regenerate.
1936 2015-07-24 Yao Qi <yao.qi@linaro.org>
1938 * linux-low.c (linux_create_inferior): Remove setting to
1939 proc->priv->new_inferior.
1940 (linux_attach): Likewise.
1941 (linux_low_filter_event): Likewise.
1942 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1944 2015-07-24 Yao Qi <yao.qi@linaro.org>
1946 * linux-low.c (linux_arch_setup): New function.
1947 (linux_low_filter_event): If proc->tdesc is NULL and
1948 proc->attached is true, call the_low_target.arch_setup.
1949 Otherwise, keep status pending, and return.
1950 (linux_resume_one_lwp_throw): Don't call get_pc if
1951 thread->while_stepping isn't NULL. Don't call
1952 get_thread_regcache if proc->tdesc is NULL.
1953 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1954 (linux_target_ops): Install arch_setup.
1955 * server.c (start_inferior): Call the_target->arch_setup.
1956 * target.h (struct target_ops) <arch_setup>: New field.
1957 (target_arch_setup): New marco.
1958 * lynx-low.c (lynx_target_ops): Update.
1959 * nto-low.c (nto_target_ops): Update.
1960 * spu-low.c (spu_target_ops): Update.
1961 * win32-low.c (win32_target_ops): Update.
1963 2015-07-24 Yao Qi <yao.qi@linaro.org>
1965 * linux-low.c (linux_add_process): Don't set
1966 proc->priv->new_inferior.
1967 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1968 (linux_attach): Likewise.
1970 2015-07-24 Yao Qi <yao.qi@linaro.org>
1972 * server.c (start_inferior): Code refactor.
1974 2015-07-24 Yao Qi <yao.qi@linaro.org>
1976 * server.c (process_serial_event): Set general_thread.
1978 2015-07-21 Yao Qi <yao.qi@linaro.org>
1980 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1981 aarch64_linux_get_debug_reg_capacity.
1983 2015-07-17 Yao Qi <yao.qi@linaro.org>
1985 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1986 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1987 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1988 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1989 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1990 (AARCH64_HWP_ALIGNMENT): Likewise.
1991 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1992 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1993 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1994 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1995 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1996 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1997 (struct aarch64_debug_reg_state): Likewise.
1998 (struct arch_lwp_info): Likewise.
1999 (aarch64_align_watchpoint): Likewise.
2000 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2001 (aarch64_watchpoint_length): Likewise.
2002 (aarch64_point_encode_ctrl_reg): Likewise
2003 (aarch64_point_is_aligned): Likewise.
2004 (aarch64_align_watchpoint): Likewise.
2005 (aarch64_linux_set_debug_regs):
2006 (aarch64_dr_state_insert_one_point): Likewise.
2007 (aarch64_dr_state_remove_one_point): Likewise.
2008 (aarch64_handle_breakpoint): Likewise.
2009 (aarch64_handle_aligned_watchpoint): Likewise.
2010 (aarch64_handle_unaligned_watchpoint): Likewise.
2011 (aarch64_handle_watchpoint): Likewise.
2013 2015-07-17 Yao Qi <yao.qi@linaro.org>
2015 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2016 and don't aarch64_get_debug_reg_state. All callers update.
2017 (aarch64_handle_aligned_watchpoint): Likewise.
2018 (aarch64_handle_unaligned_watchpoint): Likewise.
2019 (aarch64_handle_watchpoint): Likewise.
2020 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2021 (aarch64_remove_point): Likewise.
2023 2015-07-17 Yao Qi <yao.qi@linaro.org>
2025 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2027 (aarch64_handle_unaligned_watchpoint): Likewise.
2029 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2031 Revert the previous 3 commits:
2032 Move gdb_regex* to common/
2033 Move linux_find_memory_regions_full & co.
2034 gdbserver build-id attribute generator
2036 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2037 Jan Kratochvil <jan.kratochvil@redhat.com>
2039 gdbserver build-id attribute generator.
2040 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2041 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2042 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2044 (get_dynamic): Use find_pdhr to traverse program headers.
2045 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2046 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2047 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2048 (get_hex_build_id): New.
2049 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2050 to reply XML document.
2052 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2053 Jan Kratochvil <jan.kratochvil@redhat.com>
2055 * target.c: Include target/target-utils.h and fcntl.h.
2056 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2057 (target_fileio_read_stralloc): New functions.
2059 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2061 * Makefile.in (OBS): Add gdb_regex.o.
2063 * config.in: Rebuilt.
2064 * configure: Rebuilt.
2066 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2067 Jan Kratochvil <jan.kratochvil@redhat.com>
2069 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2070 * Makefile.in (OBS): Add target-utils.o.
2071 (linux-maps.o, target-utils.o): New.
2072 * configure.srv (srv_linux_obj): Add linux-maps.o.
2074 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2076 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2078 (the_low_target): Install it.
2080 2015-07-14 Pedro Alves <palves@redhat.com>
2082 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2083 Instead, ignore ECHILD, and throw an error for other errnos.
2085 2015-07-10 Pedro Alves <palves@redhat.com>
2087 * event-loop.c (struct callback_event) <data>: Change type to
2088 gdb_client_data instance instead of gdb_client_data pointer.
2089 (append_callback_event): Adjust.
2091 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2093 * linux-aarch64-low.c: Add comments for each linux_target_ops
2094 method. Remove comments already covered in target_ops and
2095 linux_target_ops definitions.
2096 (the_low_target): Add comments for each unimplemented method.
2098 2015-07-09 Yao Qi <yao.qi@linaro.org>
2100 * linux-aarch64-low.c (aarch64_regmap): Remove.
2101 (aarch64_usrregs_info): Remove.
2102 (regs_info): Set field usrregs to NULL.
2104 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2106 * linux-low.c: Include "rsp-low.h"
2107 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2108 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2109 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2110 (handle_btrace_enable_pt): New.
2111 (handle_btrace_general_set): Support "pt".
2112 (handle_btrace_conf_general_set): Support "pt:size".
2114 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2116 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2119 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2121 * linux-aarch64-low.c: Remove comment about endianness.
2122 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2123 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2126 2015-06-24 Gary Benson <gbenson@redhat.com>
2128 * linux-i386-ipa.c (stdint.h): Do not include.
2129 * lynx-i386-low.c (stdint.h): Likewise.
2130 * lynx-ppc-low.c (stdint.h): Likewise.
2131 * mem-break.c (stdint.h): Likewise.
2132 * thread-db.c (stdint.h): Likewise.
2133 * tracepoint.c (stdint.h): Likewise.
2134 * win32-low.c (stdint.h): Likewise.
2136 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2138 * server.c (write_qxfer_response): Update call to
2139 remote_escape_output.
2141 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2142 Jan Kratochvil <jan.kratochvil@redhat.com>
2144 Merge multiple hex conversions.
2145 * gdbreplay.c (tohex): Rename to 'fromhex'.
2146 (logchar): Use fromhex.
2148 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2150 * server.c (handle_qxfer_libraries): Set `version' attribute for
2153 2015-06-10 Gary Benson <gbenson@redhat.com>
2155 * target.h (struct target_ops) <multifs_open>: New field.
2156 <multifs_unlink>: Likewise.
2157 <multifs_readlink>: Likewise.
2158 * linux-low.c (nat/linux-namespaces.h): New include.
2159 (linux_target_ops): Initialize the_target->multifs_open,
2160 the_target->multifs_unlink and the_target->multifs_readlink.
2161 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2162 * hostio.c (hostio_fs_pid): New static variable.
2163 (hostio_handle_new_gdb_connection): New function.
2164 (handle_setfs): Likewise.
2165 (handle_open): Use the_target->multifs_open as appropriate.
2166 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2167 (handle_readlink): Use the_target->multifs_readlink as
2169 (handle_vFile): Handle vFile:setfs packets.
2170 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2171 after target_handle_new_gdb_connection.
2173 2015-06-10 Gary Benson <gbenson@redhat.com>
2175 * configure.ac (AC_CHECK_FUNCS): Add setns.
2176 * config.in: Regenerate.
2177 * configure: Likewise.
2178 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2179 (linux-namespaces.o): New rule.
2180 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2182 2015-06-09 Gary Benson <gbenson@redhat.com>
2184 * hostio.c (handle_open): Process mode argument with
2185 fileio_to_host_mode.
2187 2015-06-01 Yao Qi <yao.qi@linaro.org>
2189 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2190 * linux-x86-low.c: Likewise.
2192 2015-05-28 Don Breazeal <donb@codesourcery.com>
2194 * linux-low.c (handle_extended_wait): Initialize
2195 thread_info.last_resume_kind for new fork children.
2197 2015-05-15 Pedro Alves <palves@redhat.com>
2199 * target.h (target_handle_new_gdb_connection): Rewrite using if
2200 wrapped in do/while.
2202 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2204 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2205 * configure, config.in: Regenerate.
2206 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2209 2015-05-12 Don Breazeal <donb@codesourcery.com>
2211 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2212 PTRACE_EVENT_VFORK_DONE.
2213 (linux_low_ptrace_options, extended_event_reported): Add vfork
2215 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2216 and "vforkdone" for RSP 'T' Stop Reply Packet.
2217 * server.h (report_vfork_events): Declare
2220 2015-05-12 Don Breazeal <donb@codesourcery.com>
2222 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2223 (the_low_target) <new_fork>: Initialize new member.
2224 * linux-arm-low.c (arm_new_fork): New function.
2225 (the_low_target) <new_fork>: Initialize new member.
2226 * linux-low.c (handle_extended_wait): Call new target function
2228 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2229 * linux-mips-low.c (mips_add_watchpoint): New function
2230 extracted from mips_insert_point.
2231 (the_low_target) <new_fork>: Initialize new member.
2232 (mips_linux_new_fork): New function.
2233 (mips_insert_point): Call mips_add_watchpoint.
2234 * linux-x86-low.c (x86_linux_new_fork): New function.
2235 (the_low_target) <new_fork>: Initialize new member.
2237 2015-05-12 Don Breazeal <donb@codesourcery.com>
2239 * linux-low.c (handle_extended_wait): Implement return value,
2240 rename argument 'event_child' to 'event_lwp', handle
2241 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2242 (linux_low_ptrace_options): New function.
2243 (linux_low_filter_event): Call linux_low_ptrace_options,
2244 use different argument fo linux_enable_event_reporting,
2245 use return value from handle_extended_wait.
2246 (extended_event_reported): New function.
2247 (linux_wait_1): Call extended_event_reported and set
2248 status to report fork events.
2249 (linux_write_memory): Add pid to debug message.
2250 (reset_lwp_ptrace_options_callback): New function.
2251 (linux_handle_new_gdb_connection): New function.
2252 (linux_target_ops): Initialize new structure member.
2253 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2254 * lynx-low.c: Initialize new structure member.
2255 * remote-utils.c (prepare_resume_reply): Implement stop reason
2256 "fork" for "T" stop message.
2257 * server.c (handle_query): Call handle_new_gdb_connection.
2258 * server.h (report_fork_events): Declare global flag.
2259 * target.h (struct target_ops) <handle_new_gdb_connection>:
2261 (target_handle_new_gdb_connection): New macro.
2262 * win32-low.c: Initialize new structure member.
2264 2015-05-12 Don Breazeal <donb@codesourcery.com>
2266 * mem-break.c (APPEND_TO_LIST): Define macro.
2267 (clone_agent_expr): New function.
2268 (clone_one_breakpoint): New function.
2269 (clone_all_breakpoints): New function.
2270 * mem-break.h: Declare new functions.
2272 2015-05-12 Don Breazeal <donb@codesourcery.com>
2274 * linux-low.c (linux_supports_fork_events): New function.
2275 (linux_supports_vfork_events): New function.
2276 (linux_target_ops): Initialize new structure members.
2277 (initialize_low): Call linux_check_ptrace_features.
2278 * lynx-low.c (lynx_target_ops): Initialize new structure
2280 * server.c (report_fork_events, report_vfork_events):
2282 (handle_query): Add new features to qSupported packet and
2284 (captured_main): Initialize new global variables.
2285 * target.h (struct target_ops) <supports_fork_events>:
2287 <supports_vfork_events>: New member.
2288 (target_supports_fork_events): New macro.
2289 (target_supports_vfork_events): New macro.
2290 * win32-low.c (win32_target_ops): Initialize new structure
2293 2015-05-12 Gary Benson <gbenson@redhat.com>
2295 * server.c (handle_qxfer_exec_file): Use current process
2298 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2300 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2301 Remove HAVE_PTRACE_GETREGS conditionals.
2302 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2303 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2305 2015-05-08 Yao Qi <yao.qi@linaro.org>
2307 * linux-low.c (linux_supports_conditional_breakpoints): New
2309 (linux_target_ops): Install new target method.
2310 * lynx-low.c (lynx_target_ops): Install NULL hook for
2311 supports_conditional_breakpoints.
2312 * nto-low.c (nto_target_ops): Likewise.
2313 * spu-low.c (spu_target_ops): Likewise.
2314 * win32-low.c (win32_target_ops): Likewise.
2315 * server.c (handle_query): Check
2316 target_supports_conditional_breakpoints.
2317 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2319 (target_supports_conditional_breakpoints): New macro.
2321 2015-05-06 Pedro Alves <palves@redhat.com>
2324 * server.c (start_inferior): If the process exits, mourn it.
2326 2015-04-21 Gary Benson <gbenson@redhat.com>
2328 * hostio.c (fileio_open_flags_to_host): Factored out to
2329 fileio_to_host_openflags in common/fileio.c. Single use
2332 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2334 * linux-xtensa-low.c (xtensa_fill_gregset)
2335 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2338 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2340 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2341 (regs_info): Replace usrregs pointer with NULL.
2343 2015-04-17 Gary Benson <gbenson@redhat.com>
2345 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2346 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2347 * server.c (handle_qxfer_exec_file): New function.
2348 (qxfer_packets): Add exec-file entry.
2349 (handle_query): Report qXfer:exec-file:read as supported packet.
2351 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2353 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2355 2015-04-09 Gary Benson <gbenson@redhat.com>
2357 * hostio-errno.c (errno_to_fileio_error): Remove function.
2358 Update caller to use remote_fileio_to_fio_error.
2360 2015-04-09 Yao Qi <yao.qi@linaro.org>
2362 * linux-low.c (linux_insert_point): Call
2363 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2364 (linux_remove_point): Call remove_memory_breakpoint if type is
2366 * linux-x86-low.c (x86_insert_point): Don't call
2367 insert_memory_breakpoint.
2368 (x86_remove_point): Don't call remove_memory_breakpoint.
2370 2015-04-01 Pedro Alves <palves@redhat.com>
2371 Cleber Rosa <crosa@redhat.com>
2373 * server.c (gdbserver_usage): Reorganize and extend the usage
2376 2015-03-24 Pedro Alves <palves@redhat.com>
2378 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2379 output. Also dump TRAP_TRACE.
2380 (linux_low_filter_event): In debug output, distinguish a
2381 resume_stop SIGSTOP from a delayed SIGSTOP.
2383 2015-03-24 Gary Benson <gbenson@redhat.com>
2385 * linux-x86-low.c (x86_linux_new_thread): Moved to
2387 (x86_linux_prepare_to_resume): Likewise.
2389 2015-03-24 Gary Benson <gbenson@redhat.com>
2391 * Makefile.in (x86-linux-dregs.o): New rule.
2392 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2393 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2394 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2395 (x86_linux_dr_get): Likewise.
2396 (x86_linux_dr_set): Likewise.
2397 (update_debug_registers_callback): Likewise.
2398 (x86_linux_dr_set_addr): Likewise.
2399 (x86_linux_dr_get_addr): Likewise.
2400 (x86_linux_dr_set_control): Likewise.
2401 (x86_linux_dr_get_control): Likewise.
2402 (x86_linux_dr_get_status): Likewise.
2403 (x86_linux_update_debug_registers): Likewise.
2405 2015-03-24 Gary Benson <gbenson@redhat.com>
2407 * linux-x86-low.c (x86_linux_update_debug_registers):
2408 New function, factored out from...
2409 (x86_linux_prepare_to_resume): ...this.
2411 2015-03-24 Gary Benson <gbenson@redhat.com>
2413 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2414 (x86_linux_dr_set): Likewise.
2415 (update_debug_registers_callback): Likewise.
2416 (x86_linux_dr_set_addr): Likewise.
2417 (x86_linux_dr_get_addr): Likewise.
2418 (x86_linux_dr_set_control): Likewise.
2419 (x86_linux_dr_get_control): Likewise.
2420 (x86_linux_dr_get_status): Likewise.
2421 (x86_linux_prepare_to_resume): Likewise.
2423 2015-03-24 Gary Benson <gbenson@redhat.com>
2425 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2426 Use perror_with_name. Pass string through gettext.
2427 (x86_linux_dr_set): Likewise.
2429 2015-03-24 Gary Benson <gbenson@redhat.com>
2431 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2432 (x86_linux_dr_set_addr): ...this.
2433 (x86_dr_low_get_addr): Rename to...
2434 (x86_linux_dr_get_addr): ...this.
2435 (x86_dr_low_set_control): Rename to...
2436 (x86_linux_dr_set_control): ...this.
2437 (x86_dr_low_get_control): Rename to...
2438 (x86_linux_dr_get_control): ...this.
2439 (x86_dr_low_get_status): Rename to...
2440 (x86_linux_dr_get_status): ...this.
2441 (x86_dr_low): Update with new function names.
2443 2015-03-24 Gary Benson <gbenson@redhat.com>
2445 * Makefile.in (x86-linux.o): New rule.
2446 * configure.srv: Add x86-linux.o to relevant targets.
2447 * linux-low.c (lwp_set_arch_private_info): New function.
2448 (lwp_arch_private_info): Likewise.
2449 * linux-x86-low.c: Include nat/x86-linux.h.
2450 (arch_lwp_info): Removed structure.
2451 (update_debug_registers_callback):
2452 Use lwp_set_debug_registers_changed.
2453 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2454 and lwp_set_debug_registers_changed.
2455 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2457 2015-03-24 Gary Benson <gbenson@redhat.com>
2459 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2460 * linux-arm-low.c (arm_new_thread): Likewise.
2461 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2462 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2463 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2464 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2466 2015-03-24 Gary Benson <gbenson@redhat.com>
2468 * linux-low.c (ptid_of_lwp): New function.
2469 (lwp_is_stopped): Likewise.
2470 (lwp_stop_reason): Likewise.
2471 * linux-x86-low.c (update_debug_registers_callback):
2473 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2476 2015-03-24 Gary Benson <gbenson@redhat.com>
2478 * linux-low.h (linux_stop_lwp): Remove declaration.
2480 2015-03-24 Gary Benson <gbenson@redhat.com>
2482 * linux-low.h: Include nat/linux-nat.h.
2483 * linux-low.c (iterate_over_lwps_args): New structure.
2484 (iterate_over_lwps_filter): New function.
2485 (iterate_over_lwps): Likewise.
2486 * linux-x86-low.c (update_debug_registers_callback):
2487 Update signature to what iterate_over_lwps expects.
2488 Remove PID check that iterate_over_lwps now performs.
2489 (x86_dr_low_set_addr): Use iterate_over_lwps.
2490 (x86_dr_low_set_control): Likewise.
2492 2015-03-24 Gary Benson <gbenson@redhat.com>
2494 * linux-x86-low.c (x86_debug_reg_state): New function.
2495 (x86_linux_prepare_to_resume): Use the above.
2497 2015-03-24 Gary Benson <gbenson@redhat.com>
2499 * linux-low.c (current_lwp_ptid): New function.
2500 * linux-x86-low.c: Include nat/linux-nat.h.
2501 (x86_dr_low_get_addr): Use current_lwp_ptid.
2502 (x86_dr_low_get_control): Likewise.
2503 (x86_dr_low_get_status): Likewise.
2505 2015-03-20 Pedro Alves <palves@redhat.com>
2507 * tracepoint.c (cmd_qtstatus): Make "str" const.
2509 2015-03-20 Pedro Alves <palves@redhat.com>
2511 * server.c (handle_general_set): Make "req_str" const.
2513 2015-03-19 Pedro Alves <palves@redhat.com>
2515 * linux-low.c (linux_resume_one_lwp): Rename to ...
2516 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2517 instead call perror_with_name.
2518 (check_ptrace_stopped_lwp_gone): New function.
2519 (linux_resume_one_lwp): Reimplement as wrapper around
2520 linux_resume_one_lwp_throw that swallows errors if the LWP is
2523 2015-03-19 Pedro Alves <palves@redhat.com>
2525 * linux-low.c (count_events_callback, select_event_lwp_callback):
2526 No longer check whether the thread has resume_stop as last resume
2529 2015-03-19 Pedro Alves <palves@redhat.com>
2531 * linux-low.c (count_events_callback, select_event_lwp_callback):
2532 Use the lwp's status_pending_p field, not the thread's.
2534 2015-03-19 Pedro Alves <palves@redhat.com>
2536 * linux-low.c (select_event_lwp_callback): Update comments to
2537 no longer mention SIGTRAP.
2539 2015-03-18 Gary Benson <gbenson@redhat.com>
2541 * server.c (handle_query): Do not report vFile:fstat as supported.
2543 2015-03-11 Gary Benson <gbenson@redhat.com>
2545 * hostio.c (sys/types.h): New include.
2546 (sys/stat.h): Likewise.
2547 (common-remote-fileio.h): Likewise.
2548 (handle_fstat): New function.
2549 (handle_vFile): Handle vFile:fstat packets.
2551 2015-03-11 Gary Benson <gbenson@redhat.com>
2553 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2554 struct stat.st_blocks and struct stat.st_blksize.
2555 * configure: Regenerate.
2556 * config.in: Likewise.
2557 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2558 (OBS): Add common-remote-fileio.o.
2559 (common-remote-fileio.o): New rule.
2561 2015-03-09 Pedro Alves <palves@redhat.com>
2563 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2564 'struct sockaddr' pointer in 'accept' call.
2566 2015-03-09 Pedro Alves <palves@redhat.com>
2569 2015-03-07 Pedro Alves <palves@redhat.com>
2570 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2571 or <winsock2.h> here. Instead include "gdb_socket.h".
2572 (remote_open): Use union gdb_sockaddr_u.
2573 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2574 or <winsock2.h> here. Instead include "gdb_socket.h".
2575 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2576 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2578 (init_named_socket, gdb_agent_helper_thread): Use union
2581 2015-03-07 Pedro Alves <palves@redhat.com>
2583 * configure.ac (build_warnings): Move
2584 -Wdeclaration-after-statement to the C-specific set.
2585 * configure: Regenerate.
2587 2015-03-07 Pedro Alves <palves@redhat.com>
2589 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2590 or <winsock2.h> here. Instead include "gdb_socket.h".
2591 (remote_open): Use union gdb_sockaddr_u.
2592 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2593 or <winsock2.h> here. Instead include "gdb_socket.h".
2594 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2595 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2597 (init_named_socket, gdb_agent_helper_thread): Use union
2600 2015-03-07 Pedro Alves <palves@redhat.com>
2602 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2605 2015-03-06 Yao Qi <yao.qi@linaro.org>
2607 * linux-aarch64-low.c (aarch64_insert_point): Use
2608 show_debug_regs as a boolean.
2609 (aarch64_remove_point): Likewise.
2611 2015-03-05 Pedro Alves <palves@redhat.com>
2613 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2614 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2615 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2616 * nto-low.c (nto_target_ops): Likewise.
2617 * spu-low.c (spu_target_ops): Likewise.
2618 * win32-low.c (win32_target_ops): Likewise.
2620 2015-03-04 Pedro Alves <palves@redhat.com>
2622 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2623 Decide whether a breakpoint triggered based on the SIGTRAP's
2625 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2626 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2627 (linux_low_filter_event): Check for breakpoints before checking
2629 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2631 (linux_stopped_by_sw_breakpoint)
2632 (linux_supports_stopped_by_sw_breakpoint)
2633 (linux_stopped_by_hw_breakpoint)
2634 (linux_supports_stopped_by_hw_breakpoint): New functions.
2635 (linux_target_ops): Install new target methods.
2637 2015-03-04 Pedro Alves <palves@redhat.com>
2639 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2640 * server.c (swbreak_feature, hwbreak_feature): New globals.
2641 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2642 (captured_main): Clear swbreak_feature and hwbreak_feature.
2643 * server.h (swbreak_feature, hwbreak_feature): Declare.
2644 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2645 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2646 supports_stopped_by_hw_breakpoint>: New fields.
2647 (target_supports_stopped_by_sw_breakpoint)
2648 (target_stopped_by_sw_breakpoint)
2649 (target_supports_stopped_by_hw_breakpoint)
2650 (target_stopped_by_hw_breakpoint): Declare.
2652 2015-03-04 Pedro Alves <palves@redhat.com>
2654 enum lwp_stop_reason -> enum target_stop_reason
2655 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2656 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2657 (linux_wait_1, stuck_in_jump_pad_callback)
2658 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2659 (linux_stopped_by_watchpoint):
2660 * linux-low.h (enum lwp_stop_reason): Delete.
2661 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2662 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2664 2015-03-04 Yao Qi <yao.qi@linaro.org>
2666 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2668 2015-03-03 Gary Benson <gbenson@redhat.com>
2670 * hostio.c (handle_vFile): Fix prefix lengths.
2672 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2674 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2677 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2679 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2680 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2681 (clean): Add "rm -f" for above C files.
2682 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2683 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2684 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2685 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2686 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2687 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2688 (init_registers_s390x_vx_linux64)
2689 (init_registers_s390x_tevx_linux64)
2690 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2691 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2693 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2694 (s390_store_vxrs_high): New functions.
2695 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2697 (s390_arch_setup): Add logic for selecting one of the new target
2698 descriptions. Activate the new vector regsets if applicable.
2699 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2700 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2701 and init_registers_s390x_tevx_linux64.
2703 2015-03-01 Pedro Alves <palves@redhat.com>
2705 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2708 2015-02-27 Pedro Alves <palves@redhat.com>
2710 * linux-x86-low.c (u_debugreg_offset): New function.
2711 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2713 2015-02-27 Pedro Alves <palves@redhat.com>
2715 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2716 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2717 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2718 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2719 (ps_lsetfpregs, ps_getpid)
2720 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2721 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2722 (ps_lsetxregs, ps_plog): Declare.
2724 2015-02-27 Pedro Alves <palves@redhat.com>
2726 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2727 IP_AGENT_EXPORT_FUNC.
2728 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2729 IP_AGENT_EXPORT_FUNC.
2730 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2731 (IP_AGENT_EXPORT): Delete.
2732 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2733 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2734 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2735 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2736 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2737 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2738 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2739 (traceframe_read_count, traceframe_write_count)
2740 (traceframes_created, trace_state_variables, get_raw_reg)
2741 (get_trace_state_variable_value, set_trace_state_variable_value)
2742 (ust_loaded, helper_thread_id, cmd_buf): Use
2743 IPA_SYM_EXPORTED_NAME.
2744 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2745 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2746 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2747 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2748 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2749 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2750 EXTERN_C_PUSH/EXTERN_C_POP.
2751 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2752 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2753 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2754 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2755 (traceframe_write_count, traceframe_read_count)
2756 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2757 (about_to_request_buffer_space, get_trace_state_variable_value)
2758 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2759 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2760 EXTERN_C_PUSH/EXTERN_C_POP.
2761 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2762 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2763 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2764 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2765 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2766 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2767 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2768 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2770 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2771 (IP_AGENT_EXPORT_VAR_DECL): Define.
2773 (gdb_agent_get_raw_reg): Declare.
2775 2015-02-27 Tom Tromey <tromey@redhat.com>
2776 Pedro Alves <palves@redhat.com>
2778 Rename symbols whose names are reserved C++ keywords throughout.
2780 2015-02-27 Pedro Alves <palves@redhat.com>
2782 * Makefile.in (COMPILER): New, get it from autoconf.
2783 (CXX): Get from autoconf instead.
2784 (COMPILE.pre): Use COMPILER.
2785 (CC-LD): Rename to ...
2786 (CC_LD): ... this. Use COMPILER.
2787 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2788 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2789 * acinclude.m4: Include build-with-cxx.m4.
2790 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2791 Disable -Werror by default if building in C++ mode.
2792 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2793 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2794 the C++ compiler. Save/restore CXXFLAGS too.
2795 * configure: Regenerate.
2797 2015-02-27 Pedro Alves <palves@redhat.com>
2799 * acinclude.m4: Include libiberty.m4.
2800 * configure.ac: Call libiberty_INIT.
2801 * config.in, configure: Regenerate.
2803 2015-02-26 Pedro Alves <palves@redhat.com>
2805 * linux-low.c (linux_wait_1): When incrementing the PC past a
2806 program breakpoint always use the_low_target.breakpoint_len as
2807 increment, rather than the maximum between that and
2808 the_low_target.decr_pc_after_break.
2810 2015-02-23 Pedro Alves <palves@redhat.com>
2812 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2813 thread was doing a step-over; always adjust the PC if
2814 we stepped over a permanent breakpoint.
2815 (linux_wait_1): If we stepped over breakpoint that was on top of a
2816 permanent breakpoint, manually advance the PC past it.
2818 2015-02-23 Pedro Alves <palves@redhat.com>
2820 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2822 (x86_fill_gregset, x86_store_gregset): Use it when handling
2825 2015-02-20 Pedro Alves <palves@redhat.com>
2827 * thread-db.c: Include "nat/linux-procfs.h".
2828 (thread_db_init): Skip listing new threads if the kernel supports
2829 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2831 2015-02-20 Pedro Alves <palves@redhat.com>
2833 * linux-low.c (status_pending_p_callback): Use ptid_match.
2835 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2837 PR breakpoints/16812
2838 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2839 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2840 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2842 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2844 PR breakpoints/15956
2845 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2847 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2849 * linux-low.c (linux_low_btrace_conf): Print size.
2850 * server.c (handle_btrace_conf_general_set): New.
2851 (hanle_general_set): Call handle_btrace_conf_general_set.
2852 (handle_query): Report Qbtrace-conf:bts:size as supported.
2854 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2856 * linux-low.c (linux_low_enable_btrace): Update parameters.
2857 (linux_low_btrace_conf): New.
2858 (linux_target_ops)<to_btrace_conf>: Initialize.
2859 * server.c (current_btrace_conf): New.
2860 (handle_btrace_enable): Rename to ...
2861 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2862 to target_enable_btrace. Update comment. Update users.
2863 (handle_qxfer_btrace_conf): New.
2864 (qxfer_packets): Add btrace-conf entry.
2865 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2866 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2867 (target_ops)<read_btrace_conf>: New.
2868 (target_enable_btrace): Update parameters.
2869 (target_read_btrace_conf): New.
2871 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2873 * server.c (handle_btrace_general_set): Remove call to
2874 target_supports_btrace.
2875 (supported_btrace_packets): New.
2876 (handle_query): Call supported_btrace_packets.
2877 * target.h: include btrace-common.h.
2878 (btrace_target_info): Removed.
2879 (supports_btrace, target_supports_btrace): Update parameters.
2881 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2883 * Makefile.in (SFILES): Add common/btrace-common.c.
2884 (OBS): Add common/btrace-common.o.
2885 (btrace-common.o): Add build rules.
2886 * linux-low: Include btrace-common.h.
2887 (linux_low_read_btrace): Use struct btrace_data. Call
2888 btrace_data_init and btrace_data_fini.
2890 2015-02-06 Pedro Alves <palves@redhat.com>
2892 * thread-db.c (find_new_threads_callback): Add debug output.
2894 2015-02-04 Pedro Alves <palves@redhat.com>
2896 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2897 (resume_stopped_resumed_lwps): New function.
2898 (linux_wait_for_event_filtered): Use it.
2900 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2902 * Makefile.in (SFILES): Add linux-personality.c.
2903 (linux-personality.o): New rule.
2904 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2905 list of objects to be built.
2906 * linux-low.c: Include nat/linux-personality.h.
2907 (linux_create_inferior): Remove code to disable address space
2908 randomization (moved to ../nat/linux-personality.c). Create
2909 cleanup to disable address space randomization.
2911 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2913 * Makefile.in (posix-strerror.o): New rule.
2914 (mingw-strerror.o): Likewise.
2915 * configure: Regenerated.
2916 * configure.ac: Source file ../common/common.host. Initialize new
2917 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2919 2015-01-14 Yao Qi <yao@codesourcery.com>
2921 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2922 (ppc-linux.o): New rule.
2923 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2924 * configure.ac: AC_CHECK_FUNCS(getauxval).
2925 * config.in: Re-generated.
2926 * configure: Re-generated.
2927 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2928 ppc64_64bit_inferior_p
2930 2015-01-14 Yao Qi <yao@codesourcery.com>
2932 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2933 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2934 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2935 (PT_ORIG_R3, PT_TRAP): Likewise.
2936 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2937 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2938 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2940 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2942 * i387-fp.c (i387_cache_to_xsave): In look over
2943 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2944 zmmh_low_space field by use of zmmh_high_space.
2946 2015-01-09 Pedro Alves <palves@redhat.com>
2948 * linux-low.c (step_over_bkpt): Move higher up in the file.
2949 (handle_extended_wait): Don't store the stop_pc here.
2950 (get_stop_pc): Adjust comments and rename to ...
2951 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2952 stopped for a software breakpoint or hardware breakpoint.
2953 (thread_still_has_status_pending_p): New function.
2954 (status_pending_p_callback): Use
2955 thread_still_has_status_pending_p. If the event is no longer
2956 interesting, resume the LWP.
2957 (handle_tracepoints): Add assert.
2958 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2959 (wstatus_maybe_breakpoint): New function.
2960 (cancel_breakpoint): Delete function.
2961 (check_stopped_by_watchpoint): New function, factored out from
2962 linux_low_filter_event.
2963 (lp_status_maybe_breakpoint): Delete function.
2964 (linux_low_filter_event): Remove filter_ptid argument.
2965 Leave thread group exits pending here. Store the LWP's stop PC.
2966 Always leave events pending.
2967 (linux_wait_for_event_filtered): Pull all events out of the
2968 kernel, and leave them all pending.
2969 (count_events_callback, select_event_lwp_callback): Consider all
2971 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2972 (select_event_lwp): Only give preference to the stepping LWP in
2973 all-stop mode. Adjust comments.
2974 (ignore_event): New function.
2975 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2976 references to cancel_breakpoints. Adjust to renames. Also give
2977 equal priority to all LWPs that have had events in non-stop mode.
2978 If reporting a software breakpoint event, unadjust the LWP's PC.
2979 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2980 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2982 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2983 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2984 (linux_stopped_by_watchpoint): Adjust.
2985 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2986 * linux-low.h (enum lwp_stop_reason): New.
2987 (struct lwp_info) <stop_pc>: Adjust comment.
2988 <stopped_by_watchpoint>: Delete field.
2989 <stop_reason>: New field.
2990 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2991 * mem-break.c (software_breakpoint_inserted_here)
2992 (hardware_breakpoint_inserted_here): New function.
2993 * mem-break.h (software_breakpoint_inserted_here)
2994 (hardware_breakpoint_inserted_here): Declare.
2995 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2996 (cancel_breakpoints): Delete.
2997 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2998 (upload_fast_traceframes): Remove references to
3001 2015-01-09 Pedro Alves <palves@redhat.com>
3003 * thread-db.c (find_new_threads_callback): Ignore thread if the
3004 kernel thread ID is -1.
3006 2015-01-09 Pedro Alves <palves@redhat.com>
3008 * linux-low.c (linux_attach_fail_reason_string): Move to
3009 nat/linux-ptrace.c, and rename.
3010 (linux_attach_lwp): Update comment.
3011 (attach_proc_task_lwp_callback): New function.
3012 (linux_attach): Adjust to rename and use
3013 linux_proc_attach_tgid_threads.
3014 (linux_attach_fail_reason_string): Delete declaration.
3016 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3018 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3019 * server.c (gdbserver_version): Likewise.
3021 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3023 * remote-utils.c: Include ctype.h.
3024 (input_interrupt): Explicitly handle the case when the char
3025 received is the NUL byte. Improve the printing of non-ASCII
3028 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3030 * linux-low.c (linux_low_filter_event): Update call to
3031 linux_enable_event_reporting following the addition of
3032 a new parameter to that function.
3034 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3037 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3038 (AARCH64_FPCR_REGNO): Likewise.
3039 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3040 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3041 (aarch64_store_fpregset): Likewise.
3043 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3045 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3046 Remove FIXME comment about assumption about N.
3048 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3050 * configure.ac: If large-file support is disabled in GDBserver,
3051 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3052 * configure: Regenerate.
3054 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3056 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3057 warning upon ENODATA from ptrace.
3058 * linux-s390-low.c (s390_store_tdb): New.
3059 (s390_regsets): Add regset for NT_S390_TDB.
3061 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3063 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3064 without a fill_function.
3065 * linux-s390-low.c (s390_fill_last_break): Remove.
3066 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3067 (s390_arch_setup): Use regset's size instead of fill_function for
3070 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3072 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3073 the regset's store function when ptrace returned an error.
3074 * regcache.c (get_thread_regcache): Invalidate register cache
3075 before fetching inferior's registers.
3077 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3079 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3080 while-loop as for-loop.
3081 (regsets_store_inferior_registers): Likewise.
3083 2014-11-28 Yao Qi <yao@codesourcery.com>
3085 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3086 * config.in, configure: Re-generate.
3087 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3090 2014-11-21 Yao Qi <yao@codesourcery.com>
3092 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3093 (AC_CHECK_HEADERS): Remove malloc.h.
3094 * configure: Re-generated.
3095 * config.in: Re-generated.
3096 * server.h: Don't include alloca.h and malloc.h.
3097 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3098 Don't include malloc.h.
3100 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3102 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3103 corresponding ERRNO check in same block.
3105 2014-11-12 Pedro Alves <palves@redhat.com>
3107 * server.c (cont_thread): Update comment.
3108 (start_inferior, attach_inferior): No longer clear cont_thread.
3109 (handle_v_cont): No longer set cont_thread.
3110 (captured_main): Clear cont_thread each time a GDB connects.
3112 2014-11-12 Pedro Alves <palves@redhat.com>
3114 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3115 thread, and don't resume all threads if the Hc thread has exited.
3117 2014-11-12 Pedro Alves <palves@redhat.com>
3119 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3120 the process group instead of to a specific LWP.
3122 2014-10-15 Pedro Alves <palves@redhat.com>
3125 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3127 (arm_set_thread_context): Delete.
3128 (the_low_target): Adjust.
3129 * win32-i386-low.c (debug_registers_changed)
3130 (debug_registers_used): Delete.
3131 (update_debug_registers_callback): New function.
3132 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3133 needing to update their debug registers.
3134 (win32_get_current_dr): New function.
3135 (x86_dr_low_get_addr, x86_dr_low_get_control)
3136 (x86_dr_low_get_status): Fetch the debug register from the thread
3138 (i386_initial_stuff): Adjust.
3139 (i386_get_thread_context): Remove current_event parameter. Don't
3140 clear debug_registers_changed nor copy DR values to
3142 (i386_set_thread_context): Delete.
3143 (i386_prepare_to_resume): New function.
3144 (i386_thread_added): Mark the thread as needing to update irs
3146 (the_low_target): Remove i386_set_thread_context and install
3147 i386_prepare_to_resume.
3148 * win32-low.c (win32_get_thread_context): Adjust.
3149 (win32_set_thread_context): Use SetThreadContext
3151 (win32_prepare_to_resume): New function.
3152 (win32_require_context): New function, factored out from ...
3153 (thread_rec): ... this.
3154 (continue_one_thread): Call win32_prepare_to_resume on each thread
3155 we're about to continue.
3156 (win32_resume): Call win32_prepare_to_resume on the event thread.
3157 * win32-low.h (struct win32_thread_info)
3158 <debug_registers_changed>: New field.
3159 (struct win32_target_ops): Change prototype of set_thread_context,
3160 delete set_thread_context and add prepare_to_resume.
3161 (win32_require_context): New declaration.
3163 2014-10-08 Gary Benson <gbenson@redhat.com>
3165 * server.h: Do not include common-exceptions.h.
3167 2014-10-08 Gary Benson <gbenson@redhat.com>
3169 * server.h: Do not include cleanups.h.
3171 2014-09-30 James Hogan <james.hogan@imgtec.com>
3173 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3176 2014-09-23 Yao Qi <yao@codesourcery.com>
3178 * linux-low.c (lp_status_maybe_breakpoint): New function.
3179 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3180 (count_events_callback): Likewise.
3181 (select_event_lwp_callback): Likewise.
3182 (cancel_breakpoints_callback): Likewise.
3184 2014-09-19 Don Breazeal <donb@codesourcery.com>
3186 * linux-low.c (handle_extended_wait): Call
3187 linux_ptrace_get_extended_event.
3188 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3189 linux_is_extended_waitstatus.
3191 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3193 * Makefile.in (CPPFLAGS): Define.
3194 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3195 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3197 2014-09-16 Gary Benson <gbenson@redhat.com>
3199 * inferiors.h (current_inferior): Renamed as...
3200 (current_thread): New variable. All uses updated.
3201 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3202 (maybe_move_out_of_jump_pad): Likewise.
3203 (cancel_breakpoint): Likewise.
3204 (linux_low_filter_event): Likewise.
3205 (wait_for_sigstop): Likewise.
3206 (linux_resume_one_lwp): Likewise.
3207 (need_step_over_p): Likewise.
3208 (start_step_over): Likewise.
3209 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3210 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3211 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3212 and save_inferior as saved_thread.
3213 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3215 (regcache_invalidate_thread): Likewise.
3216 * remote-utils.c (prepare_resume_reply): Likewise.
3217 * thread-db.c (thread_db_get_tls_address): Likewise.
3218 (disable_thread_event_reporting): Likewise.
3219 (remove_thread_event_breakpoints): Likewise.
3220 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3222 * target.h (set_desired_inferior): Renamed as...
3223 (set_desired_thread): New declaration. All uses updated.
3224 * server.c (myresume): Updated comment to reference thread instead
3226 (handle_serial_event): Likewise.
3227 (handle_target_event): Likewise.
3229 2014-09-12 Tom Tromey <tromey@redhat.com>
3230 Gary Benson <gbenson@redhat.com>
3232 * regcache.h: Include common-regcache.h.
3233 (regcache_read_pc): Don't declare.
3234 * regcache.c (get_thread_regcache_for_ptid): New function.
3236 2014-09-11 Tom Tromey <tromey@redhat.com>
3237 Gary Benson <gbenson@redhat.com>
3239 * symbol.c: New file.
3240 * Makefile.in (SFILES): Add symbol.c.
3241 (OBS): Add symbol.o.
3243 2014-09-11 Gary Benson <gbenson@redhat.com>
3245 * target.c (target_stop_ptid, target_continue_ptid): New
3248 2014-09-11 Tom Tromey <tromey@redhat.com>
3249 Gary Benson <gbenson@redhat.com>
3251 * target.h: Include target/target.h.
3252 * target.c (target_read_memory, target_read_uint32)
3253 (target_write_memory): New functions.
3255 2014-09-11 Gary Benson <gbenson@redhat.com>
3257 * server.h (debug_hw_points): Don't declare.
3258 * server.c (debug_hw_points): Don't define. Replace all uses
3259 with show_debug_regs.
3260 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3261 all uses with show_debug_regs.
3263 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3265 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3266 endianness into account.
3267 (ppc_supply_ptrace_register): Likewise.
3269 2014-09-03 James Hogan <james.hogan@imgtec.com>
3271 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3272 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3274 2014-09-03 Gary Benson <gbenson@redhat.com>
3276 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3277 ALL_DEBUG_ADDRESS_REGISTERS.
3279 2014-09-02 Gary Benson <gbenson@redhat.com>
3281 * i386-low.h: Renamed as...
3282 * x86-low.h: New file. All type, function and variable name
3283 prefixes changed from "i386_" to "x86_". All references updated.
3284 * i386-low.c: Renamed as...
3285 * x86-low.c: New file. All type, function and variable name
3286 prefixes changed from "i386_" to "x86_". All references updated.
3288 2014-09-02 Gary Benson <gbenson@redhat.com>
3290 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3291 (x86_linux_new_thread): Likewise.
3293 2014-08-29 Gary Benson <gbenson@redhat.com>
3295 * server.h (setjmp.h): Do not include.
3296 (toplevel): Do not declare.
3297 (common-exceptions.h): Include.
3298 (cleanups.h): Likewise.
3299 * server.c (toplevel): Do not define.
3300 (exit_code): New static global.
3301 (detach_or_kill_for_exit_cleanup): New function.
3302 (main): New function. Original main renamed to...
3303 (captured_main): New function.
3304 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3306 2014-08-29 Gary Benson <gbenson@redhat.com>
3308 * Makefile.in (SFILES): Add common/common-exceptions.c.
3309 (OBS): Add common-exceptions.o.
3310 (common-exceptions.o): New rule.
3311 * utils.c (prepare_to_throw_exception): New function.
3313 2014-08-29 Gary Benson <gbenson@redhat.com>
3315 * config.in: Regenerate.
3316 * configure: Likewise.
3318 2014-08-29 Gary Benson <gbenson@redhat.com>
3320 * Makefile.in (SFILES): Add common/cleanups.c.
3322 (cleanups.o): New rule.
3324 2014-08-29 Gary Benson <gbenson@redhat.com>
3326 * utils.c (internal_vwarning): New function.
3328 2014-08-28 Gary Benson <gbenson@redhat.com>
3330 * utils.h (fatal): Remove declaration.
3331 * utils.c (fatal): Remove function.
3333 2014-08-28 Gary Benson <gbenson@redhat.com>
3335 * tracepoint.c (gdb_agent_init): Replace fatal with
3337 (initialize_tracepoint): Likewise.
3339 2014-08-28 Gary Benson <gbenson@redhat.com>
3341 * remote-utils.c (remote_prepare): Replace fatal with error.
3343 2014-08-28 Gary Benson <gbenson@redhat.com>
3345 * linux-low.c (linux_async): Replace fatal with warning.
3347 (linux_start_non_stop): Return -1 if linux_async failed.
3349 2014-08-28 Gary Benson <gbenson@redhat.com>
3351 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3353 (i386_dr_low_get_addr): Remove vague comment.
3354 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3357 2014-08-28 Gary Benson <gbenson@redhat.com>
3359 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3360 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3362 (linux_resume_one_lwp): Likewise.
3363 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3365 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3366 with internal_error.
3367 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3368 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3369 (find_register_by_name): Replace fatal with internal_error.
3370 (find_regno): Likewise.
3371 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3372 * thread-db.c (thread_db_create_event): Likewise.
3373 (thread_db_load_search): Likewise.
3374 (try_thread_db_load_1): Likewise.
3375 * tracepoint.c (get_jump_space_head): Replace fatal with
3377 (claim_trampoline_space): Likewise.
3378 (have_fast_tracepoint_trampoline_buffer): Likewise.
3379 (cmd_qtstart): Likewise.
3380 (stop_tracing): Likewise.
3381 (fast_tracepoint_collecting): Likewise.
3382 (target_malloc): Likewise.
3383 (download_tracepoint): Likewise.
3384 (download_trace_state_variables): Replace check with gdb_assert.
3385 (upload_fast_traceframes): Replace fatal with internal_error.
3387 2014-08-19 Tom Tromey <tromey@redhat.com>
3388 Gary Benson <gbenson@redhat.com>
3390 * Makefile.in (SFILES): Add common/common-debug.c.
3391 (OBS): Add common-debug.o.
3392 (common-debug.o): New rule.
3393 * debug.h (debug_printf): Don't declare.
3394 * debug.c (debug_printf): Renamed and rewritten as...
3395 (debug_vprintf): New function.
3397 2014-08-19 Gary Benson <gbenson@redhat.com>
3399 * utils.h: Do not include print-utils.h.
3401 2014-08-19 Tom Tromey <tromey@redhat.com>
3402 Gary Benson <gbenson@redhat.com>
3404 * server.h: Add static assertion.
3405 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3407 2014-08-19 Tom Tromey <tromey@redhat.com>
3408 Gary Benson <gbenson@redhat.com>
3410 * Makefile.in (SFILES): Add common/errors.c.
3411 (OBS): Add errors.o.
3412 (IPA_OBS): Add errors-ipa.o.
3413 (errors.o): New rule.
3414 (errors-ipa.o): Likewise.
3415 * utils.h (perror_with_name, error, warning): Don't declare.
3416 * utils.c (warning): Renamed and rewritten as...
3417 (vwarning): New function.
3418 (error): Renamed and rewritten as...
3419 (verror): New function.
3420 (internal_error): Renamed and rewritten as...
3421 (internal_verror): New function.
3423 2014-08-07 Gary Benson <gbenson@redhat.com>
3425 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3426 * configure: Regenerate.
3427 * config.in: Likewise.
3428 * server.h: Do not include errno.h.
3429 * event-loop.c: Likewise.
3430 * hostio-errno.c: Likewise.
3431 * linux-low.c: Likewise.
3432 * remote-utils.c: Likewise.
3433 * spu-low.c: Likewise.
3434 * utils.c: Likewise.
3435 * gdbreplay.c: Unconditionally include errno.h.
3437 2014-08-07 Gary Benson <gbenson@redhat.com>
3439 * server.h: Do not include string.h.
3440 * event-loop.c: Likewise.
3441 * linux-low.c: Likewise.
3442 * regcache.c: Likewise.
3443 * remote-utils.c: Likewise.
3444 * spu-low.c: Likewise.
3445 * utils.c: Likewise.
3447 2014-08-07 Gary Benson <gbenson@redhat.com>
3449 * server.h: Do not include gdb_assert.h.
3451 2014-08-07 Gary Benson <gbenson@redhat.com>
3453 * server.h: Do not include common-utils.h.
3455 2014-08-07 Gary Benson <gbenson@redhat.com>
3457 * server.h: Do not include ptid.h.
3458 * notif.h: Likewise.
3460 2014-08-07 Gary Benson <gbenson@redhat.com>
3462 * server.h: Do not include gdb_locale.h.
3464 2014-08-07 Gary Benson <gbenson@redhat.com>
3466 * server.h: Do not include gdb/signals.h.
3467 * win32-low.c: Likewise.
3469 2014-08-07 Gary Benson <gbenson@redhat.com>
3471 * server.h: Do not include pathmax.h.
3473 2014-08-07 Gary Benson <gbenson@redhat.com>
3475 * server.h: Do not include libiberty.h.
3476 * linux-bfin-low.c: Likewise.
3478 2014-08-07 Gary Benson <gbenson@redhat.com>
3480 * server.h: Do not include ansidecl.h.
3482 2014-08-07 Gary Benson <gbenson@redhat.com>
3484 * linux-x86-low.c: Do not include stddef.h.
3485 * lynx-ppc-low.c: Likewise.
3486 * tracepoint.c: Likewise.
3488 2014-08-07 Gary Benson <gbenson@redhat.com>
3490 * server.h: Do not include stdarg.h.
3491 * nto-low.c: Likewise.
3493 2014-08-07 Gary Benson <gbenson@redhat.com>
3495 * server.h: Do not include stdlib.h.
3496 * inferiors.c: Likewise.
3497 * linux-low.c: Likewise.
3498 * regcache.c: Likewise.
3499 * spu-low.c: Likewise.
3500 * tracepoint.c: Likewise.
3501 * utils.c: Likewise.
3503 2014-08-07 Gary Benson <gbenson@redhat.com>
3505 * server.h: Do not include stdio.h.
3506 * linux-low.c: Likewise.
3507 * remote-utils.c: Likewise.
3508 * spu-low.c: Likewise.
3509 * utils.c: Likewise.
3510 * wincecompat.c: Likewise.
3512 2014-08-06 Gary Benson <gbenson@redhat.com>
3514 * regcache.c (init_register_cache): Move conditionals inside if.
3516 2014-08-06 Gary Benson <gbenson@redhat.com>
3518 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3520 2014-07-31 Gary Benson <gbenson@redhat.com>
3522 * ax.h: Do not include server.h.
3523 * gdbthread.h: Likewise.
3524 * lynx-low.h: Likewise.
3525 * notif.h: Likewise.
3527 2014-07-30 Gary Benson <gbenson@redhat.com>
3529 * server.h: Include common-defs.h.
3530 Do not include config.h or build-gnulib-gdbserver/config.h.
3532 2014-07-30 Gary Benson <gbenson@redhat.com>
3534 * hostio-errno.c: Move server.h to top of includes list.
3535 * inferiors.c: Likewise.
3536 * linux-x86-low.c: Likewise.
3537 * notif.c: Include server.h.
3539 2014-07-24 Tom Tromey <tromey@redhat.com>
3540 Gary Benson <gbenson@redhat.com>
3542 * server.h (CORE_ADDR): Now unsigned.
3544 2014-07-16 Pedro Alves <palves@redhat.com>
3546 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3548 2014-07-15 Pedro Alves <palves@redhat.com>
3550 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3553 2014-07-11 Pedro Alves <palves@redhat.com>
3555 * linux-low.c (kill_wait_lwp): New function, based on
3556 kill_one_lwp_callback, but use my_waitpid directly.
3557 (kill_one_lwp_callback, linux_kill): Use it.
3559 2014-06-23 Pedro Alves <palves@redhat.com>
3561 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3562 before setting DR0..DR3.
3564 2014-06-20 Gary Benson <gbenson@redhat.com>
3566 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3567 * configure: Regenerated.
3568 * config.in: Likewise.
3570 2014-06-20 Gary Benson <gbenson@redhat.com>
3572 * Makefile.in (SFILES): Update locations for files moved
3574 (object file files): Reordered.
3576 2014-06-20 Gary Benson <gbenson@redhat.com>
3578 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3579 (i386_dr_low_set_addr): Likewise.
3580 (i386_dr_low_get_addr): Likewise.
3581 (i386_dr_low_can_set_control): Likewise.
3582 (i386_dr_low_set_control): Likewise.
3583 (i386_dr_low_get_control): Likewise.
3584 (i386_dr_low_get_status): Likewise.
3585 (i386_get_debug_register_length): Likewise.
3586 * linux-x86-low.c (i386_dr_low_set_addr):
3587 Changed signature. Made static.
3588 (i386_dr_low_get_addr): Likewise.
3589 (i386_dr_low_set_control): Likewise.
3590 (i386_dr_low_get_control): Likewise.
3591 (i386_dr_low_get_status): Likewise.
3592 (i386_dr_low): New global variable.
3593 * win32-i386-low.c (i386_dr_low_set_addr):
3594 Changed signature. Made static.
3595 (i386_dr_low_get_addr): Likewise.
3596 (i386_dr_low_set_control): Likewise.
3597 (i386_dr_low_get_control): Likewise.
3598 (i386_dr_low_get_status): Likewise.
3599 (i386_dr_low): New global variable.
3601 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3603 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3604 * Makefile.in (AR, AR_FLAGS): Define.
3605 * configure: Regenerate.
3607 2014-06-19 Gary Benson <gbenson@redhat.com>
3609 * Makefile.in (i386-dregs.o): New rule.
3610 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3611 * i386-low.c (target.h): Remove include.
3612 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3613 (DR_CONTROL_SHIFT): Likewise.
3614 (DR_CONTROL_SIZE): Likewise.
3615 (DR_RW_EXECUTE): Likewise.
3616 (DR_RW_WRITE): Likewise.
3617 (DR_RW_READ): Likewise.
3618 (DR_RW_IORW): Likewise.
3619 (DR_LEN_1): Likewise.
3620 (DR_LEN_2): Likewise.
3621 (DR_LEN_4): Likewise.
3622 (DR_LEN_8): Likewise.
3623 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3624 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3625 (DR_ENABLE_SIZE): Likewise.
3626 (DR_LOCAL_SLOWDOWN): Likewise.
3627 (DR_GLOBAL_SLOWDOWN): Likewise.
3628 (DR_CONTROL_RESERVED): Likewise.
3629 (I386_DR_CONTROL_MASK): Likewise.
3630 (I386_DR_VACANT): Likewise.
3631 (I386_DR_LOCAL_ENABLE): Likewise.
3632 (I386_DR_GLOBAL_ENABLE): Likewise.
3633 (I386_DR_DISABLE): Likewise.
3634 (I386_DR_SET_RW_LEN): Likewise.
3635 (I386_DR_GET_RW_LEN): Likewise.
3636 (I386_DR_WATCH_HIT): Likewise.
3637 (i386_wp_op_t): Likewise.
3638 (i386_show_dr): Likewise.
3639 (i386_length_and_rw_bits): Likewise.
3640 (i386_insert_aligned_watchpoint): Likewise.
3641 (i386_remove_aligned_watchpoint): Likewise.
3642 (i386_handle_nonaligned_watchpoint): Likewise.
3643 i386_update_inferior_debug_regs(): Likewise.
3644 (i386_dr_insert_watchpoint): Likewise.
3645 (i386_dr_remove_watchpoint): Likewise.
3646 (i386_dr_region_ok_for_watchpoint): Likewise.
3647 (i386_dr_stopped_data_address): Likewise.
3648 (i386_dr_stopped_by_watchpoint): Likewise.
3650 2014-06-19 Gary Benson <gbenson@redhat.com>
3652 * i386-low.c (i386_dr_show): Renamed to
3653 i386_show_dr and made static. All uses updated.
3654 (i386_dr_length_and_rw_bits): Renamed to
3655 i386_length_and_rw_bits and made static.
3657 (i386_dr_insert_aligned_watchpoint): Renamed to
3658 i386_insert_aligned_watchpoint and made static.
3660 (i386_dr_remove_aligned_watchpoint): Renamed to
3661 i386_remove_aligned_watchpoint and made static.
3663 (i386_dr_update_inferior_debug_regs): Renamed to
3664 i386_update_inferior_debug_regs and made static.
3667 2014-06-18 Gary Benson <gbenson@redhat.com>
3669 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3670 (i386_dr_low_can_set_control): Likewise.
3671 (i386_get_debug_register_length): Likewise.
3672 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3673 (i386_dr_low_can_set_control): Likewise.
3674 (i386_get_debug_register_length): Likewise.
3676 2014-06-17 Gary Benson <gbenson@redhat.com>
3678 * i386-low.h (i386-dregs.h): New include.
3679 (DR_FIRSTADDR): Now in i386-dregs.h.
3680 (DR_LASTADDR): Likewise.
3681 (DR_NADDR): Likewise.
3682 (DR_STATUS): Likewise.
3683 (DR_CONTROL): Likewise.
3684 (i386_debug_reg_state): Likewise.
3685 (i386_dr_insert_watchpoint): Likewise.
3686 (i386_dr_remove_watchpoint): Likewise.
3687 (i386_dr_region_ok_for_watchpoint): Likewise.
3688 (i386_dr_stopped_data_address): Likewise.
3689 (i386_dr_stopped_by_watchpoint): Likewise.
3690 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3692 2014-06-18 Gary Benson <gbenson@redhat.com>
3694 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3695 i386_dr_insert_watchpoint.
3696 (i386_low_remove_watchpoint): Renamed to
3697 i386_dr_remove_watchpoint.
3698 (i386_low_region_ok_for_watchpoint): Renamed to
3699 i386_dr_region_ok_for_watchpoint.
3700 (i386_low_stopped_data_address): Renamed to
3701 i386_dr_stopped_data_address.
3702 (i386_low_stopped_by_watchpoint): Renamed to
3703 i386_dr_stopped_by_watchpoint.
3704 * i386-low.c (i386_show_dr): Renamed to
3705 i386_dr_show and made nonstatic. All uses updated.
3706 (i386_length_and_rw_bits): Renamed to
3707 i386_dr_length_and_rw_bits and made nonstatic.
3709 (i386_insert_aligned_watchpoint): Renamed to
3710 i386_dr_insert_aligned_watchpoint and made nonstatic.
3712 (i386_remove_aligned_watchpoint): Renamed to
3713 i386_dr_remove_aligned_watchpoint and made nonstatic.
3715 (i386_update_inferior_debug_regs): Renamed to
3716 i386_dr_update_inferior_debug_regs and made nonstatic.
3718 (i386_low_insert_watchpoint): Renamed to
3719 i386_dr_insert_watchpoint. All uses updated.
3720 (i386_low_remove_watchpoint): Renamed to
3721 i386_dr_remove_watchpoint. All uses updated.
3722 (i386_low_region_ok_for_watchpoint): Renamed to
3723 i386_dr_region_ok_for_watchpoint. All uses updated.
3724 (i386_low_stopped_data_address): Renamed to
3725 i386_dr_stopped_data_address. All uses updated.
3726 (i386_low_stopped_by_watchpoint): Renamed to
3727 i386_dr_stopped_by_watchpoint. All uses updated.
3729 2014-06-18 Gary Benson <gbenson@redhat.com>
3731 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3732 (i386_dr_low_can_set_control): Likewise.
3733 (i386_insert_aligned_watchpoint): New check.
3735 2014-06-18 Gary Benson <gbenson@redhat.com>
3737 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3740 2014-06-18 Gary Benson <gbenson@redhat.com>
3742 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3743 instead of fatal and error.
3744 (i386_handle_nonaligned_watchpoint): Likewise.
3746 2014-06-18 Gary Benson <gbenson@redhat.com>
3748 * i386-low.c (i386_get_debug_register_length): New macro.
3749 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3750 (i386_show_dr): Use debug_printf instead of fprintf. Use
3751 phex to format values.
3753 2014-06-18 Gary Benson <gbenson@redhat.com>
3755 * i386-low.h: Comment changes.
3756 * i386-low.c: Likewise.
3758 2014-06-18 Gary Benson <gbenson@redhat.com>
3760 * i386-low.c: Whitespace changes.
3762 2014-06-12 Tom Tromey <tromey@redhat.com>
3764 * utils.c (freeargv): Remove.
3766 2014-06-12 Tom Tromey <tromey@redhat.com>
3768 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3769 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3770 (parse_debug_format_options): Likewise.
3771 (gdbserver_usage): Likewise.
3772 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3773 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3774 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3776 ($(LIBGNU)): Depend on libiberty.
3777 (all-lib): Recurse into all subdirs.
3778 (install-only): Invoke "install" target in subdirs.
3779 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3781 * configure: Rebuild.
3782 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3783 for vasprintf, vsnprintf, or gettimeofday.
3784 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3787 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3789 * development.sh: Delete.
3790 * Makefile.in (config.status): Adjust dependency on development.sh.
3791 * configure.ac: Adjust development.sh source call.
3792 * configure: Regenerate.
3794 2014-06-02 Pedro Alves <palves@redhat.com>
3796 * ax.c (gdb_free_agent_expr): New function.
3797 * ax.h (gdb_free_agent_expr): New declaration.
3798 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3800 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3802 (clear_breakpoint_conditions_and_commands): New function.
3803 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3804 (clear_breakpoint_conditions_and_commands): New declaration.
3806 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3808 * linux-aarch64-low.c (asm/ptrace.h): Include.
3810 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3812 Fix TLS access for -static -pthread.
3813 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3814 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3815 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3817 2014-05-20 Pedro Alves <palves@redhat.com>
3819 * linux-aarch64-low.c (aarch64_insert_point)
3820 (aarch64_remove_point): No longer check whether the type is
3821 supported here. Adjust to new interface.
3822 (the_low_target): Install aarch64_supports_z_point_type as
3823 supports_z_point_type method.
3824 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3825 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3826 instead of a Z packet char. Adjust.
3827 (arm_supports_z_point_type): New function.
3828 (arm_insert_point, arm_remove_point): Adjust to new interface.
3829 (the_low_target): Install arm_supports_z_point_type.
3830 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3831 (cris_insert_point, cris_remove_point): Adjust to new interface.
3832 Don't check whether the type is supported here.
3833 (the_low_target): Install cris_supports_z_point_type.
3834 * linux-low.c (linux_supports_z_point_type): New function.
3835 (linux_insert_point, linux_remove_point): Adjust to new interface.
3836 * linux-low.h (struct linux_target_ops) <insert_point,
3837 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3838 raw_breakpoint pointer parameter.
3839 <supports_z_point_type>: New method.
3840 * linux-mips-low.c (mips_supports_z_point_type): New function.
3841 (mips_insert_point, mips_remove_point): Adjust to new interface.
3842 Use mips_supports_z_point_type.
3843 (the_low_target): Install mips_supports_z_point_type.
3844 * linux-ppc-low.c (the_low_target): Install NULL as
3845 supports_z_point_type method.
3846 * linux-s390-low.c (the_low_target): Install NULL as
3847 supports_z_point_type method.
3848 * linux-sparc-low.c (the_low_target): Install NULL as
3849 supports_z_point_type method.
3850 * linux-x86-low.c (x86_supports_z_point_type): New function.
3851 (x86_insert_point): Adjust to new insert_point interface. Use
3852 insert_memory_breakpoint. Adjust to new
3853 i386_low_insert_watchpoint interface.
3854 (x86_remove_point): Adjust to remove_point interface. Use
3855 remove_memory_breakpoint. Adjust to new
3856 i386_low_remove_watchpoint interface.
3857 (the_low_target): Install x86_supports_z_point_type.
3858 * lynx-low.c (lynx_target_ops): Install NULL as
3859 supports_z_point_type callback.
3860 * nto-low.c (nto_supports_z_point_type): New.
3861 (nto_insert_point, nto_remove_point): Adjust to new interface.
3862 (nto_target_ops): Install nto_supports_z_point_type.
3863 * mem-break.c: Adjust intro comment.
3864 (struct raw_breakpoint) <raw_type, size>: New fields.
3865 <inserted>: Update comment.
3866 <shlib_disabled>: Delete field.
3867 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3868 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3869 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3870 (raw_bkpt_type_to_target_hw_bp_type): New function.
3871 (find_enabled_raw_code_breakpoint_at): New function.
3872 (find_raw_breakpoint_at): New type and size parameters. Use them.
3873 (insert_memory_breakpoint): New function, based off
3874 set_raw_breakpoint_at.
3875 (remove_memory_breakpoint): New function.
3876 (set_raw_breakpoint_at): Reimplement.
3877 (set_breakpoint): New, based on set_breakpoint_at.
3878 (set_breakpoint_at): Reimplement.
3879 (delete_raw_breakpoint): Go through the_target->remove_point
3880 instead of assuming memory breakpoints.
3881 (find_gdb_breakpoint_at): Delete.
3882 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3883 (find_gdb_breakpoint): New function.
3884 (set_gdb_breakpoint_at): Delete.
3885 (z_type_supported): New function.
3886 (set_gdb_breakpoint_1): New function, loosely based off
3887 set_gdb_breakpoint_at.
3888 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3889 (delete_gdb_breakpoint_at): Delete.
3890 (delete_gdb_breakpoint_1): New function, loosely based off
3891 delete_gdb_breakpoint_at.
3892 (delete_gdb_breakpoint): New function.
3893 (clear_gdb_breakpoint_conditions): Rename to ...
3894 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3896 (add_condition_to_breakpoint): Make static.
3897 (add_breakpoint_condition): Take a struct breakpoint pointer
3898 instead of an address. Adjust.
3899 (gdb_condition_true_at_breakpoint): Rename to ...
3900 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3902 (gdb_condition_true_at_breakpoint): Reimplement.
3903 (add_breakpoint_commands): Take a struct breakpoint pointer
3904 instead of an address. Adjust.
3905 (gdb_no_commands_at_breakpoint): Rename to ...
3906 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3907 parameter. Return true if no breakpoint was found. Change debug
3909 (gdb_no_commands_at_breakpoint): Reimplement.
3910 (run_breakpoint_commands): Rename to ...
3911 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3912 and change return type to boolean.
3913 (run_breakpoint_commands): New function.
3914 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3915 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3916 breakpoint. Go through the_target->remove_point instead of
3917 assuming memory breakpoint.
3918 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3919 software and hardware breakpoints.
3920 (reinsert_raw_breakpoint): Go through the_target->insert_point
3921 instead of assuming memory breakpoint.
3922 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3923 software and hardware breakpoints.
3924 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3925 Check both software and hardware breakpoints.
3926 (validate_inserted_breakpoint): Assert the breakpoint is a
3927 software breakpoint. Set the inserted flag to -1 instead of
3928 setting shlib_disabled.
3929 (delete_disabled_breakpoints): Adjust.
3930 (validate_breakpoints): Only validate software breakpoints.
3931 Adjust to inserted flag change.
3932 (check_mem_read, check_mem_write): Skip breakpoint types other
3933 than software breakpoints. Adjust to inserted flag change.
3934 * mem-break.h (enum raw_bkpt_type): New enum.
3935 (raw_breakpoint, struct process_info): Forward declare.
3936 (Z_packet_to_target_hw_bp_type): Delete declaration.
3937 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3938 (set_gdb_breakpoint, delete_gdb_breakpoint)
3939 (clear_breakpoint_conditions): New declarations.
3940 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3941 (breakpoint_inserted_here): Update comment.
3942 (add_breakpoint_condition, add_breakpoint_commands): Replace
3943 address parameter with a breakpoint pointer parameter.
3944 (gdb_breakpoint_here): Update comment.
3945 (delete_gdb_breakpoint_at): Delete.
3946 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3947 * server.c (process_point_options): Take a struct breakpoint
3948 pointer instead of an address. Adjust.
3949 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3950 delete_gdb_breakpoint.
3951 * spu-low.c (spu_target_ops): Install NULL as
3952 supports_z_point_type method.
3953 * target.h: Include mem-break.h.
3954 (struct target_ops) <prepare_to_access_memory>: Update comment.
3955 <supports_z_point_type>: New field.
3956 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3957 instead of a char. Also take a raw breakpoint pointer.
3958 * win32-arm-low.c (the_low_target): Install NULL as
3959 supports_z_point_type.
3960 * win32-i386-low.c (i386_supports_z_point_type): New function.
3961 (i386_insert_point, i386_remove_point): Adjust to new interface.
3962 (the_low_target): Install i386_supports_z_point_type.
3963 * win32-low.c (win32_supports_z_point_type): New function.
3964 (win32_insert_point, win32_remove_point): Adjust to new interface.
3965 (win32_target_ops): Install win32_supports_z_point_type.
3966 * win32-low.h (struct win32_target_ops):
3967 <supports_z_point_type>: New method.
3968 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3969 instead of a char. Also take a raw breakpoint pointer.
3971 2014-05-20 Pedro Alves <palves@redhat.com>
3973 * mem-break.h: Include break-common.h.
3974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3976 (Z_packet_to_target_hw_bp_type): New declaration.
3977 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3978 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3979 (Z_PACKET_ACCESS_WP): Delete macros.
3980 (Z_packet_to_hw_type): Delete function.
3981 * i386-low.h: Don't include break-common.h here.
3982 (Z_packet_to_hw_type): Delete declaration.
3983 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3984 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3985 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3986 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3987 * linux-aarch64-low.c: Don't include break-common.h here.
3988 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3989 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3990 (Z_packet_to_target_hw_bp_type): Delete function.
3991 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3993 (mips_insert_point, mips_remove_point): Use
3994 Z_packet_to_target_hw_bp_type.
3996 2014-05-20 Pedro Alves <palves@redhat.com>
3998 * linux-aarch64-low.c: Include break-common.h.
3999 (enum target_point_type): Delete.
4000 (Z_packet_to_point_type): Rename to ...
4001 (Z_packet_to_target_hw_bp_type): ... this, and return a
4002 target_hw_bp_type instead.
4003 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4004 instead of an enum target_point_type.
4005 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4007 (aarch64_dr_state_insert_one_point)
4008 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4009 (aarch64_handle_aligned_watchpoint)
4010 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4011 Take an enum target_hw_bp_type instead of an enum
4013 (aarch64_supports_z_point_type): New function.
4014 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4015 use Z_packet_to_target_hw_bp_type.
4017 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4019 * configure.ac: Only use -Werror by default when DEVELOPMENT
4021 * configure: Regenerate.
4023 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4025 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4026 * linux-x86-low.c (X86_64_USER_REGS): New.
4027 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4029 2014-04-28 Yao Qi <yao@codesourcery.com>
4031 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4034 2014-04-25 Pedro Alves <palves@redhat.com>
4037 * linux-low.c (linux_attach_fail_reason_string): New function.
4038 (linux_attach_lwp): Delete.
4039 (linux_attach_lwp_1): Rename to ...
4040 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4041 argument. Remove "initial" parameter. Return int instead of
4042 void. Don't error or warn here.
4043 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4044 failure to attach to the tgid. Call warning when failing to
4046 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4047 argument. Remove "initial" parameter. Return int instead of
4048 void. Don't error or warn here.
4049 (linux_attach_fail_reason_string): New declaration.
4050 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4051 interface change. Use linux_attach_fail_reason_string.
4053 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4054 Walfred Tedeschi <walfred.tedeschi@intel.com>
4056 * Makefile.in: Added rules to handle new files
4057 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4058 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4059 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4060 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4061 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4062 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4064 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4065 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4066 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4067 i386/x32-avx512.xml.
4068 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4069 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4070 i386/x32-avx512-linux.xml.
4071 * i387-fp.c (num_avx512_k_registers): New constant for number
4073 (num_avx512_zmmh_low_registers): New constant for number of
4074 lower ZMM registers (0-15).
4075 (num_avx512_zmmh_high_registers): New constant for number of
4076 higher ZMM registers (16-31).
4077 (num_avx512_ymmh_registers): New contant for number of higher
4078 YMM registers (ymm16-31 added by avx521 on x86_64).
4079 (num_avx512_xmm_registers): New constant for number of higher
4080 XMM registers (xmm16-31 added by AVX512 on x86_64).
4081 (struct i387_xsave): Add space for AVX512 registers.
4082 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4083 Add code to handle AVX512 registers.
4084 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4085 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4086 prototypei from generated file.
4087 (tdesc_amd64_avx512_linux): Likewise.
4088 (init_registers_x32_avx512_linux): Likewise.
4089 (tdesc_x32_avx512_linux): Likewise.
4090 (init_registers_i386_avx512_linux): Likewise.
4091 (tdesc_i386_avx512_linux): Likewise.
4092 (x86_64_regmap): Add AVX512 registers.
4093 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4095 (initialize_low_arch): Add code to initialize AVX512 registers.
4097 2014-04-23 Pedro Alves <palves@redhat.com>
4099 * mem-break.c (find_gdb_breakpoint_at): Make static.
4100 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4102 2014-04-23 Pedro Alves <palves@redhat.com>
4104 * i386-low.c: Don't include break-common.h here.
4105 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4106 prototype to take target_hw_bp_type as argument instead of a Z
4108 * i386-low.h: Include break-common.h here.
4109 (Z_packet_to_hw_type): Declare.
4110 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4112 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4113 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4114 (x86_remove_point): Convert the packet number to a
4115 target_hw_bp_type before calling i386_low_remove_watchpoint.
4116 * win32-i386-low.c (i386_insert_point): Convert the packet number
4117 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4118 (i386_remove_point): Convert the packet number to a
4119 target_hw_bp_type before calling i386_low_remove_watchpoint.
4121 2014-04-23 Pedro Alves <palves@redhat.com>
4123 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4125 2014-04-10 Pedro Alves <palves@redhat.com>
4127 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4128 Check if the condition or command is NULL before checking if the
4129 breakpoint is known. On success, return true.
4130 * mem-break.h (add_breakpoint_condition): Document return.
4131 (add_breakpoint_commands): Add describing comment.
4132 * server.c (skip_to_semicolon): New function.
4133 (process_point_options): Use it.
4135 2014-04-09 Pedro Alves <palves@redhat.com>
4137 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4140 2014-02-27 Pedro Alves <palves@redhat.com>
4143 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4145 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4147 (last_thread_of_process_p): Take a PID argument instead of a
4149 (linux_wait_for_lwp): Delete.
4150 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4152 (linux_low_filter_event): New function, party factored out from
4153 linux_wait_for_event.
4154 (linux_wait_for_event): Rename to ...
4155 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4156 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4157 sigsuspend. Check for zombie leaders.
4158 (linux_wait_for_event): Reimplement as wrapper around
4159 linux_wait_for_event_filtered.
4160 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4161 a normal or signal exit is seen, it's the whole process exiting.
4162 (wait_for_sigstop): No longer a for_each_inferior callback.
4163 Rewrite on top of linux_wait_for_event_filtered.
4164 (stop_all_lwps): Call wait_for_sigstop directly.
4165 * server.c (resume, handle_target_event): Handle
4166 TARGET_WAITKIND_NO_RESUMED.
4168 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4170 * win32-low.c (psapi_get_dll_name,
4171 * win32_CreateToolhelp32Snapshot): Delete.
4172 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4173 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4175 (handle_load_dll): Add function description.
4176 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4178 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4180 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4182 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4183 base address when calling win32_add_one_solib.
4184 (handle_load_dll): Delete local variable load_addr.
4185 Remove 0x1000 offset applied to DLL base address when calling
4186 win32_add_one_solib.
4187 (handle_unload_dll): Add comment.
4189 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4191 * win32-low.c (win32_add_all_dlls): Renames
4192 win32_ensure_ntdll_loaded. Rewrite function documentation.
4193 Adjust implementation to always load all DLLs.
4194 Add 0x1000 offset to DLL base address when calling
4195 win32_add_one_solib.
4196 (child_initialization_done): New static global.
4197 (do_initial_child_stuff): Set child_initialization_done to
4198 zero during child initialization, and 1 after. Replace call
4199 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4201 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4202 (handle_unload_dll): Add function documentation.
4203 (get_child_debug_event): Ignore load and unload DLL events
4204 during child initialization.
4206 2014-02-20 Doug Evans <dje@google.com>
4208 Remove global all_lwps.
4209 * inferiors.h (ptid_of): Move here from linux-low.h.
4210 (pid_of, lwpid_of): Ditto.
4211 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4212 parameter is a struct thread_info * now.
4213 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4214 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4215 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4217 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4218 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4219 * linux-arm-low.c (update_registers_callback): Update, "entry"
4220 parameter is a struct thread_info * now.
4221 Fetch lwpid from current_inferior directly.
4222 (arm_insert_point): Pass &all_threads to find_inferior instead of
4224 (arm_remove_point): Ditto.
4225 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4226 (arm_prepare_to_resume): Fetch pid from thread.
4227 (arm_read_description): Fetch lwpid from current_inferior directly.
4228 * linux-low.c (all_lwps): Delete.
4229 (delete_lwp): Delete call to remove_inferior.
4230 (handle_extended_wait): Fetch lwpid from thread.
4231 (add_lwp): Don't set lwp->entry.id. Remove call to
4232 add_inferior_to_list.
4233 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4234 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4235 (kill_one_lwp_callback): Ditto.
4236 (linux_kill): Don't dereference NULL pointer.
4237 Fetch ptid,lwpid from thread.
4238 (get_detach_signal): Fetch ptid from thread.
4239 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4240 Simplify call to regcache_invalidate_thread.
4241 (delete_lwp_callback): Update, "entry" parameter is a
4242 struct thread_info * now. Fetch pid from thread.
4243 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4244 (status_pending_p_callback): Update, "entry" parameter is a
4245 struct thread_info * now. Fetch ptid from thread.
4246 (find_lwp_pid): Update, "entry" parameter is a
4247 struct thread_info * now.
4248 (linux_wait_for_lwp): Fetch pid from thread.
4249 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4250 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4251 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4252 (dequeue_one_deferred_signal): Ditto.
4253 (cancel_breakpoint): Fetch ptid from current_inferior.
4254 (linux_wait_for_event): Pass &all_threads to find_inferior,
4255 not &all_lwps. Fetch ptid, lwpid from thread.
4256 (count_events_callback): Update, "entry" parameter is a
4257 struct thread_info * now.
4258 (select_singlestep_lwp_callback): Ditto.
4259 (select_event_lwp_callback): Ditto.
4260 (cancel_breakpoints_callback): Ditto.
4261 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4263 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4264 (unsuspend_one_lwp): Update, "entry" parameter is a
4265 struct thread_info * now.
4266 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4268 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4269 Fetch lwpid from thread, not lwp.
4270 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4271 Pass &all_threads to find_inferior, not &all_lwps.
4272 (send_sigstop): Fetch lwpid from thread, not lwp.
4273 (send_sigstop_callback): Update, "entry" parameter is a
4274 struct thread_info * now.
4275 (suspend_and_send_sigstop_callback): Ditto.
4276 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4277 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4278 struct thread_info * now.
4279 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4281 (lwp_running): Update, "entry" parameter is a
4282 struct thread_info * now.
4283 (stop_all_lwps): Fetch ptid from thread.
4284 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4285 (linux_resume_one_lwp): Fetch lwpid from thread.
4286 (linux_set_resume_request): Update, "entry" parameter is a
4287 struct thread_info * now. Fetch pid, lwpid from thread.
4288 (resume_status_pending_p): Update, "entry" parameter is a
4289 struct thread_info * now.
4290 (need_step_over_p): Ditto. Fetch lwpid from thread.
4291 (start_step_over): Fetch lwpid from thread.
4292 (linux_resume_one_thread): Update, "entry" parameter is a
4293 struct thread_info * now. Fetch lwpid from thread.
4294 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4295 (proceed_one_lwp): Update, "entry" parameter is a
4296 struct thread_info * now. Fetch lwpid from thread.
4297 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4298 struct thread_info * now.
4299 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4300 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4301 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4303 (regsets_store_inferior_registers): Ditto.
4304 (fetch_register, store_register): Ditto.
4305 (linux_read_memory, linux_write_memory): Ditto.
4306 (linux_request_interrupt): Ditto.
4307 (linux_read_auxv): Ditto.
4308 (linux_xfer_siginfo): Ditto.
4309 (linux_qxfer_spu): Ditto.
4310 (linux_qxfer_libraries_svr4): Ditto.
4311 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4312 moved to inferiors.h.
4314 (get_thread_lwp): Update.
4315 (struct lwp_info): Delete member "entry". Simplify comment for
4318 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4319 current_inferior directly.
4320 (update_watch_registers_callback): Update, "entry" parameter is a
4321 struct thread_info * now. Fetch pid from thread.
4322 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4323 (mips_insert_point): Fetch lwpid from current_inferior.
4324 Pass &all_threads to find_inferior, not &all_lwps.
4325 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4326 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4328 (mips_stopped_data_address): Ditto.
4329 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4331 * linux-tile-low.c (tile_arch_setup): Ditto.
4332 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4333 (update_debug_registers_callback): Update, "entry" parameter is a
4334 struct thread_info * now. Fetch pid from thread.
4335 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4336 Pass &all_threads to find_inferior, not &all_lwps.
4337 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4338 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4339 Pass &all_threads to find_inferior, not &all_lwps.
4340 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4341 (i386_dr_low_get_status): Ditto.
4342 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4343 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4344 (x86_linux_read_description): Ditto.
4345 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4347 2014-02-20 Doug Evans <dje@google.com>
4349 * inferiors.c (get_first_inferior): Fix buglet.
4351 2014-02-19 Doug Evans <dje@google.com>
4353 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4354 * inferiors.c (add_thread): Change result type to struct thread_info *.
4355 All callers updated.
4356 (add_lwp): Call add_thread here instead of in callers.
4357 All callers updated.
4358 * linux-low.h (get_lwp_thread): Rewrite.
4359 (struct lwp_info): New member "thread".
4361 2014-02-19 Doug Evans <dje@google.com>
4363 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4364 All callers updated.
4366 2014-02-19 Doug Evans <dje@google.com>
4368 * inferiors.c (add_thread): Fix whitespace.
4370 2014-02-19 Doug Evans <dje@google.com>
4372 * dll.c (clear_dlls): Replace accessing list implemention details
4374 * gdbthread.h (get_first_thread): Declare.
4375 * inferiors.c (for_each_inferior_with_data): New function.
4376 (get_first_thread): New function.
4377 (find_thread_ptid): Simplify.
4378 (get_first_inferior): New function.
4379 (clear_list): Delete.
4380 (one_inferior_p): New function.
4381 (clear_inferior_list): New function.
4382 (clear_inferiors): Update.
4383 * inferiors.h (for_each_inferior_with_data): Declare.
4384 (clear_inferior_list): Declare.
4385 (one_inferior_p): Declare.
4386 (get_first_inferior): Declare.
4387 * linux-low.c (linux_wait_for_event): Replace accessing list
4388 implemention details with API function.
4389 * server.c (target_running): Ditto.
4390 (accumulate_file_name_length): New function.
4391 (emit_dll_description): New function.
4392 (handle_qxfer_libraries): Replace accessing list implemention
4393 details with API function.
4394 (handle_qxfer_threads_worker): New function.
4395 (handle_qxfer_threads_proper): Replace accessing list implemention
4396 details with API function.
4397 (handle_query): Ditto.
4398 (visit_actioned_threads_callback_ftype): New typedef.
4399 (visit_actioned_threads_data): New struct.
4400 (visit_actioned_threads): Rewrite to be find_inferior callback.
4401 (resume): Call find_inferior.
4402 (handle_status): Replace accessing list implemention
4403 details with API function.
4404 (process_serial_event): Replace accessing list implemention details
4406 * target.c (set_desired_inferior): Replace accessing list implemention
4407 details with API function.
4408 * tracepoint.c (same_process_p): New function.
4409 (gdb_agent_about_to_close): Replace accessing list implemention
4410 details with API function.
4411 * win32-low.c (child_delete_thread): Replace accessing list
4412 implemention details with API function.
4413 (match_dll_by_basename): New function.
4414 (dll_is_loaded_by_basename): New function.
4415 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4416 details call to dll_is_loaded_by_basename.
4418 2014-02-19 Doug Evans <dje@google.com>
4420 * dll.h (struct dll_info): Add comment.
4421 * gdbthread.h (struct thread_info): Add comment.
4422 (current_ptid): Simplify.
4423 * inferiors.c (add_process): Update.
4424 (remove_process): Update.
4425 * inferiors.h (struct process_info): Rename member "head" to "entry".
4426 * linux-low.c (delete_lwp): Update.
4428 (last_thread_of_process_p): Update.
4429 (kill_one_lwp_callback, linux_kill): Update.
4430 (status_pending_p_callback): Update.
4431 (wait_for_sigstop): Update. Simplify read of ptid.
4432 (start_step_over): Update.
4433 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4434 (get_lwp_thread): Update.
4435 (struct lwp_info): Rename member "head" to "entry".
4436 * regcache.h (inferior_list_entry): Delete.
4437 * server.c (kill_inferior_callback): Update.
4438 (detach_or_kill_inferior_callback): Update.
4439 (print_started_pid): Update.
4440 (print_attached_pid): Update.
4441 (process_serial_event): Simplify read of ptid.
4442 * thread-db.c (thread_db_create_event): Update.
4443 (thread_db_get_tls_address): Update.
4444 * win32-low.c (current_inferior_ptid): Simplify.
4446 2014-02-19 Tom Tromey <tromey@redhat.com>
4448 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4450 (target_supports_btrace): Update.
4452 2014-02-14 Yao Qi <yao@codesourcery.com>
4454 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4455 (rsp-low-ipa.o): New target.
4457 2014-02-12 Tom Tromey <tromey@redhat.com>
4459 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4460 convert_ascii_to_int.
4461 * regcache.c (registers_to_string): Likewise.
4462 * remote-utils.c (decode_M_packet): Likewise.
4463 * server.c (process_serial_event): Likewise.
4465 2014-02-12 Tom Tromey <tromey@redhat.com>
4467 * server.c (handle_query, handle_v_run): Use hex2bin, not
4469 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4471 2014-02-12 Tom Tromey <tromey@redhat.com>
4473 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4474 convert_int_to_ascii.
4475 * regcache.c (registers_to_string, collect_register_as_string):
4477 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4479 * server.c (process_serial_event): Likewise.
4480 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4481 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4483 2014-02-12 Tom Tromey <tromey@redhat.com>
4485 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4486 bin2hex, not hexify.
4487 * tracepoint.c (cmd_qtstatus): Likewise.
4489 2014-02-12 Tom Tromey <tromey@redhat.com>
4491 * remote-utils.c (monitor_output): Pass explicit length to
4494 2014-02-12 Tom Tromey <tromey@redhat.com>
4496 * tracepoint.c: Include rsp-low.h.
4497 * server.c: Include rsp-low.h.
4498 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4499 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4501 * remote-utils.c: Include rsp-low.h.
4502 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4503 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4504 (convert_int_to_ascii, convert_ascii_to_int): Move to
4506 * regcache.c: Include rsp-low.h.
4507 * ax.c: Include rsp-low.h.
4508 * Makefile.in (SFILES): Add common/rsp-low.c.
4509 (OBS): Add rsp-low.o.
4510 (rsp-low.o): New target.
4512 2014-02-12 Tom Tromey <tromey@redhat.com>
4514 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4515 Include print-utils.h.
4516 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4517 (plongest, thirty_two, phex_nz): Remove.
4518 * Makefile.in (SFILES): Add common/print-utils.c.
4519 (OBS): Add print-utils.o.
4520 (print-utils-ipa.o): New target.
4521 (print-utils.o): New target.
4522 (IPA_OBJS): Add print-utils-ipa.o.
4524 2014-02-06 Tom Tromey <tromey@redhat.com>
4526 * Makefile.in (SFILES): Fix indentation.
4528 2014-02-05 Doug Evans <dje@google.com>
4530 * linux-low.c (linux_wait_for_event): Improve comment.
4531 (linux_wait_1): Keep current_inferior in sync with event_child.
4533 2014-01-22 Doug Evans <dje@google.com>
4535 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4537 2014-01-22 Doug Evans <dje@google.com>
4539 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4540 * configure: Regenerate.
4541 * config.in: Regenerate.
4542 * Makefile.in (SFILES): Add debug.c.
4544 * debug.c: New file.
4545 * debug.h: New file.
4546 * linux-aarch64-low.c (*): Update all debugging printfs to use
4547 debug_printf instead of fprintf.
4548 * linux-arm-low.c (*): Ditto.
4549 * linux-cris-low.c (*): Ditto.
4550 * linux-crisv32-low.c (*): Ditto.
4551 * linux-m32r-low.c (*): Ditto.
4552 * linux-sparc-low.c (*): Ditto.
4553 * linux-x86.c (*): Ditto.
4554 * linux-low.c (*): Ditto.
4555 (linux_wait_1): Add calls to debug_enter, debug_exit.
4556 (linux_wait): Remove redundant debugging printf.
4557 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4558 (linux_resume, unstop_all_lwps): Ditto.
4559 * mem-break.c (*): Update all debugging printfs to use
4560 debug_printf instead of fprintf.
4561 * remote-utils.c (*): Ditto.
4562 * thread-db.c (*): Ditto.
4563 * server.c #include <ctype.h>, "gdb_vecs.h".
4564 (debug_threads): Moved to debug.c.
4565 (*): Update all debugging printfs to use debug_printf instead of
4567 (start_inferior): Replace call to fflush with call to debug_flush.
4568 (monitor_show_help): Mention set debug-format.
4569 (parse_debug_format_options): New function.
4570 (handle_monitor_command): Handle "monitor set debug-format".
4571 (gdbserver_usage): Mention --debug-format.
4572 (main): Parse --debug-format.
4573 * server.h (debug_threads): Declaration moved to debug.h.
4575 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4576 trace_debug_1 that uses debug_printf.
4577 (tracepoint_look_up_symbols): Update all debugging printfs to use
4578 debug_printf instead of fprintf.
4580 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4582 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4585 2014-01-17 Pedro Alves <palves@redhat.com>
4588 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4589 defined after including gdb_proc_service.h.
4591 2014-01-16 Doug Evans <dje@google.com>
4593 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4594 (match_dll): Use it.
4596 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4598 * target.h (target_ops) <read_btrace>: Change parameters and
4599 return type to allow error reporting.
4600 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4601 trace reading errors on.
4602 * linux-low.c (linux_low_read_btrace): Pass trace reading
4604 (linux_low_disable_btrace): New.
4606 2014-01-15 Doug Evans <dje@google.com>
4608 * inferiors.c (thread_id_to_gdb_id): Delete.
4609 * inferiors.h (thread_id_to_gdb_id): Delete.
4611 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4613 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4614 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4617 2014-01-08 Pedro Alves <palves@redhat.com>
4619 * server.c (handle_status): Don't discard previous queued stop
4620 replies or thread's pending status here.
4621 (main) <disconnection>: Do it here instead.
4623 2014-01-08 Pedro Alves <palves@redhat.com>
4625 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4626 * server.c (visit_actioned_threads, handle_pending_status): New
4628 (handle_v_cont): Factor out parts to ...
4629 (resume): ... this new function. If in all-stop, and a thread
4630 being resumed has a pending status, report it without actually
4632 (myresume): Adjust to use the new 'resume' function.
4633 (clear_pending_status_callback, set_pending_status_callback)
4634 (find_status_pending_thread_callback): New functions.
4635 (handle_status): Handle the case of multiple threads having
4636 interesting statuses to report. Report threads' real last signal
4637 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4638 with an interesting thread to report the status for, instead of
4639 always reporting the status of the first thread.
4641 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4643 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4644 * gdbreplay.c (gdbreplay_version): Likewise.
4646 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4648 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4649 iov.iov_len with the real length in use.
4651 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4653 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4654 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4655 for all targets that use win32-low.c.
4656 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4657 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4659 2013-12-13 Pedro Alves <palves@redhat.com>
4661 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4662 if equal to TARGET_WAITKIND_LOADED.
4663 * win32-low.c (cached_status): New static global.
4664 (win32_wait): Add declaration.
4665 (do_initial_child_stuff): Flush all initial pending debug events
4666 up to the initial breakpoint.
4667 (win32_wait): If CACHED_STATUS was set, return that instead
4668 of doing a real wait. Remove the code resuming the execution
4669 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4670 during the initial phase. Also remove the code changing
4671 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4672 TARGET_WAITKIND_STOPPED.
4674 2013-12-11 Yao Qi <yao@codesourcery.com>
4676 * notif.c (handle_notif_ack): Return 0 if no notification
4679 2013-11-20 Doug Evans <dje@google.com>
4681 * linux-low.c (linux_set_resume_request): Fix comment.
4683 2013-11-20 Doug Evans <dje@google.com>
4685 * linux-low.c (resume_status_pending_p): Tweak comment.
4687 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4689 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4690 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4691 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4692 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4693 (srv_amd64_regobj): Add amd64-mpx.o.
4694 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4695 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4696 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4697 * i387-fp.c (num_pl_bnd_register) Added constant.
4698 (num_pl_bnd_cfg_registers) Added constant.
4699 (struct i387_xsave) Added reserved area and MPX fields.
4700 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4701 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4703 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4704 (init_registers_amd64_mpx_linux): Declare new function.
4705 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4706 (x86_64_regmap): Add MPX registers.
4707 (x86_linux_read_description): Add MPX case.
4708 (initialize_low_arch): Initialize MPX targets.
4710 2013-11-18 Tom Tromey <tromey@redhat.com>
4712 * configure: Rebuild.
4713 * configure.ac: Don't check for stdlib.h.
4714 * gdbreplay.c: Unconditionally include stdlib.h.
4716 2013-11-18 Tom Tromey <tromey@redhat.com>
4718 * config.in: Rebuild.
4719 * configure: Rebuild.
4720 * configure.ac: Don't use AC_HEADER_DIRENT.
4722 2013-11-18 Tom Tromey <tromey@redhat.com>
4724 * server.h: Don't check HAVE_STRING_H.
4725 * gdbreplay.c: Don't check HAVE_STRING_H.
4726 * configure: Rebuild.
4728 2013-11-18 Tom Tromey <tromey@redhat.com>
4730 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4733 2013-11-08 Tom Tromey <tromey@redhat.com>
4735 * configure, config.in: Rebuild.
4736 * configure.ac: Remove unused configury.
4738 2013-11-08 Tom Tromey <tromey@redhat.com>
4740 * acinclude.m4: Include common.m4, codeset.m4.
4741 * configure, config.in: Rebuild.
4742 * configure.ac: Use GDB_AC_COMMON.
4744 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4746 * linux-s390-low.c (HWCAP_S390_TE): New define.
4747 (s390_arch_setup): Consider the TE field in the HWCAP for
4748 determining 'have_regset_tdb'.
4750 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4753 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4756 2013-10-02 Pedro Alves <palves@redhat.com>
4758 * server.c (process_serial_event): Don't output "GDBserver
4759 exiting" if GDB is connected through stdio.
4760 * target.c (mywait): Likewise, be silent if GDB is connected
4763 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4765 * lynx-low.c (lynx_add_threads_after_attach): New function.
4766 (lynx_attach): Remove call to add_thread. Add call to
4767 lynx_add_threads_after_attach instead.
4769 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4771 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4772 * config.in, configure: Regenerated.
4774 2013-09-18 Yao Qi <yao@codesourcery.com>
4777 * server.c (start_inferior): Clear 'resume_info'.
4779 2013-09-16 Jiong Wang <jiwang@tilera.com>
4781 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4784 2013-09-16 Jiong Wang <jiwang@tilera.com>
4786 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4787 linux-tile-low.o to srv_tgtobj.
4789 2013-09-16 Will Newton <will.newton@linaro.org>
4791 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4794 2013-09-06 Pedro Alves <palves@redhat.com>
4796 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4797 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4798 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4799 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4800 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4801 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4803 2013-09-06 Pedro Alves <palves@redhat.com>
4805 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4806 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4808 2013-09-06 Pedro Alves <palves@redhat.com>
4810 * linux-amd64-ipa.c: Include tracepoint.h.
4811 * linux-i386-ipa.c: Include tracepoint.h.
4813 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4815 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4816 (ps_get_thread_area): New function.
4818 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4820 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4821 (initialize_low_arch): Call init_registers_crisv32 rather than
4822 init_register_crisv32.
4824 2013-09-05 Pedro Alves <palves@redhat.com>
4826 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4828 * hostio.h: ... this new file.
4829 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4830 win32-low.c: Include hostio.h.
4832 2013-09-05 Pedro Alves <palves@redhat.com>
4834 * server.h (gdb_client_data, handler_func, callback_handler_func)
4835 (delete_file_handler, add_file_handler, append_callback_event)
4836 (delete_callback_event, start_event_loop, initialize_event_loop):
4837 Move to event-loop.h and include it.
4838 * event-loop.h: New file.
4840 2013-09-05 Pedro Alves <palves@redhat.com>
4842 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4843 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4844 (loaded_dll, unloaded_dll): Move to ...
4845 * dll.h: ... this new file.
4846 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4848 2013-09-05 Pedro Alves <palves@redhat.com>
4850 * server.h (current_process, get_thread_process, all_processes)
4851 (add_inferior_to_list, for_each_inferior, current_inferior)
4852 (remove_inferior, add_process, remove_process, find_process_pid)
4853 (have_started_inferiors_p, have_attached_inferiors_p)
4854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4855 (clear_inferiors, find_inferior, find_inferior_id)
4856 (inferior_target_data, set_inferior_target_data)
4857 (inferior_regcache_data, set_inferior_regcache_data): Move to
4858 inferiors.h, and include it.
4859 * inferiors.h: New file.
4861 2013-09-05 Pedro Alves <palves@redhat.com>
4863 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4867 2013-09-05 Pedro Alves <palves@redhat.com>
4869 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4871 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4872 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4873 (handle_tracepoint_general_set, handle_tracepoint_query)
4874 (tracepoint_finished_step, tracepoint_was_hit)
4875 (release_while_stepping_state_list, current_traceframe)
4876 (in_readonly_region, traceframe_read_mem)
4877 (fetch_traceframe_registers, traceframe_read_sdata)
4878 (traceframe_read_info, struct fast_tpoint_collect_status)
4879 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4880 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4881 (supply_fast_tracepoint_registers)
4882 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4883 (ipa_tdesc, claim_trampoline_space)
4884 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4885 (agent_mem_read, agent_get_trace_state_variable_value)
4886 (agent_set_trace_state_variable_value, agent_tsv_read)
4887 (agent_mem_read_string, get_raw_reg_func_addr)
4888 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4889 * tracepoint.h: ... this new file.
4891 2013-09-05 Pedro Alves <palves@redhat.com>
4893 * server.h (perror_with_name, error, fatal, warning, paddress)
4894 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4896 * utils.h: New file.
4898 2013-09-05 Pedro Alves <palves@redhat.com>
4900 * server.h (remote_debug, noack_mode, transport_is_reliable)
4901 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4902 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4903 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4904 (write_enn, initialize_async_io, enable_async_io)
4905 (disable_async_io, check_remote_input_interrupt_request)
4906 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4907 (dead_thread_notify, prepare_resume_reply)
4908 (decode_address_to_semicolon, decode_address, decode_m_packet)
4909 (decode_M_packet, decode_X_packet, decode_xfer_write)
4910 (decode_search_memory_packet, unhexify, hexify)
4911 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4912 (look_up_one_symbol, relocate_instruction)
4913 (monitor_output): Move to remote-utils.h, and include it.
4914 * remote-utils.h: New file.
4916 2013-09-05 Pedro Alves <palves@redhat.com>
4918 * server.h (_): Delete.
4920 2013-09-02 Pedro Alves <palves@redhat.com>
4922 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4923 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4925 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4927 2013-09-02 Pierre Muller <muller@sourceware.org>
4929 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4930 or WriteProcessMemory complete successfully and handle
4931 ERROR_PARTIAL_COPY error.
4933 2013-09-02 Pedro Alves <palves@redhat.com>
4935 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4936 error instead of EIO.
4938 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4941 * linux-low.c: Include filestuff.h.
4942 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4943 * lynx-low.c: Include filestuff.h.
4944 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4945 * server.c: Include filestuff.h.
4946 (main): Call notice_open_fds.
4947 * spu-low.c: Include filestuff.h.
4948 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4950 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4952 * Makefile.in: Explain why ../target and ../nat are not
4953 listed as include file search paths.
4954 (linux-waitpid.o): New object file rule.
4955 * configure.srv (srv_native_linux_obj): New variable.
4956 Replace all occurrences of linux native object files with
4957 $srv_native_linux_obj.
4958 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4959 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4960 (linux_enable_event_reporting): Remove declaration.
4961 (my_waitpid): Moved to common/linux-waitpid.c.
4962 (linux_wait_for_event): Pass ptid when calling
4963 linux_enable_event_reporting.
4964 (linux_supports_tracefork_flag): Remove.
4965 (linux_enable_event_reporting): Likewise.
4966 (linux_tracefork_grandchild): Remove.
4967 (STACK_SIZE): Moved to common/linux-ptrace.c.
4968 (linux_tracefork_child): Remove.
4969 (linux_test_for_tracefork): Remove.
4970 (linux_look_up_symbols): Call linux_supports_traceclone.
4971 (initialize_low): Remove call to linux_test_for_tracefork.
4972 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4973 common/linux-ptrace.h.
4974 (PTRACE_TYPE_ARG4): Likewise.
4975 Include linux-ptrace.h.
4977 2013-08-21 Pedro Alves <palves@redhat.com>
4979 * config.in: Renegerate.
4981 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4983 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4984 (SFILES): Remove $(srcdir)/common/target-common.c and
4985 add $(srcdir)/target/waitstatus.c.
4986 (OBS): Remove target-common.o and add waitstatus.o.
4987 (server_h): Remove $(srcdir)/../common/target-common.h and
4988 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4989 and $(srcdir)/../target/waitstatus.h.
4990 (target-common.o): Remove.
4991 (waitstatus.o): New target object file.
4992 * target.h: Do not include target-common.h and
4993 include target/resume.h, target/wait.h and
4994 target/waitstatus.h.
4996 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4998 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4999 to PTRACE_TYPE_ARG3.
5000 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5001 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5003 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5004 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5006 2013-07-27 Jie Zhang <jie@codesourcery.com>
5007 Daniel Jacobowitz <dan@codesourcery.com>
5008 Yao Qi <yao@codesourcery.com>
5010 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5011 (mips-linux-watch.o): New rule.
5012 (mips_linux_watch_h): New variable.
5013 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5015 * linux-mips-low.c: Include mips-linux-watch.h.
5016 (struct arch_process_info, struct arch_lwp_info): New.
5017 (update_watch_registers_callback): New function.
5018 (mips_linux_new_process, mips_linux_new_thread) New functions.
5019 (mips_linux_prepare_to_resume, mips_insert_point): New
5021 (mips_remove_point, mips_stopped_by_watchpoint): New
5023 (rsp_bp_type_to_target_hw_bp_type): New function.
5024 (mips_stopped_data_address): New function.
5025 (the_low_target): Add watchpoint support functions.
5027 2013-07-27 Yao Qi <yao@codesourcery.com>
5029 * i386-low.c: Include break-common.h.
5030 (enum target_hw_bp_type): Remove.
5032 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5034 * Makefile.in (SFILES): /common/target-common.c.
5035 (OBS): Add target-common.o.
5036 (server_h): Add $(srcdir)/../common/target-common.h.
5037 (target-common.o): New target.
5038 * server.c (queue_stop_reply_callback): Free
5039 status string after use.
5040 * target.c (target_waitstatus_to_string): Remove.
5041 * target.h: Include target-common.h.
5042 (resume_kind): Likewise.
5043 (target_waitkind): Likewise.
5044 (target_waitstatus): Likewise.
5045 (TARGET_WNOHANG): Likewise.
5047 2013-07-04 Yao Qi <yao@codesourcery.com>
5049 * Makefile.in (host_alias): Use @host_noncanonical@.
5050 (target_alias): Use @target_noncanonical@.
5051 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5052 ACX_NONCANONICAL_HOST.
5053 * configure: Regenerated.
5056 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5058 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5059 * configure: Rebuild.
5060 * Makefile.in (version_host, version_target): Get from configure.
5061 (version.c): Use $(version_host) and $(version_target).
5063 2013-07-03 Pedro Alves <palves@redhat.com>
5065 * Makefile.in (config.status): Depend on development.sh.
5066 * acinclude.m4: Include libmcheck.m4.
5067 * configure: Regenerate.
5069 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5071 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5072 attribute inside the parentheses.
5073 (winapi_DebugSetProcessKillOnExit): Ditto.
5074 (winapi_DebugBreakProcess): Ditto.
5075 (winapi_GenerateConsoleCtrlEvent): Ditto.
5077 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5079 * notif.h (notif_event): Add a dummy member to avoid compiler
5082 2013-07-01 Pedro Alves <palves@redhat.com>
5084 * hostio.c (HOSTIO_PATH_MAX): Define.
5085 (require_filename, handle_open, handle_unlink, handle_readlink):
5088 2013-07-01 Pedro Alves <palves@redhat.com>
5090 * server.h: Include "pathmax.h".
5091 * linux-low.c: Don't include sys/param.h.
5092 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5094 * win32-low.c: Don't include sys/param.h.
5095 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5097 2013-07-01 Pedro Alves <palves@redhat.com>
5099 * event-loop.c: Don't check HAVE_UNISTD_H before including
5101 * gdbreplay.c: Likewise.
5102 * remote-utils.c: Likewise.
5103 * server.c: Likewise.
5104 * configure.ac: Don't check for unistd.h.
5105 * configure: Regenerate.
5107 2013-06-28 Tom Tromey <tromey@redhat.com>
5109 * Makefile.in (version.c): Use version.in, not
5112 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5114 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5115 * configure: Rebuild.
5116 * Makefile.in (version_host, version_target): Get from configure.
5117 (version.c): Use $(version_host) and $(version_target).
5119 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5121 Fix trace-status to output user name without trailing colon.
5122 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5124 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5126 Fix trace-status to output proper start-time and stop-time.
5127 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5128 output start time and stop time in hex as gdb expects.
5130 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5132 * tracepoint.c (build_traceframe_info_xml): Output trace state
5133 variables present in the trace buffer.
5135 2013-06-24 Tom Tromey <tromey@redhat.com>
5137 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5139 (version.o): Remove.
5140 * gdbreplay.c: Include version.h.
5141 (version, host_name): Don't declare.
5142 * server.h: Include version.h.
5143 (version, host_name): Don't declare.
5145 2013-06-12 Pedro Alves <palves@redhat.com>
5147 * linux-x86-low.c (linux_is_elf64): Delete global.
5148 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5149 with local linux_pid_exe_is_elf_64_file use.
5151 2013-06-11 Pedro Alves <palves@redhat.com>
5153 * linux-low.c (regset_disabled, disable_regset): New functions.
5154 (regsets_fetch_inferior_registers)
5155 (regsets_store_inferior_registers): Use them.
5156 (initialize_regsets_info); Don't allocate the disabled_regsets
5158 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5161 2013-06-11 Pedro Alves <palves@redhat.com>
5163 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5166 2013-06-11 Pedro Alves <palves@redhat.com>
5168 * linux-x86-low.c (initialize_low_arch): Call
5169 init_registers_x32_avx_linux.
5171 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5173 Fix compatibility with Android Bionic.
5174 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5177 2013-06-07 Pedro Alves <palves@redhat.com>
5180 * Makefile.in (OBS): Add tdesc.o.
5181 (IPA_OBJS): Add tdesc-ipa.o.
5182 (tdesc-ipa.o): New rule.
5183 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5185 * linux-low.c (new_inferior): Delete.
5186 (disabled_regsets, num_regsets): Delete.
5187 (linux_add_process): Adjust to set the new per-process
5189 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5190 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5191 was a stop. When calling arch_setup, switch the current inferior
5192 to the thread that got an event.
5193 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5194 (regsets_fetch_inferior_registers)
5195 (regsets_store_inferior_registers): New regsets_info parameter.
5197 (linux_register_in_regsets): New regs_info parameter. Adjust to
5199 (register_addr, fetch_register, store_register): New usrregs_info
5200 parameter. Adjust to use it.
5201 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5202 parameter regs_info. Adjust to use it.
5203 (linux_fetch_registers): Get the current inferior's regs_info, and
5205 (linux_store_registers): Ditto.
5206 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5207 (initialize_low): Don't initialize the target_regsets here. Call
5208 initialize_low_arch.
5209 * linux-low.h (target_regsets): Delete declaration.
5210 (struct regsets_info): New.
5211 (struct usrregs_info): New.
5212 (struct regs_info): New.
5213 (struct process_info_private) <new_inferior>: New field.
5214 (struct linux_target_ops): Delete the num_regs, regmap, and
5215 regset_bitmap fields. New field regs_info.
5216 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5217 * i387-fp.c (num_xmm_registers): Delete.
5218 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5219 calls to new interface.
5220 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5221 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5222 Infer the number of xmm registers from the regcache's target
5224 * i387-fp.h (num_xmm_registers): Delete.
5225 * inferiors.c (add_thread): Don't install the thread's regcache
5227 * proc-service.c (gregset_info): Fetch the current inferior's
5228 regs_info. Adjust to use it.
5229 * regcache.c: Include tdesc.h.
5230 (register_bytes, reg_defs, num_registers)
5231 (gdbserver_expedite_regs): Delete.
5232 (get_thread_regcache): If the thread doesn't have a regcache yet,
5233 create one, instead of aborting gdbserver.
5234 (regcache_invalidate_one): Rename to ...
5235 (regcache_invalidate_thread): ... this.
5236 (regcache_invalidate_one): New.
5237 (regcache_invalidate): Only invalidate registers of the current
5239 (init_register_cache): Add target_desc parameter, and use it.
5240 (new_register_cache): Ditto. Assert the target description has a
5241 non zero registers_size.
5242 (regcache_cpy): Add assertions. Adjust.
5243 (realloc_register_cache, set_register_cache): Delete.
5244 (registers_to_string, registers_from_string): Adjust.
5245 (find_register_by_name, find_regno, find_register_by_number)
5246 (register_cache_size): Add target_desc parameter, and use it.
5247 (free_register_cache_thread, free_register_cache_thread_one)
5248 (regcache_release, register_cache_size): New.
5249 (register_size): Add target_desc parameter, and use it.
5250 (register_data, supply_register, supply_register_zeroed)
5251 (supply_regblock, supply_register_by_name, collect_register)
5252 (collect_register_as_string, collect_register_by_name): Adjust.
5253 * regcache.h (struct target_desc): Forward declare.
5254 (struct regcache) <tdesc>: New field.
5255 (init_register_cache, new_register_cache): Add target_desc
5257 (regcache_invalidate_thread): Declare.
5258 (regcache_invalidate_one): Delete declaration.
5259 (regcache_release): Declare.
5260 (find_register_by_number, register_cache_size, register_size)
5261 (find_regno): Add target_desc parameter.
5262 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5264 * remote-utils.c: Include tdesc.h.
5265 (outreg, prepare_resume_reply): Adjust.
5266 * server.c: Include tdesc.h.
5267 (gdbserver_xmltarget): Delete declaration.
5268 (get_features_xml, process_serial_event): Adjust.
5269 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5271 (struct process_info) <tdesc>: New field.
5272 (ipa_tdesc): Declare.
5273 * tdesc.c: New file.
5274 * tdesc.h: New file.
5275 * tracepoint.c: Include tdesc.h.
5276 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5277 (get_context_regcache): Adjust to pass ipa_tdesc down.
5278 (do_action_at_tracepoint): Adjust to get the register cache size
5279 from the context regcache's description.
5280 (traceframe_walk_blocks): Adjust to get the register cache size
5281 from the current trace frame's description.
5282 (traceframe_get_pc): Adjust to get current trace frame's
5283 description and pass it down.
5284 (gdb_collect): Adjust to get the register cache size from the
5286 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5287 (gdbserver_xmltarget): Delete.
5288 (initialize_low_tracepoint): Set the ipa's target description.
5289 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5290 (initialize_low_tracepoint): Set the ipa's target description.
5291 * linux-x86-low.c: Include tdesc.h.
5292 [__x86_64__] (is_64bit_tdesc): New.
5293 (ps_get_thread_area, x86_get_thread_area): Use it.
5294 (i386_cannot_store_register): Rename to ...
5295 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5296 (i386_cannot_fetch_register): Rename to ...
5297 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5298 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5300 (target_regsets): Rename to ...
5301 (x86_regsets): ... this.
5302 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5304 (x86_siginfo_fixup): Use is_64bit_tdesc.
5305 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5306 (tdesc_x32_avx_linux, tdesc_x32_linux)
5307 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5309 (x86_linux_update_xmltarget): Delete.
5310 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5311 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5312 (AMD64_LINUX_USER64_CS): New.
5313 (x86_linux_read_description): New, based on
5314 x86_linux_update_xmltarget.
5315 (same_process_callback): New.
5316 (x86_arch_setup_process_callback): New.
5317 (x86_linux_update_xmltarget): New.
5318 (x86_regsets_info): New.
5319 (amd64_linux_regs_info): New.
5320 (i386_linux_usrregs_info): New.
5321 (i386_linux_regs_info): New.
5322 (x86_linux_regs_info): New.
5323 (x86_arch_setup): Reimplement.
5324 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5325 (x86_emit_ops): Ditto.
5326 (the_low_target): Adjust. Install x86_linux_regs_info,
5327 x86_cannot_fetch_register, and x86_cannot_store_register.
5328 (initialize_low_arch): New.
5329 * linux-ia64-low.c (tdesc_ia64): Declare.
5330 (ia64_fetch_register): Adjust.
5331 (ia64_usrregs_info, regs_info): New globals.
5332 (ia64_regs_info): New function.
5333 (the_low_target): Adjust.
5334 (initialize_low_arch): New function.
5335 * linux-sparc-low.c (tdesc_sparc64): Declare.
5336 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5338 (sparc_arch_setup): New function.
5339 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5340 (the_low_target): Adjust.
5341 (initialize_low_arch): New function.
5342 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5343 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5344 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5345 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5346 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5347 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5348 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5349 (tdesc_powerpc_isa205_vsx64l): Declare.
5350 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5351 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5352 (ppc_set_pc, ppc_get_hwcap): Adjust.
5353 (ppc_usrregs_info): Forward declare.
5354 (!__powerpc64__) ppc_regmap_adjusted: New global.
5355 (ppc_arch_setup): Adjust to the current process'es target
5357 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5358 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5359 (ppc_store_evrregset): Adjust.
5360 (target_regsets): Rename to ...
5361 (ppc_regsets): ... this, and make static.
5362 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5363 (ppc_regs_info): New function.
5364 (the_low_target): Adjust.
5365 (initialize_low_arch): New function.
5366 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5367 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5368 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5369 (tdesc_s390x_linux64v2): Declare.
5370 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5371 (s390_fill_gregset, s390_store_last_break): Adjust.
5372 (target_regsets): Rename to ...
5373 (s390_regsets): ... this, and make static.
5374 (s390_get_pc, s390_set_pc): Adjust.
5375 (s390_get_hwcap): New target_desc parameter, and use it.
5376 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5377 (s390_arch_setup): Adjust to set the current process'es target
5378 description. Don't adjust the regmap.
5379 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5380 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5381 (regs_info_3264): New globals.
5382 (s390_regs_info): New function.
5383 (the_low_target): Adjust.
5384 (initialize_low_arch): New function.
5385 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5386 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5387 [__mips64] (init_registers_mips_linux)
5388 (init_registers_mips_dsp_linux): Delete defines.
5389 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5390 (have_dsp): New global.
5391 (mips_read_description): New, based on mips_arch_setup.
5392 (mips_arch_setup): Reimplement.
5393 (get_usrregs_info): New function.
5394 (mips_cannot_fetch_register, mips_cannot_store_register)
5395 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5396 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5397 (target_regsets): Rename to ...
5398 (mips_regsets): ... this, and make static.
5399 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5400 (dsp_regs_info, regs_info): New globals.
5401 (mips_regs_info): New function.
5402 (the_low_target): Adjust.
5403 (initialize_low_arch): New function.
5404 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5405 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5407 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5408 (arm_read_description): New, with bits factored from
5410 (arm_arch_setup): Reimplement.
5411 (target_regsets): Rename to ...
5412 (arm_regsets): ... this, and make static.
5413 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5414 (arm_regs_info): New function.
5415 (the_low_target): Adjust.
5416 (initialize_low_arch): New function.
5417 * linux-m68k-low.c (tdesc_m68k): Declare.
5418 (target_regsets): Rename to ...
5419 (m68k_regsets): ... this, and make static.
5420 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5421 (m68k_regs_info): New function.
5422 (m68k_arch_setup): New function.
5423 (the_low_target): Adjust.
5424 (initialize_low_arch): New function.
5425 * linux-sh-low.c (tdesc_sharch): Declare.
5426 (target_regsets): Rename to ...
5427 (sh_regsets): ... this, and make static.
5428 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5429 (sh_regs_info, sh_arch_setup): New functions.
5430 (the_low_target): Adjust.
5431 (initialize_low_arch): New function.
5432 * linux-bfin-low.c (tdesc_bfin): Declare.
5433 (bfin_arch_setup): New function.
5434 (bfin_usrregs_info, regs_info): New globals.
5435 (bfin_regs_info): New function.
5436 (the_low_target): Adjust.
5437 (initialize_low_arch): New function.
5438 * linux-cris-low.c (tdesc_cris): Declare.
5439 (cris_arch_setup): New function.
5440 (cris_usrregs_info, regs_info): New globals.
5441 (cris_regs_info): New function.
5442 (the_low_target): Adjust.
5443 (initialize_low_arch): New function.
5444 * linux-cris-low.c (tdesc_crisv32): Declare.
5445 (cris_arch_setup): New function.
5446 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5447 (cris_regs_info): New function.
5448 (the_low_target): Adjust.
5449 (initialize_low_arch): New function.
5450 * linux-m32r-low.c (tdesc_m32r): Declare.
5451 (m32r_arch_setup): New function.
5452 (m32r_usrregs_info, regs_info): New globals.
5453 (m32r_regs_info): Adjust.
5454 (initialize_low_arch): New function.
5455 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5456 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5457 (tic6x_usrregs_info): Forward declare.
5458 (tic6x_read_description): New function, based on ...
5459 (tic6x_arch_setup): ... this. Reimplement.
5460 (target_regsets): Rename to ...
5461 (tic6x_regsets): ... this, and make static.
5462 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5463 (tic6x_regs_info): New function.
5464 (the_low_target): Adjust.
5465 (initialize_low_arch): New function.
5466 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5467 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5468 (target_regsets): Rename to ...
5469 (xtensa_regsets): ... this, and make static.
5470 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5472 (xtensa_arch_setup, xtensa_regs_info): New functions.
5473 (the_low_target): Adjust.
5474 (initialize_low_arch): New function.
5475 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5476 (nios2_arch_setup): Set the current process'es tdesc.
5477 (target_regsets): Rename to ...
5478 (nios2_regsets): ... this.
5479 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5480 (nios2_regs_info): New function.
5481 (the_low_target): Adjust.
5482 (initialize_low_arch): New function.
5483 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5484 (aarch64_arch_setup): Set the current process'es tdesc.
5485 (target_regsets): Rename to ...
5486 (aarch64_regsets): ... this.
5487 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5488 (aarch64_regs_info): New function.
5489 (the_low_target): Adjust.
5490 (initialize_low_arch): New function.
5491 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5493 (target_regsets): Rename to ...
5494 (tile_regsets): ... this.
5495 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5496 (tile_regs_info): New function.
5497 (tile_arch_setup): Set the current process'es tdesc.
5498 (the_low_target): Adjust.
5499 (initialize_low_arch): New function.
5500 * spu-low.c (tdesc_spu): Declare.
5501 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5502 * win32-arm-low.c (tdesc_arm): Declare.
5503 (arm_arch_setup): New function.
5504 (the_low_target): Install arm_arch_setup instead of
5506 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5507 (init_windows_x86): Rename to ...
5508 (i386_arch_setup): ... this. Set `win32_tdesc'.
5509 (the_low_target): Adjust.
5510 * win32-low.c (win32_tdesc): New global.
5511 (child_add_thread): Don't create the thread cache here.
5512 (do_initial_child_stuff): Set the new process'es tdesc.
5513 * win32-low.h (struct target_desc): Forward declare.
5514 (win32_tdesc): Declare.
5515 * lynx-i386-low.c (tdesc_i386): Declare global.
5516 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5517 * lynx-low.c (lynx_tdesc): New global.
5518 (lynx_add_process): Set the new process'es tdesc.
5519 * lynx-low.h (struct target_desc): Forward declare.
5520 (lynx_tdesc): Declare global.
5521 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5522 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5523 * nto-low.c (nto_tdesc): New global.
5524 (do_attach): Set the new process'es tdesc.
5525 * nto-low.h (struct target_desc): Forward declare.
5526 (nto_tdesc): Declare.
5527 * nto-x86-low.c (tdesc_i386): Declare.
5528 (nto_x86_arch_setup): Set `nto_tdesc'.
5530 2013-06-04 Gary Benson <gbenson@redhat.com>
5532 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5533 to qSupported response when appropriate.
5534 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5535 with nonzero-length annex.
5536 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5537 arguments supplied in annex.
5539 2013-05-31 Doug Evans <dje@google.com>
5542 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5543 64 bits in 64-cross-32 environment.
5545 2013-05-28 Pedro Alves <palves@redhat.com>
5547 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5548 (aarch64-without-fpu.c): Delete rule.
5549 * configure.srv (aarch64*-*-linux*): Remove references to
5550 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5551 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5554 2013-05-24 Pedro Alves <palves@redhat.com>
5556 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5557 instead of strchr/decode_address. Error if the range isn't split
5558 with a ','. Don't assume there's be a ':' in the action.
5560 2013-05-23 Yao Qi <yao@codesourcery.com>
5561 Pedro Alves <palves@redhat.com>
5563 * linux-low.c (lwp_in_step_range): New function.
5564 (linux_wait_1): If the thread was range stepping and stopped
5565 outside the stepping range, report the stop to GDB. Otherwise,
5566 continue stepping. Add range stepping debug output.
5567 (linux_set_resume_request): Copy the step range from the resume
5569 (linux_supports_range_stepping): New.
5570 (linux_target_ops) <supports_range_stepping>: Set to
5571 linux_supports_range_stepping.
5572 * linux-low.h (struct linux_target_ops)
5573 <supports_range_stepping>: New field.
5574 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5575 * linux-x86-low.c (x86_supports_range_stepping): New.
5576 (the_low_target) <supports_range_stepping>: Set to
5577 x86_supports_range_stepping.
5578 * server.c (handle_v_cont): Handle 'r' action.
5579 (handle_v_requests): Append ";r" if the target supports range
5581 * target.h (struct thread_resume) <step_range_start,
5582 step_range_end>: New fields.
5583 (struct target_ops) <supports_range_stepping>:
5585 (target_supports_range_stepping): New macro.
5587 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5589 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5590 confusion in comment.
5592 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5594 * lynx-low.c (struct process_info_private): New type.
5595 (lynx_add_process): New function.
5596 (lynx_create_inferior, lynx_attach): Replace calls to
5597 add_process by calls to lynx_add_process.
5598 (lynx_resume): If PTID is null, then try using
5599 current_process()->private->last_wait_event_ptid.
5601 (lynx_clear_inferiors): Delete. The contents of that function
5602 has been inlined in lynx_mourn;
5603 (lynx_wait_1): Save the ptid in the process's private data.
5604 (lynx_mourn): Free the process' private data. Replace call
5605 to lynx_clear_inferiors by call to clear_inferiors.
5607 2013-05-17 Yao Qi <yao@codesourcery.com>
5609 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5612 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5614 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5615 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5616 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5617 PT_TEXT_END_ADDR guards. Update comments.
5618 (linux_target_op) <read_offsets>: Conditionally define to
5619 linux_read_offsets if the target is UCLIBC and if it defines
5620 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5622 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5623 Andrew Jenner <andrew@codesourcery.com>
5625 * Makefile.in (SFILES): Add linux-nios2-low.c.
5626 (clean): Add action to delete nios2-linux.c.
5627 (nios2-linux.c): New rule.
5628 * configure.srv: Add nios2*-*-linux*.
5629 * linux-nios2-low.c: New.
5631 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5633 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5635 2013-04-25 Hui Zhu <hui@codesourcery.com>
5638 * ax.c (ax_printf): Add fflush.
5640 2013-04-22 Tom Tromey <tromey@redhat.com>
5642 * Makefile.in (SFILES): Add filestuff.c.
5643 (OBS): Add filestuff.o.
5644 (filestuff.o): New target.
5645 * config.in, configure: Rebuild.
5646 * configure.ac: Check for fdwalk, pipe2.
5648 2013-04-17 Pedro Alves <palves@redhat.com>
5650 * configure.ac (USE_THREAD_DB): Delete variable.
5651 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5652 Don't AC_SUBST USE_THREAD_DB.
5653 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5654 * config.in, configure: Regenerate.
5656 2013-04-16 Pedro Alves <palves@redhat.com>
5658 * linux-low.h (struct lwp_info) <thread_known>: Move under
5659 the USE_THREAD_DB #ifdef.
5661 2013-04-16 Pedro Alves <palves@redhat.com>
5663 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5664 (linux-low.o): Delete rule.
5665 * linux-low.h: Always include "gdb_thread_db.h" instead of
5666 conditionally including thread_db.h.
5667 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5670 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5672 * Makefile.in (install-only): Fix make install regression.
5674 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5676 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5677 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5679 * gdbserver.1: Remove.
5681 2013-03-22 Pedro Alves <palves@redhat.com>
5683 * linux-low.c (handle_extended_wait): Don't call
5684 linux_enable_event_reporting.
5686 2013-03-15 Tony Theodore <tonyt@logyst.com>
5689 * Makefile.in (SHELL): Use @SHELL@.
5691 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5693 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5696 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5698 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5699 Remove extraneous NULL element.
5701 2013-03-13 Yao Qi <yao@codesourcery.com>
5703 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5704 'V' block in trace frame.
5706 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5708 * target.h (struct target_ops): Add btrace ops.
5709 (target_supports_btrace): New macro.
5710 (target_enable_btrace): New macro.
5711 (target_disable_btrace): New macro.
5712 (target_read_btrace): New macro.
5713 * gdbthread.h (struct thread_info): Add btrace field.
5714 * server.c: Include btrace-common.h.
5715 (handle_btrace_general_set): New function.
5716 (handle_btrace_enable): New function.
5717 (handle_btrace_disable): New function.
5718 (handle_general_set): Call handle_btrace_general_set.
5719 (handle_qxfer_btrace): New function.
5720 (struct qxfer qxfer_packets[]): Add btrace entry.
5721 * inferiors.c (remove_thread): Disable btrace.
5722 * linux-low: Include linux-btrace.h.
5723 (linux_low_enable_btrace): New function.
5724 (linux_low_read_btrace): New function.
5725 (linux_target_ops): Add btrace ops.
5726 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5727 Add srv_linux_btrace=yes.
5728 (x86_64-*-linux*): Add linux-btrace.o.
5729 Add srv_linux_btrace=yes.
5730 * configure.ac: Define HAVE_LINUX_BTRACE.
5731 * config.in: Regenerated.
5732 * configure: Regenerated.
5734 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5736 * server.c (handle_qxfer): Preserve error message if -3 is
5738 (qxfer): Document the -3 return value.
5740 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5742 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5743 (linux_btrace_h): New variable.
5744 (linux-btrace.o): New rule.
5746 2013-03-08 Stan Shebs <stan@codesourcery.com>
5747 Hafiz Abid Qadeer <abidh@codesourcery.com>
5749 * tracepoint.c (trace_buffer_size): New global.
5750 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5751 (init_trace_buffer): Change to one-argument function. Allocate
5752 trace buffer memory.
5753 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5754 handle QTBuffer:size packet.
5755 (cmd_bigqtbuffer_size): New function.
5756 (initialize_tracepoint): Call init_trace_buffer with
5757 DEFAULT_TRACE_BUFFER_SIZE.
5758 * server.c (handle_query): Add QTBuffer:size in the
5761 2013-03-07 Yao Qi <yao@codesourcery.com>
5763 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5764 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5766 (cmd_qtsp): Adjust condition. Do post increment.
5767 Set cur_action and cur_step_action back to 0.
5769 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5772 * linux-low.c (linux_write_memory): Return early success if LEN is
5775 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5777 * configure.srv: Add x86_64-*-cygwin* as target.
5779 2013-02-28 Tom Tromey <tromey@redhat.com>
5781 * configure.ac: Invoke AC_SYS_LARGEFILE.
5782 * configure, config.in: Rebuild.
5784 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5786 * win32-low.c: Throughout, fix format strings and casts of
5787 printf-like functions to avoid type related warnings on all
5789 (get_child_debug_event): Print dwDebugEventCode as hex since
5790 that's how it's usually documented.
5792 2013-02-28 Yao Qi <yao@codesourcery.com>
5794 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5797 2013-02-27 Jiong Wang <jiwang@tilera.com>
5799 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5800 (reg-tilegx32.c): New rule.
5801 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5802 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5803 different register info initializer according to elf class.
5804 (init_registers_tilgx32): New function. The tilegx32 register info
5806 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5807 (tile_store_gregset): Likewise.
5809 2013-02-27 Yao Qi <yao@codesourcery.com>
5811 * server.c (process_point_options): Print debug message when
5812 debug_threads is true.
5814 2013-02-26 Yao Qi <yao@codesourcery.com>
5816 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5818 2013-02-19 Pedro Alves <palves@redhat.com>
5819 Kai Tietz <ktietz@redhat.com>
5823 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5824 instead of strtoul to extract address from packet.
5825 (process_serial_event) <'z'>: Likewise.
5827 2013-02-18 Yao Qi <yao@codesourcery.com>
5829 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5831 2013-02-14 Pedro Alves <palves@redhat.com>
5835 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5836 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5838 2013-02-14 Pedro Alves <palves@redhat.com>
5840 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5842 2013-02-14 Pedro Alves <palves@redhat.com>
5844 * tracepoint.c (save_string): Delete.
5845 (add_tracepoint_action): Use savestring instead of save_string.
5847 2013-02-12 Pedro Alves <palves@redhat.com>
5849 * linux-xtensa-low.c: Ditto.
5850 * xtensa-xtregs.c: Ditto.
5852 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5854 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5857 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5859 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5860 aarch64_num_wp_regs and aarch64_num_bp_regs to
5861 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5863 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5865 * linux-aarch64-low.c (ps_get_thread_area): Replace
5866 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5868 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5869 Marcus Shawcroft <marcus.shawcroft@arm.com>
5870 Nigel Stephens <nigel.stephens@arm.com>
5871 Yufeng Zhang <yufeng.zhang@arm.com>
5873 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5874 (aarch64.c, aarch64-without-fpu.c): New targets.
5875 * configure.srv (aarch64*-*-linux*): New.
5876 * linux-aarch64-low.c: New file.
5878 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5880 * linux-low.c (handle_extended_wait, linux_create_inferior)
5881 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5882 (dequeue_one_deferred_signal, linux_resume_one_thread)
5883 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5884 (linux_tracefork_grandchild, linux_test_for_tracefork)
5885 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5886 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5887 where the argument is 0.
5889 2013-01-25 Yao Qi <yao@codesourcery.com>
5891 * event-loop.c: Include "queue.h".
5892 (gdb_event_p): New typedef.
5893 (struct gdb_event) <next_event>: Remove.
5894 (event_queue): Change to QUEUE(gdb_event_p).
5895 (async_queue_event): Remove.
5896 (gdb_event_xfree): New.
5897 (initialize_event_loop): New.
5898 (process_event): Use API from QUEUE.
5899 (wait_for_event): Likewise.
5900 * server.c (main): Call initialize_event_loop.
5901 * server.h (initialize_event_loop): Declare.
5903 2013-01-18 Yao Qi <yao@codesourcery.com>
5905 * ax.h (struct eval_agent_expr_context): New.
5906 (gdb_eval_agent_expr): Update declaration.
5907 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5908 TFRAME. Add new argument CTX.
5909 * server.h (struct eval_agent_expr_context): Declare.
5910 (agent_mem_read, agent_tsv_read): Update declaration.
5911 (agent_mem_read_string): Likewise.
5912 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5913 (add_traceframe_block): Add new argument TPOINT.
5914 Increase TPOINT->traceframe_usage.
5915 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5916 eval_tracepoint_agent_expr.
5917 (condition_true_at_tracepoint): Likewise.
5918 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5919 (agent_mem_read_string, agent_tsv_read): Likewise.
5921 2013-01-16 Yao Qi <yao@codesourcery.com>
5923 * linux-low.c (linux_resume_one_lwp): Don't check
5924 'lwp->bp_reinsert != 0'.
5926 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5927 Pedro Alves <palves@redhat.com>
5929 * lynx-low.c (ptrace_request_to_str): Define a temporary
5930 macro and use it to simplify this function's implementation.
5932 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5934 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5937 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5939 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5941 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5943 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5945 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5947 * lynx-low.c (lynx_resume): Use the resume_info parameter
5948 to determine the ptid for the lynx_ptrace call, unless
5949 it is equal to minus_one_ptid, in which case we use the
5950 ptid of the current_inferior.
5951 (lynx_wait_1): After having received a thread create/exit
5952 event, resume the inferior's execution using the signaling
5953 thread's ptid, rather than the old ptid.
5955 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5957 * lynx-low.c (lynx_resume): Delete variable ret.
5959 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5961 * gdbreplay.c (gdbreplay_version): Update copyright year.
5962 * server.c (gdbserver_version): Likewise.
5964 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5966 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5969 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5971 * lynx-low.c (ptrace_request_to_str): Add handling for
5974 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5976 * lynx-low.c (lynx_attach): Delete variable new_process.
5978 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5980 * lynx-low.c (lynx_create_inferior): Delete variable
5983 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5985 * lynx-low.c (ptrace_request_to_str): Do not handle
5986 PTRACE_GETTHREADLIST if this macro does not exist.
5988 2012-12-15 Yao Qi <yao@codesourcery.com>
5990 * Makefile.in (OBS): Add notif.o.
5991 * notif.c, notif.h: New.
5992 * server.c: Include "notif.h".
5993 (struct vstop_notif) <next>: Remove.
5995 (queue_stop_reply): Update.
5996 (push_event, send_next_stop_reply): Remove.
5997 (discard_queued_stop_replies): Update.
5998 (notif_stop): New variable.
5999 (handle_v_stopped): Remove.
6000 (handle_v_requests): Don't call handle_v_stopped. Call
6001 handle_ack_notif instead.
6002 (queue_stop_reply_callback): Call notif_event_enque instead
6003 of queue_stop_reply.
6004 (handle_status): Don't call send_next_stop_reply, call
6005 notif_write_event instead.
6006 (kill_inferior_callback): Likewise.
6007 (detach_or_kill_inferior_callback): Likewise.
6008 (main): Call initialize_notif.
6009 (process_serial_event): Call QUEUE_is_empty.
6010 (handle_target_event): Call notif_push instead of push event.
6011 * server.h (push_event): Remove declaration.
6013 2012-12-10 Tom Tromey <tromey@redhat.com>
6015 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6016 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6019 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6020 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6021 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6022 (amd64-linux-ipa.o, ax.o): Rewrite.
6023 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6024 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6025 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6026 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6027 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6028 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6029 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6030 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6031 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6032 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6033 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6034 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6035 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6036 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6037 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6038 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6039 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6040 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6041 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6042 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6043 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6044 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6045 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6046 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6047 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6048 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6049 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6050 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6051 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6052 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6053 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6054 (reg-tilegx.o): Remove.
6055 (all_object_files): New macro.
6056 Include .deps files.
6057 * aclocal.m4, configure: Rebuild.
6058 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6059 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6060 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6062 2012-12-05 Tom Tromey <tromey@redhat.com>
6065 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6067 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6069 * configure.ac: Check for linux/perf_event.h.
6070 * config.in: Regenerated.
6071 * configure: Regenerated.
6073 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6075 * hostio.c (handle_readlink): Decrease buffer size
6076 parameter passed to readlink by one byte.
6078 2012-11-26 Yao Qi <yao@codesourcery.com>
6080 * configure.ac (build_warnings): Append '-Wempty-body'.
6081 * configure: Regenerated.
6082 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6085 2012-11-15 Pierre Muller <muller@sourceware.org>
6087 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6088 * config.in: Regenerate.
6089 * configure: Regenerate.
6090 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6091 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6092 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6093 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6095 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6096 instead of <sys/wait.h> header.
6097 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6099 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6101 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6102 (various make rules): Remove -DGDBSERVER
6104 2012-11-09 Yao Qi <yao@codesourcery.com>
6106 * spu-low.c (current_ptid): Move it to ..
6107 * gdbthread.h: ... here. New.
6108 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6109 * server.c (myresume, process_serial_event): Likewise.
6110 * thread-db.c (thread_db_find_new_threads): Likewise.
6111 * tracepoint.c (run_inferior_command): Likewise.
6113 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6115 * server.c (handle_search_memory_1): Include access length in
6118 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6120 * linux-crisv32-low.c: Fix compile errors.
6122 2012-09-04 Yao Qi <yao@codesourcery.com>
6124 * tracepoint.c (cmd_qtsv): Adjust debug message.
6125 Don't check CUR_TPOINT.
6127 2012-08-28 Yao Qi <yao@codesourcery.com>
6129 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6130 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6131 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6132 Remove declarations of xmalloc, xreallloc, xstrdup and
6134 * Makefile.in (libiberty_h): New.
6135 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6136 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6138 2012-08-23 Yao Qi <yao@codesourcery.com>
6140 * server.h: Remove declaration of 'xsnprintf'.
6142 2012-08-22 Keith Seitz <keiths@redhat.com>
6144 * server.h: Include build-gnulib-gbserver/config.h.
6145 * gdbreplay.c: Likewise.
6147 2012-08-08 Doug Evans <dje@google.com>
6149 * Makefile.in (SFILES): Add gdb_vecs.c.
6150 (OBS): Add gdb_vecs.o.
6151 (gdb_vecs_h, host_defs_h): New variables.
6152 (thread-db.o): Add $(gdb_vecs_h) dependency.
6153 (gdb_vecs.o): New rule.
6154 * thread-db.c: #include "gdb_vecs.h".
6155 (thread_db_load_search): Use a vector to iterate over path elements.
6156 Handle text appearing after "$pdir".
6158 * configure.ac: Add check for strstr.
6159 * config.in: Regenerate.
6160 * configure: Regenerate.
6162 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6164 * hostio.c (handle_pread): If pread fails, fall back to attempting
6166 (handle_pwrite): Likewise for pwrite.
6168 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6170 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6171 between unsupported TYPE and unimplementable ADDR/LEN combination.
6172 (arm_insert_point): Act on new return value.
6174 2012-07-31 Pedro Alves <palves@redhat.com>
6176 * server.c (process_point_options): Only skip tokens if we find
6177 one that is unrecognized. Don't treat 'X' specially while
6178 skipping unrecognized tokens.
6180 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6182 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6183 to 4-byte-align HW breakpoint addresses for Thumb.
6185 2012-07-27 Yao Qi <yao@codesourcery.com>
6189 * server.h: Declare gdb_agent_about_to_close.
6190 * target.c (kill_inferior): Include "agent.h".
6191 New. Send command 'kill'.
6192 * target.h (kill_inferior): Removed macro.
6193 * tracepoint.c (gdb_agent_about_to_close): New.
6194 (gdb_agent_helper_thread): Handle command 'close'.
6195 Wait endlessly until the inferior stops.
6196 Install gdb_agent_remove_socket to atexit hook.
6197 (agent_socket_name): New static variable.
6198 (gdb_agent_socket_init): Replace local variable 'name' with
6199 'agent_socket_name'.
6200 (gdb_agent_remove_socket): New.
6202 2012-07-27 Yao Qi <yao@codesourcery.com>
6204 * server.c (process_point_options): Stop at 'X' when parsing.
6206 2012-07-19 Michael Eager <eager@eagercon.com>
6208 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6210 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6211 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6212 hardware breakpoint.
6214 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6216 * gdbserver/linux-low.c (initialize_low): Call
6217 linux_ptrace_init_warnings.
6219 2012-07-02 Doug Evans <dje@google.com>
6221 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6224 2012-07-02 Stan Shebs <stan@codesourcery.com>
6226 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6227 (ax.o): Add it to build rule.
6229 (OBS): Add format.o.
6230 (IPA_OBS): Add format.o.
6231 * server.c (handle_query): Claim support for breakpoint commands.
6232 (process_point_options): Add command case.
6233 (process_serial_event): Leave running if there are printfs in
6235 * mem-break.h (any_persistent_commands): Declare.
6236 (add_breakpoint_commands): Declare.
6237 (gdb_no_commands_at_breakpoint): Declare.
6238 (run_breakpoint_commands): Declare.
6239 * mem-break.c (struct point_command_list): New struct.
6240 (struct breakpoint): New field command_list.
6241 (any_persistent_commands): New function.
6242 (add_commands_to_breakpoint): New function.
6243 (add_breakpoint_commands): New function.
6244 (gdb_no_commands_at_breakpoint): New function.
6245 (run_breakpoint_commands): New function.
6246 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6248 * ax.c: Include format.h.
6249 (ax_printf): New function.
6250 (gdb_eval_agent_expr): Add printf opcode.
6252 2012-06-13 Yao Qi <yao@codesourcery.com>
6254 * server.c (start_inferior): Remove duplicated writes to fields
6255 'last_resume_kind' and 'last_status' of 'current_inferior'.
6257 2012-06-12 Yao Qi <yao@codesourcery.com>
6258 Pedro Alves <palves@redhat.com>
6260 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6262 * server.c (handle_v_cont): Extend comment.
6264 2012-06-11 Yao Qi <yao@codesourcery.com>
6266 * linux-low.c (linux_attach): Add 'static'.
6268 2012-06-06 Yao Qi <yao@codesourcery.com>
6270 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6272 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6274 Fix gcc -flto compilation warning.
6275 * server.c (main): Make variable multi_mode and attach volatile.
6277 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6279 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6280 if the platform doesn't know about it.
6282 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6284 * Makefile.in (SFILES): Add linux-tile-low.c.
6285 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6286 * configure.srv: Handle tilegx-*-linux*.
6287 * linux-tile-low.c: New file.
6289 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6291 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6293 2012-05-24 Pedro Alves <palves@redhat.com>
6297 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6299 2012-05-24 Pedro Alves <palves@redhat.com>
6303 Replace target_signal with gdb_signal throughout.
6305 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6307 * linux-low.c (linux_store_registers): Avoid the copying sequence
6308 when no data has been retrieved by ptrace.
6310 2012-05-22 Will Deacon <will.deacon@arm.com>
6312 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6313 Include asm/ptrace.h.
6314 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6317 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6319 * linux-low.c (linux_store_registers): Don't re-retrieve data
6320 with ptrace that has already been obtained from /proc. Always
6321 copy any data retrieved with ptrace to the buffer supplied.
6323 2012-05-11 Yao Qi <yao@codesourcery.com>
6324 Pedro Alves <palves@redhat.com>
6326 * linux-low.c (enum stopping_threads_kind): New.
6327 (stopping_threads): Change type to `enum stopping_threads_kind'.
6328 (handle_extended_wait): If stopping and suspending threads, leave
6329 the new_lwp suspended too.
6330 (linux_wait_for_event): Adjust.
6331 (stop_all_lwps): Set `stopping_threads' to
6332 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6333 whether we're suspending threads or just stopping them. Assert no
6336 2012-04-29 Yao Qi <yao@codesourcery.com>
6338 * server.h: Move some code to ...
6339 * gdbthread.h: ... here. New.
6340 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6341 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6342 (nto-low.o, win32-low.o): Likewise.
6343 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6344 * regcache.c, remote-utils.c, server.c: Likewise.
6345 * target.c, tracepoint.c, win32-low.c: Likewise.
6347 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6349 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6350 (PTRACE_ARG4_TYPE): Likewise.
6351 (PTRACE_XFER_TYPE): Likewise.
6352 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6353 ptrace to PTRACE_ARG3_TYPE.
6354 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6355 (PTRACE_ARG4_TYPE): Likewise.
6356 (PTRACE_XFER_TYPE): Likewise.
6357 (linux_detach_one_lwp): Cast fourth argument of
6358 ptrace to long then PTRACE_ARG4_TYPE.
6359 (regsets_fetch_inferior_registers): Cast third argument of
6360 ptrace to long then PTRACE_ARG3_TYPE.
6361 (regsets_store_inferior_registers): Likewise.
6363 2012-04-20 Pedro Alves <palves@redhat.com>
6365 * configure: Regenerate.
6367 2012-04-19 Pedro Alves <palves@redhat.com>
6369 * Makefile.in (GNULIB_BUILDDIR): New.
6370 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6371 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6372 (all, install-only, uninstall, clean-info, all-lib, clean): No
6373 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6374 (maintainer-clean realclean distclean): Use subdir_do.
6376 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6377 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6378 * acinclude.m4: Include acx_configure_dir.m4.
6379 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6380 calls. Call AC_PROG_RANLIB. Configure gnulib using
6383 (GNULIB_STDINT_H): Adjust.
6384 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6385 * gdbreplay.c: Include build-gnulib/config.h.
6386 * server.h: Likewise.
6387 * aclocal.m4: Regenerate.
6388 * config.in: Regenerate.
6389 * configure: Regenerate.
6391 2012-04-19 Pedro Alves <palves@redhat.com>
6393 * Makefile.in (LIBGNU, INCGNU): Adjust.
6394 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6395 (all, install-only, uninstall, clean-info, all-lib, clean)
6396 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6397 * configure.ac: Adjust AC_OUTPUT output.
6398 * aclocal.m4: Regenerate.
6399 * configure: Regenerate.
6401 2012-04-19 Pedro Alves <palves@redhat.com>
6403 * Makefile.in (generated_files): New.
6404 (server_h): Remove the explicit dependency on config.h, and depend
6405 on $generated_files.
6407 2012-04-19 Pedro Alves <palves@redhat.com>
6409 * Makefile.in (INCGNU): Add -Ignulib.
6411 2012-04-19 Pedro Alves <palves@redhat.com>
6413 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6414 (INCGNU): ... this, and spell out -I here.
6415 (GNULIB_LIB): Rename to ...
6417 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6419 2012-04-19 Pedro Alves <palves@redhat.com>
6421 * config.in: Regenerate.
6423 2012-04-19 Pedro Alves <palves@redhat.com>
6425 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6426 * server.h (memmem): Remove declaration.
6427 * config.in: Regenerate.
6428 * configure: Regenerate.
6430 2012-04-19 Yao Qi <yao@codesourcery.com>
6432 * Makefile.in (SFILES): Add common/vec.c.
6436 2012-04-19 Yao Qi <yao@codesourcery.com>
6438 * remote-utils.c (prepare_resume_reply): Replace with macro
6439 target_core_of_thread.
6440 * server.c (handle_qxfer_threads_proper): Likewise.
6441 * target.h (traget_core_of_thread): New macro.
6443 2012-04-18 Pedro Alves <palves@redhat.com>
6445 * aclocal.m4: Regenerate.
6446 * configure: Regenerate.
6448 2012-04-16 Yao Qi <yao@codesourcery.com>
6450 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6451 duplicated on address.
6453 2012-04-16 Yao Qi <yao@codesourcery.com>
6455 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6456 (struct tracepoint_action_ops) <send>: New field.
6457 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6458 (agent_expr_send, x_tracepoint_action_send): New.
6459 (l_tracepoint_action_send): New.
6460 (cmd_qtdp): Download and install tracepoint
6461 according to `use_agent'.
6462 (run_inferior_command): Add one more parameter `len'.
6464 (tracepoint_send_agent): New.
6465 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6467 2012-04-16 Yao Qi <yao@codesourcery.com>
6469 * tracepoint.c (download_tracepoints): Moved to ...
6470 (cmd_qtstart): ... here.
6472 2012-04-14 Yao Qi <yao@codesourcery.com>
6474 * tracepoint.c: Include inttypes.h.
6475 (struct collect_memory_action): Use sized types.
6476 (struct tracepoint): Likewise.
6477 (cmd_qtdp, stop_tracing): Update print specifiers.
6478 (cmd_qtp, response_tracepoint): Likewise.
6479 (collect_data_at_tracepoint): Likewise.
6480 (collect_data_at_step): Likewise.
6482 2012-04-14 Yao Qi <yao@codesourcery.com>
6484 Import gnulib module inttypes.
6485 * aclocal.m4, config.in, configure: Regenerated.
6487 2012-04-14 Yao Qi <yao@codesourcery.com>
6489 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6490 Makefile and config.status at last.
6492 2012-04-13 Yao Qi <yao@codesourcery.com>
6494 * tracepoint.c: Include stdint.h unconditionally.
6496 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6498 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6499 on BFD_HAVE_SYS_PROCFS_TYPE.
6500 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6501 * configure: Regenerate.
6502 * config.in: Likewise.
6504 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6506 * Makefile.in (clean): Also remove x32.c x32-linux.c
6507 x32-avx.c x32-avx-linux.c.
6508 (x32.o): New target.
6510 (x32-linux.o): Likewise.
6511 (x32-linux.c): Likewise.
6512 (x32-avx.o): Likewise.
6513 (x32-avx.c): Likewise.
6514 (x32-avx-linux.o): Likewise.
6515 (x32-avx-linux.c): Likewise.
6517 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6518 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6519 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6520 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6521 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6522 i386/x32-avx-linux.xml.
6524 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6525 (init_registers_x32_avx_linux): Likwise.
6526 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6527 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6529 2012-04-13 Pedro Alves <palves@redhat.com>
6531 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6532 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6533 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6534 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6537 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6539 * linux-x86-low.c (compat_x32_clock_t): New.
6540 (compat_x32_siginfo_t): Likewise.
6541 (compat_x32_siginfo_from_siginfo): Likewise.
6542 (siginfo_from_compat_x32_siginfo): Likewise.
6543 (linux_is_elf64): Likewise.
6544 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6545 and siginfo_from_compat_x32_siginfo for x32.
6546 (x86_arch_setup): Set linux_is_elf64.
6548 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6551 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6553 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6554 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6555 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6556 compatible with process.
6558 2012-04-12 Yao Qi <yao@codesourcery.com>
6560 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6561 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6562 (install-only, install-info, clean): Handle sub dir gnulib.
6563 (all-lib, am--refresh): New targets.
6564 (memmem.o): Remove target.
6565 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6566 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6567 (AC_REPLACE_FUNCS): Remove memmem.
6568 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6569 (AC_OUTPUT): Generate Makefile in gnulib/.
6570 * aclocal.m4, config.in, configure: Regenerated.
6572 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6574 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6576 2012-04-05 Pedro Alves <palves@redhat.com>
6578 -Werror=strict-aliasing
6580 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6583 2012-04-04 Pedro Alves <palves@redhat.com>
6585 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6586 (sparc_store_gregset_from_stack, sparc_store_gregset)
6587 (sparc_breakpoint_at): Fix formatting.
6589 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6591 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6593 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6594 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6595 * config.in: Regenerate.
6596 * configure: Likewise.
6598 2012-03-29 Pedro Alves <palves@redhat.com>
6600 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6601 Correct ptrace arguments.
6603 2012-03-28 Pedro Alves <palves@redhat.com>
6605 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6606 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6607 (IA64_FR1_REGNUM): New defines.
6608 (ia64_fetch_register): New.
6609 (the_low_target): Install it.
6610 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6612 * linux-low.c (linux_fetch_registers): Try the
6613 the_low_target.fetch_register hook first.
6615 * linux-arm-low.c (the_low_target): Adjust.
6616 * linux-bfin-low.c (the_low_target): Adjust.
6617 * linux-cris-low.c (the_low_target): Adjust.
6618 * linux-crisv32-low.c (the_low_target): Adjust.
6619 * linux-m32r-low.c (the_low_target): Adjust.
6620 * linux-m68k-low.c (the_low_target): Adjust.
6621 * linux-mips-low.c (the_low_target): Adjust.
6622 * linux-ppc-low.c (the_low_target): Adjust.
6623 * linux-s390-low.c (the_low_target): Adjust.
6624 * linux-sh-low.c (the_low_target): Adjust.
6625 * linux-sparc-low.c (the_low_target): Adjust.
6626 * linux-tic6x-low.c (the_low_target): Adjust.
6627 * linux-x86-low.c (the_low_target): Adjust.
6628 * linux-xtensa-low.c (the_low_target): Adjust.
6630 2012-03-26 Pedro Alves <palves@redhat.com>
6632 * server.c (handle_qxfer_libraries): Don't bail early if
6633 the_target->qxfer_libraries_svr4 is not NULL.
6635 2012-03-26 Pedro Alves <palves@redhat.com>
6637 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6639 2012-03-23 Pedro Alves <palves@redhat.com>
6641 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6642 "library-list-svr4" element's start tag when the the DSO list is
6645 2012-03-23 Pedro Alves <palves@redhat.com>
6647 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6648 a variable whose type size is the same as the inferior's pointer
6651 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6653 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6655 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6656 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6657 * linux-low.h: Include <signal.h>.
6658 (struct siginfo): Remove forward declaration.
6659 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6662 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6664 * .gitignore: Ignore more files.
6666 2012-03-19 Pedro Alves <palves@redhat.com>
6667 Jan Kratochvil <jan.kratochvil@redhat.com>
6669 * server.c (cont_thread, general_thread): Add describing comments.
6670 (start_inferior): Clear `cont_thread'.
6671 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6674 2012-03-15 Yao Qi <yao@codesourcery.com>
6676 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6678 (cmd_qtdp): ... here.
6680 2012-03-15 Yao Qi <yao@codesourcery.com>
6682 * tracepoint.c (struct tracepoint_action_ops): New.
6683 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6684 (m_tracepoint_action_download): New.
6685 (r_tracepoint_action_download): New.
6686 (x_tracepoint_action_download): New.
6687 (l_tracepoint_action_download): New.
6688 (add_tracepoint_action): Install `action->ops' according type.
6689 (download_tracepoint_1): Move code `download' function pointer
6690 of various tracepoint_action_ops.
6692 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6694 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6695 linux_ptrace_attach_warnings.
6697 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6699 * Makefile.in (linux-ptrace.o): New.
6700 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6701 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6702 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6703 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6704 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6706 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6708 2012-03-08 Yao Qi <yao@codesourcery.com>
6709 Pedro Alves <palves@redhat.com>
6711 Fix PR server/13392.
6712 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6714 * tracepoint.c (remove_tracepoint): New.
6715 (cmd_qtdp): Call remove_tracepoint when failed to install.
6717 2012-03-07 Pedro Alves <palves@redhat.com>
6719 * linux-low.c (get_detach_signal): New.
6720 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6721 Pass on pending signals to PTRACE_DETACH. Check the result of the
6723 * server.c (program_signals, program_signals_p): New.
6724 (handle_general_set): Handle QProgramSignals.
6725 * server.h (program_signals, program_signals_p): Declare.
6727 2012-03-05 Pedro Alves <palves@redhat.com>
6728 Jan Kratochvil <jan.kratochvil@redhat.com>
6730 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6733 2012-03-03 Yao Qi <yao@codesourcery.com>
6735 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6736 agent_look_up_symbols.
6738 2012-03-03 Yao Qi <yao@codesourcery.com>
6740 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6741 (linux-x86-low.o): Likewise.
6742 * server.h: Remove in_process_agent_loaded.
6743 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6747 2012-03-03 Yao Qi <yao@codesourcery.com>
6749 * tracepoint.c (gdb_agent_capability): New global.
6750 (in_process_agent_loaded_ust): Renamed to
6751 `in_process_agent_supports_ust'.
6753 (in_process_agent_supports_ust): Call agent_capability_check.
6754 (clear_installed_tracepoints): Assert that agent supports
6757 2012-03-03 Yao Qi <yao@codesourcery.com>
6759 * linux-low.c (linux_supports_agent): New.
6760 (linux_target_ops): Initialize field `supports_agent' with
6761 linux_supports_agent.
6762 * target.h (struct target_ops) <supports_agent>: New.
6763 (target_supports_agent): New macro.
6764 * server.c (handle_general_set): Handle packet 'QAgent'.
6765 (handle_query): Send `QAgent+'.
6766 * Makefile.in (server.o): Depends on agent.h.
6768 2012-03-03 Yao Qi <yao@codesourcery.com>
6770 * Makefile.in (OBS): Add agent.o.
6771 Add new rule for agent.o.
6772 Track dependence of tracepoint.c on agent.h.
6773 * tracepoint.c (run_inferior_command_1):
6774 (run_inferior_command): Call agent_run_command.
6775 (gdb_ust_connect_sync_socket): Deleted. Move it to
6777 (resume_thread, stop_thread): Likewise.
6778 (gdb_ust_socket_init): Renamed to ...
6779 (gdb_agent_socket_init): ... New.
6780 (gdb_ust_thread): Renamed to ...
6781 (gdb_agent_helper_thread): ... New.
6782 (gdb_ust_init): Move some code to ...
6783 (gdb_agent_init): ... here. New.
6784 [HAVE_UST]: Call gdb_ust_init.
6785 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6786 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6787 * config.in, configure: Regenerated.
6789 2012-03-02 Pedro Alves <palves@redhat.com>
6791 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6792 * linux-low.c (struct simple_pid_list): New.
6793 (stopped_pids): New a struct simple_pid_list pointer.
6794 (add_to_pid_list, pull_pid_from_list): New.
6795 (handle_extended_wait): Don't assume the first signal new children
6796 report is SIGSTOP. Adjust call to pull_pid_from_list.
6797 (linux_wait_for_lwp): Adjust.
6799 2012-03-02 Yao Qi <yao@codesourcery.com>
6801 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6804 2012-03-02 Yao Qi <yao@codesourcery.com>
6806 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6807 `stop_pc' and `tpoint'. Update caller.
6809 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6811 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6812 * linux-low.c (use_linux_regsets): New macro.
6813 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6814 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6815 (linux_register_in_regsets): New function.
6816 (usr_fetch_inferior_registers): Skip registers covered by
6818 (usr_store_inferior_registers): Likewise.
6819 (usr_fetch_inferior_registers): New macro.
6820 (usr_store_inferior_registers): Likewise.
6821 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6822 (linux_store_registers): Likewise.
6823 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6825 (init_registers_mips64_dsp_linux): Likewise.
6826 (init_registers_mips_linux): New macro.
6827 (init_registers_mips_dsp_linux): Likewise.
6828 (mips_dsp_num_regs): Likewise.
6829 (DSP_BASE, DSP_CONTROL): New fallback macros.
6830 (mips_base_regs): New macro.
6831 (mips_regmap): Use it. Fix the size.
6832 (mips_dsp_regmap): New variable.
6833 (mips_dsp_regset_bitmap): Likewise.
6834 (mips_arch_setup): New function.
6835 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6837 (mips_cannot_store_register): Likewise.
6838 (the_low_target): Update .arch_setup, .num_regs and .regmap
6839 initializers. Add .regset_bitmap initializer.
6840 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6842 * linux-bfin-low.c (the_low_target): Likewise.
6843 * linux-cris-low.c (the_low_target): Likewise.
6844 * linux-crisv32-low.c (the_low_target): Likewise.
6845 * linux-ia64-low.c (the_low_target): Likewise.
6846 * linux-m32r-low.c (the_low_target): Likewise.
6847 * linux-m68k-low.c (the_low_target): Likewise.
6848 * linux-ppc-low.c (the_low_target): Likewise.
6849 * linux-s390-low.c (the_low_target): Likewise.
6850 * linux-sh-low.c (the_low_target): Likewise.
6851 * linux-sparc-low.c (the_low_target): Likewise.
6852 * linux-tic6x-low.c (the_low_target): Likewise.
6853 * linux-x86-low.c (the_low_target): Likewise.
6854 * linux-xtensa-low.c (the_low_target): Likewise.
6855 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6856 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6857 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6859 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6860 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6862 2012-02-29 Yao Qi <yao@codesourcery.com>
6863 Pedro Alves <palves@redhat.com>
6865 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6866 `step_over_finished' is true.
6868 2012-02-27 Pedro Alves <palves@redhat.com>
6870 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6871 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6873 2012-02-27 Pedro Alves <palves@redhat.com>
6876 * linux-low.c (pid_is_stopped): New.
6877 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6879 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6881 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6884 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6886 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6888 2012-02-24 Luis Machado <lgustavo@codesourcery>
6890 * server.c (handle_query): Advertise support for target-side
6891 breakpoint condition evaluation.
6892 (process_point_options): New function.
6893 (process_serial_event): When inserting a breakpoint, check for
6894 a target-side condition that should be evaluated.
6896 * mem-break.c: Include regcache.h and ax.h.
6897 (point_cond_list_t): New data structure.
6898 (breakpoint) <cond_list>: New field.
6899 (find_gdb_breakpoint_at): Make non-static.
6900 (delete_gdb_breakpoint_at): Clear any target-side
6902 (clear_gdb_breakpoint_conditions): New function.
6903 (add_condition_to_breakpoint): Likewise.
6904 (add_breakpoint_condition): Likewise.
6905 (gdb_condition_true_at_breakpoint): Likewise.
6906 (gdb_breakpoint_here): Return result directly instead
6907 of going through a local variable.
6909 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6910 (clear_gdb_breakpoint_conditions): Likewise.
6911 (add_breakpoint_condition): Likewise.
6912 (gdb_condition_true_at_breakpoint): Likewise.
6914 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6915 (need_step_over_p): Take target-side breakpoint condition into
6918 2012-02-24 Luis Machado <lgustavo@codesourcery>
6920 * server.h: Include tracepoint.h.
6921 (agent_mem_read, agent_get_trace_state_variable_value,
6922 agent_set_trace_state_variable_value,
6923 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6924 get_set_tsv_func_addr): New prototypes.
6926 * ax.h: New include file.
6927 * ax.c: New source file.
6929 * tracepoint.c: Include ax.h.
6930 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6931 agent_expr, eval_result_type): Move to ax.h.
6932 (parse_agent_expr): Rename to ...
6933 (gdb_parse_agent_expr): ... this, make it non-static and move
6935 (unparse_agent_expr) Rename to ...
6936 (gdb_unparse_agent_expr): ... this, make it non-static and move
6938 (eval_agent_expr): Rename to ...
6939 (eval_tracepoint_agent_expr): ... this.
6940 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6941 forward declarations.
6942 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6943 (agent_get_trace_state_variable_value): New function.
6944 (agent_set_trace_state_variable_value): New function.
6945 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6946 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6947 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6948 (condition_true_at_tracepoint): Likewise.
6949 (parse_agent_expr): Rename to ...
6950 (gdb_parse_agent_expr): ... this and move to ax.c.
6951 (unparse_agent_expr): Rename to ...
6952 (gdb_unparse_agent_expr): ... this and move to ax.c.
6953 (gdb_agent_op_name): Move to ax.c.
6954 (eval_agent_expr): Rename to ...
6955 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6957 (eval_tracepoint_agent_expr): New function.
6958 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6960 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6962 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6963 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6964 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6965 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6966 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6967 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6968 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6969 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6970 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6971 (compile_bytecodes): Remove forward declaration.
6972 (is_goto_target): Move to ax.c.
6973 (compile_bytecodes): Move to ax.c and call
6974 agent_get_trace_state_variable_value (...) and
6975 agent_set_trace_state_variable_value (...).
6977 * Makefile.in: Update ax.c and IPA dependencies.
6979 2012-02-24 Pedro Alves <palves@redhat.com>
6981 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6982 (cmd_bigqtbuffer_circular): ... this. Only handle
6983 'QTBuffer:circular:'.
6984 (handle_tracepoint_general_set): Adjust.
6986 2012-02-16 Yao Qi <yao@codesourcery.com>
6988 * inferiors.c: Move code to ...
6989 * dll.c: .... here. New.
6990 * server.h: Declare clear_dlls.
6991 * Makefile.in (SFILES): Add dll.c.
6995 2012-02-11 Yao Qi <yao@codesourcery.com>
6997 * server.c: (handle_monitor_command): Add a new parameter
6999 (handle_query): Update caller.
7001 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7003 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7004 * configure, config.in: Regenerate.
7005 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7008 2012-02-02 Pedro Alves <palves@redhat.com>
7010 Try SIGKILL first, then PTRACE_KILL.
7011 * linux-low.c (linux_kill_one_lwp): New.
7012 (linux_kill_one_lwp): Rename to ...
7013 (kill_one_lwp_callback): ... this. Use the new
7016 2012-02-02 Pedro Alves <palves@redhat.com>
7018 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7021 2012-01-27 Pedro Alves <palves@redhat.com>
7023 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7024 (elf_64_file_p): Make static.
7025 (linux_pid_exe_is_elf_64_file): New.
7026 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7027 Delete declarations.
7028 (linux_pid_exe_is_elf_64_file): Declare.
7029 * linux-x86-low.c (x86_arch_setup): Use
7030 linux_pid_exe_is_elf_64_file.
7032 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7034 * linux-low.c (linux_wait_for_event_1): Rename to ...
7035 (linux_wait_for_event): ... here and merge it with former
7036 linux_wait_for_event - new variable wait_ptid, use it.
7037 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7039 2012-01-23 Pedro Alves <palves@redhat.com>
7041 * server.c (main): Avoid yet another case of infinite loop while
7042 detaching/killing after a longjmp.
7044 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7047 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7049 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7051 * hostio.c (handle_readlink): New function.
7052 (handle_vFile): Call it to handle "vFile:readlink" packets.
7054 2012-01-20 Pedro Alves <palves@redhat.com>
7055 Ulrich Weigand <ulrich.weigand@linaro.org>
7057 * server.c (handle_v_requests): Only support vAttach and vRun to
7058 start multiple processes when in extended protocol mode.
7060 2012-01-17 Pedro Alves <palves@redhat.com>
7062 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7063 memalign plus mprotect to allocate the scratch buffer.
7065 2012-01-13 Pedro Alves <palves@redhat.com>
7067 * server.c (attach_inferior): Clear `cont_thread'.
7069 2012-01-13 Pedro Alves <palves@redhat.com>
7071 * server.c (main): Avoid infinite loop while detaching/killing
7074 2012-01-09 Doug Evans <dje@google.com>
7076 * server.c (start_inferior): Set last_ptid in --wrapper case.
7078 2012-01-06 Yao Qi <yao@codesourcery.com>
7080 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7082 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7084 2012-01-04 Yao Qi <yao@codesourcery.com>
7086 * tracepoint.c (cmd_qtdp): Print debug message
7087 for static tracepoint.
7089 2012-01-04 Yao Qi <yao@codesourcery.com>
7091 * tracepoint.c (trace_vdebug): Differentiate debug message
7092 between gdbserver and IPA.
7094 2012-01-03 Yao Qi <yao@codesourcery.com>
7096 * tracepoint.c (tracepoint_was_hit): Don't collect for
7099 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7101 * terminal.h: Reformat copyright header.
7103 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7105 * server.c (gdbserver_version): Update copyright year.
7106 * gdbreplay.c (gdbreplay_version): Likewise.
7108 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7110 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7113 2011-12-18 Hui Zhu <teawater@gmail.com>
7114 * linux-low.c (linux_create_inferior): Save return value to ret.
7116 2011-12-18 Hui Zhu <teawater@gmail.com>
7118 * linux-low.c (linux_create_inferior): Save return value to ret.
7120 2011-12-16 Doug Evans <dje@google.com>
7122 * linux-low.c (linux_create_inferior): If stdio connection,
7123 redirect stdin from /dev/null, stdout to stderr.
7124 * remote-utils.c (remote_is_stdio): New static global.
7125 (remote_connection_is_stdio): New function.
7126 (remote_prepare): Handle stdio connection.
7127 (remote_open): Ditto.
7128 (remote_close): Don't close stdin for stdio connections.
7129 (read_prim,write_prim): New functions. Replace all calls to
7130 read/write to these.
7131 * server.c (main): Watch for "-" argument. Move call to
7132 remote_prepare before start_inferior.
7133 * server.h (STDIO_CONNECTION_NAME): New macro.
7134 (remote_connection_is_stdio): Declare.
7136 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7137 in debugging output.
7139 2011-12-15 Yao Qi <yao@codesourcery.com>
7141 * tracepoint.c: Include sys/syscall.h.
7142 (gdb_ust_thread): Remove preprocessor conditional.
7144 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7146 * linux-low.c (linux_detach_one_lwp): Call
7147 the_low_target.prepare_to_resume before detaching.
7149 2011-12-14 Yao Qi <yao@codesourcery.com>
7151 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7154 2011-12-14 Yao Qi <yao@codesourcery.com>
7156 * i386-low.c (i386_low_stopped_data_address): Initialize local
7159 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7163 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7164 DR_CONTROL unless necessary. Extend comments.
7165 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7166 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7168 2011-12-13 Yao Qi <yao@codesourcery.com>
7170 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7172 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7174 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7176 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7177 Print new debug message for such case.
7179 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7181 Fix overlapping memcpy.
7182 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7183 the read_inferior_memory transfer.
7184 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7185 write_inferior_memory transfer.
7186 (set_fast_tracepoint_jump): New variable buf. Use it for the
7187 read_inferior_memory and write_inferior_memory transfers.
7188 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7189 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7190 Use it for the write_inferior_memory transfer.
7191 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7194 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7196 * linux-low.c (fetch_register, store_register): Make code
7197 consistent, fix formatting.
7199 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7201 * linux-low.c (usr_store_inferior_registers): Factor out code
7202 to handle individual registers into...
7203 (store_register): ... this new function.
7205 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7207 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7208 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7209 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7210 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7211 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7212 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7213 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7214 (srv_xmlfiles): Add new XML files.
7216 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7218 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7219 (init_registers_s390_linux32v1): Add prototype.
7220 (init_registers_s390_linux32v2): Likewise.
7221 (init_registers_s390_linux64v1): Likewise.
7222 (init_registers_s390_linux64v2): Likewise.
7223 (init_registers_s390x_linux64v1): Likewise.
7224 (init_registers_s390x_linux64v2): Likewise.
7225 (s390_num_regs): Increment to 52.
7226 (s390_regmap): Add orig_r2 register.
7227 (s390_num_regs_3264): Increment to 68.
7228 (s390_regmap_3264): Add orig_r2 register.
7229 (s390_collect_ptrace_register): Handle orig_r2 register.
7230 (s390_supply_ptrace_register): Likewise.
7231 (s390_fill_last_break): New function.
7232 (s390_store_last_break): Likewise.
7233 (s390_fill_system_call): New function.
7234 (s390_store_system_call): Likewise.
7235 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7237 (s390_check_regset): New function.
7238 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7239 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7240 Update target_regsets for available register sets.
7242 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7243 Jan Kratochvil <jan.kratochvil@redhat.com>
7245 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7246 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7248 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7249 * linux-low.h (struct process_info_private): New member r_debug.
7250 * server.c (handle_qxfer_libraries): Call
7251 the_target->qxfer_libraries_svr4.
7252 (handle_qxfer_libraries_svr4): New function.
7253 (qxfer_packets): New entry "libraries-svr4".
7254 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7255 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7256 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7257 PACKET_qXfer_libraries_svr4.
7259 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7261 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7262 PSW address/mask between 8-byte and 16-byte formats.
7263 (s390_supply_ptrace_register): Likewise.
7264 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7265 basic addressing mode bit.
7267 2011-11-24 Stan Shebs <stan@codesourcery.com>
7269 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7271 2011-11-17 Stan Shebs <stan@codesourcery.com>
7273 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7274 (tracing_start_time): New global.
7275 (tracing_stop_time): New global.
7276 (tracing_user_name): New global.
7277 (tracing_notes): New global.
7278 (tracing_stop_note): New global.
7279 (cmd_qtstart): Set traceframe_usage, start_time.
7280 (stop_tracing): Set stop_time.
7281 (cmd_qtstatus): Report additional status.
7282 (cmd_qtp): New function.
7283 (handle_tracepoint_query): Call it.
7284 (cmd_qtnotes): New function.
7285 (handle_tracepoint_general_set): Call it.
7286 (get_timestamp): Rename from tsv_get_timestamp.
7288 2011-11-14 Stan Shebs <stan@codesourcery.com>
7289 Kwok Cheung Yeung <kcy@codesourcery.com>
7291 * linux-x86-low.c (small_jump_insn): New.
7292 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7293 trampoline and error message, build a trampoline and issue a small
7294 jump instruction to it.
7295 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7296 trampoline and error message.
7297 (x86_get_min_fast_tracepoint_insn_len): New.
7298 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7299 * linux-low.h (struct linux_target_ops): Add arguments to
7300 install_fast_tracepoint_jump_pad operation, add new operation.
7301 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7303 (linux_get_min_fast_tracepoint_insn_len): New function.
7304 (linux_target_op): Add new operation.
7305 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7306 (gdb_trampoline_buffer_end): Ditto.
7307 (gdb_trampoline_buffer_error): Ditto.
7308 (struct ipa_sym_addresses): Add fields for new IPA variables.
7309 (symbol_list): Add entries for new IPA variables.
7310 (struct tracepoint): Add fields to hold the address range of the
7311 trampoline used by the tracepoint.
7312 (trampoline_buffer_head): New static variable.
7313 (trampoline_buffer_tail): Ditto.
7314 (claim_trampoline_space): New function.
7315 (have_fast_tracepoint_trampoline_buffer): New function.
7316 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7318 (install_fast_tracepoint): Ditto, also add error buffer argument.
7319 (cmd_qtminftpilen): New function.
7320 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7321 (fast_tracepoint_from_trampoline_address): New function.
7322 (fast_tracepoint_collecting): Handle trampoline as part of jump
7324 (set_trampoline_buffer_space): New function.
7325 (initialize_tracepoint): Initialize new IPA variables.
7326 * target.h (struct target_ops): Add arguments to
7327 install_fast_tracepoint_jump_pad operation, add new
7328 get_min_fast_tracepoint_insn_len operation.
7329 (target_get_min_fast_tracepoint_insn_len): New.
7330 (install_fast_tracepoint_jump_pad): Add arguments.
7331 * server.h (IPA_BUFSIZ): Define.
7332 * linux-i386-ipa.c: Include extra header files.
7333 (initialize_fast_tracepoint_trampoline_buffer): New function.
7334 (initialize_low_tracepoint): Call it.
7335 * server.h (set_trampoline_buffer_space): Declare.
7336 (claim_trampoline_space): Ditto.
7337 (have_fast_tracepoint_trampoline_buffer): Ditto.
7339 2011-11-14 Yao Qi <yao@codesourcery.com>
7341 * server.c (handle_query): Handle InstallInTrace for qSupported.
7342 * tracepoint.c (add_tracepoint): Sort list.
7343 (install_tracepoint, download_tracepoint): New.
7344 (cmd_qtdp): Call them to install and download tracepoints.
7345 (sort_tracepoints): Removed.
7346 (cmd_qtstart): Update.
7348 2011-11-14 Yao Qi <yao@codesourcery.com>
7350 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7351 * mem-break.h: Declare.
7352 * tracepoint.c (cmd_qtstart): Move some code to ...
7353 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7355 (download_tracepoints): Move some code to ...
7356 (download_tracepoint_1): ... here. New.
7358 2011-11-08 Yao Qi <yao@codesourcery.com>
7360 * remote-utils.c (relocate_instruction): A comment fix.
7362 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7364 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7365 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7366 dr_status_mirror and dr_control_mirror from debug_reg_state.
7367 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7368 (i386_initial_stuff): Remove use of deleted globals.
7369 (i386_get_thread_context, i386_set_thread_context,
7370 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7371 from debug_reg_state.
7373 2011-11-05 Yao Qi <yao@codesourcery.com>
7375 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7376 address as TPOINT's.
7378 2011-11-02 Stan Shebs <stan@codesourcery.com>
7380 * tracepoint.c (agent_mem_read_string): New function.
7381 (eval_agent_expr): Call it for tracenz.
7382 * server.c (handle_query): Report support for tracenz.
7384 2011-11-02 Yao Qi <yao@codesourcery.com>
7386 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7388 2011-11-02 Yao Qi <yao@codesourcery.com>
7390 * target.h: Fix a typo in comment.
7392 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7394 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7395 clobber the breakpoints' shadows with fast tracepoint jumps.
7396 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7397 * target.c (write_inferior_memory): Also pass MYADDR down to
7400 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7402 * configure.ac: Check support for personality routine.
7403 * configure: Regenerate.
7404 * config.in: Likewise.
7405 * linux-low.c: Include <sys/personality.h>.
7406 Define ADDR_NO_RANDOMIZE if necessary.
7407 (linux_create_inferior): Disable address space randomization when
7408 forking inferior, if requested.
7409 (linux_supports_disable_randomization): New function.
7410 (linux_target_ops): Install it.
7411 * server.h (disable_randomization): Declare.
7412 * server.c (disable_randomization): New global variable.
7413 (handle_general_set): Handle QDisableRandomization.
7414 (handle_query): Likewise for qSupported.
7415 (main): Support --disable-randomization and --no-disable-randomization
7416 command line arguments.
7417 * target.h (struct target_ops): Add supports_disable_randomization.
7418 (target_supports_disable_randomization): New macro.
7420 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7422 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7424 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7425 [!PT_GETDSBT] (target_loadmap): New definition.
7426 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7427 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7428 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7429 and PT_GETDSBT to LINUX_LOADMAP.
7430 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7431 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7433 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7435 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7436 (arm_linux_hwbp_cap): New static variable.
7437 (arm_linux_get_hwbp_cap): Replace by ...
7438 (arm_linux_init_hwbp_cap): ... this new function.
7439 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7440 (arm_linux_get_hw_watchpoint_count): Likewise.
7441 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7442 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7443 (arm_prepare_to_resume): Use perror_with_name instead of error.
7445 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7447 * linux-arm-low.c: Include <signal.h>.
7448 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7449 (struct arm_linux_hwbp_cap): New data type.
7450 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7451 (struct arm_linux_hw_breakpoint): New data type.
7452 (MAX_BPTS, MAX_WPTS): Define.
7453 (struct arch_process_info, struct arch_lwp_info): New data types.
7454 (arm_linux_get_hwbp_cap): New function.
7455 (arm_linux_get_hw_breakpoint_count): Likewise.
7456 (arm_linux_get_hw_watchpoint_count): Likewise.
7457 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7458 (arm_hwbp_control_initialize): Likewise.
7459 (arm_hwbp_control_is_enabled): Likewise.
7460 (arm_hwbp_control_is_initialized): Likewise.
7461 (arm_hwbp_control_disable): Likewise.
7462 (arm_linux_hw_breakpoint_equal): Likewise.
7463 (arm_linux_hw_point_initialize): Likewise.
7464 (struct update_registers_data): New data structure.
7465 (update_registers_callback: New function.
7466 (arm_insert_point): Likewise.
7467 (arm_remove_point): Likewise.
7468 (arm_stopped_by_watchpoint): Likewise.
7469 (arm_stopped_data_address): Likewise.
7470 (arm_new_process): Likewise.
7471 (arm_new_thread): Likewise.
7472 (arm_prepare_to_resume): Likewise.
7473 (the_low_target): Register arm_insert_point, arm_remove_point,
7474 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7475 arm_new_thread, and arm_prepare_to_resume.
7477 2011-09-15 Stan Shebs <stan@codesourcery.com>
7479 * server.h (struct emit_ops): Add compare-goto fields.
7480 * tracepoint.c (gdb_agent_op_sizes): New table.
7481 (emit_eq_goto): New function.
7482 (emit_ne_goto): New function.
7483 (emit_lt_goto): New function.
7484 (emit_le_goto): New function.
7485 (emit_gt_goto): New function.
7486 (emit_ge_goto): New function.
7487 (is_goto_target): New function.
7488 (compile_bytecodes): Recognize special cases of compare-goto
7489 combinations and call specialized emitters for them.
7490 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7491 (amd64_emit_ne_goto): New function.
7492 (amd64_emit_lt_goto): New function.
7493 (amd64_emit_le_goto): New function.
7494 (amd64_emit_gt_goto): New function.
7495 (amd64_emit_ge_goto): New function.
7496 (amd64_emit_ops): Add the new functions.
7497 (i386_emit_eq_goto): New function.
7498 (i386_emit_ne_goto): New function.
7499 (i386_emit_lt_goto): New function.
7500 (i386_emit_le_goto): New function.
7501 (i386_emit_gt_goto): New function.
7502 (i386_emit_ge_goto): New function.
7503 (i386_emit_ops): Add the new functions.
7505 2011-09-08 Stan Shebs <stan@codesourcery.com>
7507 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7508 (i386_emit_epilogue): Restore %ebx.
7510 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7512 * server.c (step_thread): Remove definition.
7513 (process_serial_event): Don't handle Hs.
7514 * server.h (step_thread): Remove declaration.
7515 * target.c (set_desired_inferior): Remove use of step_thread.
7517 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7519 * linux-low.c: Include linux-procfs.h.
7520 (linux_attach_lwp_1): Update comments.
7521 (linux_attach): Scan for existing threads when attaching to a
7522 process that is the tgid.
7523 * Makefile.in: Update dependencies.
7525 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7527 * configure.srv: Add linux-procfs.o dependencies.
7529 2011-08-14 Yao Qi <yao@codesourcery.com>
7531 * target.h (struct target_ops): Fix indent.
7532 * win32-low.c (win32_target_ops): Fix comment.
7534 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7535 Yao Qi <yao@codesourcery.com>
7537 * Makefile.in (clean): Remove tic6x-*.c files.
7538 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7539 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7540 (tic6x-c64xp-linux.c): Likewise.
7541 * configure.srv: Add support for tic6x-*-uclinux.
7542 * linux-tic6x-low.c: New.
7543 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7545 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7546 Yao Qi <yao@codesourcery.com>
7548 * target.h (struct target_ops): Add read_loadmap.
7549 * linux-low.c (struct target_loadseg): New type.
7550 (struct target_loadmap): New type.
7551 (linux_read_loadmap): New function.
7552 (linux_target_ops): Add linux_read_loadmap.
7553 * server.c (handle_query): Support qXfer:fdpic:read packet.
7554 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7557 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7559 * win32-low.c: Include <stdint.h>.
7561 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7563 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7564 to the inferior here.
7565 (i386_remove_aligned_watchpoint): Ditto.
7566 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7567 fit part of the watchpoint in the debug registers.
7568 (i386_update_inferior_debug_regs): New.
7569 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7570 registers, and only update the inferior on success.
7571 (i386_low_remove_watchpoint): Ditto.
7573 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7575 * linux-low.c (compare_ints, unique, list_threads, show_process,
7576 linux_core_of_thread): Delete.
7577 (linux_target_ops): Change linux_core_of_thread to
7578 linux_common_core_of_thread.
7579 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7580 * utils.c (malloc_failure): Change type of argument.
7581 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7582 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7583 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7584 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7585 (IPA_OBJS): Add common-utils-ipa.o.
7586 (ptid_h, linux_osdata_h): New macros.
7587 (server_h): Add common/common-utils.h, common/xml-utils.h,
7588 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7590 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7591 ptid.o, buffer.o): New rules.
7592 (linux-low.o): Add common/linux-osdata.h as a dependency.
7593 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7594 * configure.ac: Add AC_HEADER_DIRENT check.
7595 * config.in: Regenerate.
7596 * configure: Regenerate.
7597 * remote-utils.c (xml_escape_text): Delete.
7598 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7599 buffer_xml_printf): Move to common/buffer.c.
7600 * server.c (main): Remove call to initialize_inferiors.
7601 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7602 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7603 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7604 internal_error, gdb_assert, gdb_assert_fail): Delete.
7605 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7606 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7608 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7609 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7610 initialize_inferiors): Delete.
7612 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7614 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7617 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7619 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7621 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7623 2011-05-26 Yao Qi <yao@codesourcery.com>
7625 * Makefile.in (thread-db.o): Track dependence to
7626 common/gdb_thread_db.h.
7627 * thread-db.c: include gdb_thread_db.h from right place.
7629 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7631 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7632 __FILE__ and __LINE__ to internal_error.
7634 2011-05-13 Doug Evans <dje@google.com>
7636 * thread-db.c (try_thread_db_load_from_sdir): New function.
7637 (try_thread_db_load_from_dir): New function.
7638 (thread_db_load_search): Handle $sdir, ignore $pdir.
7639 Remove trying of system directories if search of
7640 libthread-db-search-path fails, that is now done via $sdir.
7642 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7644 * server.c (handle_query): Add EnableDisableTracepoints to the list
7645 of supported features.
7646 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7648 (cmd_qtenable_disable): New.
7649 (cmd_qtstart): Install tracepoints even if disabled.
7650 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7651 receiving a QTEnable or QTDisable packet.
7652 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7653 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7655 (gdb_probe): Skip data collection if static tracepoint is disabled.
7657 2011-05-10 Doug Evans <dje@google.com>
7659 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7661 2011-05-04 Doug Evans <dje@google.com>
7663 * linux-low.c (linux_join): Skip process lookup.
7664 * spu-low.c (spu_join): Ditto.
7665 * server.c (join_inferiors_callback): Delete.
7666 (process_serial_event): For 'D' packet (detach) call join_inferior
7669 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7671 * README: Don't mention xscale*-*-linux*.
7672 * configure.srv (xscale*-*-linux*): Don't handle target.
7674 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7676 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7678 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7679 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7680 (i386_emit_void_call_2): Likewise.
7682 2011-04-26 Yao Qi <yao@codesourcery.com>
7684 * linux-low.c: Move common macros to linux-ptrace.h.
7685 Include linux-ptrace.h.
7686 * Makefile.in (linux_ptrace_h): New.
7687 (linux-low.o): Depends on linux-ptrace.h.
7689 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7691 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7692 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7693 (remote_prepare): New function with most of the TCP code from ...
7694 (remote_open): ... here. Detect PORT here unconditionally. Move also
7695 setting transport_is_reliable.
7696 * server.c (run_once): New variable.
7697 (gdbserver_usage): Document it.
7698 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7699 the first run if RUN_ONCE.
7700 * server.h (run_once, remote_prepare): New declarations.
7702 2011-04-19 Tom Tromey <tromey@redhat.com>
7704 * win32-low.c (handle_load_dll): Remove duplicate "the".
7706 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7708 Remove support for old Cygwin 1.5 versions.
7709 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7710 function to avoid warning.
7711 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7714 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7716 * gdbserver/server.h (Macro _): Define it if not available.
7718 2011-03-14 Michael Snyder <msnyder@vmware.com>
7720 * hostio.c (handle_close): Remove unnecessary null test.
7722 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7724 * Makefile.in (maintainer-clean realclean distclean): Remove
7725 "make ... subdir_do" command.
7727 2011-03-10 Michael Snyder <msnyder@vmware.com>
7729 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7731 * server.c (handle_v_run): Free alloced buffer on early return.
7733 2011-03-09 Yao Qi <yao@codesourcery.com>
7736 2011-03-04 Yao Qi <yao@codesourcery.com>
7738 * Makefile.in: Remove GNU make feature --directory.
7740 2011-03-05 Yao Qi <yao@codesourcery.com>
7742 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7743 (subdir_do): New make target. Copied from gdb/Makefile.
7744 (maintainer-clean, realclean, distclean, clean): Call corresponding
7745 make targets in common/Makefile.
7747 2011-02-11 Yao Qi <yao@codesourcery.com>
7749 * configure.ac: Call AC_PROG_RANLIB.
7750 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7751 * configure: Regenerate.
7753 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7755 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7757 2011-03-06 Yao Qi <yao@codesourcery.com>
7759 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7761 2011-03-05 Yao Qi <yao@codesourcery.com>
7763 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7764 (subdir_do): New make target. Copied from gdb/Makefile.
7765 (maintainer-clean, realclean, distclean, clean): Call corresponding
7766 make targets in common/Makefile.
7768 2011-03-04 Yao Qi <yao@codesourcery.com>
7770 * Makefile.in: Remove GNU make feature --directory.
7772 2011-03-04 Michael Snyder <msnyder@vmware.com>
7774 * server.c (queue_stop_reply): Call xmalloc not malloc.
7776 2011-03-02 Michael Snyder <msnyder@vmware.com>
7778 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7780 2011-02-28 Michael Snyder <msnyder@vmware.com>
7782 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7783 (cmd_qtframe): Ditto.
7784 (cmd_qtbuffer): Ditto.
7785 (cmd_bigqtbuffer): Ditto.
7787 * utils.c (decimal2str): Initialize 'width' to nine, then
7790 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7792 * hostio.c (require_data): Free *data, not data.
7794 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7796 * hostio.c (require_data): Use free, not xfree.
7798 2011-02-27 Michael Snyder <msnyder@vmware.com>
7800 * server.c (handle_query): Discard unused value.
7802 * hostio.c (require_data): Free malloc memory before returning
7805 2011-02-26 Michael Snyder <msnyder@vmware.com>
7807 * linux-low.c (list_threads): Call closedir for dirent.
7809 2011-02-27 Michael Snyder <msnyder@vmware.com>
7811 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7812 a case statement falls through.
7814 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7819 2011-02-26 Michael Snyder <msnyder@vmware.com>
7821 * utils.c (decimal2str): Eliminate dead code and dead param.
7822 (pulongest): Drop dead param from call to decimal2str.
7825 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7827 Revert the following patch (not approved yet):
7828 2011-02-21 Hui Zhu <teawater@gmail.com>
7829 * tracepoint.c (tp_printf): New function.
7830 (eval_agent_expr): Handle gdb_agent_op_printf.
7832 2011-02-21 Hui Zhu <teawater@gmail.com>
7834 * tracepoint.c (tp_printf): New function.
7835 (eval_agent_expr): Handle gdb_agent_op_printf.
7837 2011-02-18 Tom Tromey <tromey@redhat.com>
7839 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7840 (tracepoint.o): Likewise.
7841 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7842 (gdb_agent_op_names): Likewise.
7844 2011-02-18 Tom Tromey <tromey@redhat.com>
7846 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7847 gdb_agent_op_rot>: New constants.
7848 (gdb_agent_op_names): Add pick and roll.
7849 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7852 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7854 * aclocal.m4: Regenerated with aclocal-1.11.1.
7856 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7858 * server.c (handle_qxfer_traceframe_info): New.
7859 (qxfer_packets): Register "traceframe-info".
7860 (handle_query): Report support for qXfer:traceframe-info:read+.
7861 * tracepoint.c (match_blocktype): New.
7862 (traceframe_find_block_type): Rename to ...
7863 (traceframe_walk_blocks): ... this. Add callback filter argument,
7865 (traceframe_find_block_type): New, reimplemented on top of
7866 traceframe_walk_blocks.
7867 (build_traceframe_info_xml): New.
7868 (traceframe_read_info): New.
7869 * server.h (traceframe_read_info): Declare.
7871 2011-02-11 Yao Qi <yao@codesourcery.com>
7873 * configure.ac: Call AC_PROG_RANLIB.
7874 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7875 * configure: Regenerate.
7877 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7879 * server.c (gdb_read_memory): Change return semantics to allow
7881 (handle_search_memory_1): Adjust.
7882 (process_serial_event) <'m' packet>: Handle partial transfers.
7883 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7885 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7887 * regcache.c (init_register_cache): Initialize
7888 regcache->register_status.
7889 (free_register_cache): Release regcache->register_status.
7890 (regcache_cpy): Copy register_status.
7891 (registers_to_string): Print 'x's for unavailable registers.
7892 (supply_register): Mark the register's status valid or
7893 unavailable, depending on whether a buffer was passed in or not.
7894 (supply_register_zeroed): New.
7895 (supply_regblock): Mark the registers' status valid or
7896 unavailable, depending on whether a buffer was passed in or not.
7897 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7898 (struct regcache): New `register_status' field.
7899 (supply_register_zeroed): Declare.
7900 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7901 supply_register_zeroed, rather than passing a NULL buffer to
7903 * tracepoint.c (fetch_traceframe_registers): Update comment.
7905 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7907 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7910 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7912 * server.h (decode_xfer_write): Change prototype.
7913 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7914 and don't extract the annex here.
7915 * server.c (decode_xfer_read): Remove `annex' parameter,
7916 and don't extract the annex here.
7918 (struct qxfer): New.
7919 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7920 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7921 (handle_qxfer_statictrace): New functions, abstracted out from
7922 handle_query, and made to use the struct qxfer interface.
7923 (handle_threads_qxfer_proper): Rename to ...
7924 (handle_qxfer_threads_proper): ... this.
7925 (handle_threads_qxfer): Rename to ...
7926 (handle_qxfer_threads): ... this. Adjust.
7927 (qxfer_packets): New array.
7928 (handle_qxfer): New function.
7929 (handle_query): Use handle_qxfer.
7931 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7933 * gdbreplay.c: Shorten lines of >= 80 columns.
7934 * linux-low.c: Ditto.
7935 * linux-ppc-low.c: Ditto.
7936 * linux-s390-low.c: Ditto.
7937 * linux-sparc-low.c: Ditto.
7938 * linux-x86-low.c: Ditto.
7939 * linux-xtensa-low.c: Ditto.
7940 * mem-break.c: Ditto.
7942 * regcache.h: Ditto.
7943 * remote-utils.c: Ditto.
7946 * thread-db.c: Ditto.
7947 * tracepoint.c: Ditto.
7949 * win32-low.h: Ditto.
7951 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7953 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7956 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7958 * server.c (gdbserver_version): Update copyright year in version
7960 * gdbreplay.c (gdbreplay_version): Ditto.
7962 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7964 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7965 * linux-bfin-low.c: New file.
7966 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7967 PT_DATA_ADDR for BFIN targets.
7968 * Makefile.in (SFILES): Add linux-bfin-low.c.
7969 (clean): Remove reg-bfin.c.
7970 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7971 * README: Mention supported Blackfin targets.
7973 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7975 * .gitignore: New file.
7977 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7979 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7981 2010-10-22 Jie Zhang <jie@codesourcery.com>
7983 * Makefile.in: Add FLAGS_TO_PASS variable.
7984 (install): Remove dependency of install-only and recursively
7985 invoke make for install-only.
7987 2010-10-04 Doug Evans <dje@google.com>
7989 * Makefile.in (uninstall): Use $(DESTDIR).
7991 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7995 * linux-x86-low.c (compat_siginfo_from_siginfo)
7996 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7997 si_code is < 0. Check for si_code == SI_TIMER before checking for
8000 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8002 * lynx-i386-low.c: New file.
8003 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8005 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8007 * lynx-low.c (ptrace_request_to_str): Remove handling for
8008 request values that have been removed in LynxOS 5.x.
8010 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8012 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8015 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8017 * configure.ac: Add --enable-inprocess-agent option.
8018 * configure: Rebuilt.
8020 2010-09-06 Yao Qi <yao@codesourcery.com>
8022 * linux-low.c (linux_kill): Remove unused variable.
8023 (linux_stabilize_threads): Likewise.
8024 * server.c (start_inferior): Likewise.
8025 (queue_stop_reply_callback): Likewise.
8026 * tracepoint.c (do_action_at_tracepoint): Likewise.
8028 2010-09-06 Yao Qi <yao@codesourcery.com>
8030 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8033 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8035 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8037 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8039 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8042 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8044 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8045 gdbserver/lynx-ppc-low.c: New files.
8046 * Makefile.in (lynx_low_h): New variable.
8047 (lynx-low.o, lynx-ppc-low.o): New rules.
8048 * configure.ac: On LynxOS, link with -lnetinet.
8049 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8050 * configure: regenerate.
8052 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8054 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8055 * configure.ac: Add check for vasprintf and vsnprintf.
8056 * configure, config.in: Regenerate.
8057 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8059 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8061 * gdbreplay.c: Move include of alloca.h up, next to include of
8063 * server.h: Add include of malloc.h.
8064 * mem-break.c: Remove include of malloc.h.
8065 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8067 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8069 * Makefile.in (memmem.o): Build with -Wno-error.
8071 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8073 * utils.c (xsnprintf): Make non-static.
8074 * server.h: Add xsnprintf declaration.
8075 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8076 replace calls to snprintf by calls to xsnprintf throughout.
8078 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8080 * configure.ac: Add configure check for alloca.
8081 * configure, config.in: Regenerate.
8082 * server.h: Include alloca.h if it exists.
8083 * gdbreplay.c: Include alloca.h if it exists.
8085 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8087 * linux-low.c (__SIGRTMIN): Define if not already defined.
8088 (linux_create_inferior): Check for __ANDROID__ rather than
8090 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8091 are already deferred.
8092 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8093 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8094 stopped and already has a pending signal to report.
8095 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8096 a pending signal to report or is moving out of a jump pad.
8097 (linux_init_signals): Check for __ANDROID__ rather than
8100 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8102 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8103 debug_threads check. Avoid a linear search when not doing debug
8106 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8108 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8109 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8110 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8111 (process_event): Change local fd's type to gdb_fildes_t.
8112 (create_file_handler): Adjust prototype.
8113 (delete_file_handler): Adjust prototype.
8114 (handle_file_event): Adjust prototype. Use pfildes.
8115 (create_file_event): Adjsut prototype.
8116 * remote-utils.c (remote_desc, listen_desc): Change type to
8118 * server.h: New gdb_fildes_t typedef.
8119 [USE_WIN32API]: Include winsock2.h.
8120 (delete_file_handler, add_file_handler): Adjust prototypes.
8122 * utils.c (pfildes): New.
8124 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8126 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8127 * configure: Regenerate.
8129 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8131 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8132 (linux_done_accessing_memory): ... this.
8133 (linux_target_ops): Adjust.
8134 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8135 * nto-low.c (nto_target_ops): Adjust comment.
8136 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8137 * spu-low.c (spu_target_ops): Adjust comment.
8138 * target.h (target_ops): Rename unprepare_to_access_memory field
8139 to done_accessing_memory.
8140 (unprepare_to_access_memory): Rename to ...
8141 (done_accessing_memory): ... this.
8143 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8145 * linux-low.c (linux_prepare_to_access_memory): New.
8146 (linux_unprepare_to_access_memory): New.
8147 (linux_target_ops): Install them.
8148 * server.c (read_memory): Rename to ...
8149 (gdb_read_memory): ... this. Use
8150 prepare_to_access_memory/prepare_to_access_memory.
8151 (write_memory): Rename to ...
8152 (gdb_write_memory): ... this. Use
8153 prepare_to_access_memory/prepare_to_access_memory.
8154 (handle_search_memory_1): Adjust.
8155 (process_serial_event): Adjust.
8156 * target.h (struct target_ops): New fields
8157 prepare_to_access_memory and unprepare_to_access_memory.
8158 (prepare_to_access_memory, unprepare_to_access_memory): New.
8159 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8160 prepare_to_access_memory/prepare_to_access_memory.
8161 * nto-low.c (nto_target_ops): Adjust.
8162 * spu-low.c (spu_target_ops): Adjust.
8163 * win32-low.c (win32_target_ops): Adjust.
8165 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8167 * Makefile.in (WARN_CFLAGS): Get it from configure.
8168 (WERROR_CFLAGS): New.
8169 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8170 * configure.ac: Introduce --enable-werror, which adds -Werror to
8171 the compiler command line. Enabled by default. Disable with
8172 --disable-werror. Add -Wdeclaration-after-statement
8173 Wpointer-arith and -Wformat-nonliteral to warning flags.
8174 * configure: Regenerate.
8176 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8178 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8180 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8182 * gdbreplay.c (remote_error): New.
8184 (expect): Use gdbchar. Check for error reading from GDB.
8185 Clarify sync error output.
8186 (play): Check for errors writing to GDB.
8187 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8188 * remote-utils.c (getpkt): Check for errors writing to the remote
8191 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8193 * linux-low.c (linux_wait_1): Move non-debugging code out of
8194 `debug_threads' control.
8196 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8198 * linux-low.c (linux_wait_1): Don't set last_status here.
8199 * server.c (push_event, queue_stop_reply_callback): Assert we're
8200 not pushing a TARGET_WAITKIND_IGNORE event.
8201 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8202 (myresume, handle_target_event): Set the thread's last_resume_kind
8203 and last_status from the target returned status.
8205 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8209 * linux-x86-low.c (update_debug_registers_callback): New.
8210 (i386_dr_low_set_addr): Use it.
8211 (i386_dr_low_get_addr): New.
8212 (i386_dr_low_set_control): Use update_debug_registers_callback.
8213 (i386_dr_low_get_control): New.
8214 (i386_dr_low_get_status): Adjust.
8215 * linux-low.c (linux_stop_lwp): New.
8216 * linux-low.h (linux_stop_lwp): Declare.
8218 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8219 argument instead of a i386_debug_reg_state.
8220 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8221 a i386_debug_reg_state.
8222 (i386_insert_aligned_watchpoint): Adjust.
8223 (i386_remove_aligned_watchpoint): Adjust.
8224 (i386_low_stopped_data_address): Read the debug registers from the
8225 inferior instead of from the mirrors.
8226 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8227 (i386_dr_low_get_addr): Declare.
8228 (i386_dr_low_get_control): Declare.
8229 (i386_dr_low_get_status): Change prototype.
8231 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8232 (i386_dr_low_get_addr): New.
8233 (i386_dr_low_get_control): New.
8234 (i386_dr_low_get_status): Adjust prototype. Return
8236 (i386_initial_stuff): Clear dr_status_mirror and
8238 (i386_get_thread_context): Adjust.
8239 (i386_set_thread_context): Adjust.
8240 (i386_thread_added): Adjust.
8242 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8244 * linux-low.h (linux_thread_area): Delete declaration.
8246 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8248 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8249 after its termination.
8251 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8253 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8254 (gdb_wants_all_stopped): Delete.
8255 (linux_wait_1): Don't call them.
8256 * server.c (handle_v_cont): Tag all threads as want-stopped.
8257 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8258 stopped as "client-wants-stopped".
8260 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8262 * Makefile.in (signals_h): New.
8263 (server_h): Depend on it.
8264 (server.o): Don't depend on $(signals_def).
8265 (signals.o): Depend on $(signals_def).
8267 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8269 * Makefile.in (signals_def): New.
8270 (server_h): Append include/gdb/signals.h and signals_def.
8271 (server.o): Append signals_def.
8273 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8275 * server.c (handle_target_event): Use target_signal_to_host for
8276 resume_info.sig initialization.
8277 * target.h (struct thread_resume) <sig>: New comment.
8279 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8281 * server.c (handle_query): strcpy() the returned string from paddress()
8282 instead of sprintf().
8283 * utils.c (paddress): Return phex_nz().
8285 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8287 * server.c (handle_v_cont): Call mourn_inferior if process
8289 (myresume): Likewise.
8291 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8293 Static tracepoints, and integration with UST.
8295 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8296 * mem-break.c (uninsert_all_breakpoints)
8297 (reinsert_all_breakpoints): New.
8298 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8299 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8300 (gdb_agent_ust_loaded, helper_thread_id)
8301 (gdb_agent_helper_thread_id): New macros.
8302 (struct ipa_sym_addresses): Add addr_ust_loaded,
8303 addr_helper_thread_id, addr_cmd_buf.
8304 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8305 (in_process_agent_loaded_ust): New.
8306 (write_e_ust_not_loaded): New.
8307 (maybe_write_ipa_ust_not_loaded): New.
8308 (struct collect_static_trace_data_action): New.
8309 (enum tracepoint_type) <static_tracepoint>: New.
8310 (struct tracepoint) <handle>: Mention static tracepoints.
8311 (struct static_tracepoint_ctx): New.
8312 (CMD_BUF_SIZE): New.
8313 (add_tracepoint_action): Handle static tracepoint actions.
8314 (unprobe_marker_at): New.
8315 (clear_installed_tracepoints): Handle static tracepoints.
8316 (cmd_qtdp): Handle static tracepoints.
8317 (probe_marker_at): New.
8318 (cmd_qtstart): Handle static tracepoints.
8319 (response_tracepoint): Handle static tracepoints.
8320 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8321 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8322 (get_context_regcache): Handle static tracepoints.
8323 (do_action_at_tracepoint): Handle static tracepoint actions.
8324 (traceframe_find_block_type): Handle static trace data blocks.
8325 (traceframe_read_sdata): New.
8326 (download_tracepoints): Download static tracepoint actions.
8327 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8328 (GDB_PROBE_NAME): New.
8333 (ust_marker_to_static_tracepoint): New.
8335 (collect_ust_data_at_tracepoint): New.
8336 (gdb_ust_probe): New.
8337 (UNIX_PATH_MAX, SOCK_DIR): New.
8338 (gdb_ust_connect_sync_socket): New.
8339 (resume_thread, stop_thread): New.
8340 (run_inferior_command): New.
8341 (init_named_socket): New.
8342 (gdb_ust_socket_init): New.
8343 (cstr_to_hexstr): New.
8345 (first_marker, next_marker): New.
8346 (response_ust_marker): New.
8347 (cmd_qtfstm, cmd_qtsstm): New.
8348 (unprobe_marker_at, probe_marker_at): New.
8349 (cmd_qtstmat, gdb_ust_thread): New.
8350 (gdb_ust_init): New.
8351 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8352 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8354 (x86_64_st_collect_regmap): New.
8355 (X86_64_NUM_ST_COLLECT_GREGS): New.
8356 (AMD64_RIP_REGNUM): New.
8357 (supply_static_tracepoint_registers): New.
8358 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8360 (i386_st_collect_regmap): New.
8361 (i386_NUM_ST_COLLECT_GREGS): New.
8362 (supply_static_tracepoint_registers): New.
8363 * server.c (handle_query): Handle qXfer:statictrace:read.
8364 <qSupported>: Report support for StaticTracepoints, and
8365 qXfer:statictrace:read features.
8366 * server.h (traceframe_read_sdata)
8367 (supply_static_tracepoint_registers): Declare.
8368 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8369 (unpack_varlen_hex): Include in IPA build.
8370 * Makefile.in (ustlibs, ustinc): New.
8371 (IPA_OBJS): Add remote-utils-ipa.o.
8372 ($(IPA_LIB)): Link -ldl and -lpthread.
8374 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8375 * config.in, configure: Regenerate.
8377 2010-06-20 Ian Lance Taylor <iant@google.com>
8378 Pedro Alves <pedro@codesourcery.com>
8380 * linux-x86-low.c (always_true): Delete.
8381 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8382 trying to fool the compiler with always_true.
8384 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8386 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8387 conditions in gdbserver.
8389 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8391 * spu-low.c (spu_read_memory): Wrap around local store limit.
8392 (spu_write_memory): Likewise.
8394 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8396 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8397 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8399 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8401 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8402 uses with LONGEST uses.
8404 2010-06-14 Stan Shebs <stan@codesourcery.com>
8405 Pedro Alves <pedro@codesourcery.com>
8409 * linux-x86-low.c: Include limits.h.
8414 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8415 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8416 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8417 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8418 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8419 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8420 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8421 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8422 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8423 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8424 (amd64_emit_void_call_2): New.
8425 (amd64_emit_ops): New.
8426 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8427 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8428 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8429 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8430 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8431 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8432 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8433 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8434 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8435 (i386_emit_stack_adjust, i386_emit_int_call_1)
8436 (i386_emit_void_call_2): New.
8437 (i386_emit_ops): New.
8438 (x86_emit_ops): New.
8439 (the_low_target): Install x86_emit_ops.
8440 * server.h (struct emit_ops): New.
8441 (get_raw_reg_func_addr): Declare.
8442 (current_insn_ptr, emit_error): Declare.
8443 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8444 (set_trace_state_variable_value): New defines.
8445 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8446 addr_get_trace_state_variable_value and
8447 addr_set_trace_state_variable_value.
8448 (symbol_list): New fields for get_raw_reg,
8449 get_trace_state_variable_value and set_trace_state_variable_value.
8450 (condfn): New typedef.
8451 (struct tracepoint): New field `compiled_cond'.
8452 (do_action_at_tracepoint): Clear compiled_cond.
8453 (get_trace_state_variable_value, set_trace_state_variable_value):
8455 (condition_true_at_tracepoint): If there's a compiled condition,
8457 (current_insn_ptr, emit_error): New globals.
8458 (struct bytecode_address): New.
8459 (get_raw_reg_func_addr): New.
8460 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8461 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8462 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8463 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8464 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8465 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8466 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8467 (compile_tracepoint_condition, compile_bytecodes): New.
8468 * target.h (emit_ops): Forward declare.
8469 (struct target_ops): New field emit_ops.
8470 (target_emit_ops): New.
8471 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8472 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8473 * linux-low.c (linux_emit_ops): New.
8474 (linux_target_ops): Install it.
8475 * linux-low.h (struct linux_target_ops): New field emit_ops.
8477 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8479 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8480 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8482 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8483 Stan Shebs <stan@codesourcery.com>
8485 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8486 (all): Depend on $(extra_libraries).
8487 (install-only): Install the IPA.
8488 (IPA_OBJS, IPA_LIB): New.
8489 (clean): Remove the IPA lib.
8490 (IPAGENT_CFLAGS): New.
8491 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8492 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8493 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8494 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8495 * configure.ac: Check for atomic builtins support in the compiler.
8496 (IPA_DEPFILES, extra_libraries): Define.
8497 * configure.srv (ipa_obj): Add description.
8498 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8499 (i[34567]86-*-linux*): Set ipa_obj.
8500 (x86_64-*-linux*): Set ipa_obj.
8501 * linux-low.c (stabilizing_threads): New.
8502 (supports_fast_tracepoints): New.
8503 (linux_detach): Stabilize threads before detaching.
8504 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8505 the lwp is either not stabilizing, or is moving out of a jump pad.
8506 (linux_fast_tracepoint_collecting): New.
8507 (maybe_move_out_of_jump_pad): New.
8508 (enqueue_one_deferred_signal): New.
8509 (dequeue_one_deferred_signal): New.
8510 (linux_wait_for_event_1): If moving out of a jump pad, defer
8511 pending signals to later.
8512 (linux_stabilize_threads): New.
8513 (linux_wait_1): Check if threads need moving out of jump pads, and
8515 (stuck_in_jump_pad_callback): New.
8516 (move_out_of_jump_pad_callback): New.
8518 (linux_resume_one_lwp): Handle moving out of jump pads.
8519 (linux_set_resume_request): Dequeue deferred signals.
8520 (need_step_over_p): Also step over fast tracepoint jumps.
8521 (start_step_over): Also uninsert fast tracepoint jumps.
8522 (finish_step_over): Also reinsert fast tracepoint jumps.
8523 (linux_install_fast_tracepoint_jump): New.
8524 (linux_target_ops): Install linux_stabilize_threads and
8525 linux_install_fast_tracepoint_jump_pad.
8526 * linux-low.h (linux_target_ops) <get_thread_area,
8527 install_fast_tracepoint_jump_pad>: New fields.
8528 (struct lwp_info) <collecting_fast_tracepoint,
8529 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8530 (linux_get_thread_area): Declare.
8531 * linux-x86-low.c (jump_insn): New.
8532 (x86_get_thread_area): New.
8533 (append_insns): New.
8535 (amd64_install_fast_tracepoint_jump_pad): New.
8536 (i386_install_fast_tracepoint_jump_pad): New.
8537 (x86_install_fast_tracepoint_jump_pad): New.
8538 (the_low_target): Install x86_get_thread_area and
8539 x86_install_fast_tracepoint_jump_pad.
8540 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8541 (struct fast_tracepoint_jump): New.
8542 (fast_tracepoint_jump_insn): New.
8543 (fast_tracepoint_jump_shadow): New.
8544 (find_fast_tracepoint_jump_at): New.
8545 (fast_tracepoint_jump_here): New.
8546 (delete_fast_tracepoint_jump): New.
8547 (set_fast_tracepoint_jump): New.
8548 (uninsert_fast_tracepoint_jumps_at): New.
8549 (reinsert_fast_tracepoint_jumps_at): New.
8550 (set_breakpoint_at): Use write_inferior_memory.
8551 (uninsert_raw_breakpoint): Use write_inferior_memory.
8552 (check_mem_read): Mask out fast tracepoint jumps.
8553 (check_mem_write): Mask out fast tracepoint jumps.
8554 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8555 (set_fast_tracepoint_jump): Declare.
8556 (delete_fast_tracepoint_jump)
8557 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8558 (reinsert_fast_tracepoint_jumps_at): Declare.
8559 * regcache.c: Don't compile many functions when building the
8560 in-process agent library.
8561 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8562 the register buffer in the heap.
8563 (free_register_cache): If the register buffer isn't owned by the
8564 regcache, don't free it.
8565 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8566 pre-existing register caches.
8567 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8569 (convert_ascii_to_int): : Constify `from' parameter type.
8570 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8571 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8572 the needed buffer in-place.
8573 (relocate_instruction): New.
8574 * server.c (handle_query) <qSymbols>: If the target supports
8575 tracepoints, give it a chance of looking up symbols. Report
8576 support for fast tracepoints.
8577 (handle_status): Stabilize threads.
8578 (process_serial_event): Adjust.
8579 * server.h (struct fast_tracepoint_jump): Forward declare.
8580 (struct process_info) <fast_tracepoint_jumps>: New field.
8581 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8582 (decode_X_packet, decode_M_packet): Adjust.
8583 (relocate_instruction): Declare.
8584 (in_process_agent_loaded): Declare.
8585 (tracepoint_look_up_symbols): Declare.
8586 (struct fast_tpoint_collect_status): Declare.
8587 (fast_tracepoint_collecting): Declare.
8588 (force_unlock_trace_buffer): Declare.
8589 (handle_tracepoint_bkpts): Declare.
8590 (initialize_low_tracepoint)
8591 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8592 * target.h (struct target_ops) <stabilize_threads,
8593 install_fast_tracepoint_jump_pad>: New fields.
8594 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8595 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8596 [HAVE_STDINT_H]: Include stdint.h.
8597 (trace_debug_1): Rename to ...
8598 (trace_vdebug): ... this.
8599 (trace_debug): Rename to ...
8600 (trace_debug_1): ... this. Add `level' parameter.
8602 (ATTR_USED, ATTR_NOINLINE): New.
8603 (IP_AGENT_EXPORT): New.
8604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8605 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8606 (about_to_request_buffer_space, trace_buffer_is_full)
8607 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8608 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8609 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8610 (traceframe_write_count, traceframes_created)
8611 (trace_state_variables)
8612 New renaming defines.
8613 (struct ipa_sym_addresses): New.
8614 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8616 (ipa_sym_addrs): New.
8617 (all_tracepoint_symbols_looked_up): New.
8618 (in_process_agent_loaded): New.
8619 (write_e_ipa_not_loaded): New.
8620 (maybe_write_ipa_not_loaded): New.
8621 (tracepoint_look_up_symbols): New.
8622 (debug_threads) [IN_PROCESS_AGENT]: New.
8623 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8624 (UNKNOWN_SIDE_EFFECTS): New.
8625 (stop_tracing): New.
8626 (flush_trace_buffer): New.
8627 (stop_tracing_bkpt): New.
8628 (flush_trace_buffer_bkpt): New.
8629 (read_inferior_integer): New.
8630 (read_inferior_uinteger): New.
8631 (read_inferior_data_pointer): New.
8632 (write_inferior_data_pointer): New.
8633 (write_inferior_integer): New.
8634 (write_inferior_uinteger): New.
8635 (struct collect_static_trace_data_action): Delete.
8636 (enum tracepoint_type): New.
8637 (struct tracepoint) <type>: New field `type'.
8638 <actions_str, step_actions, step_actions_str>: Only include in
8640 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8641 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8642 (tracepoints): Use IP_AGENT_EXPORT.
8643 (last_tracepoint): Don't include in the IPA.
8644 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8645 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8646 (alloced_trace_state_variables): New.
8647 (trace_state_variables): Use IP_AGENT_EXPORT.
8648 (traceframe_t): Delete unused variable.
8649 (circular_trace_buffer): Don't include in the IPA.
8650 (trace_buffer_start): Delete.
8651 (struct trace_buffer_control): New.
8652 (trace_buffer_free): Delete.
8653 (struct ipa_trace_buffer_control): New.
8654 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8655 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8657 (trace_buffer_ctrl): New.
8658 (TRACE_BUFFER_CTRL_CURR): New.
8659 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8660 Reimplement as macros.
8661 (trace_buffer_wrap): Delete.
8662 (traceframe_write_count, traceframe_read_count)
8663 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8664 (struct tracepoint_hit_ctx) <type>: New field.
8665 (struct fast_tracepoint_ctx): New.
8666 (memory_barrier): New.
8668 (record_tracepoint_error): Update atomically in the IPA.
8669 (clear_inferior_trace_buffer): New.
8670 (about_to_request_buffer_space): New.
8671 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8672 updating the same buffer.
8673 (add_tracepoint): Default the tracepoint's type to trap
8674 tracepoint, and orig_size to -1.
8675 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8677 (create_trace_state_variable): New parameter `gdb'. Handle it.
8678 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8679 (cmd_qtdp): Handle fast tracepoints.
8681 (max_jump_pad_size): New.
8682 (gdb_jump_pad_head): New.
8683 (get_jump_space_head): New.
8684 (claim_jump_space): New.
8685 (sort_tracepoints): New.
8686 (MAX_JUMP_SIZE): New.
8687 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8689 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8690 support. Upload fast traceframes, and delete internal IPA
8692 (stop_tracing_handler): New.
8693 (flush_trace_buffer_handler): New.
8694 (cmd_qtstop): Upload fast tracepoints.
8695 (response_tracepoint): Handle fast tracepoints.
8696 (tracepoint_finished_step): Upload fast traceframes. Set the
8697 tracepoint hit context's tracepoint type.
8698 (handle_tracepoint_bkpts): New.
8699 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8700 type. Add comment about fast tracepoints.
8701 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8702 non-existing action_str field.
8703 (get_context_regcache): Handle fast tracepoints.
8704 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8706 (fast_tracepoint_from_jump_pad_address): New.
8707 (fast_tracepoint_from_ipa_tpoint_address): New.
8708 (collecting_t): New.
8709 (force_unlock_trace_buffer): New.
8710 (fast_tracepoint_collecting): New.
8713 (write_inferior_data_ptr): New.
8714 (target_tp_heap): New.
8715 (target_malloc): New.
8716 (download_agent_expr): New.
8718 (download_tracepoints): New.
8719 (download_trace_state_variables): New.
8720 (upload_fast_traceframes): New.
8721 (IPA_FIRST_TRACEFRAME): New.
8722 (IPA_NEXT_TRACEFRAME_1): New.
8723 (IPA_NEXT_TRACEFRAME): New.
8724 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8725 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8726 (gdb_jump_pad_buffer_end): New.
8727 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8728 (initialize_tracepoint): Adjust.
8729 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8730 buffer. Initialize the low module.
8731 * utils.c (PREFIX, TOOLNAME): New.
8732 (malloc_failure): Use PREFIX.
8733 (error): In the IPA, an error causes an exit.
8734 (fatal, warning): Use PREFIX.
8735 (internal_error): Use TOOLNAME.
8736 (NUMCELLS): Increase to 10.
8737 * configure, config.in: Regenerate.
8739 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8741 * server.c (handle_query) <qSupported>: Do two passes over the
8742 qSupported string to avoid nesting strtok.
8744 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8746 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8748 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8750 * configure: Regenerate.
8751 * proc-service.list: New.
8753 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8755 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8758 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8760 * gdbreplay.c (remote_open): Check error return from socket() call by
8761 its equality to -1 not by it being negative.
8762 * remote-utils.c (remote_open): Likewise.
8764 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8766 * config.h: Regenerate.
8768 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8770 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8771 doesn't provide PTRACE_GET_THREAD_AREA.
8773 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8775 * linux-m68k-low.c: Include <asm/ptrace.h>
8776 (ps_get_thread_area): Implement.
8778 2010-05-03 Doug Evans <dje@google.com>
8780 * event-loop.c (struct callback_event): New struct.
8781 (callback_list): New global.
8782 (append_callback_event, delete_callback_event): New functions.
8783 (process_callback): New function.
8784 (start_event_loop): Call it.
8785 * remote-utils.c (NOT_SCHEDULED): Define.
8786 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8787 moved out of readchar.
8788 (readchar): Rewrite. Call reschedule before returning.
8789 (reset_readchar): New function.
8790 (remote_close): Call it.
8791 (process_remaining, reschedule): New functions.
8792 * server.h (callback_handler_func): New typedef.
8793 (append_callback_event, delete_callback_event): Declare.
8795 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8797 * proc-service.c (ps_pglobal_lookup): Use
8798 thread_db_look_up_one_symbol.
8799 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8800 parameter. Use it instead of all_symbols_looked_up.
8801 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8803 (all_symbols_looked_up): Don't declare.
8804 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8805 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8807 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8808 Set all_symbols_looked_up here.
8809 (thread_db_look_up_one_symbol): New.
8810 (thread_db_get_tls_address): Adjust.
8811 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8812 thread_db object on the heap, and tentatively set it in the
8814 (thread_db_init): Don't set all_symbols_looked_up here.
8815 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8817 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8819 * linux-low.c (linux_kill, linux_detach): Adjust.
8820 (status_pending_p_callback): Remove redundant statement. Check
8821 for !TARGET_WAITIKIND_IGNORE, instead of
8822 TARGET_WAITKIND_STOPPED.
8823 (handle_tracepoints): Make sure LWP is locked. Adjust.
8824 (linux_wait_for_event_1): Adjust.
8825 (linux_cancel_breakpoints): New.
8826 (unsuspend_one_lwp): New.
8827 (unsuspend_all_lwps): New.
8828 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8829 (send_sigstop_callback): Change return type to int, add new
8830 `except' parameter and handle it.
8831 (suspend_and_send_sigstop_callback): New.
8832 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8833 pass them down. If SUSPEND, also increment the lwp's suspend
8835 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8836 (need_step_over_p): Don't consider suspended LWPs.
8837 (start_step_over): Adjust.
8838 (proceed_one_lwp): Change return type to int, add new `except'
8839 parameter and handle it.
8840 (unsuspend_and_proceed_one_lwp): New.
8841 (proceed_all_lwps): Use find_inferior instead of
8843 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8844 also decrement the suspend count of LWPs. Pass `except' down,
8845 instead of hacking its suspend count.
8846 (linux_pause_all): Add `freeze' parameter. Adjust.
8847 (linux_unpause_all): New.
8848 (linux_target_ops): Install linux_unpause_all.
8849 * server.c (handle_status): Adjust.
8850 * target.h (struct target_ops): New fields `unpause_all' and
8851 `cancel_breakpoints'. Add new parameter to `pause_all'.
8852 (pause_all): Add new `freeze' parameter.
8854 (cancel_breakpoints): New.
8855 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8857 (cmd_qtstart): Pause threads.
8858 (stop_tracing): Pause threads, and cancel breakpoints.
8859 * win32-low.c (win32_target_ops): Adjust.
8861 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8863 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8864 the inferior right away from here...
8865 (linux_wait_1): ... to here, and adjust to check the thread's
8866 last_resume_kind instead of the lwp's step or stop_expected flags.
8868 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8870 * README: Use consistent `GDB' and `GDBserver' spellings.
8872 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8874 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8875 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8876 (linux_detach_one_lwp): Assume the lwp is stopped.
8877 (any_thread_of): Delete.
8878 (linux_detach): Stop all lwps here. Don't blindly delete all
8880 (delete_lwp_callback): New.
8881 (linux_mourn): Delete all lwps of the process that is gone.
8882 (linux_wait_1): Don't delete the last lwp of the process here.
8883 * mem-break.h (mark_breakpoints_out): Declare.
8884 * mem-break.c (mark_breakpoints_out): New.
8885 (free_all_breakpoints): Use it.
8886 * server.c (handle_target_event): If the process is gone, mark
8888 * thread-db.c (struct thread_db) <create_bp>: New field.
8889 (thread_db_enable_reporting): Fix prototype. Store a thread event
8890 breakpoint reference in the thread_db struct.
8891 (thread_db_load_search): Clear the thread_db object.
8892 (try_thread_db_load_1): Ditto.
8893 (switch_to_process): New.
8894 (disable_thread_event_reporting): Use it.
8895 (remove_thread_event_breakpoints): New.
8896 (thread_db_detach, thread_db_mourn): Use it.
8898 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8900 * linux-low.c (linux_enable_event_reporting): New.
8901 (linux_wait_for_event_1, handle_extended_wait): Use it.
8903 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8905 * linux-low.c (linux_kill_one_lwp, linux_kill)
8906 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8907 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8908 SIGSTOP even if the LWP is stopped.
8909 (send_sigstop_callback): New.
8910 (stop_all_lwps): Use send_sigstop_callback instead.
8911 (linux_resume_one_thread): Adjust.
8912 (proceed_one_lwp): Still proceed an LWP that the client has
8913 requested to stop, if we haven't reported it as stopped yet. Make
8914 sure that LWPs the client want stopped, have a pending SIGSTOP.
8916 2010-04-26 Doug Evans <dje@google.com>
8918 * server.c (handle_general_set): Make static.
8920 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8921 Print received char after testing for error/eof instead of before.
8922 (input_interrupt): Tweak comment.
8924 2010-04-23 Doug Evans <dje@google.com>
8926 * server.c (start_inferior): Print inferior argv if --debug.
8928 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8930 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8931 * nto-x86-low.c: Include server.h
8933 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8935 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8936 be consistent with other sources of this directory.
8937 (init_registers_amd64): Correct name of source file of this function
8940 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8942 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8945 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8947 * win32-i386-low.c: Add 64-bit support.
8948 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8949 (init_registers_amd64): Declare.
8950 (mappings): Add 64-bit version of array.
8951 (init_windows_x86): New function.
8952 (the_low_target): Change init_arch field to init_windows_x86.
8954 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8956 * win32-low.c: Adapt to support also 64-bit architecture.
8957 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8958 (get_image_name): Use SIZE_T type for local variable `done'.
8959 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8960 (toolhelp_get_dll_name): Idem.
8961 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8962 Use uintptr_t typecast to avoid warning.
8963 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8964 (handle_exception): Use phex_nz to avoid warning.
8965 (win32_wait): Remove unused local variable `process'.
8967 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8969 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8972 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8974 * configure.ac: Use `ws2_32' library for srv_mingw.
8975 * configure: Regenerate.
8976 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8977 * remote-utils.c: Likewise.
8979 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8981 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8982 if __x86_64__ is defined.
8984 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8986 * configure: Regenerate.
8988 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8990 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8991 * target.h (target_ops): New get_tib_address field.
8992 * win32-low.h (win32_thread_info): Add thread_local_base field.
8993 * win32-low.c (child_add_thread): Add tlb argument.
8994 Set thread_local_base field to TLB.
8995 (get_child_debug_event): Adapt to child_add_thread change.
8996 (win32_get_tib_address): New function.
8997 (win32_target_ops): Set get_tib_address field to
8998 win32_get_tib_address.
8999 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9001 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9003 * linux-low.c (linux_mourn): Also remove the process.
9004 * server.c (handle_target_event): Don't remove the process here.
9005 * nto-low.c (nto_mourn): New.
9006 (nto_target_ops): Install it.
9007 * spu-low.c (spu_mourn): New.
9008 (spu_target_ops): Install it.
9009 * win32-low.c (win32_mourn): New.
9010 (win32_target_ops): Install it.
9012 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9014 * server.h (buffer_xml_printf): Remove redundant `;'.
9016 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9018 * regcache.c (set_register_cache): Invalidate regcaches before
9019 changing the register cache layout.
9020 (regcache_invalidate_one): Allow a NULL regcache.
9021 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9022 regcaches before changing the register cache layout or the target
9025 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9027 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9028 variable warning on Linux/x86-64.
9030 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9032 GDBserver disconnected tracing support.
9034 * linux-low.c (linux_remove_process): Delete.
9035 (add_lwp): Don't set last_resume_kind here.
9036 (linux_kill): Use `mourn'.
9037 (linux_detach): Use `thread_db_detach', and `mourn'.
9039 (linux_attach_lwp_1): Adjust comment.
9040 (linux_attach): last_resume_kind moved the thread_info; adjust.
9041 (status_pending_p_callback): Adjust.
9042 (linux_wait_for_event_1): Adjust.
9043 (count_events_callback, select_singlestep_lwp_callback)
9044 (select_event_lwp_callback, cancel_breakpoints_callback)
9045 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9046 (proceed_one_lwp): Adjust.
9047 (linux_async): Add debug output.
9048 (linux_thread_stopped): New.
9049 (linux_pause_all): New.
9050 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9052 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9053 (thread_db_free): Delete declaration.
9054 (thread_db_detach, thread_db_mourn): Declare.
9055 * thread-db.c (thread_db_init): Use thread_db_mourn.
9056 (thread_db_free): Delete, split in two.
9057 (disable_thread_event_reporting): New.
9058 (thread_db_detach): New.
9059 (thread_db_mourn): New.
9061 * server.h (struct thread_info) <last_resume_kind>: New field.
9062 <attached>: Add comment.
9063 <gdb_detached>: New field.
9064 (handler_func): Change return type to int.
9065 (handle_serial_event, handle_target_event): Ditto.
9066 (gdb_connected): Declare.
9068 (disconnected_tracing): Declare.
9069 (stop_tracing): Declare.
9071 * server.c (handle_query) <qSupported>: Report support for
9072 disconnected tracing.
9073 (queue_stop_reply_callback): Account for running threads.
9074 (gdb_wants_thread_stopped): New.
9075 (gdb_wants_all_threads_stopped): New.
9076 (gdb_reattached_process): New.
9077 (handle_status): Clear the `gdb_detached' flag of all processes.
9078 In all-stop, stop all threads.
9079 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9080 (process_serial_event): If the remote connection breaks, or if an
9081 exit was forced with "monitor exit", force an event loop exit.
9082 Handle disconnected tracing on detach.
9083 (handle_serial_event): Adjust.
9084 (handle_target_event): If GDB isn't connected, forward events back
9085 to the inferior, unless the last process exited, in which case,
9086 exit gdbserver. Adjust interface.
9088 * remote-utils.c (remote_open): Don't block in accept. Instead
9089 register an event loop source on the listen socket file
9090 descriptor. Refactor bits into ...
9091 (listen_desc): ... this new global.
9092 (gdb_connected): ... this new function.
9093 (enable_async_notification): ... this new function.
9094 (handle_accept_event): ... this new function.
9095 (remote_close): Clear remote_desc.
9097 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9099 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9101 (mourn_inferior): Define.
9102 (target_process_qsupported): Avoid the dangling else problem.
9103 (thread_stopped): Define.
9104 (pause_all): Define.
9105 (target_waitstatus_to_string): Declare.
9106 * target.c (target_waitstatus_to_string): New.
9108 * tracepoint.c (tracing): Make extern.
9109 (disconnected_tracing): New.
9110 (stop_tracing): Make extern. Handle tracing stops due to GDB
9112 (cmd_qtdisconnected): New.
9113 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9114 (handle_tracepoint_general_set): Handle QTDisconnected.
9116 * event-loop.c (event_handler_func): Change return type to int.
9117 (process_event): Bail out if the event handler wants the event
9119 (handle_file_event): Ditto.
9120 (start_event_loop): Bail out if the event handler wants the event
9123 * nto-low.c (nto_target_ops): Adjust.
9124 * spu-low.c (spu_wait): Don't remove the process here.
9125 (spu_target_ops): Adjust.
9126 * win32-low.c (win32_wait): Don't remove the process here.
9127 (win32_target_ops): Adjust.
9129 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9131 * regcache.c (realloc_register_cache): Invalidate inferior's
9132 regcache before recreating it.
9134 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9136 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9138 2010-04-09 Stan Shebs <stan@codesourcery.com>
9139 Pedro Alves <pedro@codesourcery.com>
9141 * server.h (LONGEST): New.
9142 (struct thread_info) <while_stepping>: New field.
9143 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9145 (initialize_tracepoint, handle_tracepoint_general_set)
9146 (handle_tracepoint_query, tracepoint_finished_step)
9147 (tracepoint_was_hit, release_while_stepping_state_list):
9148 (current_traceframe): Declare.
9149 * server.c (handle_general_set): Handle tracepoint packets.
9151 (write_memory): New.
9152 (handle_search_memory_1): Use read_memory.
9153 (handle_query): Report support for conditional tracepoints, trace
9154 state variables, and tracepoint sources. Handle tracepoint
9156 (main): Initialize the tracepoints module.
9157 (process_serial_event): Handle traceframe reads/writes.
9159 * linux-low.c (handle_tracepoints): New.
9160 (linux_wait_1): Call it.
9161 (linux_resume_one_lwp): Handle while-stepping.
9162 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9163 (linux_target_ops): Install them.
9164 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9166 * linux-x86-low.c (x86_supports_tracepoints): New.
9167 (the_low_target). Install it.
9169 * mem-break.h (delete_breakpoint): Declare.
9170 * mem-break.c (delete_breakpoint): Make external.
9172 * target.h (struct target_ops): Add `supports_tracepoints',
9173 `read_pc', and `write_pc' fields.
9174 (target_supports_tracepoints): Define.
9175 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9178 * regcache.h (struct regcache) <registers_owned>: New field.
9179 (init_register_cache, regcache_cpy): Declare.
9180 (regcache_read_pc, regcache_write_pc): Declare.
9181 (register_cache_size): Declare.
9182 (supply_regblock): Declare.
9183 * regcache.c (init_register_cache): New.
9184 (new_register_cache): Use it.
9185 (regcache_cpy): New.
9186 (register_cache_size): New.
9187 (supply_regblock): New.
9188 (regcache_read_pc, regcache_write_pc): New.
9190 * tracepoint.c: New.
9192 * Makefile.in (OBS): Add tracepoint.o.
9193 (tracepoint.o): New rule.
9195 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9197 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9199 (i386-mmx.c): Likewise.
9200 (i386-mmx-linux.o): Likewise.
9201 (i386-mmx-linux.c): Likewise.
9203 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9204 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9205 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9206 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9208 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9209 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9210 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9212 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9214 * Makefile.in (clean): Updated.
9216 (i386-avx.c): Likewise.
9217 (i386-avx-linux.o): Likewise.
9218 (i386-avx-linux.c): Likewise.
9219 (amd64-avx.o): Likewise.
9220 (amd64-avx.c): Likewise.
9221 (amd64-avx-linux.o): Likewise.
9222 (amd64-avx-linux.c): Likewise.
9224 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9225 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9226 (srv_amd64_regobj): Add amd64-avx.o.
9227 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9228 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9229 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9230 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9231 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9232 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9233 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9235 * i387-fp.c: Include "i386-xstate.h".
9237 (i387_cache_to_xsave): Likewise.
9238 (i387_xsave_to_cache): Likewise.
9239 (x86_xcr0): Likewise.
9241 * i387-fp.h (i387_cache_to_xsave): Likewise.
9242 (i387_xsave_to_cache): Likewise.
9243 (x86_xcr0): Likewise.
9245 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9246 * linux-crisv32-low.c (target_regsets): Likewise.
9247 * linux-m68k-low.c (target_regsets): Likewise.
9248 * linux-mips-low.c (target_regsets): Likewise.
9249 * linux-ppc-low.c (target_regsets): Likewise.
9250 * linux-s390-low.c (target_regsets): Likewise.
9251 * linux-sh-low.c (target_regsets): Likewise.
9252 * linux-sparc-low.c (target_regsets): Likewise.
9253 * linux-xtensa-low.c (target_regsets): Likewise.
9255 * linux-low.c: Include <sys/uio.h>.
9256 (regsets_fetch_inferior_registers): Support nt_type.
9257 (regsets_store_inferior_registers): Likewise.
9258 (linux_process_qsupported): New.
9259 (linux_target_ops): Add linux_process_qsupported.
9261 * linux-low.h (regset_info): Add nt_type.
9262 (linux_target_ops): Add process_qsupported.
9264 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9266 (init_registers_i386_avx_linux): New.
9267 (init_registers_amd64_avx_linux): Likewise.
9268 (xmltarget_i386_linux_no_xml): Likewise.
9269 (xmltarget_amd64_linux_no_xml): Likewise.
9270 (PTRACE_GETREGSET): Likewise.
9271 (PTRACE_SETREGSET): Likewise.
9272 (x86_fill_xstateregset): Likewise.
9273 (x86_store_xstateregset): Likewise.
9274 (use_xml): Likewise.
9275 (x86_linux_update_xmltarget): Likewise.
9276 (x86_linux_process_qsupported): Likewise.
9277 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9278 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9279 init_registers_i386_linux here. Call
9280 x86_linux_update_xmltarget.
9281 (the_low_target): Add x86_linux_process_qsupported.
9283 * server.c (handle_query): Call target_process_qsupported.
9285 * target.h (target_ops): Add process_qsupported.
9286 (target_process_qsupported): New.
9288 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9290 * inferiors.c (add_thread): Set last_status kind to
9291 TARGET_WAITKIND_IGNORE.
9292 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9293 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9294 (linux_wait_1): Move `thread' local definition to block that uses
9295 it. Don't NULL initialize `event_child'.
9296 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9297 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9298 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9300 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9302 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9303 an extended waitstatus, or by a watchpoint.
9304 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9305 thread was stepping or has been stopped by a watchpoint.
9307 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9309 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9310 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9311 of another, then delete the previous, and validate all
9313 (validate_inserted_breakpoint): New.
9314 (delete_disabled_breakpoints): New.
9315 (validate_breakpoints): New.
9316 (check_mem_read): Validate breakpoints before trusting their
9317 shadow. Delete disabled breakpoints.
9318 (check_mem_write): Validate breakpoints before trusting they
9319 should be inserted. Delete disabled breakpoints.
9320 * mem-break.h (validate_breakpoints):
9321 * server.c (handle_query): Validate breakpoints when we see a
9324 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9326 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9327 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9328 if we could tell there's a GDB breakpoint at stop_pc.
9329 (need_step_over_p): Don't do a step over if we find a GDB
9330 breakpoint at the resume PC.
9332 * mem-break.c (struct raw_breakpoint): New.
9333 (enum bkpt_type): New type `gdb_breakpoint'.
9334 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9335 fields. New field `raw'.
9336 (find_raw_breakpoint_at): New.
9337 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9339 (set_breakpoint_at): Adjust.
9340 (delete_raw_breakpoint): New.
9341 (release_breakpoint): New.
9342 (delete_breakpoint): Rename to...
9343 (delete_breakpoint_1): ... this. Add proc parameter. Use
9344 release_breakpoint. Return ENOENT.
9345 (delete_breakpoint): Reimplement.
9346 (find_breakpoint_at): Delete.
9347 (find_gdb_breakpoint_at): New.
9348 (delete_breakpoint_at): Delete.
9349 (set_gdb_breakpoint_at): New.
9350 (delete_gdb_breakpoint_at): New.
9351 (gdb_breakpoint_here): New.
9352 (set_reinsert_breakpoint): Use release_breakpoint.
9353 (uninsert_breakpoint): Rename to ...
9354 (uninsert_raw_breakpoint): ... this.
9355 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9356 (reinsert_raw_breakpoint): Change parameter type to
9358 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9360 (check_breakpoints): Adjust. Use release_breakpoint.
9361 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9362 (breakpoint_inserted_here): Ditto.
9363 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9364 Don't trust the breakpoint's shadow if it is not inserted.
9365 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9366 (delete_all_breakpoints): Adjust.
9367 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9368 use delete_breakpoint_1.
9370 * mem-break.h (breakpoints_supported): Delete declaration.
9371 (set_gdb_breakpoint_at): Declare.
9372 (gdb_breakpoint_here): Declare.
9373 (delete_breakpoint_at): Delete.
9374 (delete_gdb_breakpoint_at): Declare.
9376 * server.h (struct raw_breakpoint): Forward declare.
9377 (struct process_info): New field `raw_breakpoints'.
9379 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9382 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9384 * linux-low.c (status_pending_p_callback): Fix comment.
9385 (linux_wait_for_event_1): Move most of the internal breakpoint
9386 handling from here...
9387 (linux_wait_1): ... to here.
9388 (count_events_callback): New.
9389 (select_singlestep_lwp_callback): New.
9390 (select_event_lwp_callback): New.
9391 (cancel_breakpoints_callback): New.
9392 (select_event_lwp): New.
9393 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9394 priority to all LWPs that have had events that should be reported
9395 to the client. Cancel breakpoints when about to reporting the
9396 event to the client, not while stopping lwps. No longer cancel
9397 finished single-steps here.
9398 (cancel_finished_single_step): Delete.
9399 (cancel_finished_single_steps): Delete.
9401 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9403 * mem-break.c (enum bkpt_type): New.
9404 (struct breakpoint): New field `type'.
9405 (set_breakpoint_at): Change return type to struct breakpoint
9406 pointer. Set type to `other_breakpoint' by default.
9407 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9408 in the breakpoint list.
9409 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9410 (reinsert_breakpoint): Rename to ...
9411 (reinsert_raw_breakpoint): ... this.
9412 (reinsert_breakpoints_at): Adjust.
9413 * mem-break.h (struct breakpoint): Declare.
9414 (set_breakpoint_at): Change return type to struct breakpoint
9417 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9419 * server.c (handle_query): Assign, not compare.
9421 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9423 Teach linux gdbserver to step-over-breakpoints.
9425 * linux-low.c (can_hardware_single_step): New.
9426 (supports_breakpoints): New.
9427 (handle_extended_wait): If stopping threads, read the stop pc of
9430 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9431 low target doesn't support retrieving the PC.
9432 (add_lwp): Set last_resume_kind to resume_continue.
9433 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9434 (linux_attach): Don't clear stop_expected. Set the lwp's
9435 last_resume_kind to resume_stop.
9436 (linux_detach_one_lwp): Don't check for removed breakpoints.
9437 (check_removed_breakpoint): Delete.
9438 (status_pending_p): Rename to ...
9439 (status_pending_p_callback): ... this. Don't check for removed
9440 breakpoints. Don't consider threads that are stopped from GDB's
9442 (linux_wait_for_lwp): Always read the stop_pc here.
9443 (cancel_breakpoint): New.
9444 (step_over_bkpt): New global.
9445 (linux_wait_for_event_1): Implement stepping over breakpoints.
9446 (gdb_wants_lwp_stopped): New.
9447 (gdb_wants_all_stopped): New.
9448 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9449 single-step traps here. Store the thread's last reported target
9451 (send_sigstop): Don't clear stop_expected. Always set it,
9453 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9454 (cancel_finished_single_step): New.
9455 (cancel_finished_single_steps): New.
9456 (wait_for_sigstop): Don't cancel finished single-step traps here.
9457 (linux_resume_one_lwp): Don't check for removed breakpoints.
9458 Don't set `step' on non-hardware step archs.
9459 (linux_set_resume_request): Ignore resume_stop requests if already
9460 stopping or stopped. Set the lwp's last_resume_kind.
9461 (resume_status_pending_p): Don't check for removed breakpoints.
9462 (need_step_over_p): New.
9463 (start_step_over): New.
9464 (finish_step_over): New.
9465 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9466 requests. Clear the thread's last reported target waitstatus.
9467 Don't use the `suspended' flag. Don't consider pending breakpoints.
9468 (linux_resume): Start a step-over if necessary.
9469 (proceed_one_lwp): New.
9470 (proceed_all_lwps): New.
9471 (unstop_all_lwps): New.
9472 * linux-low.h (struct lwp_info): Rewrite comment for the
9473 `suspended' flag. Add the `stop_pc' field. Delete the
9474 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9475 Add `'last_resume_kind' and `need_step_over' fields.
9476 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9477 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9478 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9479 (set_raw_breakpoint_at): New.
9480 (set_breakpoint_at): Rewrite to use it.
9481 (reinsert_breakpoint_handler): Delete.
9482 (set_reinsert_breakpoint): New.
9483 (reinsert_breakpoint_by_bp): Delete.
9484 (delete_reinsert_breakpoints): New.
9485 (uninsert_breakpoint): Rewrite.
9486 (uninsert_breakpoints_at): New.
9487 (reinsert_breakpoint): Rewrite.
9488 (reinsert_breakpoints_at): New.
9489 (check_breakpoints): Rewrite.
9490 (breakpoint_here): New.
9491 (breakpoint_inserted_here): New.
9492 (check_mem_read): Adjust.
9493 * mem-break.h (breakpoints_supported, breakpoint_here)
9494 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9495 (reinsert_breakpoint_by_bp): Delete declaration.
9496 (delete_reinsert_breakpoints): Declare.
9497 (reinsert_breakpoint): Delete declaration.
9498 (reinsert_breakpoints_at): Declare.
9499 (uninsert_breakpoint): Delete declaration.
9500 (uninsert_breakpoints_at): Declare.
9501 (check_breakpoints): Adjust prototype.
9502 * server.h: Adjust include order.
9503 (struct thread_info): Declare here. Add a `last_status' field.
9505 2010-03-23 Michael Snyder <msnyder@vmware.com>
9507 * server.c (crc32): New function.
9508 (handle_query): Add handling for 'qCRC:' request.
9510 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9512 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9513 lwp had been stopped by a watchpoint.
9515 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9517 * server.h (internal_error): Declare.
9518 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9519 * utils.c (internal_error): New function.
9521 2010-03-15 Andreas Schwab <schwab@redhat.com>
9523 * configure.srv: Fix typo setting srv_regobj.
9525 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9527 * linux-low.c (fetch_register): Avoid passing a non string literal
9529 (usr_store_inferior_registers): Ditto.
9531 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9533 * linux-low.c (linux_write_memory): Bail out early if peeking
9536 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9538 * linux-low.h (struct lwp_info): New fields
9539 `stopped_by_watchpoint' and `stopped_data_address'.
9540 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9541 here, and cache them in the lwp object.
9542 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9544 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9546 (linux_stopped_by_watchpoint): Rewrite.
9547 (linux_stopped_data_address): Rewrite.
9549 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9551 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9552 switching the current inferior, not before.
9554 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9556 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9557 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9558 i386-linux.c and amd64-linux.c.
9559 (reg-i386.o): Removed.
9560 (reg-i386.c): Likewise.
9561 (reg-i386-linux.o): Likewise.
9562 (reg-i386-linux.c): Likewise.
9563 (reg-x86-64.o): Likewise.
9564 (reg-x86-64.c): Likewise.
9565 (reg-x86-64-linux.o): Likewise.
9566 (reg-x86-64-linux.c): Likewise.
9569 (i386-linux.o): Likewise.
9570 (i386-linux.c): Likewise.
9571 (amd64.o): Likewise.
9572 (amd64.c): Likewise.
9573 (amd64-linux.o): Likewise.
9574 (amd64-linux.c): Likewise.
9576 * configure.srv (srv_i386_regobj): New.
9577 (srv_i386_linux_regobj): Likewise.
9578 (srv_amd64_regobj): Likewise.
9579 (srv_amd64_linux_regobj): Likewise.
9580 (srv_i386_32bit_xmlfiles): Likewise.
9581 (srv_i386_64bit_xmlfiles): Likewise.
9582 (srv_i386_xmlfiles): Likewise.
9583 (srv_amd64_xmlfiles): Likewise.
9584 (srv_i386_linux_xmlfiles): Likewise.
9585 (srv_amd64_linux_xmlfiles): Likewise.
9586 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9587 srv_xmlfiles to $srv_i386_xmlfiles.
9588 (i[34567]86-*-mingw32ce*): Likewise.
9589 (i[34567]86-*-mingw*): Likewise.
9590 (i[34567]86-*-nto*): Likewise.
9591 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9592 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9593 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9594 (x86_64-*-linux*): Likewise.
9596 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9597 (init_registers_amd64_linux): New.
9598 (x86_arch_setup): Replace init_registers_x86_64_linux with
9599 init_registers_amd64_linux.
9601 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9603 * configure.ac: Check for libdl. If it is not available link against
9604 static libthread_db.
9605 * configure: Regenerate.
9607 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9611 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9612 handing a read watchpoint.
9613 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9615 2010-02-12 Doug Evans <dje@google.com>
9617 * linux-low.c (linux_supports_tracefork_flag): Document.
9618 (linux_look_up_symbols): Add comment.
9620 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9622 * regcache.c (supply_register): Clear regcache if buf is NULL.
9624 2010-02-02 Nicolas Roche <roche@sourceware.org>
9625 Joel Brobecker <brobecker@adacore.com>
9627 * inferiors.c (find_inferior): Add function documentation.
9628 (unloaded_dll): Handle the case where the unloaded dll has not
9629 been previously registered in the dll list.
9631 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9633 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9634 (thumb2_breakpoint): New.
9635 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9637 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9639 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9640 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9643 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9645 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9647 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9649 * linux-s390-low.c (s390_collect_ptrace_register)
9650 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9652 2010-01-21 Doug Evans <dje@google.com>
9654 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9655 (PTRACE_ARG4_TYPE): New macro.
9656 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9657 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9658 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9659 (usr_store_inferior_registers): Ditto.
9660 (linux_read_memory, linux_write_memory): Ditto.
9661 (linux_test_for_tracefork): Ditto.
9663 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9664 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9666 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9668 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9671 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9673 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9674 prototype to take a regcache. Adjust.
9676 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9678 * regcache.h (struct thread_info): Forward declare.
9679 (struct regcache): New.
9680 (new_register_cache): Adjust prototype.
9681 (get_thread_regcache): Declare.
9682 (free_register_cache): Adjust prototype.
9683 (registers_to_string, registers_from_string): Ditto.
9684 (supply_register, supply_register_by_name, collect_register)
9685 (collect_register_as_string, collect_register_by_name): Ditto.
9686 * regcache.c (struct inferior_regcache_data): Delete.
9687 (get_regcache): Rename to ...
9688 (get_thread_regcache): ... this. Adjust. Switch inferior before
9690 (regcache_invalidate_one): Adjust.
9691 (regcache_invalidate): Fix prototype.
9692 (new_register_cache): Return the new register cache.
9693 (free_register_cache): Change prototype.
9694 (realloc_register_cache): Adjust.
9695 (registers_to_string): Change prototype to take a regcache. Adjust.
9696 (registers_from_string): Ditto.
9697 (register_data): Ditto.
9698 (supply_register): Ditto.
9699 (supply_register_by_name): Ditto.
9700 (collect_register): Ditto.
9701 (collect_register_as_string): Ditto.
9702 (collect_register_by_name): Ditto.
9703 * server.c (process_serial_event): Adjust.
9704 * linux-low.h (regset_fill_func, regset_store_func): Change
9706 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9708 * linux-low.c (get_stop_pc): Adjust.
9709 (check_removed_breakpoint): Adjust.
9710 (linux_wait_for_event): Adjust.
9711 (linux_resume_one_lwp): Adjust.
9712 (fetch_register): Add regcache parameter. Adjust.
9713 (usr_store_inferior_registers): Ditto.
9714 (regsets_fetch_inferior_registers): Ditto.
9715 (regsets_store_inferior_registers): Ditto.
9716 (linux_fetch_registers, linux_store_registers): Ditto.
9717 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9719 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9721 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9722 prototype to take a regcache.
9723 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9724 * remote-utils.c (convert_ascii_to_int, outreg)
9725 (prepare_resume_reply): Change prototype to take a regcache.
9727 * target.h (struct target_ops) <fetch_registers, store_registers>:
9728 Change prototype to take a regcache.
9729 (fetch_inferior_registers, store_inferior_registers): Change
9730 prototype to take a regcache. Adjust.
9731 * proc-service.c (ps_lgetregs): Adjust.
9732 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9733 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9734 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9735 take a regcache. Adjust.
9736 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9737 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9738 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9739 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9740 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9741 (cris_cannot_fetch_register):
9742 (cris_breakpoint_at): Change prototype to take a regcache.
9744 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9745 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9746 to take a regcache. Adjust.
9747 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9749 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9750 take a regcache. Adjust.
9751 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9752 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9753 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9754 * linux-mips-low.c (mips_get_pc):
9755 (mips_set_pc): Change prototype to take a regcache. Adjust.
9756 (mips_reinsert_addr): Adjust.
9757 (mips_collect_register): Change prototype to take a regcache.
9759 (mips_supply_register):
9760 (mips_collect_register_32bit, mips_supply_register_32bit)
9761 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9762 (mips_store_fpregset): Ditto.
9763 * linux-ppc-low.c (ppc_supply_ptrace_register)
9764 (ppc_supply_ptrace_register): Ditto.
9765 (parse_spufs_run): Adjust.
9766 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9767 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9768 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9769 take a regcache. Adjust.
9770 * linux-s390-low.c (s390_collect_ptrace_register)
9771 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9772 (s390_set_pc): Change prototype to take a regcache. Adjust.
9773 (s390_arch_setup): Adjust.
9774 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9775 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9777 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9778 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9780 (sparc_breakpoint_at): Adjust.
9781 * linux-xtensa-low.c (xtensa_fill_gregset):
9782 (xtensa_store_gregset):
9783 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9784 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9785 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9786 prototype to take a regcache. Adjust.
9787 * win32-arm-low.c (arm_fetch_inferior_register)
9788 (arm_store_inferior_register): Change prototype to take a
9790 * win32-i386-low.c (i386_fetch_inferior_register)
9791 (i386_store_inferior_register): Change prototype to take a
9793 * win32-low.c (child_fetch_inferior_registers)
9794 (child_store_inferior_registers): Change prototype to take a
9796 (win32_wait): Adjust.
9797 (win32_fetch_inferior_registers): Change prototype to take a
9799 (win32_store_inferior_registers): Adjust.
9800 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9801 store_inferior_register>: Change prototype to take a regcache.
9803 2010-01-20 Doug Evans <dje@google.com>
9805 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9807 (linux_wait_for_event1, linux_init_signals): Ditto.
9808 (W_STOPCODE): Provide definition if missing.
9810 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9812 * linux-low.c (linux_core_of_thread): New.
9813 (compare_ints, show_process, list_threads): New.
9814 (linux_qxfer_osdata): Report threads and cores.
9815 (linux_target_op): Register linux_core_of_thread.
9816 * remote-utils.c (prepare_resume_reply): Report the core.
9817 (buffer_xml_printf): Support %d specifier.
9818 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9820 (handle_query): Handle qXfer:threads. Announce availability
9822 * target.h (struct target_ops): New field core_of_thread.
9824 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9826 * Makefile.in (clean): Remove new generated files.
9827 (reg-s390.o, reg-s390.c): Remove rules.
9828 (reg-s390x.o, reg-s390x.c): Likewise.
9829 (s390-linux32.o, s390-linux32.c): Add rules.
9830 (s390-linux64.o, s390-linux64.c): Likewise.
9831 (s390x-linux64.o, s390x-linux64.c): Likewise.
9832 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9833 * linux-s390-low.c: Include <elf.h>.
9834 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9835 (init_registers_s390): Remove prototype.
9836 (init_registers_s390x): Likewise.
9837 (init_registers_s390_linux32): Add prototype.
9838 (init_registers_s390_linux64): Likewise.
9839 (init_registers_s390x_linux64): Likewise.
9840 (s390_num_regs_3264): New define.
9841 (s390_regmap_3264): New global variable.
9842 (s390_cannot_fetch_register): Remove obsolete check.
9843 (s390_cannot_store_register): Likewise.
9844 (s390_collect_ptrace_register): Handle upper/lower register halves.
9845 (s390_supply_ptrace_register): Likewise.
9846 (s390_fill_gregset): Update to register number changes.
9847 (s390_get_hwcap): New routine.
9848 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9849 Install appropriate regmap and register set.
9851 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9853 * server.c (gdbserver_version): Update copyright year to 2010.
9854 * gdbreplay.c (gdbreplay_version): Likewise.
9856 2009-12-28 Doug Evans <dje@google.com>
9858 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9859 elf/external.h. Include <elf.h> instead but only if necessary.
9861 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9863 * linux-low.c (linux_remove_process): Remove `detaching'
9864 parameter. Don't release/detach from thread_db here.
9865 (linux_kill): Release/detach from thread_db here, ...
9866 (linux_detach): ... and here, before actually detaching.
9867 (linux_wait_1): ... and here, when a process exits.
9868 * thread-db.c (any_thread_of): New.
9869 (thread_db_free): Switch the current inferior to a thread of the
9872 2009-12-21 Doug Evans <dje@google.com>
9874 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9876 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9877 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9878 warning ifndef __NR_tkill. Move setting of errno there too.
9879 Delete unnecessary resetting of errno after syscall.
9880 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9882 * configure.ac: Check for dladdr.
9883 * config.in: Regenerate.
9884 * configure: Regenerate.
9885 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9886 (try_thread_db_load): Update.
9888 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9890 2009-12-18 Doug Evans <dje@google.com>
9892 * event-loop.c: Include unistd.h if it exists.
9894 * linux-low.c (my_waitpid): Move definition away from being in
9895 between linux_tracefork_child/linux_test_for_tracefork.
9897 * gdb_proc_service.h (psaddr_t): Fix type.
9898 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9899 signature to match glibc.
9901 2009-12-16 Doug Evans <dje@google.com>
9903 * linux-low.c (linux_read_memory): Fix argument to read.
9905 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9907 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9908 events, don't leave current_inferior pointing at null.
9910 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9912 * win32-low.c (LOG): Delete.
9913 (OUTMSG): Output to stderr.
9914 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9915 on compile time LOG macro.
9916 (win32_wait): Fix debug output.
9918 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9920 * win32-low.c (win32_add_one_solib): If the dll name is
9921 "ntdll.dll", prepend the system directory to the dll path.
9923 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9925 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9927 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9928 Vladimir Prus <vladimir@codesourcery.com>
9930 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9931 * configure.ac: Check for __mcoldfire__ and set
9932 gdb_cv_m68k_is_coldfire.
9933 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9934 reg-cf.o and reg-m68k.o.
9935 * configure: Regenerated.
9937 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9939 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9940 Pass it to thread_db_free.
9941 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9942 proper `detaching' argument to linux_remove_process.
9943 * linux-low.h (thread_db_free): Add `detaching' parameter.
9944 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9946 (thread_db_free): Add `detaching' parameter. Only
9947 call td_ta_clear_event if detaching from process.
9949 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9951 * thread-db.c (thread_db_free): Fix typo.
9953 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9956 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9958 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9960 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9961 with an i686 compiler.
9962 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9964 * configure: Rebuilt.
9966 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9970 * server.c (handle_search_memory_1): Correct read_addr initialization
9971 in loop for searching subsequent chunks.
9973 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9975 * configure.ac: New --with-libthread-db option.
9976 * thread-db.c: Allow direct dependence on libthread_db.
9977 (thread_db_free): Adjust.
9978 * config.in: Regenerate.
9979 * configure: Likewise.
9981 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9984 * thread-db.c (attach_thread): New function.
9985 (maybe_attach_thread): Return success/failure.
9986 (find_new_threads_callback): Adjust.
9987 (thread_db_find_new_threads): Loop until no new threads.
9989 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9991 * proc-service.c (ps_lgetregs): Formatting.
9993 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9995 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9996 * configure.ac: Adjust.
9997 * linux-low.h (struct process_info_private): Move members to struct
9999 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10000 * linux-low.c (linux_remove_process): Adjust.
10001 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10002 * server.c (handle_query): Move code ...
10003 (handle_monitor_command): ... here. New function.
10004 * target.h (struct target_ops): New member.
10005 * thread-db.c (struct thread_db): New.
10006 (libthread_db_search_path): New variable.
10007 (thread_db_create_event, thread_db_enable_reporting)
10008 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10009 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10010 (try_thread_db_load_1, dladdr_to_soname): New functions.
10011 (try_thread_db_load, thread_db_load_search): New functions.
10012 (thread_db_init): Search for libthread_db.
10013 (thread_db_free): New function.
10014 (thread_db_handle_monitor_command): Likewise.
10015 * config.in: Regenerate.
10016 * configure: Regenerate.
10018 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10020 * spu-low.c (spu_kill): Wait for inferior to terminate.
10021 Call clear_inferiors.
10022 (spu_detach): Call clear_inferiors.
10024 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10026 * aclocal.m4: Regenerate.
10027 * config.in: Likewise.
10028 * configure: Likewise.
10030 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10032 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10033 (parse_spufs_run): New function.
10034 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10035 (ppc_breakpoint_at): Handle SPU breakpoints.
10037 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10039 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10040 (SPUFS_MAGIC): Define.
10041 (spu_enumerate_spu_ids): New function.
10042 (linux_qxfer_spu): New function.
10043 (linux_target_ops): Install linux_qxfer_spu.
10045 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10047 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10048 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10049 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10050 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10051 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10052 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10053 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10054 (init_registers_powerpc_cell32l): Add prototype.
10055 (init_registers_powerpc_cell64l): Likewise.
10056 (ppc_arch_setup): Detect Cell/B.E. architecture.
10058 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10060 * Makefile.in (datarootdir): New variable.
10062 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10064 * linux-low.c (linux_write_memory): Update debugging output.
10065 * Makefile.in (clean): Add new descriptions.
10066 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10067 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10068 * configure.srv: Add new files for arm*-*-linux*.
10069 * linux-arm-low.c: Add new declarations.
10070 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10071 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10072 (HWCAP_VFPv3D16): New.
10073 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10074 instead of __IWMMXT__.
10075 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10076 (arm_arch_setup): New.
10077 (target_regsets): Remove #ifdef. Add VFP regset.
10078 (the_low_target): Use arm_arch_setup.
10080 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10082 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10083 the main thread again.
10085 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10087 Adding Neutrino gdbserver.
10088 * configure: Regenerated.
10089 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10090 * configure.srv (i[34567]86-*-nto*): New target.
10091 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10092 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10093 (nto_comctrl) [__QNX__]: New function.
10094 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10096 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10098 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10101 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10102 Pedro Alves <pedro@codesourcery.com>
10104 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10105 don't support CONTEXT_EXTENDED_REGISTERS.
10106 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10107 (the_low_target): Install them.
10108 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10109 failing with ERROR_PIPE_NOT_CONNECTED.
10111 2009-06-30 Doug Evans <dje@google.com>
10112 Pierre Muller <muller@ics.u-strasbg.fr>
10114 Add h/w watchpoint support to x86-linux, win32-i386.
10115 * Makefile.in (SFILES): Add i386-low.c
10116 (i386_low_h): Define.
10117 (i386-low.o): Add dependencies.
10118 (linux-x86-low.o): Add i386-low.h dependency.
10119 (win32-i386-low.o): Ditto.
10120 * i386-low.c: New file.
10121 * i386-low.h: New file.
10122 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10123 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10124 * linux-low.c (linux_add_process): Initialize arch_private.
10125 (linux_remove_process): Free arch_private.
10126 (add_lwp): Initialize arch_private.
10127 (delete_lwp): Free arch_private.
10128 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10130 * linux-low.h (process_info_private): New member arch_private.
10131 (lwp_info): New member arch_private.
10132 (linux_target_ops): New members new_process, new_thread,
10134 (ptid_of): New macro.
10135 * linux-x86-low.c: Include stddef.h, i386-low.h.
10136 (arch_process_info): New struct.
10137 (arch_lwp_info): New struct.
10138 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10139 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10140 (i386_dr_low_get_status): New function.
10141 (x86_insert_point, x86_remove_point): New functions.
10142 (x86_stopped_by_watchpoint): New function.
10143 (x86_stopped_data_address): New function.
10144 (x86_linux_new_process, x86_linux_new_thread): New functions.
10145 (x86_linux_prepare_to_resume): New function.
10146 (the_low_target): Add entries for insert_point, remove_point,
10147 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10149 * server.c (debug_hw_points): New global.
10150 (monitor_show_help): Document set debug-hw-points.
10151 (handle_query): Process "set debug-hw-points".
10152 * server.h (debug_hw_points): Declare.
10153 (paddress): Declare.
10154 * utils.c (NUMCELLS, CELLSIZE): New macros.
10155 (get_sell, xsnprintf, paddress): New functions.
10156 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10157 remove_point, stopped_by_watchpoint, stopped_data_address.
10158 * win32-i386-low.c: Include i386-low.h.
10159 (debug_reg_state): Replaces dr.
10160 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10161 (i386_dr_low_get_status): New function.
10162 (i386_insert_point, i386_remove_point): New functions.
10163 (i386_stopped_by_watchpoint): New function.
10164 (i386_stopped_data_address): New function.
10165 (i386_initial_stuff): Update.
10166 (get_thread_context,set_thread_context,i386_thread_added): Update.
10167 (the_low_target): Add entries for insert_point,
10168 remove_point, stopped_by_watchpoint, stopped_data_address.
10169 * win32-low.c (win32_insert_watchpoint): New function.
10170 (win32_remove_watchpoint): New function.
10171 (win32_stopped_by_watchpoint): New function.
10172 (win32_stopped_data_address): New function.
10173 (win32_target_ops): Add entries for insert_watchpoint,
10174 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10175 * win32-low.h (win32_target_ops): New members insert_point,
10176 remove_point, stopped_by_watchpoint, stopped_data_address.
10178 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10180 * server.c (process_serial_event): Re-return unsupported, not
10181 error, if the type isn't recognized. Re-allow supporting only
10182 insert or remove packets. Also call require_running for
10183 breakpoints. Add missing break statement to default case. Tidy.
10184 * target.h (struct target_ops): Rename insert_watchpoint to
10185 insert_point, and remove_watchpoint to remove_point.
10187 * linux-low.h (struct linux_target_ops): Likewise.
10188 * linux-low.c (linux_insert_watchpoint): Rename to ...
10189 (linux_insert_point): ... this. Adjust.
10190 (linux_remove_watchpoint): Rename to ...
10191 (linux_remove_point): ... this. Adjust.
10192 (linux_target_ops): Adjust.
10193 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10194 (cris_insert_point): ... this.
10195 (cris_remove_watchpoint): Rename to ...
10196 (cris_remove_point): ... this.
10197 (the_low_target): Adjust.
10199 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10201 * server.c (handle_v_kill): Pass signal_pid to
10202 kill_inferior if multi_process is zero.
10204 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10206 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10207 * target.h (target_ops): Comment for *_watchpoint to make it clear
10208 the functions can get types '0' and '1'.
10210 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10212 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10213 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10214 * regcache.c (get_regcache): Likewise.
10215 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10216 * win32-low.c (child_fetch_inferior_registers): Remove check for
10219 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10220 Pedro Alves <pedro@codesourcery.com>
10222 * target.h (struct target_ops) <supports_multi_process>: New
10224 (target_supports_multi_process): New.
10225 * server.c (handle_query): Even if GDB reports support, only
10226 enable multi-process if the target also supports it. Report
10227 multi-process support only if the target backend supports it.
10228 * linux-low.c (linux_supports_multi_process): New function.
10229 (linux_target_ops): Install it as target_supports_multi_process
10232 2009-05-24 Doug Evans <dje@google.com>
10234 Global renaming of find_thread_pid to find_thread_ptid.
10235 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10236 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10237 All callers updated.
10239 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10240 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10243 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10244 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10245 (linux_resume_one_lwp): Ditto.
10247 2009-05-23 Doug Evans <dje@google.com>
10249 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10250 from struct inferior_list_entry * to struct lwp_info *.
10251 All callers updated.
10253 2009-05-13 Doug Evans <dje@google.com>
10255 * linux-x86-low.c: Don't include assert.h.
10256 (x86_siginfo_fixup): Use fatal, not assert.
10257 (x86_arch_setup): Fix comment.
10259 2009-05-12 Doug Evans <dje@google.com>
10261 Biarch support for i386/amd64 gdbserver.
10262 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10263 Add linux-x86-low.c.
10264 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10265 (linux-x86-low.o): Add.
10266 * linux-x86-64-low.c: Delete.
10267 * linux-i386-low.c: Delete.
10268 * linux-x86-low.c: New file.
10269 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10271 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10273 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10274 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10275 (linux_child_pid_to_exec_file): New function.
10276 (elf_64_header_p, elf_64_file_p): New functions.
10277 (siginfo_fixup): New function.
10278 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10279 give target a chance to convert layout.
10280 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10281 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10283 2009-05-07 Doug Evans <dje@google.com>
10285 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10286 (regsets_store_inferior_registers): Ditto.
10288 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10292 * linux-low.c (must_set_ptrace_flags): Delete.
10293 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10295 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10296 `lwp->must_set_ptrace_flags' instead.
10297 (linux_wait_for_event_1): Set ptrace options here.
10298 (linux_wait_1): ... not here.
10300 2009-04-30 Doug Evans <dje@google.com>
10302 * inferiors.c (started_inferior_callback): New function.
10303 (attached_inferior_callback): New function.
10304 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10305 * server.c (print_started_pid, print_attached_pid): New functions.
10306 (detach_or_kill_for_exit): New function.
10307 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10308 * server.h (have_started_inferiors_p): Declare.
10309 (have_attached_inferiors_p): Declare.
10311 * inferiors.c (remove_process): Fix memory leak, free process.
10312 * linux-low.c (linux_remove_process): New function.
10313 (linux_kill): Call it instead of remove_process.
10314 (linux_detach, linux_wait_1): Ditto.
10316 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10318 * configure.srv: Add x86 Windows CE target.
10320 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10322 * inferiors.c (get_thread_process): Make global.
10323 * server.h (get_thread_process): Add prototype.
10324 * thread-db.c (find_one_thread): Use get_thread_process
10325 instead of current_process.
10326 (thread_db_get_tls_address): Do not crash if called when
10327 thread layer is not yet initialized.
10329 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10331 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10332 * spu-low.c (current_tid): Rename to ...
10333 (current_ptid): ... this.
10334 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10335 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10336 ptid_get_lwp (current_ptid) instead of current_tid.
10337 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10338 instead of current_tid. Use find_process_pid to verify pid
10339 argument is valid. Pass proper argument to remove_process.
10340 (spu_thread_alive): Compare current_ptid instead of current_tid.
10341 (spu_resume): Likewise.
10343 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10345 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10348 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10350 Implement the multiprocess extensions, and add linux multiprocess
10353 * server.h (ULONGEST): Declare.
10354 (struct ptid, ptid_t): New.
10355 (minus_one_ptid, null_ptid): Declare.
10356 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10357 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10358 (struct inferior_list_entry): Change `id' type from unsigned from
10360 (struct sym_cache, struct breakpoint, struct
10361 process_info_private): Forward declare.
10362 (struct process_info): Declare.
10363 (current_process): Declare.
10364 (all_processes): Declare.
10365 (initialize_inferiors): Declare.
10366 (add_thread): Adjust to use ptid_t.
10367 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10368 (add_process, remove_process, find_thread_pid): Declare.
10369 (find_inferior_id): Adjust to use ptid_t.
10370 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10371 (multi_process): Declare.
10372 (push_event): Adjust to use ptid_t.
10373 (read_ptid, write_ptid): Declare.
10374 (prepare_resume_reply): Adjust to use ptid_t.
10375 (clear_symbol_cache): Declare.
10376 * inferiors.c (all_processes): New.
10377 (null_ptid, minus_one_ptid): New.
10378 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10379 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10380 (add_thread): Change unsigned long to ptid. Remove gdb_id
10382 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10383 (gdb_id_to_thread): Rename to ...
10384 (find_thread_pid): ... this. Change unsigned long to ptid.
10385 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10386 (loaded_dll, pull_pid_from_list): Adjust.
10387 (add_process, remove_process, find_process_pid)
10388 (get_thread_process, current_process, initialize_inferiors): New.
10389 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10390 (struct target_waitstatus) <related_pid>: Ditto.
10391 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10392 return type to int.
10393 (struct target_ops) <join>: Add `pid' argument.
10394 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10395 (struct target_ops) <wait>: Add `ptid' field. Change return type
10397 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10398 (mywait): Add `ptid' argument. Change return type to ptid_t.
10399 (target_pid_to_str): Declare.
10400 * target.c (set_desired_inferior): Adjust to use ptids.
10401 (mywait): Add new `ptid' argument. Adjust.
10402 (target_pid_to_str): New.
10403 * mem-break.h (free_all_breakpoints): Declare.
10404 * mem-break.c (breakpoints): Delelete.
10405 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10406 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10407 to use per-process breakpoint list.
10408 (free_all_breakpoints): New.
10409 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10410 (symbol_cache, all_symbols_looked_up): Delete.
10412 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10414 (prepare_resume_reply): Change ptid argument's type from unsigned
10415 long to ptid_t. Adjust. Implement W;process and X;process.
10416 (free_sym_cache, clear_symbol_cache): New.
10417 (look_up_one_symbol): Adjust to per-process symbol cache. *
10418 * server.c (cont_thread, general_thread, step_thread): Change type
10420 (attached): Delete.
10421 (multi_process): New.
10422 (last_ptid): Change type to ptid_t.
10423 (struct vstop_notif) <ptid>: Change type to ptid_t.
10424 (queue_stop_reply, push_event): Change `ptid' argument's type to
10426 (discard_queued_stop_replies): Add `pid' argument.
10427 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10428 changes. Don't reference the `attached' global.
10429 (attach_inferior): Adjust to mywait interface changes.
10430 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10431 features. Handle and report "multiprocess+". Handle
10433 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10435 (handle_v_kill): New.
10436 (handle_v_stopped): Adjust to use target_pid_to_str.
10437 (handle_v_requests): Allow multiple attaches and runs when
10438 multiprocess extensions are in effect. Handle "vKill".
10439 (myresume): Adjust to use ptids.
10440 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10441 (handle_status): Adjust to discard_queued_stop_replies interface
10443 (first_thread_of, kill_inferior_callback)
10444 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10445 (main): Call initialize_inferiors. Adjust to use ptids, killing
10446 and detaching from all inferiors. Handle multiprocess packet
10448 * linux-low.h: Include gdb_proc_service.h.
10449 (struct process_info_private): New.
10450 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10451 <lwpid_of>: Use ptid_get_lwp.
10452 (get_lwp_thread): Adjust.
10453 (struct lwp_info): Add `dead' member.
10454 (find_lwp_pid): Declare.
10455 * linux-low.c (thread_db_active): Delete.
10456 (new_inferior): Adjust comment.
10457 (inferior_pid): Delete.
10458 (linux_add_process): New.
10459 (handle_extended_wait): Adjust.
10460 (add_lwp): Change unsigned long to ptid.
10461 (linux_create_inferior): Add process to processes table. Adjust
10462 to use ptids. Don't set new_inferior here.
10463 (linux_attach_lwp): Rename to ...
10464 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10465 it. Adjust to use ptids.
10466 (linux_attach_lwp): New.
10467 (linux_attach): Add process to processes table. Don't set
10469 (struct counter): New.
10470 (second_thread_of_pid_p, last_thread_of_process_p): New.
10471 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10472 multiple processes.
10473 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10474 processes. Remove process from process table.
10475 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10476 to multiple processes.
10477 (any_thread_of): New.
10478 (linux_detach): Add `pid' argument, and handle it. Remove process
10479 from processes table.
10480 (linux_join): Add `pid' argument. Handle it.
10481 (linux_thread_alive): Change unsighed long argument to ptid_t.
10482 Consider dead lwps as not being alive.
10483 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10484 threads we're not interested in.
10485 (same_lwp, find_lwp_pid): New.
10486 (linux_wait_for_lwp): Change `pid' argument's type from int to
10488 (linux_wait_for_event): Rename to ...
10489 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10490 from int to ptid_t. Adjust.
10491 (linux_wait_for_event): New.
10492 (linux_wait_1): Add `ptid' argument. Change return type to
10493 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10494 that exit from the process table.
10495 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10497 (mark_lwp_dead): New.
10498 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10499 stopping all threads, mark its main lwp as dead.
10500 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10502 (fetch_register, usr_store_inferior_registers)
10503 (regsets_fetch_inferior_registers)
10504 (regsets_store_inferior_registers, linux_read_memory)
10505 (linux_write_memory): Inline `inferior_pid'.
10506 (linux_look_up_symbols): Adjust to use per-process
10507 `thread_db_active'.
10508 (linux_request_interrupt): Adjust to use ptids.
10509 (linux_read_auxv): Inline `inferior_pid'.
10510 (initialize_low): Don't reference thread_db_active.
10511 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10512 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10513 (ps_getpid): Return the pid of the current inferior.
10514 * thread-db.c (proc_handle, thread_agent): Delete.
10515 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10517 (find_one_thread): Change argument type to ptid_t. Adjust to
10519 (maybe_attach_thread): Adjust to per-process data and ptids.
10520 (thread_db_find_new_threads): Ditto.
10521 (thread_db_init): Ditto.
10522 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10523 processes table. Adjust to use ptids.
10524 (spu_kill, spu_detach): Adjust interface. Remove process from
10526 (spu_join, spu_thread_alive): Adjust interface.
10527 (spu_wait): Adjust interface. Remove process from processes
10528 table. Adjust to use ptids.
10529 * win32-low.c (current_inferior_tid): Delete.
10530 (current_inferior_ptid): New.
10531 (debug_event_ptid): New.
10532 (thread_rec): Take a ptid. Adjust.
10533 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10534 (child_delete_thread): Ditto.
10535 (do_initial_child_stuff): Add `attached' argument. Add process to
10537 (child_fetch_inferior_registers, child_store_inferior_registers):
10539 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10540 (win32_attach): Pass 1 to do_initial_child_stuff.
10541 (win32_kill): Adjust interface. Remove process from processes
10543 (win32_detach): Ditto.
10544 (win32_join): Adjust interface.
10545 (win32_thread_alive): Take a ptid.
10546 (win32_resume): Adjust to use ptids.
10547 (get_child_debug_event): Ditto.
10548 (win32_wait): Adjust interface. Remove exiting process from
10551 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10553 Non-stop mode support.
10555 * server.h (non_stop): Declare.
10556 (gdb_client_data, handler_func): Declare.
10557 (delete_file_handler, add_file_handler, start_event_loop):
10559 (handle_serial_event, handle_target_event, push_event)
10560 (putpkt_notif): Declare.
10561 * target.h (enum resume_kind): New.
10562 (struct thread_resume): Replace `step' field by `kind' field.
10563 (TARGET_WNOHANG): Define.
10564 (struct target_ops) <wait>: Add `options' argument.
10565 <supports_non_stop, async, start_non_stop>: New fields.
10566 (target_supports_non_stop, target_async): New.
10567 (start_non_stop): Declare.
10568 (mywait): Add `options' argument.
10569 * target.c (mywait): Add `options' argument. Print child exit
10570 notifications here.
10571 (start_non_stop): New.
10572 * server.c (non_stop, own_buf, mem_buf): New globals.
10573 (struct vstop_notif): New.
10574 (notif_queue): New global.
10575 (queue_stop_reply, push_event, discard_queued_stop_replies)
10576 (send_next_stop_reply): New.
10577 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10579 (attach_inferior): In non-stop mode, don't wait for the target
10581 (handle_general_set): Handle QNonStop.
10582 (handle_query): When handling qC, return the current general
10583 thread, instead of the first thread of the list.
10584 (handle_query): If the backend supports non-stop mode, include
10585 QNonStop+ in the qSupported query response.
10586 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10588 (handle_v_attach, handle_v_run): Handle non-stop mode.
10589 (handle_v_stopped): New.
10590 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10591 (myresume): Adjust to use resume_kind. Handle non-stop.
10592 (queue_stop_reply_callback): New.
10593 (handle_status): Handle non-stop mode.
10594 (main): Clear non_stop flag on reconnection. Use the event-loop.
10595 Refactor serial protocol handling from here ...
10596 (process_serial_event): ... to this new function. When GDB
10597 selects any thread, select one here. In non-stop mode, wait until
10598 GDB acks all pending events before exiting.
10599 (handle_serial_event, handle_target_event): New.
10600 * remote-utils.c (remote_open): Install remote_desc in the event
10602 (remote_close): Remove remote_desc from the event loop.
10603 (putpkt_binary): Rename to...
10604 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10605 (putpkt_binary): New as wrapper around putpkt_binary_1.
10606 (putpkt_notif): New.
10607 (prepare_resume_reply): In non-stop mode, don't change the
10609 * event-loop.c: New.
10610 * Makefile.in (OBJ): Add event-loop.o.
10611 (event-loop.o): New rule.
10613 * linux-low.h (pid_of): Moved here.
10615 (get_lwp_thread): Use lwpid_of.
10616 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10617 * linux-low.c (pid_of): Delete.
10618 (inferior_pid): Use lwpid_of.
10619 (linux_event_pipe): New.
10620 (target_is_async_p): New.
10622 (handle_extended_wait): Use lwpid_of.
10623 (add_lwp): Don't set lwpid field.
10624 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10625 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10626 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10627 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10628 first. Adjust to linux_wait_for_event interface changes. Use
10630 (linux_detach): Don't delete the main lwp here.
10631 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10632 (status_pending_p): Don't consider explicitly suspended lwps.
10633 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10634 pointer. Add OPTIONS argument. Change return type to int. Use
10635 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10636 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10637 pointer. Add status pointer argument. Return a pid instead of a
10638 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10639 changes. In non-stop mode, don't switch to a random thread.
10640 (linux_wait): Rename to...
10641 (linux_wait_1): ... this. Add target_options argument, and handle
10642 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10643 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10644 clean exit and signal exit code. Don't stop all threads in
10645 non-stop mode. In all-stop mode, only stop all threads when
10646 reporting a stop to GDB. Handle explicit thread stop requests.
10647 (async_file_flush, async_file_mark): New.
10649 (send_sigstop): Use lwpid_of.
10650 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10651 interface changes. In non-stop mode, don't switch to a random
10653 (linux_resume_one_lwp): Use lwpid_of.
10654 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10655 (linux_resume_one_thread): ... this. Handle resume_stop. In
10656 non-stop mode, don't look for pending flag in all threads.
10657 (resume_status_pending_p): Don't consider explicitly suspended
10659 (my_waitpid): Reimplement. Emulate __WALL.
10660 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10662 (sigchld_handler, linux_supports_non_stop, linux_async)
10663 (linux_start_non_stop): New.
10664 (linux_target_ops): Register linux_supports_non_stop, linux_async
10665 and linux_start_non_stop.
10666 (initialize_low): Install SIGCHLD handler.
10667 * thread-db.c (thread_db_create_event, find_one_thread)
10668 (thread_db_get_tls_address): Use lwpid_of.
10669 * win32-low.c (win32_detach): Adjust to use resume_kind.
10670 (win32_wait): Add `options' argument.
10671 * spu-low.c (spu_resume): Adjust to use resume_kind.
10672 (spu_wait): Add `options' argument.
10674 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10676 Decouple target code from remote protocol.
10678 * target.h (enum target_waitkind): New.
10679 (struct target_waitstatus): New.
10680 (struct target_ops) <wait>: Return an unsigned long. Take a
10681 target_waitstatus pointer instead of a char pointer.
10682 (mywait): Likewise.
10683 * target.c (mywait): Change prototype to return an unsigned long.
10684 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10685 * server.h (thread_from_wait, old_thread_from_wait): Delete
10687 (prepare_resume_reply): Change prototype to take a
10689 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10690 (last_status, last_ptid): New.
10691 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10692 pid instead of a signal.
10693 (attach_inferior): Remove "status" and "signal" parameters.
10695 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10697 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10698 (handle_v_requests, myresume): Remove "status" and "signal"
10699 parameters. Adjust.
10700 (handle_status): New.
10701 (main): Delete local `status'. Adjust.
10702 * remote-utils.c: Include target.h.
10703 (prepare_resume_reply): Change prototype to take a
10704 target_waitstatus. Adjust.
10706 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10708 * spu-low.c (spu_wait): Adjust.
10709 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10711 (win32_wait): Adjust.
10713 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10715 * target.h (struct thread_resume): Delete leave_stopped member.
10716 (struct target_ops): Add a `n' argument to the `resume' callback.
10717 * server.c (start_inferior): Adjust.
10718 (handle_v_cont, myresume): Adjust.
10719 * linux-low.c (check_removed_breakpoint): Adjust to resume
10720 interface change, and to removed leave_stopped field.
10721 (resume_ptr): Delete.
10722 (struct thread_resume_array): New.
10723 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10724 resume interface change.
10725 (linux_continue_one_thread, linux_queue_one_thread)
10726 (resume_status_pending_p): Check if the resume field is NULL
10727 instead of checking the leave_stopped member.
10728 (linux_resume): Adjust to the target resume interface change.
10729 * spu-low.c (spu_resume): Adjust to the target resume interface
10731 * win32-low.c (win32_detach, win32_resume): Ditto.
10733 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10735 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10737 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10739 (linux_continue_one_thread): Only preserve the stepping flag if
10740 there's a pending breakpoint.
10742 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10744 * server.c (main): After the inferior having exited, call
10745 remote_close before exiting gdbserver.
10747 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10749 Fix size of FPSCR in Power 7 processors.
10750 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10751 (PPC_FEATURE_HAS_DFP): New #define.
10752 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10755 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10757 * server.c (handle_query) Whitespace and formatting.
10759 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10761 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10762 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10763 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10764 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10765 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10766 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10767 Makefile.in, configure.ac: Fix whitespace throughout.
10768 * configure: Regenerate.
10770 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10772 * inferiors.c (find_inferior): Make it safe for the callback
10773 function to delete the currently iterated inferior.
10775 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10777 * Makefile.in (linuw_low_h): Move higher.
10778 (thread-db.o): Depend on $(linux_low_h).
10780 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10782 Rename "process" to "lwp" throughout.
10784 * linux-low.c (all_processes): Rename to...
10785 (all_lwps): ... this.
10786 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10787 (add_process): Rename to ...
10788 (add_lwp): ... this. Adjust.
10789 (linux_create_inferior): Adjust.
10790 (linux_attach_lwp): Adjust.
10791 (linux_attach): Adjust.
10792 (linux_kill_one_process): Rename to ...
10793 (linux_kill_one_lwp): ... this. Adjust.
10794 (linux_kill): Adjust.
10795 (linux_detach_one_process): Rename to ...
10796 (linux_detach_one_lwp): ... this. Adjust.
10797 (linux_detach): Adjust.
10798 (check_removed_breakpoint): Adjust.
10799 (status_pending_p): Adjust.
10800 (linux_wait_for_process): Rename to ...
10801 (linux_wait_for_lwp): ... this. Adjust.
10802 (linux_wait_for_event): Adjust.
10803 (send_sigstop): Adjust.
10804 (wait_for_sigstop): Adjust.
10805 (stop_all_processes): Rename to ...
10806 (stop_all_lwps): ... this.
10807 (linux_resume_one_process): Rename to ...
10808 (linux_resume_one_lwp): ... this. Adjust.
10809 (linux_set_resume_request, linux_continue_one_thread)
10810 (linux_queue_one_thread, resume_status_pending_p)
10811 (usr_store_inferior_registers, regsets_store_inferior_registers)
10812 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10814 * linux-low.h (get_process): Rename to ...
10815 (get_lwp): ... this. Adjust.
10816 (get_thread_process): Rename to ...
10817 (get_thread_lwp): ... this. Adjust.
10818 (get_process_thread): Rename to ...
10819 (get_lwp_thread): ... this. Adjust.
10820 (struct process_info): Rename to ...
10821 (struct lwp_info): ... this.
10822 (all_processes): Rename to ...
10823 (all_lwps): ... this.
10824 * proc-service.c (ps_lgetregs): Adjust.
10825 * thread-db.c (thread_db_create_event, find_one_thread)
10826 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10828 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10830 * server.c (handle_query): Handle "qAttached".
10832 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10834 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10835 GPLv3, update license URL.
10837 2009-03-01 Doug Evans <dje@google.com>
10839 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10840 (server_h): Add gdb_signals.h.
10841 (signals.o): Update.
10842 * server.h (target_signal_from_host,target_signal_to_host_p)
10843 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10845 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10847 * remote-utils.c (getpkt): Also generate remote-debug
10848 information if noack_mode is set.
10850 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10852 * server.c (handle_query): Report qXfer:siginfo:read and
10853 qXfer:siginfo:write as supported and handle them.
10854 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10855 * linux-low.c (linux_xfer_siginfo): New.
10856 (linux_target_ops): Set it.
10858 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10860 * server.c (gdbserver_usage): Mention --remote-debug.
10861 (main): Accept '--remote-debug' switch.
10863 2009-01-18 Doug Evans <dje@google.com>
10865 * regcache.c (new_register_cache): No need to check result of xcalloc.
10866 * server.c (handle_search_memory): Back out calls to xmalloc,
10867 result is checked and error is returned to user upon failure.
10868 (handle_query): Ditto. Add more checks for result of malloc.
10869 (handle_v_cont): Check result of malloc, report error back to
10871 (handle_v_run): Ditto. Call freeargv.
10872 * server.h (freeargv): Declare.
10873 * utils.c (freeargv): New fn.
10875 2009-01-15 Doug Evans <dje@google.com>
10877 * gdbreplay.c (perror_with_name): Make arg const char *.
10878 * server.h (target_signal_to_name): Make return type const char *.
10879 * thread-db.c (thread_db_err_str): Make return type const char *.
10880 * utils.c (perror_with_name): Make arg const char *.
10882 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10884 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10885 when handling a EXIT_PROCESS_DEBUG_EVENT.
10887 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10889 * gdbreplay.c (gdbreplay_version): Update copyright year.
10890 * server.c (gdbserver_version): Likewise.
10892 2009-01-05 Doug Evans <dje@google.com>
10894 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10895 (handle_extended_wait): Improve comment.
10897 2008-12-13 Doug Evans <dje@google.com>
10899 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10900 * server.h (ATTR_MALLOC): New macro.
10901 (xmalloc,xcalloc,xstrdup): Declare.
10902 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10903 * inferiors.c: Ditto.
10904 * linux-low.c: Ditto.
10905 * mem-break.c: Ditto.
10906 * regcache.c: Ditto.
10907 * remote-utils.c: Ditto.
10910 * win32-low.c: Ditto.
10912 2008-12-12 Doug Evans <dje@google.com>
10914 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10915 in debugging printf.
10917 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10919 2008-12-09 Doug Evans <dje@google.com>
10921 * linux-low.h (struct process_info): Delete member tid, unused.
10922 * thread-db.c (find_one_thread): Update.
10923 (maybe_attach_thread): Update.
10925 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10927 * target.h (struct target_ops): Add qxfer_osdata member.
10928 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10930 (linux_qxfer_osdata): New functions.
10931 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10933 * server.c (handle_query): Handle "qXfer:osdata:read:".
10934 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10935 (buffer_xml_printf): New functions.
10936 * server.h (struct buffer): New.
10937 (buffer_grow_str, buffer_grow_str0): New macros.
10938 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10939 (buffer_xml_printf): Declare.
10941 2008-11-24 Doug Evans <dje@google.com>
10943 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10945 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10947 * server.c (handle_v_run): Always use the supplied argument list.
10949 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10951 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10952 (xtensa_regmap_table): Add entry for scompare1.
10954 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10956 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10957 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10958 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10959 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10960 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10961 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10962 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10963 XML target descriptions.
10964 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10965 when inferior is running on an ISA 2.05 or later processor. Add
10966 special case to return offset for full 64-bit slot of FPSCR when
10969 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10971 * Makefile.in (SFILES, clean): Added sparc64 files.
10972 (reg-sparc64.o, reg-sparc64.c): New.
10973 * configure.srv (sparc*-*-linux*): New configuration.
10974 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10975 syscall arguments for SPARC.
10976 (regsets_store_inferior_registers): Likewise.
10977 * linux-sparc-low.c: New file.
10979 2008-10-21 Doug Evans <dje@google.com>
10981 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10982 (READLINE_DIR,READLINE_DEP): Delete.
10983 (INTERNAL_CFLAGS): Update.
10984 (LINTFLAGS): Update.
10986 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10988 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10989 whole argv from the last run, not just argv[0].
10991 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10993 * regcache.c (new_register_cache): Return NULL if the register
10994 cache size isn't known yet.
10995 (free_register_cache): Avoid dereferencing a NULL regcache.
10997 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10999 * configure.srv: Merge MIPS and MIPS64.
11001 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11003 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11005 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11007 * Makefile.in: Add required vsx dependencies.
11009 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11010 Declare init_registers_powerpc_vsx32l.
11011 Declare init_registers_powerpc_vsx64l.
11012 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11013 (ppc_arch_setup): Check for VSX in hwcap.
11014 (ppc_fill_vsxregset): New function.
11015 (ppc_store_vsxregset): New function.
11016 Add new VSX entry in regset_info target_regsets.
11018 * configure.srv: Add new VSX dependencies.
11020 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11022 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11023 (remote_open): Set or clear transport_is_reliable.
11024 (putpkt_binary): Don't expect acks in noack mode.
11025 (getpkt): Don't send ack/nac in noack mode.
11026 * server.c (handle_general_set): Handle QStartNoAckMode.
11027 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11029 (main): Reset noack_mode on every connection.
11030 * server.h (noack_mode): Declare.
11032 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11034 * Makefile.in (GDBREPLAY_OBS): New variable.
11035 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11037 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11038 Daniel Jacobowitz <dan@codesourcery.com>
11040 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11041 (usr_store_inferior_registers): Likewise.
11042 (regsets_store_inferior_registers): Likewise.
11044 2008-07-31 Rolf Jansen <rj@surtec.com>
11045 Pedro Alves <pedro@codesourcery.com>
11047 * configure.ac: Check for memmem declaration.
11048 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11049 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11050 (disable_packet_qfThreadInfo): Unconditionally compile.
11051 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11052 * configure, config.in: Regenerate.
11054 2008-07-28 Doug Kwan <dougkwan@google.com>
11056 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11057 (linux_write_memory): Remove declaration of errno.
11059 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11061 * linux-low.c (handle_extended_wait): Do not use "status"
11062 variable uninitialized.
11064 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11066 * server.c (handle_v_attach): Inhibit reporting dll changes.
11068 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11070 * remote-utils.c (prepare_resume_reply): If requested, don't
11071 output "thread:TID" in the T stop reply.
11073 * server.c (disable_packet_vCont, disable_packet_Tthread)
11074 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11075 (handle_query): If requested, disable support for qC, qfThreadInfo
11077 (handle_v_requests): If requested, disable support for vCont.
11078 (gdbserver_show_disableable): New.
11079 (main): Handle --disable-packet and --disable-packet=LIST.
11081 * server.h (disable_packet_vCont, disable_packet_Tthread)
11082 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11084 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11086 * server.c (gdbserver_usage): Mention --version.
11088 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11090 * Makefile.in (gdbreplay.o): New rule.
11092 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11094 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11095 message, not gdbserver.
11097 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11098 Nathan Sidwell <nathan@codesourcery.com>
11099 Joseph Myers <joseph@codesourcery.com>
11101 * acinclude.m4: Include ../../config/acx.m4.
11102 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11103 * configure, config.in: Regenerate.
11104 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11105 * server.c (gdbserver_version): Print PKGVERSION.
11106 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11107 (main): Adjust gdbserver_usage calls.
11108 * gdbreplay.c (version, host_name): Add declarations.
11109 (gdbreplay_version, gdbreplay_usage): New.
11110 (main): Accept --version and --help options.
11112 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11114 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11115 (arm_breakpoint_at): Handle Thumb.
11116 (the_low_target): Add comment.
11118 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11120 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11122 2008-05-09 Doug Evans <dje@google.com>
11124 * server.h (decode_search_memory_packet): Declare.
11125 * remote-utils.c (decode_search_memory_packet): New fn.
11126 * server.c (handle_search_memory_1): New fn.
11127 (handle_search_memory): New fn.
11128 (handle_query): Process qSearch:memory packets.
11130 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11132 * regcache.c (registers_length): Remove.
11133 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11134 full register packet.
11135 * regcache.h (registers_length): Remove prototype.
11136 * server.h (PBUFSIZ): Define to 16384.
11138 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11140 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11141 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11142 powerpc-64l.o, and powerpc-altivec64l.o.
11143 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11144 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11145 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11146 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11147 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11150 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11151 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11152 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11153 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11154 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11155 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11156 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11157 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11158 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11159 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11162 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11163 (init_registers_powerpc_32l): ... this new prototype.
11164 (init_registers_powerpc_32): Remove, replace by ...
11165 (init_registers_powerpc_altivec32l): ... this new prototype.
11166 (init_registers_powerpc_e500): Remove, replace by ...
11167 (init_registers_powerpc_e500l): ... this new prototype.
11168 (init_registers_ppc64): Remove, replace by ...
11169 (init_registers_powerpc_64l): ... this new prototype.
11170 (init_registers_powerpc_64): Remove, replace by ...
11171 (init_registers_powerpc_altivec64l): ... this new prototype.
11172 (ppc_num_regs): Set to 73.
11173 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11174 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11175 (ppc_cannot_store_register): Handle orig_r3 and trap.
11176 (ppc_arch_setup): Update init_registers_... calls.
11177 (ppc_fill_gregset): Handle orig_r3 and trap.
11179 * inferiors.c (clear_inferiors): Reset current_inferior.
11181 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11183 * acinclude.m4: Add override.m4.
11184 * configure: Regenerate.
11186 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11188 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11189 initial call to init_register_ppc64.
11191 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11193 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11194 single powerpc*-*-linux* case.
11195 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11197 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11199 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11200 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11202 * linux-ppc-low.c: Include <elf.h>.
11203 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11204 (ppc_hwcap): New global variable.
11205 (ppc_regmap): Remove __SPE__ #ifdef sections.
11206 (ppc_regmap_e500): New global variable.
11207 (ppc_cannot_store_register): Update __SPE__ special case.
11208 (ppc_get_hwcap): New function.
11209 (ppc_arch_setup): Use it to determine whether inferior supports
11210 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11211 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11212 Do not access registers if target does not support AltiVec.
11213 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11214 Do not access registers if target does not support SPE.
11215 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11217 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11219 * linux-low.c (disabled_regsets, num_regsets): New.
11220 (use_regsets_p): Delete.
11221 (linux_wait_for_process): Clear disabled_regsets.
11222 (regsets_fetch_inferior_registers): Check and set it.
11223 (regsets_store_inferior_registers): Likewise.
11224 (linux_fetch_registers, linux_store_registers): Do not use
11226 (initialize_low): Allocate disabled_regsets.
11228 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11230 * Makefile.in (LIBOBJS): New.
11231 (OBS): Use LIBOBJS.
11232 (memmem.o): New rule.
11233 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11234 * configure: Regenerated.
11236 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11238 * server.c (handle_query): Never return "unsupported" for
11239 qXfer:features:read queries.
11241 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11243 * server.c (get_features_xml): Fix inverted condition.
11244 (handle_query): Always support qXfer:feature:read.
11246 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11248 * server.c (wrapper_argv): New.
11249 (start_inferior): Handle wrapper_argv. If set, expect an extra
11251 (gdbserver_usage): Document --wrapper.
11252 (main): Parse --wrapper.
11254 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11256 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11257 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11258 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11259 (ppc_set_pc): Likewise.
11260 (ppc_arch_setup): New function.
11261 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11262 of collect_register.
11263 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11265 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11267 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11268 instead of linux-ppc64-low.o.
11269 * linux-ppc64-low.c: Remove file.
11270 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11271 (linux-ppc64-low.o): Remove rule.
11273 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11274 (init_registers_powerpc_64): Likewise.
11275 (ppc_regmap): Conditionally define depending on __powerpc64__.
11276 (ppc_cannot_store_register): Do not special-case "fpscr" when
11277 compiled on __powerpc64__.
11278 (ppc_collect_ptrace_register): New function.
11279 (ppc_supply_ptrace_register): New function.
11280 (ppc_breakpoint): Change type to "unsigned int".
11281 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11282 (the_low_target): Conditionally provide initializers for the
11283 arch_setup member depending on __powerpc64__. Install
11284 collect_ptrace_register and supply_ptrace_register members.
11286 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11288 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11289 * server.c (gdbserver_xmltarget): Define.
11290 (get_features_xml): Use it to replace "target.xml" and arch_string.
11292 * configure.srv: Remove srv_xmltarget. Add XML files that were
11293 mentioned there to srv_xmlfiles instead. Remove conditional tests
11294 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11295 srv_xmlfiles and srv_regobj to include all possible choices.
11296 * configure.ac (srv_xmltarget): Remove.
11297 (srv_xmlfiles): Do not add "target.xml".
11298 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11299 checks for supplementary target information.
11300 * configure: Regenerate.
11301 * Makefile.in (XML_TARGET): Remove.
11302 (target.xml): Remove rule.
11303 (clean): Do not clean up target.xml.
11304 (.PRECIOUS): Do not mention target.xml.
11306 * target.h (struct target_ops): Remove arch_string member.
11307 * linux-low.c (linux_arch_string): Remove.
11308 (linux_target_ops): Remove arch_string initializer.
11309 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11310 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11311 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11312 * spu-low.c (spu_arch_string): Remove.
11313 (spu_target_ops): Remove arch_string initializer.
11314 * win32-low.c (win32_arch_string): Remove.
11315 (win32_target_ops): Remove arch_string initializer.
11316 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11317 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11318 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11320 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11322 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11323 by collect_ptrace_register and supply_ptrace_register hooks.
11324 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11325 instead of checking for the_low_target.left_pad_xfer.
11326 (usr_store_inferior_registers): Use collect_ptrace_register callback
11327 instead of checking for the_low_target.left_pad_xfer.
11329 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11330 (s390_supply_ptrace_register): Likewise.
11331 (s390_fill_gregset): Call s390_collect_ptrace_register.
11332 (the_low_target): Update.
11334 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11335 (ppc_supply_ptrace_register): Likewise.
11336 (the_low_target): Update.
11338 * linux-i386-low.c (the_low_target): Update.
11339 * linux-x86-64-low.c (the_low_target): Update.
11341 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11343 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11344 reg-s390.o and reg-s390x.o.
11346 * linux-low.c (new_inferior): New global variable.
11347 (linux_create_inferior, linux_attach): Set it.
11348 (linux_wait_for_process): Call the_low_target.arch_setup after the
11349 target has stopped for the first time.
11350 (initialize_low): Do not call the_low_target.arch_setup.
11352 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11353 (s390_set_pc): Likewise.
11354 (s390_arch_setup): New function.
11355 (the_low_target): Use s390_arch_setup as arch_setup routine.
11357 * regcache.c (realloc_register_cache): New function.
11358 (set_register_cache): Call it for each existing regcache.
11360 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11362 * server.h (init_registers): Remove prototype.
11364 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11365 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11366 instead of init_registers ().
11367 * linux-arm-low.c (init_registers_arm): Add prototype.
11368 (init_registers_arm_with_iwmmxt): Likewise.
11369 (the_low_target): Add initializer for arch_setup field.
11370 * linux-cris-low.c (init_registers_cris): Add prototype.
11371 (the_low_target): Add initializer for arch_setup field.
11372 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11373 (the_low_target): Add initializer for arch_setup field.
11374 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11375 (the_low_target): Add initializer for arch_setup field.
11376 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11377 (the_low_target): Add initializer for arch_setup field.
11378 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11379 (the_low_target): Add initializer for arch_setup field.
11380 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11381 (the_low_target): Add initializer for arch_setup field.
11382 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11383 (init_registers_mips64_linux): Likewise.
11384 (the_low_target): Add initializer for arch_setup field.
11385 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11386 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11387 (the_low_target): Add initializer for arch_setup field.
11388 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11389 (init_registers_powerpc_64): Likewise.
11390 (the_low_target): Add initializer for arch_setup field.
11391 * linux-s390-low.c (init_registers_s390): Add prototype.
11392 (init_registers_s390x): Likewise.
11393 (the_low_target): Add initializer for arch_setup field.
11394 * linux-sh-low.c (init_registers_sh): Add prototype.
11395 (the_low_target): Add initializer for arch_setup field.
11396 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11397 (the_low_target): Add initializer for arch_setup field.
11398 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11399 (the_low_target): Add initializer for arch_setup field.
11401 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11402 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11403 instead of init_registers ().
11404 * win32-arm-low.c (init_registers_arm): Add prototype.
11405 (the_low_target): Add initializer for arch_setup field.
11406 * win32-i386-low.c (init_registers_i386): Add prototype.
11407 (the_low_target): Add initializer for arch_setup field.
11409 * spu-low.c (init_registers_spu): Add prototype.
11410 (initialize_low): Call initialie_registers_spu () instead of
11411 initialize_registers ().
11413 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11415 * server.c (handle_v_requests): When handling the vRun and vAttach
11416 packets, if already debugging a process, don't kill it. Return an
11419 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11421 * server.c (handle_query): Correct length check.
11423 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11425 * win32-low.c (do_initial_child_stuff): Add process handle
11426 parameter. Set current_process_handle and current_process_id from the
11427 parameters. Clear globals.
11428 (win32_create_inferior): Don't set current_process_handle and
11429 current_process_id here. Instead pass them on the call to
11430 do_initial_child_stuff.
11431 (win32_attach): Likewise.
11432 (win32_clear_inferiors): New.
11433 (win32_kill): Don't close the current process handle or the
11434 current thread handle here. Instead call win32_clear_inferiors.
11435 (win32_detach): Don't open a new handle to the process. Call
11436 win32_clear_inferiors.
11437 (win32_join): Don't rely on current_process_handle; open a new
11438 handle using the process id.
11439 (win32_wait): Call win32_clear_inferiors when the inferior process
11442 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11444 * server.c (monitor_show_help): Add "exit".
11446 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11448 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11449 (clean): Add reg-xtensa.c.
11450 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11451 * configure.srv (xtensa*-*-linux*) New target.
11452 * linux-xtensa-low.c: New.
11453 * xtensa-xtregs.c: New.
11455 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11457 * hostio.c: Don't include errno.h.
11458 (errno_to_fileio_errno): Move to hostio-errno.
11459 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11460 error number outputting to the target->hostio_last_error callback.
11461 (hostio_packet_error): Use FILEIO_EINVAL directly.
11462 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11463 calls to hostio_error.
11464 * hostio-errno.c: New.
11465 * server.h (hostio_last_error_from_errno): Declare.
11466 * target.h (target_ops): Add hostio_last_error member.
11467 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11468 as hostio_last_error handler.
11469 * spu-low.c (spu_target_ops): Likewise.
11470 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11471 (wince_hostio_last_error): New functions.
11472 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11473 as hostio_last_error handler.
11474 (win32_target_ops) [!_WIN32_WCE]: Register
11475 hostio_last_error_from_errno as hostio_last_error handler.
11476 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11477 (hostio-errno.o): New rule.
11478 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11479 * configure.srv (srv_hostio_err_objs): New variable. Default to
11481 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11482 * configure: Regenerate.
11484 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11486 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11487 (linux_kill, linux_detach): Clean up the process list.
11488 * remote-utils.c (remote_open): Improve port number parsing.
11489 (putpkt_binary, input_interrupt): Only send interrupts if the target
11491 * server.c (extended_protocol): Make static.
11492 (attached): Define earlier.
11493 (exit_requested, response_needed, program_argv): New variables.
11494 (target_running): New.
11495 (start_inferior): Clear attached here.
11496 (attach_inferior): Set attached here.
11497 (require_running): Define.
11498 (handle_query): Use require_running and target_running. Implement
11500 (handle_v_attach, handle_v_run): New.
11501 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11502 (gdbserver_usage): Update.
11503 (main): Redo argument parsing. Handle --debug and --multi. Handle
11504 --attach along with other options or after the port. Save
11505 program_argv. Support no initial program. Resynchronize
11506 communication with GDB after an error. Handle "monitor exit".
11507 Use require_running and target_running. Always allow the extended
11508 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11509 restart in extended mode.
11510 * README: Refer to the GDB manual. Update --attach usage.
11512 2007-12-20 Andreas Schwab <schwab@suse.de>
11514 * linux-low.c (STACK_SIZE): Define.
11515 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11516 (linux_test_for_tracefork): Likewise.
11518 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11520 * linux-low.c (linux_wait_for_event): Update messages. Do not
11521 reinsert auto-delete breakpoints.
11522 * mem-break.c (struct breakpoint): Change return type of handler to
11524 (set_breakpoint_at): Update handler type.
11525 (reinsert_breakpoint_handler): Return 1 instead of calling
11527 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11529 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11530 * mem-break.h (set_breakpoint_at): Update handler type.
11531 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11532 * win32-low.c (auto_delete_breakpoint): New.
11533 (get_child_debug_event): Use it.
11535 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11537 * configure.ac: Check for pread and pwrite.
11538 * hostio.c (handle_pread): Fall back to lseek and read.
11539 (handle_pwrite): Fall back to lseek and write.
11540 * config.in, configure: Regenerated.
11542 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11544 * server.c (myresume): Add own_buf argument.
11545 (main): Update calls.
11547 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11549 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11550 * remote-utils.c (remote_open): Do not call disable_async_io.
11551 (block_async_io): Delete.
11552 (unblock_async_io): Make static.
11553 (initialize_async_io): New.
11554 * server.c (handle_v_cont): Handle async I/O here.
11555 (myresume): Likewise. Move other common resume tasks here...
11556 (main): ... from here. Call initialize_async_io. Disable async
11557 I/O before the main loop.
11558 * server.h (initialize_async_io): Declare.
11559 (block_async_io, unblock_async_io): Delete prototypes.
11560 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11562 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11564 * remote-utils.c (readchar): Allow binary data in received messages.
11566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11568 * win32-low.c (attaching): New global.
11569 (win32_create_inferior): Clear the `attaching' global.
11570 (win32_attach): Set the `attaching' global.
11571 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11572 attaching. Only set a breakpoint at the entry point if not
11575 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11577 * server.c (main): Don't report dll events on the initial
11578 connection on attaches.
11580 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11582 * server.c (main): Relax numerical bases supported for the pid of
11583 the --attach command line argument.
11585 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11587 * win32-low.c (win32_attach): Call OpenProcess before
11588 DebugActiveProcess, not after. Add last error output to error
11591 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11593 * win32-low.c (win32_get_thread_context)
11594 (win32_set_thread_context): New functions.
11595 (thread_rec): Use win32_get_thread_context.
11596 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11597 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11600 2007-12-03 Leo Zayas
11601 Pedro Alves <pedro_alves@portugalmail.pt>
11603 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11605 (child_add_thread): Minor cleanup.
11606 (child_continue): Resume artificially suspended threads before
11607 calling ContinueDebugEvent.
11608 (suspend_one_thread): New.
11609 (fake_breakpoint_event): New.
11610 (get_child_debug_event): Change return type to int. Check here if
11611 gdb sent an interrupt request. If a soft interrupt was requested,
11612 fake a breakpoint event. Return 0 if there is no event to handle,
11614 (win32_wait): Don't check here if gdb sent an interrupt request.
11615 Ensure there is a valid event to handle.
11616 (win32_request_interrupt): Add soft interruption method as last
11619 2007-12-03 Leo Zayas
11620 Pedro Alves <pedro_alves@portugalmail.pt>
11622 * win32-low.h (win32_thread_info): Add descriptions to the
11623 structure members. Replace `suspend_count' counter by a
11625 * win32-low.c (thread_rec): Update condition of when to get the
11626 context from the inferior. Rely on ContextFlags being set if it
11627 has already been retrieved. Only suspend the inferior thread if
11628 we haven't already. Warn if that fails.
11629 (continue_one_thread): s/suspend_count/suspended/. Only call
11630 ResumeThread once. Warn if that fails.
11632 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11634 * win32-low.c (win32_wait): Don't read from the inferior when it
11635 has already exited.
11637 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11639 * Makefile.in (win32_low_h): New variable.
11640 (win32-low.o): Add dependency on $(win32_low_h).
11641 (win32-arm-low.o, win32-i386-low.o): New rules.
11643 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11645 * hostio.c: Correct copyright year.
11647 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11649 * Makefile.in (OBS): Add hostio.o.
11650 (hostio.o): New rule.
11651 * server.h (handle_vFile): Declare.
11652 * hostio.c: New file.
11653 * server.c (handle_v_requests): Take packet_len and new_packet_len
11654 for binary packets. Call handle_vFile.
11655 (main): Update call to handle_v_requests.
11657 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11659 * linux-low.c: Include <sched.h>.
11661 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11663 * linux-low.c (linux_tracefork_grandchild): New.
11664 (linux_tracefork_child): Use clone.
11665 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11667 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11669 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11671 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11673 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11675 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11677 * inferiors.c (change_inferior_id): Delete.
11678 (add_pid_to_list, pull_pid_from_list): New.
11679 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11680 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11681 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11682 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11683 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11684 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11685 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11686 (using_threads): Always set to 1.
11687 (handle_extended_wait): New.
11688 (add_process): Do not set TID.
11689 (linux_create_inferior): Set must_set_ptrace_flags.
11690 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11691 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11692 (linux_thread_alive): Rename TID argument to LWPID.
11693 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11694 (linux_wait_for_event): Do not use TID or check using_threads. Update
11695 call to dead_thread_notify. Call handle_extended_wait.
11696 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11697 (send_sigstop): Delete sigstop_sent.
11698 (wait_for_sigstop): Avoid TID.
11699 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11700 (linux_test_for_tracefork): New.
11701 (linux_lookup_signals): Use thread_db_active and
11702 linux_supports_tracefork_flag.
11703 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11704 * linux-low.h (get_process_thread): Avoid TID.
11705 (struct process_ifo): Move thread_known and tid to the end. Remove
11707 (linux_attach_lwp, thread_db_init): Update prototypes.
11708 * server.h (change_inferior_id): Delete prototype.
11709 (add_pid_to_list, pull_pid_from_list): New prototypes.
11710 * thread-db.c (thread_db_use_events): New.
11711 (find_first_thread): Rename to...
11712 (find_one_thread): ...this. Update callers and messages. Do not
11713 call fatal. Check thread_db_use_events. Do not call
11714 change_inferior_id or new_thread_notify.
11715 (maybe_attach_thread): Update. Do not call new_thread_notify.
11716 (thread_db_init): Set thread_db_use_events. Check use_events.
11717 * utils.c (fatal, warning): Correct message prefix.
11719 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11721 * Makefile.in (clean): Remove new files.
11722 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11723 (powerpc-64.o, powerpc-64.c): New rules.
11724 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11725 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11727 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11729 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11730 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11731 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11732 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11733 (target_regsets): Add AltiVec and SPE register sets.
11734 * configure.ac: Check for AltiVec and SPE.
11735 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11736 (ppc_fill_vrregset, ppc_store_vrregset): New.
11737 (target_regsets): Add AltiVec register set.
11738 * configure: Regenerated.
11740 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11742 * linux-low.c (O_LARGEFILE): Define.
11743 (linux_read_memory): Use /proc/PID/mem.
11744 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11745 * configure, config.in: Regenerated.
11747 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11749 * linux-low.c (linux_wait_for_event): Do not pass signals while
11752 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11754 * win32-low.c (create_process): New.
11755 (win32_create_inferior): Use create_process instead of
11756 CreateProcess. If create_process failed retry appending an ".exe"
11757 suffix. Store the GetLastError result immediatelly after
11758 create_process calls and use it on the call to error.
11760 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11762 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11764 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11766 * configure.ac: Switch license to GPLv3.
11768 2007-08-01 Michael Snyder <msnyder@access-company.com>
11770 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11772 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11774 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11776 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11777 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11778 CloseToolhelp32Snapshot.
11779 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11780 CloseToolhelp32Snapshot.
11782 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11784 * server.c (main): Check for inferior exit before main loop.
11786 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11788 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11789 instead of on tmp_desc.
11791 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11792 Daniel Jacobowitz <dan@codesourcery.com>
11794 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11795 (add_thread): Minor cleanups.
11796 (clear_inferiors): Move lower in the file. Clear the DLL
11798 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11799 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11800 (xml_escape_text): New.
11801 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11803 (handle_v_cont): Report errors.
11804 (gdbserver_version): Update.
11805 (main): Correct size of own_buf. Do not report initial DLL events.
11806 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11807 (unloaded_dll, xml_escape_text): New.
11808 * win32-low.c (enum target_waitkind): Update comments.
11809 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11810 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11811 (win32_EnumProcessModules, win32_GetModuleInformation)
11812 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11813 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11814 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11815 (win32_Module32First, win32_Module32Next, load_toolhelp)
11816 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11817 (get_child_debug_event): Handle DLL events.
11818 (win32_wait): Likewise.
11820 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11822 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11823 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11825 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11827 * win32-low.c (handle_output_debug_string): Ignore event if not
11830 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11832 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11834 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11836 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11838 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11840 * inferiors.c (change_inferior_id): Add comment.
11841 * linux-low.c (check_removed_breakpoint): Add an early
11842 prototype. Improve debug output.
11843 (linux_attach): Doc update.
11844 (linux_detach_one_process, linux_detach): Clean up before releasing
11846 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11847 * linux-low.h (struct process_info): Doc improvement.
11848 * mem-break.c (delete_all_breakpoints): New.
11849 * mem-break.h (delete_all_breakpoints): New prototype.
11850 * thread-db.c (find_first_thread): New.
11851 (thread_db_create_event): Call it instead of
11852 thread_db_find_new_threads. Clean up unused variables.
11853 (maybe_attach_thread): Remove first thread handling.
11854 (thread_db_find_new_threads): Use find_first_thread.
11855 (thread_db_get_tls_address): Likewise.
11857 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11859 * thread-db.c (thread_db_find_new_threads): Add prototype.
11860 (thread_db_create_event): Check for the main thread before adding
11862 (maybe_attach_thread): Only enable event reporting if TID == 0.
11863 (thread_db_get_tls_address): Check for new threads.
11865 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11867 * linux-low.c (linux_create_inferior): Try execv before execvp.
11868 * spu-low.c (spu_create_inferior): Likewise.
11870 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11872 * linux-low.c (linux_create_inferior): Change execv to execvp.
11873 * spu-low.c (spu_create_inferior): Likewies.
11875 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11877 * Makefile.in (clean): Clean new files instead of deleted ones.
11878 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11879 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11881 * configure.srv: Specify XML files and new regformats for MIPS and
11883 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11884 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11885 an entry for the restart register.
11886 (mips_cannot_fetch_register, mips_cannot_store_register)
11887 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11888 register names to match the XML descriptions.
11889 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11890 restart register instead of $0.
11892 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11893 Markus Deuling <deuling@de.ibm.com>
11895 * remote-utils.c (decode_xfer_write): New function.
11896 * server.h (decode_xfer_write): Add prototype.
11897 * server.c (handle_query): Add PACKET_LEN argument. Support
11898 qXfer:spu:read and qXfer:spu:write packets.
11899 (main): Pass packet_len to handle_query.
11900 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11901 * target.h (target_ops): Add qxfer_spu.
11903 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11905 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11906 accessing non-seekable spufs files.
11908 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11910 * server.c (handle_query): Add reply for qC packet.
11912 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11913 Leo Zayas <lerele@champenstudios@com>
11915 * server.h (check_remote_input_interrupt_request): New function.
11916 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11917 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11918 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11919 (check_remote_input_interrupt_request): New function.
11920 * server.h (check_remote_input_interrupt_request): Declare.
11921 * win32-low.c (winapi_DebugBreakProcess,
11922 winapi_GenerateConsoleCtrlEvent): New typedefs.
11923 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11925 (win32_wait): Check for remote interrupt request
11926 with check_remote_input_interrupt_request.
11927 (win32_request_interrupt): New function.
11928 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11932 * win32-low.c (debug_registers_changed,
11933 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11934 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11935 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11936 (thread_rec): Get context using the low target.
11937 (child_add_thread): Call thread_added on the low target,
11938 which does the same thing.
11940 (do_initial_child_stuff): Remove debug registers references.
11941 Set context using the low target. Resume threads after
11942 setting the contexts.
11943 (child_continue): Remove dead variable. Remove debug
11944 registers references.
11945 (child_fetch_inferior_registers): Go through the low target.
11946 (do_child_store_inferior_registers): Remove.
11947 (child_store_inferior_registers): Go through the low target.
11948 (win32_resume): Remove debug registers references.
11949 Set context using the low target.
11950 (handle_exception): Change return type to void. Don't record
11951 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11952 first chance exception.
11953 (get_child_debug_event): Change return type to void. Remove
11954 goto loop. Always return after waiting for debug event.
11955 (win32_wait): Convert to switch statement. Handle spurious
11958 * win32-i386-low.c (debug_registers_changed,
11959 debug_registers_used): New.
11960 (initial_stuff): Rename to ...
11961 (i386_initial_stuff): ... this. Clear debug registers
11963 (store_debug_registers): Delete.
11964 (i386_get_thread_context): New.
11965 (load_debug_registers): Delete.
11966 (i386_set_thread_context): New.
11967 (i386_thread_added): New.
11968 (single_step): Rename to ...
11969 (i386_single_step): ... this.
11970 (do_fetch_inferior_registers): Rename to ...
11971 (i386_fetch_inferior_register): ... this.
11972 (i386_store_inferior_register): New.
11973 (the_low_target): Adapt to new interface.
11975 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11976 (arm_get_thread_context): New.
11977 (arm_set_thread_context): New.
11979 (do_fetch_inferior_registers): Rename to ...
11980 (arm_fetch_inferior_register): ... this.
11981 (arm_store_inferior_register): New.
11982 (arm_wince_breakpoint): Reimplement as unsigned long.
11983 (arm_wince_breakpoint_len): Define.
11984 (the_low_target): Adapt to new interface.
11986 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11987 load_debug_registers. Add get_thread_context, set_thread_context,
11988 thread_added and store_inferior_register. Rename
11989 fetch_inferior_registers to fetch_inferior_register.
11990 (regptr): Remove declaration.
11992 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11994 * linux-low.c (linux_detach): Change return type to int. Return 0.
11995 * spu-low.c (spu_detach): Likewise.
11997 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11999 * target.h (target_ops): Change return type of detach to int.
12001 (join_inferior): New.
12002 * server.c (main): Don't skip detach support on mingw32.
12003 If the inferior doesn't support detaching return error.
12004 Call join_inferior instead of using waitpid.
12005 * linux-low.c (linux_join): New.
12006 (linux_target_op): Add linux_join.
12007 * spu-low.c (spu_join): New.
12008 (spu_target_ops): Add spu_join.
12009 * win32-low.c (win32_detach): Adapt to new interface.
12010 Reopen current_process_handle before detaching. Issue a child
12011 resume before detaching.
12013 (win32_target_op): Add win32_join.
12015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12017 * win32-low.c (win32-attach): Fix return value.
12018 * target.h (target_ops): Describe ATTACH return values.
12020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12022 * win32-low.c (GETPROCADDRESS): Define.
12023 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12024 (winapi_DebugSetProcessKillOnExit): Likewise.
12025 (win32_create_inferior): Force usage of ansi CreateProcessA.
12026 (win32_attach): Use GETPROCADDRESS.
12027 (win32_detach): Likewise.
12029 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12031 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12033 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12035 * win32-low.c: Commit leftover changes from 2007-03-29.
12037 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12040 fields short instead of int. Add explicit padding.
12041 (i387_cache_to_fsave): Remove unnecessary casts.
12042 (i387_fsave_to_cache): Doc fix.
12043 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12045 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12047 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12048 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12050 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12052 * configure.srv (arm*-*-mingw32ce*): Move near the other
12055 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12057 * configure.ac: Add errno checking.
12058 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12059 sys/file.h and malloc.h.
12060 (AC_CHECK_DECLS): Add perror.
12061 (srv_mingwce): Handle.
12062 * configure.srv (i[34567]86-*-cygwin*): Add
12063 win32-i386-low.o to srv_tgtobj.
12064 (i[34567]86-*-mingw*): Likewise.
12065 (arm*-*-mingw32ce*): Add case.
12066 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12067 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12068 [__MINGW32CE__] (strerror): New function.
12069 [__MINGW32CE__] (errno): Define to GetLastError.
12070 [__MINGW32CE__] (COUNTOF): New macro.
12071 (remote_open): Remove extra close call.
12072 * mem-break.c (delete_breakpoint_at): New function.
12073 * mem-break.h (delete_breakpoint_at): Declare.
12074 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12075 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12076 [USE_WIN32API] (read, write): Add char* casts.
12077 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12078 * server.h: Include wincecompat.h on Windows CE.
12079 [HAVE_ERRNO_H]: Check.
12080 (perror): Declare if not declared.
12081 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12082 (perror_with_name): Remove errno declaration.
12083 * wincecompat.h: New.
12084 * wincecompat.c: New.
12085 * win32-low.h: New.
12086 * win32-arm-low.c: New.
12087 * win32-i386-low.c: New.
12088 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12089 (OUTMSG2): Make it safe.
12091 (COUNTOF): New macro.
12092 (NUM_REGS): Get it from the low target.
12093 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12094 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12095 (thread_rec): Let low target handle debug registers.
12096 (child_add_thread): Likewise.
12097 (child_init_thread_list): Likewise.
12098 (continue_one_thread): Likewise.
12100 (do_child_fetch_inferior_registers): Move to ...
12101 * win32-i386-low.c: ... here, and rename to ...
12102 (do_fetch_inferior_registers): ... this.
12103 * win32-low.c (child_fetch_inferior_registers):
12104 Go through the low target.
12105 (do_child_store_inferior_registers): Use regptr.
12106 (strwinerror): New function.
12107 (win32_create_inferior): Handle Windows CE.
12108 Use strwinerror instead of strerror on Windows error
12109 codes. Add program to the error output.
12110 Don't close the main thread handle on Windows CE.
12111 (win32_attach): Use coredll.dll on Windows CE.
12112 (win32_kill): Close current process and current
12114 (win32_detach): Use coredll.dll on Windows CE.
12115 (win32_resume): Let low target handle debug registers, and
12117 (handle_exception): Add/Remove initial breakpoint. Avoid
12118 non-existant WSTOPSIG on Windows CE.
12119 (win32_read_inferior_memory): Cast to remove warning.
12120 (win32_arch_string): Go through the low target.
12121 (initialize_low): Call set_breakpoint_data with the low
12122 target's breakpoint.
12123 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12124 FOP_REGNUM, mappings): Move to ...
12125 * win32-i386-low.c: ... here.
12126 * win32-low.c (win32_thread_info): Move to ...
12127 * win32-low.h: ... here.
12128 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12129 win32-arm-low.c and wincecompat.c.
12130 (all:): Add $EXEEXT.
12131 (install-only:): Likewise.
12132 (gdbserver:): Likewise.
12133 (gdbreplay:): Likewise.
12134 * config.in: Regenerate.
12135 * configure: Regenerate.
12137 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12139 * win32-low.c: Rename typedef thread_info to
12140 win32_thread_info throughout.
12142 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12144 * win32-i386-low.c: Rename to ...
12145 * win32-low.c: ... this.
12146 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12147 * Makefile.in: Likewise.
12149 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12151 * remote-utils.c (monitor_output): Constify msg parameter.
12152 * server.h (monitor_output): Likewise.
12153 * win32-i386-low.c (handle_output_debug_string): New.
12154 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12155 handle_output_debug_string.
12156 (get_child_debug_event): Likewise.
12158 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12160 * server.c (main): Correct strtoul check.
12162 2007-03-27 Jon Ringle <jon@ringle.org>
12164 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12166 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12168 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12170 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12172 * terminal.h: Check HAVE_SGTTY_H.
12174 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12176 * remote-utils.c (remote_open): Print out the assigned port number.
12178 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12180 * remote-utils.c (monitor_output): New function.
12181 * server.c (debug_threads): Define here.
12182 (monitor_show_help): New function.
12183 (handle_query): Handle qRcmd.
12184 (main): Do not handle 'd' packet.
12185 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12186 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12189 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12191 * Makefile.in (EXEEXT): New.
12192 (clean): Use $(EXEEXT).
12194 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12196 * target.h (target_ops): Rename send_signal to request_interrupt,
12197 and remove enum target_signal parameter.
12198 * linux-low.c (linux_request_interrupt): Rename from
12199 linux_send_signal, and always send SIGINT.
12200 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12201 and always send SIGINT.
12202 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12204 (input_interrupt): Likewise.
12206 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12208 * server.c (get_features_xml): Check if target implemented
12210 * win32-i386-low.c (win32_arch_string): New.
12211 (win32_target_ops): Add win32_arch_string as arch_string member.
12213 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12215 * spu-low.c (spu_arch_string): New.
12216 (spu_target_ops): Add spu_arch_string.
12218 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12220 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12221 * configure.ac: Do not check for terminal.h.
12222 * configure, config.in: Regenerated.
12224 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12226 * Makefile.in (OBS): Add $(XML_BUILTIN).
12227 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12229 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12230 (arm-with-iwmmxt.c): New.
12231 * config.in, configure: Regenerate.
12232 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12233 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12234 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12235 (arm*-*-linux*): Add iWMMXt and regset support.
12236 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12237 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12238 (arm_store_wmmxregset, target_regsets): New.
12239 * server.c (get_features_xml): Take annex argument. Check builtin
12241 (handle_query): Handle multiple annexes.
12243 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12245 * remote-utils.c [USE_WIN32API] (read, write): Define.
12246 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12249 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12251 * linux-i386-low.c (the_low_target): Set arch_string.
12252 * linux-x86-64-low.c (the_low_target): Likewise.
12253 * linux-low.c (linux_arch_string): New.
12254 (linux_target_ops): Add it.
12255 * linux-low.h (struct linux_target_ops): Add arch_string.
12256 * server.c (write_qxfer_response): Use const void * for DATA.
12257 (get_features_xml): New.
12258 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12259 * target.h (struct target_ops): Add arch_string method.
12261 2007-01-03 Denis Pilat <denis.pilat@st.com>
12262 Daniel Jacobowitz <dan@codesourcery.com>
12264 * linux-low.c (linux_kill): Handle being called with no threads.
12265 * win32-i386-low.c (win32_kill): Likewise.
12266 (get_child_debug_event): Clear current_process_handle.
12268 2006-12-30 Denis PILAT <denis.pilat@st.com>
12269 Daniel Jacobowitz <dan@codesourcery.com>
12271 * remote-utils.c (remote_open): Check the type of specified
12272 serial port devices before opening them.
12273 * server.c (main): Kill the inferior if an error occurs during
12274 the first remote_open.
12276 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12278 * README: Update supported targets.
12280 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12282 * Makefile.in (clean): Remove reg-mips64.c.
12283 (reg-mips64.c, reg-mips64.o): New rules.
12284 * configure.srv: Handle mips64. Include regset support for mips.
12285 * linux-mips-low.c (union mips_register): New.
12286 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12287 (mips_breakpoint, mips_breakpoint_at): Use int.
12288 (mips_collect_register, mips_supply_register)
12289 (mips_collect_register_32bit, mips_supply_register_32bit)
12290 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12291 (mips_store_fpregset, target_regsets): New.
12292 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12294 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12296 * configure.srv: Add target "spu*-*-*".
12297 * Makefile.in (clean): Remove reg-spu.c.
12298 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12299 * spu-low.c: New file.
12301 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12303 * configure.ac: Correct td_thr_tls_get_addr test.
12304 * configure: Regenerated.
12306 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12308 * linux-low.c (linux_wait_for_event): Reformat. Use the
12309 pass_signals array.
12310 * remote-utils.c (decode_address_to_semicolon): New.
12311 * server.c (pass_signals, handle_general_set): New.
12312 (handle_query): Mention QPassSignals for qSupported.
12313 (main): Call handle_general_set.
12314 * server.h (pass_signals, decode_address_to_semicolon): New.
12316 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12318 * server.c (handle_query): Correct error handling for read_auxv.
12320 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12322 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12323 and srv_linux_thread_db to yes.
12324 * linux-s390-low.c (s390_fill_gregset): New function.
12325 (target_regsets): Define data structure.
12327 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12329 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12330 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12331 * config.in, configure: Regenerated.
12332 * inferiors.c (gdb_id_to_thread): New function.
12333 (gdb_id_to_thread_id): Use it.
12334 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12335 * linux-low.h (struct process_info): Add th member.
12336 (thread_db_get_tls_address): New prototype.
12337 * remote-utils.c (decode_address): Make non-static.
12338 * server.c (handle_query): Handle qGetTLSAddr.
12339 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12340 * target.h (struct target_ops): Add get_tls_address.
12341 * thread-db.c (maybe_attach_thread): Save the thread handle.
12342 (thread_db_get_tls_address): New.
12344 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12346 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12347 (linux_resume_one_process): Take a siginfo_t *. Update all
12348 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12349 (struct pending_signals): Add a siginfo_t.
12350 (linux_wait_for_process): Always set last_status.
12351 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12352 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12353 * linux-low.h (struct process_info): Add last_status.
12355 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12357 * remote-utils.c (try_rle): New function.
12358 (putpkt_binary): Use it.
12360 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12362 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12363 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12364 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12365 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12366 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12369 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12371 * server.c (terminal_fd): New variable.
12372 (old_foreground_pgrp): Likewise.
12373 (restore_old_foreground_pgrp): New function.
12374 (start_inferior): Record the terminal file descriptor in terminal_fd
12375 and its original foreground group in old_foreground_pgrp. Register
12376 restore_old_foreground_pgrp with atexit().
12378 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12380 * server.c (handle_query): Correct qPart to qXfer.
12382 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12384 * configure.ac: Check for more headers which are missing on
12385 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12386 * configure.srv: Add Cygwin and mingw32.
12387 * remote-utils.c: Don't include headers unconditionally which
12388 are missing on mingw32. Include <winsock.h> for mingw32.
12389 (remote_open): Adjust for mingw32 support. Flush
12390 standard error after writing to it.
12391 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12392 (unblock_async_io, enable_async_io, disable_async_io)
12393 (readchar, getpkt): Update for Winsock support.
12394 (prepare_resume_reply): Expect a protocol signal number.
12395 * server.c: Disable <sys/wait.h> on mingw32.
12396 (start_inferior): Adjust for mingw32 support. Flush
12397 standard error after writing to it.
12398 (attach_inferior): Likewise. Use protocol signal
12400 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12402 * win32-i386-low.c: New file.
12403 * Makefile.in (XM_CLIBS): Set.
12404 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12405 (win32-i386-low.o): New dependency rule.
12406 * linux-low.c (linux_wait): Use target signal numbers.
12407 * target.h (struct target_ops): Doc fix.
12408 * server.h (target_signal_to_name): New prototype.
12409 * gdbreplay.c: Don't include headers unconditionally which
12410 are missing on mingw32. Include <winsock.h> for mingw32.
12411 (remote_close, remote_open): Adjust for Winsock support.
12412 * configure, config.in: Regenerated.
12414 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12416 * server.c (decode_xfer_read, write_qxfer_response): New.
12417 (handle_query): Take a packet length argument. Handle
12418 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12419 the qSupported response.
12420 (main): Update call to handle_query.
12422 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12424 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12425 (putpkt_binary): Renamed from putpkt and adjusted for binary
12427 (putpkt): New wrapper for putpkt_binary.
12428 (readchar): Don't mask off the high bit.
12429 (decode_X_packet): New function.
12430 * server.c (main): Call putpkt_binary if a handler sets the packet
12431 length. Save the length of the incoming packet. Handle 'X'.
12432 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12434 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12436 * server.c (handle_query): Handle qSupported.
12438 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12440 * remote-utils.c (all_symbols_looked_up): New variable.
12441 (look_up_one_symbol): Check it.
12442 * server.h (look_up_one_symbol): New declaration.
12443 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12445 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12447 * Makefile.in (linux-arm-low.o): Update dependencies.
12448 * linux-arm-low.c: Include "gdb_proc_service.h".
12449 (PTRACE_GET_THREAD_AREA): Define.
12450 (ps_get_thread_area): New function.
12452 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12454 * configure.srv (m68k*-*-uclinux*): New target.
12455 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12456 (linux_resume_one_process): Remove extraneous cast.
12457 (linux_read_offsets): New.
12458 (linux_target_op): Add linux_read_offsets on mmuless systems.
12459 * server.c (handle_query): Add qOffsets logic.
12460 * target.h (struct target_ops): Add read_offsets.
12462 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12464 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12465 (PTRACE_GET_THREAD_AREA): Define.
12466 (ps_get_thread_area): New function.
12467 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12468 (linux-x86-64-low.o): Update.
12470 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12472 * configure.ac: Remove checks for prfpregset_t.
12473 * gdb_proc_service.h: New file.
12474 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12475 new "gdb_proc_service.h".
12476 * proc-service.c: Likewise.
12477 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12478 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12479 * Makefile.in (gdb_proc_service_h): Updated.
12480 * configure, config.in: Regenerated.
12482 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12484 * remote-utils.c (prepare_resume_reply): Move declaration
12485 of gdb_id_from_wait to the top of the block.
12487 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12489 * linux-low.c (regsets_store_inferior_registers): Read the regset
12490 from the target before filling it.
12492 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12494 * server.c (attach_inferior): Return SIGTRAP for a successful
12497 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12499 * Makefile.in (OBS): Add version.o.
12500 (STAGESTUFF): Delete.
12501 (version.o): Add dependencies.
12502 (version.c): Replace rule.
12503 (clean): Remove version.c.
12504 * server.c (gdbserver_version): New.
12505 (gdbserver_usage): Use printf.
12506 (main): Handle --version and --help.
12507 * server.h (version, host_name): Add declarations.
12509 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12521 * linux-x86-64-low.c:
12523 * linux-s390-low.c:
12524 * linux-ppc64-low.c:
12526 * linux-mips-low.c:
12527 * linux-m68k-low.c:
12528 * linux-m32r-low.c:
12531 * linux-ia64-low.c:
12532 * linux-i386-low.c:
12533 * linux-crisv32-low.c:
12545 * gdbserver.1: Add (C) after Copyright. Update the FSF
12548 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12550 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12551 (arm_breakpoint_at): Recognize both breakpoints.
12552 (the_low_target): Use the correct breakpoint instruction.
12554 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12556 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12557 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12558 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12559 (the_low_target): Update.
12561 2005-10-25 Andreas Schwab <schwab@suse.de>
12563 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12565 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12566 (ia64_num_regs): Reduce to 462.
12568 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12570 * acinclude.m4: Correct quoting.
12571 * aclocal.m4: Regenerated.
12573 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12574 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12575 (thread_db_init): Call thread_db_err_str.
12576 * configure.ac: Check for TD_VERSION.
12577 * config.in, configure: Regenerated.
12579 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12581 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12583 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12585 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12586 is not available. Define HAVE_PTRACE_GETREGS if it is.
12587 * config.in, configure: Regenerated.
12588 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12589 * linux-i386-low.c, linux-m68k-low.c: Update to use
12590 HAVE_PTRACE_GETREGS.
12591 * linux-low.c (regsets_fetch_inferior_registers)
12592 (regsets_store_inferior_registers): Only return 0 if we processed
12594 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12595 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12597 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12599 * inferiors.c (struct thread_info): Add gdb_id.
12600 (add_thread): Add gdb_id argument.
12601 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12602 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12603 calls to add_thread.
12604 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12605 * server.c (handle_query): Use thread_to_gdb_id.
12606 (handle_v_cont, main): Use gdb_id_to_thread_id.
12607 * server.h (add_thread): Update prototype.
12608 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12611 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12613 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12614 left-padded registers.
12615 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12616 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12618 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12620 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12621 * configure: Regenerate.
12622 * config.in: Regenerate.
12623 * server.h (NEED_DECLARATION_STRERROR):
12624 Replace with !HAVE_DECL_STRERROR.
12626 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12628 * linux-low.c (linux_wait, linux_send_signal): Don't test
12629 an unsigned long variable for > 0 if it could be MAX_ULONG.
12630 * server.c (myresume): Likewise.
12631 * target.c (set_desired_inferior): Likewise.
12633 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12635 * configure.ac: Simplify and improve check for socklen_t.
12636 * configure, config.in: Regenerate.
12638 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12640 * acconfig.h: Remove.
12641 * configure.ac: Add a test for socklen_t. Use three-argument
12642 AC_DEFINE throughout.
12643 * config.in: Regenerated using autoheader 2.59.
12644 * configure: Regenerated.
12646 * gdbreplay.c (socklen_t): Provide a default.
12647 (remote_open): Use socklen_t.
12648 * remote-utils.c (socklen_t): Provide a default.
12649 (remote_open): Use socklen_t.
12650 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12653 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12655 * linux-low.c (linux_read_memory, linux_write_memory)
12656 (linux_read_auxv): Likewise.
12657 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12658 (check_mem_write): Likewise.
12659 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12661 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12662 (registers_from_string, register_data): Likewise.
12663 * server.c (handle_query, main): Likewise.
12664 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12665 (decode_M_packet): Likewise.
12666 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12667 * target.h (struct target_ops): Update read_memory, write_memory,
12669 (read_inferior_memory, write_inferior_memory): Update.
12670 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12671 to unsigned char *.
12672 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12673 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12674 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12675 linux-s390-low.c, linux-sh-low.c: Update for changes in
12676 read_inferior_memory and the_low_target->breakpoint.
12678 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12680 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12681 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12682 * configure.srv: Add powerpc64-*-linux*.
12683 * linux-ppc64-low.c: New file.
12685 2005-05-23 Orjan Friberg <orjanf@axis.com>
12687 * linux-cris-low.c: New file with support for CRIS.
12688 * linux-crisv32-low.c: Ditto for CRISv32.
12689 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12690 (clean): Add reg-cris.c and reg-crisv32.c.
12691 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12692 reg-crisv32.o, and reg-crisv32.c to make rules.
12693 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12694 recognized targets.
12696 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12698 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12699 of sizeof (PTRACE_XFER_TYPE).
12700 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12702 2005-05-12 Orjan Friberg <orjanf@axis.com>
12704 * target.h (struct target_ops): Add insert_watchpoint,
12705 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12706 pointers for hardware watchpoint support.
12707 * linux-low.h (struct linux_target_ops): Ditto.
12708 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12709 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12710 to linux_target_ops.
12711 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12713 * server.c (main): Recognize 'Z' and 'z' packets.
12715 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12717 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12718 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12719 (the_low_target): Add new members.
12721 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12723 * proc-service.c (ps_lgetregs): Search all_processes instead of
12726 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12728 * server.c (start_inferior): Change return type to int.
12729 (attach_inferior): Change sigptr to int *.
12730 (handle_v_cont, handle_v_requests): Change signal to int *.
12731 (main): Change signal to int.
12733 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12735 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12736 * configure.srv: Add m32r*-*-linux*.
12737 * linux-m32r-low.c: New file.
12739 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12741 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12743 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12745 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12746 Take unsigned long arguments for PIDs.
12747 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12748 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12749 (wait_for_sigstop, linux_resume_one_process)
12750 (regsets_fetch_inferior_registers, linux_send_signal)
12751 (linux_read_auxv): Likewise. Update the types of variables holding
12752 PIDs. Update format string specifiers.
12753 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12754 * remote-utils.c (prepare_resume_reply): Likewise.
12755 * server.c (cont_thread, general_thread, step_thread)
12756 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12758 (handle_query): Update format specifiers.
12759 (handle_v_cont, main): Use strtoul for thread IDs.
12760 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12761 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12762 (general_thread, step_thread, thread_from_wait)
12763 (old_thread_from_wait): Update.
12764 * target.h (struct thread_resume): Use unsigned long for THREAD.
12765 (struct target_ops): Use unsigned long for arguments to attach and
12768 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12770 * acinclude.m4: Include bfd/bfd.m4 directly.
12771 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12772 <agriffis@toolchain.org>.
12773 * aclocal.m4, configure: Regenerated.
12775 2005-01-07 Andrew Cagney <cagney@gnu.org>
12777 * configure.ac: Rename configure.in, require autoconf 2.59.
12778 * configure: Re-generate.
12780 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12782 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12783 LIBS when finished.
12784 * aclocal.m4: Regenerated.
12785 * configure: Regenerated.
12787 2004-11-21 Andreas Schwab <schwab@suse.de>
12789 * linux-m68k-low.c (m68k_num_gregs): Define.
12790 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12791 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12792 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12793 (m68k_breakpoint_at): New. Add to the_low_target.
12795 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12796 srv_linux_thread_db to yes.
12798 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12800 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12801 (ARCH_SET_FS): Likewise.
12802 (ARCH_GET_FS): Likewise.
12803 (ARCH_GET_GS): Likewise.
12805 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12807 * linux-i386-low.c (ps_get_thread_area): New.
12808 * linux-x86-64-low.c (ps_get_thread_area): New.
12809 * linux-low.c: Include <sys/syscall.h>.
12810 (linux_kill_one_process): Don't kill the first thread here.
12811 (linux_kill): Kill the first thread here.
12812 (kill_lwp): New function.
12813 (send_sigstop, linux_send_signal): Use it.
12814 * proc-service.c: Clean up #ifdefs.
12815 (fpregset_info): Delete.
12816 (ps_lgetregs): Update and enable implementation.
12817 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12819 * remote-utils.c (struct sym_cache, symbol_cache): New.
12820 (input_interrupt): Print a clearer message.
12821 (async_io_enabled): New variable.
12822 (enable_async_io, disable_async_io): Use it. Update comments.
12823 (look_up_one_symbol): Use the symbol cache.
12824 * thread-db.c (thread_db_look_up_symbols): New function.
12825 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12827 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12829 * configure.in: Test for -rdynamic.
12830 * configure: Regenerated.
12831 * Makefile (INTERNAL_LDFLAGS): New.
12832 (gdbserver, gdbreplay): Use it.
12834 2004-09-02 Andrew Cagney <cagney@gnu.org>
12836 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12838 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12840 * linux-low.c (linux_wait): Clear all_processes list also.
12842 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12844 * linux-low.c: Include <errno.h>. Remove extern declaration of
12847 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12849 * gdbreplay.c, server.h, utils.c: Update copyright years.
12851 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12853 * server.c (main): Print child status or termination signal from
12854 variable 'signal', not 'sig'.
12856 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12858 * linux-low.c (linux_read_memory): Change return type to
12859 int. Check for and return error from ptrace().
12860 * target.c (read_inferior_memory): Change return type to int. Pass
12861 back return status from the_target->read_memory().
12862 * target.h (struct target_ops): Adapt *read_memory() prototype.
12864 (read_inferior_memory): Adapt prototype.
12865 * server.c (main): Return an error packet if
12866 read_inferior_memory() returns an error.
12868 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12870 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12871 Unify with other clean targets.
12873 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12875 * server.c (handle_v_cont): Call set_desired_inferior.
12877 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12879 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12881 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12883 * linux-low.c (linux_wait): Unblock async I/O.
12884 (linux_resume): Block and enable async I/O.
12885 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12886 * server.h (block_async_io, unblock_async_io): Add prototypes.
12888 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12890 * remote-utils.c (remote_open): Print a status notice after
12891 opening a TCP port.
12892 * server.c (attach_inferior): Print a status notice after
12895 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12897 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12899 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12901 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12903 * server.c, target.h: Update copyright years.
12905 2004-02-25 Roland McGrath <roland@redhat.com>
12907 * target.h (struct target_ops): New member `read_auxv'.
12908 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12909 * linux-low.c (linux_read_auxv): New function.
12910 (linux_target_ops): Initialize `read_auxv' member to that.
12912 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12914 Committed by Jim Blandy <jimb@redhat.com>.
12916 * linux-s390-low.c (s390_num_regs): Update.
12917 (s390_regmap): Remove control registers. Use __s390x__ predefine
12918 instead of GPR_SIZE to distiguish s390 and s390x targets.
12920 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12922 * linux-low.c: Update copyright year.
12923 (check_removed_breakpoint): Clear pending_is_breakpoint.
12924 (linux_set_resume_request, linux_queue_one_thread)
12925 (resume_status_pending_p): New functions.
12926 (linux_continue_one_thread): Use process->resume.
12927 (linux_resume): Only resume threads if there are no pending events.
12928 * linux-low.h (struct process_info): Add resume request
12931 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12933 * regcache.c (new_register_cache): Clear the allocated register
12934 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12936 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12938 * linux-low.c (linux_resume): Take a struct thread_resume *
12940 (linux_wait): Update call.
12941 (resume_ptr): New static variable.
12942 (linux_continue_one_thread): Renamed from
12943 linux_continue_one_process. Use resume_ptr.
12944 (linux_resume): Use linux_continue_one_thread.
12945 * server.c (handle_v_cont, handle_v_requests): New functions.
12946 (myresume): New function.
12947 (main): Handle 'v' case.
12948 * target.h (struct thread_resume): New type.
12949 (struct target_ops): Change argument of "resume" to struct
12951 (myresume): Delete macro.
12953 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12955 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12956 (uninstall): Support DESTDIR.
12958 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12960 * configure.srv: Add xscale*linux copy of arm*linux entry.
12962 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12964 * linux-arm-low.c (arm_reinsert_addr): New function.
12965 (the_low_target): Add arm_reinsert_addr.
12967 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12969 * mem-break.c: Remove whitespace at end of file.
12971 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12973 * configure.in: Check whether we need to prototype strerror.
12974 * server.h: Optionally prototype strerror.
12975 * gdbreplay.c (perror_with_name): Use strerror.
12976 * linux-low.c (linux_attach_lwp): Use strerror.
12977 * utils.c (perror_with_name): Use strerror.
12978 * config.in, configure: Regenerated.
12980 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12982 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12983 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12985 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12987 * Makefile.in (SFILES): Update.
12988 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12989 low-sun3.c: Remove files.
12991 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12993 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12994 (linux_detach_one_process, linux_detach): New functions.
12995 (linux_target_ops): Add linux_detach.
12996 * server.c (main): Handle 'D' packet.
12997 * target.h (struct target_ops): Add "detach" member.
12998 (detach_inferior): Define.
13000 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13002 From Kelley Cook <kelleycook@wideopenwest.com>:
13003 * configure.srv: Accept i[34567]86 variants.
13005 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13007 * linux-low.c (linux_wait_for_event): Correct comment typos.
13008 (linux_resume_one_process): Call check_removed_breakpoint.
13009 (linux_send_signal): New function.
13010 (linux_target_ops): Add linux_send_signal.
13011 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13013 * target.h (struct target_ops): Add send_signal.
13015 2003-05-29 Jim Blandy <jimb@redhat.com>
13017 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13018 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13019 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13020 away part of the register's value.
13022 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13024 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13025 (linux_wait_for_event, linux_init_signals): Likewise.
13027 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13029 * configure.in: Check for stdlib.h.
13030 * configure: Regenerated.
13031 * config.in: Regenerated.
13033 2003-01-04 Andreas Schwab <schwab@suse.de>
13035 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13037 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13039 * Makefile.in: Remove obsolete code.
13041 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13043 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13044 defined(PT_FPR0_HI).
13046 2002-11-17 Stuart Hughes <seh@zee2.com>
13048 * linux-arm-low.c (arm_num_regs): Increase.
13049 (arm_regmap): Include status register.
13051 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13053 * linux-low.c (register_addr): Remove incorrect -1 check.
13055 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13057 * linux-low.c (linux_create_inferior): Call setpgid. Return
13059 (unstopped_p, linux_signal_pid): Remove.
13060 (linux_target_ops): Remove linux_signal_pid.
13061 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13062 global instead of target method.
13063 * target.h (struct target_ops): Remove signal_pid. Update comment
13064 for create_inferior.
13065 * server.c (signal_pid): New variable.
13066 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13067 gdbserver. Set the child to be the foreground process group.
13068 (attach_inferior): Set signal_pid.
13070 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13072 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13074 2002-08-20 Jim Blandy <jimb@redhat.com>
13076 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13079 2002-08-01 Andrew Cagney <cagney@redhat.com>
13081 * Makefile.in: Make chill references obsolete.
13083 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13085 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13086 * configure: Regenerate.
13087 * config.in: Regenerate.
13089 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13091 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13092 (perror_with_name, remote_close, remote_open, expect, play): Static.
13094 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13096 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13097 byte offsets instead of an array of indexes.
13098 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13100 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13102 * regcache.c: Add comment.
13104 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13106 * thread-db.c: New file.
13107 * proc-service.c: New file.
13108 * acinclude.m4: New file.
13109 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13110 proc-service.o, and thread-db.o.
13111 (linux-low.o): Add USE_THREAD_DB.
13112 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13113 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13114 * aclocal.m4: Regenerated.
13115 * config.in: Regenerated.
13116 * configure: Regenerated.
13117 * configure.in: Check for proc_service.h, sys/procfs.h,
13118 thread_db.h, and linux/elf.h headrs.
13119 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13120 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13121 Check for -lthread_db and thread support.
13122 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13123 PowerPC, and SuperH.
13124 * i387-fp.c: Constify arguments.
13125 * i387-fp.h: Likewise.
13126 * inferiors.c: (struct thread_info): Renamed from
13127 `struct inferior_info'. Remove PID member. Use generic inferior
13128 list header. All uses updated.
13129 (inferiors, signal_pid): Removed.
13130 (all_threads): New variable.
13131 (get_thread): Define.
13132 (add_inferior_to_list): New function.
13133 (for_each_inferior): New function.
13134 (change_inferior_id): New function.
13135 (add_inferior): Removed.
13136 (remove_inferior): New function.
13137 (add_thread): New function.
13138 (free_one_thread): New function.
13139 (remove_thread): New function.
13140 (clear_inferiors): Use for_each_inferior and free_one_thread.
13141 (find_inferior): New function.
13142 (find_inferior_id): New function.
13143 (inferior_target_data): Update argument type.
13144 (set_inferior_target_data): Likewise.
13145 (inferior_regcache_data): Likewise.
13146 (set_inferior_regcache_data): Likewise.
13147 * linux-low.c (linux_bp_reinsert): Remove.
13148 (all_processes, stopping_threads, using_thrads)
13149 (struct pending_signals, debug_threads, pid_of): New.
13150 (inferior_pid): Replace with macro.
13151 (struct inferior_linux_data): Remove.
13152 (get_stop_pc, add_process): New functions.
13153 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13154 Use add_process and add_thread.
13155 (linux_attach_lwp): New function, based on old linux_attach. Use
13156 add_process and add_thread. Set stop_expected for new threads.
13157 (linux_attach): New function.
13158 (linux_kill_one_process): New function.
13159 (linux_kill): Kill all LWPs.
13160 (linux_thread_alive): Use find_inferior_id.
13161 (check_removed_breakpoints, status_pending_p): New functions.
13162 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13163 Update. Use WNOHANG. Wait for cloned processes also. Update process
13164 struct for the found process.
13165 (linux_wait_for_event): New function.
13166 (linux_wait): Use it. Support LWPs.
13167 (send_sigstop, wait_for_sigstop, stop_all_processes)
13168 (linux_resume_one_process, linux_continue_one_process): New functions.
13169 (linux_resume): Support LWPs.
13170 (REGISTER_RAW_SIZE): Remove.
13171 (fetch_register): Use register_size instead. Call supply_register.
13172 (usr_store_inferior_registers): Likewise. Call collect_register.
13173 Fix recursive case.
13174 (regsets_fetch_inferior_registers): Improve error message.
13175 (regsets_store_inferior_registers): Add debugging.
13176 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13177 (unstopped_p, linux_signal_pid): New functions.
13178 (linux_target_ops): Add linux_signal_pid.
13179 (linux_init_signals): New function.
13180 (initialize_low): Call it. Initialize using_threads.
13181 * regcache.c (inferior_regcache_data): Add valid
13183 (get_regcache): Fetch registers lazily. Add fetch argument
13184 and update all callers.
13185 (regcache_invalidate_one, regcache_invalidate): New
13187 (new_register_cache): Renamed from create_register_cache.
13188 Return the new regcache.
13189 (free_register_cache): Change argument to a void *.
13190 (registers_to_string, registers_from_string): Call get_regcache
13191 with fetch flag set.
13192 (register_data): Make static. Pass fetch flag to get_regcache.
13193 (supply_register): Call get_regcache with fetch flag clear.
13194 (collect_register): Call get_regcache with fetch flag set.
13195 (collect_register_as_string): New function.
13196 * regcache.h: Update.
13197 * remote-utils.c (putpkt): Flush after debug output and use
13199 Handle input interrupts while waiting for an ACK.
13200 (input_interrupt): Use signal_pid method.
13201 (getpkt): Flush after debug output and use stderr.
13202 (outreg): Use collect_register_as_string.
13203 (new_thread_notify, dead_thread_notify): New functions.
13204 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13205 and general_thread.
13206 (look_up_one_symbol): Flush after debug output.
13207 * server.c (step_thread, server_waiting): New variables.
13208 (start_inferior): Don't use signal_pid. Update call to mywait.
13209 (attach_inferior): Update call to mywait.
13210 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13211 (main): Don't fetch/store registers explicitly. Use
13212 set_desired_inferior. Support proposed ``Hs'' packet. Update
13214 * server.h: Update.
13215 (struct inferior_list, struct_inferior_list_entry): New.
13216 * target.c (set_desired_inferior): New.
13217 (write_inferior_memory): Constify.
13218 (mywait): New function.
13219 * target.h: Update.
13220 (struct target_ops): New signal_pid method.
13221 (mywait): Removed macro, added prototype.
13223 * linux-low.h (regset_func): Removed.
13224 (regset_fill_func, regset_store_func): New.
13225 (enum regset_type): New.
13226 (struct regset_info): Add type field. Use new operation types.
13227 (struct linux_target_ops): stop_pc renamed to get_pc.
13228 Add decr_pc_after_break and breakpoint_at.
13229 (get_process, get_thread_proess, get_process_thread)
13230 (strut process_info, all_processes, linux_attach_lwp)
13231 (thread_db_init): New.
13233 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13234 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13235 (the_low_target): Add new members.
13236 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13237 (i386_store_fpxregset): Constify.
13238 (target_regsets): Add new kind identifier.
13239 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13240 (i386_set_pc): Add debugging.
13241 (i386_breakpoint_at): New function.
13242 (the_low_target): Add new members.
13243 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13244 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13245 (mips_breakpoint_at): New.
13246 (the_low_target): Add new members.
13247 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13248 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13249 (the_low_target): Add new members.
13250 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13251 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13252 (the_low_target): Add new members.
13253 * linux-x86-64-low.c (target_regsets): Add new kind
13256 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13258 From Martin Pool <mbp@samba.org>:
13259 * server.c (gdbserver_usage): New function.
13262 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13264 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13265 stop_at -> stop_pc.
13267 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13269 * Makefile.in: Remove obsolete code.
13271 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13273 * linux-low.c (regsets_fetch_inferior_registers),
13274 (regsets_store_inferior_registers): Removed cast to int from
13276 * regcache.h: Added declaration of struct inferior_info.
13278 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13280 * inferiors.c (struct inferior_info): Add regcache_data.
13281 (add_inferior): Call create_register_cache.
13282 (clear_inferiors): Call free_register_cache.
13283 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13284 * regcache.c (struct inferior_regcache_data): New.
13285 (registers): Remove.
13286 (get_regcache): New function.
13287 (create_register_cache, free_register_cache): New functions.
13288 (set_register_cache): Don't initialize the register cache here.
13289 (registers_to_string, registers_from_string, register_data): Call
13291 * regcache.h: Add prototypes.
13292 * server.h: Likewise.
13294 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13296 * mem-break.c: New file.
13297 * mem-break.h: New file.
13298 * Makefile.in: Add mem-break.o rule; update server.h
13300 * inferiors.c (struct inferior_info): Add target_data
13302 (clear_inferiors): Free target_data member if set.
13303 (inferior_target_data, set_inferior_target_data): New functions.
13304 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13305 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13306 * linux-low.c (linux_bp_reinsert): New variable.
13307 (struct inferior_linux_data): New.
13308 (linux_create_inferior): Use set_inferior_target_data.
13309 (linux_attach): Likewise. Call add_inferior.
13310 (linux_wait_for_one_inferior): New function.
13311 (linux_wait): Call it.
13312 (linux_write_memory): Add const.
13313 (initialize_low): Call set_breakpoint_data.
13314 * linux-low.h (struct linux_target_ops): Add breakpoint
13316 * server.c (attach_inferior): Remove extra add_inferior
13318 * server.h: Include mem-break.h. Update inferior.c
13320 * target.c (read_inferior_memory)
13321 (write_inferior_memory): New functions.
13322 * target.h (read_inferior_memory)
13323 (write_inferior_memory): Change macros to prototypes.
13324 (struct target_ops): Update comments. Add const to write_memory
13327 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13329 * linux-low.c (usr_store_inferior_registers): Support
13330 registers which are allowed to fail to store.
13331 * linux-low.h (linux_target_ops): Likewise.
13332 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13333 (ppc_cannot_store_register): FPSCR may not be storable.
13335 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13337 * server.h: Include <string.h> if HAVE_STRING_H.
13338 * ChangeLog: Correct paths in last ChangeLog entry.
13340 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13342 * linux-low.h: Remove obsolete prototypes.
13343 (struct linux_target_ops): New.
13344 (extern the_low_target): New.
13345 * linux-low.c (num_regs, regmap): Remove declarations.
13346 (register_addr): Use the_low_target explicitly.
13347 (fetch_register): Likewise.
13348 (usr_fetch_inferior_registers): Likewise.
13349 (usr_store_inferior_registers): Likewise.
13350 * linux-arm-low.c (num_regs): Remove.
13351 (arm_num_regs): Define.
13352 (arm_regmap): Renamed from regmap, made static.
13353 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13355 (arm_cannot_store_register): Renamed from cannot_store_register,
13357 (the_low_target): New.
13358 * linux-i386-low.c (num_regs): Remove.
13359 (i386_num_regs): Define.
13360 (i386_regmap): Renamed from regmap, made static.
13361 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13363 (i386_cannot_store_register): Renamed from cannot_store_register,
13365 (the_low_target): New.
13366 * linux-ia64-low.c (num_regs): Remove.
13367 (ia64_num_regs): Define.
13368 (ia64_regmap): Renamed from regmap, made static.
13369 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13371 (ia64_cannot_store_register): Renamed from cannot_store_register,
13373 (the_low_target): New.
13374 * linux-m68k-low.c (num_regs): Remove.
13375 (m68k_num_regs): Define.
13376 (m68k_regmap): Renamed from regmap, made static.
13377 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13379 (m68k_cannot_store_register): Renamed from cannot_store_register,
13381 (the_low_target): New.
13382 * linux-mips-low.c (num_regs): Remove.
13383 (mips_num_regs): Define.
13384 (mips_regmap): Renamed from regmap, made static.
13385 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13387 (mips_cannot_store_register): Renamed from cannot_store_register,
13389 (the_low_target): New.
13390 * linux-ppc-low.c (num_regs): Remove.
13391 (ppc_num_regs): Define.
13392 (ppc_regmap): Renamed from regmap, made static.
13393 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13395 (ppc_cannot_store_register): Renamed from cannot_store_register,
13397 (the_low_target): New.
13398 * linux-s390-low.c (num_regs): Remove.
13399 (s390_num_regs): Define.
13400 (s390_regmap): Renamed from regmap, made static.
13401 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13403 (s390_cannot_store_register): Renamed from cannot_store_register,
13405 (the_low_target): New.
13406 * linux-sh-low.c (num_regs): Remove.
13407 (sh_num_regs): Define.
13408 (sh_regmap): Renamed from regmap, made static.
13409 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13411 (sh_cannot_store_register): Renamed from cannot_store_register,
13413 (the_low_target): New.
13414 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13415 (the_low_target): New.
13417 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13419 * Makefile.in: Add stamp-h target.
13420 * configure.in: Create stamp-h.
13421 * configure: Regenerated.
13423 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13425 * inferiors.c: New file.
13426 * target.c: New file.
13427 * target.h: New file.
13428 * Makefile.in: Add target.o and inferiors.o. Update
13430 * linux-low.c (inferior_pid): New static variable,
13431 moved from server.c.
13432 (linux_create_inferior): Renamed from create_inferior.
13433 Call add_inferior. Return 0 on success instead of a PID.
13434 (linux_attach): Renamed from myattach.
13435 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13436 (linux_thread_alive): Renamed from mythread_alive.
13437 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13439 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13440 (regsets_store_inferior_registers): Correct error message.
13441 Add missing ``return 0''.
13442 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13443 (linux_store_registers): Renamed from store_inferior_registers.
13444 (linux_read_memory): Renamed from read_inferior_memory.
13445 (linux_write_memory): Renamed from write_inferior_memory.
13446 (linux_target_ops): New structure.
13447 (initialize_low): Call set_target_ops ().
13448 * remote-utils.c (unhexify): New function.
13449 (hexify): New function.
13450 (input_interrupt): Send signals to ``signal_pid''.
13451 * server.c (inferior_pid): Remove.
13452 (start_inferior): Update create_inferior call.
13453 (attach_inferior): Call add_inferior.
13454 (handle_query): New function.
13455 (main): Call handle_query for `q' packets.
13456 * server.h: Include "target.h". Remove obsolete prototypes.
13457 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13459 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13461 * Makefile.in: Add WARN_CFLAGS. Update configury
13463 * configure.in: Check for <string.h>
13464 * configure: Regenerate.
13465 * config.in: Regenerate.
13466 * gdbreplay.c: Include needed system headers.
13467 (remote_open): Remove strchr prototype.
13468 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13469 * regcache.c (supply_register): Change buf argument to const void *.
13470 (supply_register_by_name): Likewise.
13471 (collect_register): Change buf argument to void *.
13472 (collect_register_by_name): Likewise.
13473 * regcache.h: Add missing prototypes.
13474 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13475 * server.c (handle_query): New function.
13476 (attached): New static variable, moved out of main.
13477 (main): Quiet longjmp clobber warnings.
13478 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13479 * utils.c (error): Remove NORETURN.