1 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3 * linux-s390-low.c (s390_supports_tracepoints): New function.
4 (struct linux_target_ops): Fill supports_tracepoints hook.
6 2016-03-18 Yao Qi <yao.qi@linaro.org>
8 * linux-low.c (lwp_signal_can_be_delivered): New function.
9 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
11 2016-03-18 Yao Qi <yao.qi@linaro.org>
13 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
14 0 if signal is enqueued. Remove 'signal' from one debugging
15 message. Move one debugging message to some lines below.
16 Remove code setting 'signal' to 0.
18 2016-03-18 Yao Qi <yao.qi@linaro.org>
20 * linux-low.c (linux_low_filter_event): Remove redundant
21 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
23 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
25 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
26 (struct linux_target_ops): Wire in the above.
28 2016-03-03 Yao Qi <yao.qi@linaro.org>
30 * linux-low.c: Update comments to start_step_over.
32 2016-03-03 Yao Qi <yao.qi@linaro.org>
35 * linux-low.c (handle_extended_wait): Set child suspended
36 if event_lwp->bp_reinsert isn't zero.
38 2016-03-02 Yao Qi <yao.qi@linaro.org>
40 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
41 enqueue_pending_signal.
43 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
45 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
48 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
50 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
51 (s390_regmap_3264) [!__s390x__]: New global.
52 (s390_collect_ptrace_register): Skip map entries containing -1.
53 (s390_supply_ptrace_register): Ditto.
54 (s390_fill_gprs_high): New function.
55 (s390_store_gprs_high): New function.
56 (s390_regsets): Add NT_S390_HIGH_GPRS.
57 (s390_get_hwcap): Enable on 31-bit.
58 (have_hwcap_s390_high_gprs): Enable on 31-bit.
59 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
60 Detect NT_S390_HIGH_GPRS.
61 (s390_usrregs_info_3264): Enable on 31-bit.
62 (s390_regs_info): Enable regs_info_3264 on 31-bit.
63 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
65 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
68 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
69 * configure.srv: Ditto.
70 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
71 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
72 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
73 (init_registers_amd64_linux): Remove prototype.
74 (tdesc_amd64_linux): Remove declaration.
75 (get_ipa_tdesc): New function.
76 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
77 initialize remaining tdescs.
78 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
79 (init_registers_i386_linux): Remove prototype.
80 (tdesc_i386_linux): Remove declaration.
81 (get_ipa_tdesc): New function.
82 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
83 initialize remaining tdescs.
84 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
85 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
86 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
87 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
88 (x86_get_ipa_tdesc_idx): New function.
89 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
90 * linux-x86-tdesc.h: New file.
91 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
92 (target_get_ipa_tdesc_idx): New macro.
93 * tracepoint.c (ipa_tdesc_idx): New macro.
94 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
95 (symbol_list): Add ipa_tdesc_idx.
96 (cmd_qtstart): Write ipa_tdesc_idx in the target.
98 (ipa_tdesc_idx): New variable.
99 (get_context_regcache): Use get_ipa_tdesc.
100 (gdb_collect): Ditto.
102 * tracepoint.h (get_ipa_tdesc): New prototype.
105 2016-02-24 Pedro Alves <palves@redhat.com>
107 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
108 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
109 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
110 Factor out common code between the USE_SIGTRAP_SIGINFO and
111 !USE_SIGTRAP_SIGINFO blocks.
112 (linux_low_filter_event): Call save_stop_reason instead of
113 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
115 (linux_wait_1): Update comments.
117 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
119 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
120 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
121 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
122 ppc_insert_point, ppc_remove_point.
124 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
126 * linux-s390-low.c (s390_supports_z_point_type): New function.
127 (struct linux_target_ops): Wire s390_supports_z_point_type in.
129 2016-02-16 Yao Qi <yao.qi@linaro.org>
131 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
132 PC. Get pc from regcache_read_pc.
134 2016-02-12 Yao Qi <yao.qi@linaro.org>
136 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
137 or linux_get_pc_32bit.
138 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
140 2016-02-12 Yao Qi <yao.qi@linaro.org>
142 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
143 arm_linux_get_next_pcs_fixup.
145 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
147 * tracepoint.c (x_tracepoint_action_download): Change
148 write_inferior_data_ptr to write_inferior_data_pointer.
149 (cmd_qtstart): Likewise.
150 (write_inferior_data_ptr): Remove.
151 (download_agent_expr): Change write_inferior_data_ptr to
152 write_inferior_data_pointer.
153 (download_tracepoint_1): Likewise.
154 (download_tracepoint): Likewise.
155 (download_trace_state_variables): Likewise.
157 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
158 Marcin Kościelnicki <koriakin@0x04.net>
160 * tracepoint.c (struct tracepoint_action_ops): Remove.
161 (struct tracepoint_action): Remove ops.
162 (m_tracepoint_action_download, r_tracepoint_action_download)
163 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
164 size and offset accordingly.
165 (m_tracepoint_action_ops, r_tracepoint_action_ops)
166 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
167 (tracepoint_action_send, tracepoint_action_download): New functions.
168 Helpers for trace action handlers.
169 (add_tracepoint_action): Remove setup actions ops.
170 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
172 2016-02-10 Yao Qi <yao.qi@linaro.org>
174 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
176 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
178 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
180 * configure: Regenerate.
182 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
184 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
185 void * to gdb_byte *.
186 * linux-low.c (siginfo_fixup): Likewise.
187 (linux_xfer_siginfo): Likewise.
188 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
190 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
192 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
194 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
196 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
198 * linux-x86-low.c [__x86_64__]: Include
199 "nat/amd64-linux-siginfo.h".
200 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
201 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
202 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
203 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
204 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
205 (cpt_si_fd, si_timerid, si_overrun): Move from
206 nat/amd64-linux-siginfo.c.
207 * Makefile.in (amd64-linux-siginfo.o:): New rule.
209 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
211 * server.c (skip_to_semicolon): Remove.
212 (process_point_options): Use strchrnul instead of
215 2016-01-26 Yao Qi <yao.qi@linaro.org>
217 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
218 * linux-low.c (install_software_single_step_breakpoints): Don't
219 call regcache_read_pc.
220 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
223 2016-01-26 Yao Qi <yao.qi@linaro.org>
225 * linux-low.c (install_software_single_step_breakpoints): Call
226 regcache_read_pc instead of get_pc.
228 2016-01-26 Yao Qi <yao.qi@linaro.org>
230 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
231 (unblock_async_io): Rename to ...
232 (block_unblock_async_io): ... it. New function.
233 (enable_async_io): Don't install SIGIO handler. Unblock it
235 (disable_async_io): Don't ignore SIGIO. Block it instead.
236 (initialize_async_io): Install SIGIO handler. Don't call
239 2016-01-26 Yao Qi <yao.qi@linaro.org>
241 * remote-utils.c (getpkt): If the buffer isn't empty, and the
242 first character is '\003', call *the_target->request_interrupt.
244 2016-01-25 Yao Qi <yao.qi@linaro.org>
246 * remote-utils.c (new_thread_notify): Remove.
247 (dead_thread_notify): Likewise.
248 * remote-utils.h (new_thread_notify): Remove declaration.
249 (dead_thread_notify): Likewise.
251 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
253 * gdb.trace/pending.exp: Fix expected message on continue.
255 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
257 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
258 it works properly on big-endian machines where sizeof (CORE_ADDR)
261 2016-01-21 Pedro Alves <palves@redhat.com>
263 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
264 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
265 * configure: Regenerate.
267 2016-01-21 Yao Qi <yao.qi@linaro.org>
269 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
270 is_thumb and set it according to CPSR saved on the stack.
271 (get_next_pcs_syscall_next_pc): Pass is_thumb to
272 arm_sigreturn_next_pc.
274 2016-01-18 Yao Qi <yao.qi@linaro.org>
276 * linux-low.c (linux_set_pc_64bit): New function.
277 (linux_get_pc_64bit): New function.
278 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
280 * linux-sparc-low.c (debug_threads): Remove declaration.
281 (sparc_get_pc): Remove.
282 (the_low_target): Use linux_get_pc_64bit instead of
284 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
285 (the_low_target): Use linux_get_pc_64bit and
288 2016-01-18 Yao Qi <yao.qi@linaro.org>
290 * linux-arm-low.c (debug_threads): Remove declaration.
291 (arm_get_pc, arm_set_pc): Remove.
292 (the_low_target): Use linux_get_pc_32bit and
294 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
295 (the_low_target): Use linux_get_pc_32bit and
297 * linux-cris-low.c (debug_threads): Remove declaration.
298 (cris_get_pc, cris_set_pc,): Remove.
299 (the_low_target): Use linux_get_pc_32bit and
301 * linux-crisv32-low.c (debug_threads): Remove declaration.
302 (cris_get_pc, cris_set_pc): Remove.
303 (the_low_target): Use linux_get_pc_32bit and
305 * linux-low.c: Include inttypes.h.
306 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
307 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
308 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
309 (the_low_target): Use linux_get_pc_32bit and
311 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
312 (the_low_target): Use linux_get_pc_32bit and
314 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
315 (the_low_target): Use linux_get_pc_32bit and
317 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
318 (the_low_target): Use linux_get_pc_32bit and
320 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
321 (the_low_target): Use linux_get_pc_32bit and
324 2016-01-18 Gary Benson <gbenson@redhat.com>
326 * configure.ac (AC_FUNC_FORK): New check.
327 * config.in: Regenerate.
328 * configure: Likewise.
330 2016-01-14 Yao Qi <yao.qi@linaro.org>
332 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
333 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
334 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
335 arm_get_next_pcs_ctor.
337 2016-01-12 Josh Stone <jistone@redhat.com>
338 Philippe Waroquiers <philippe.waroquiers@skynet.be>
340 * inferiors.h: Include "gdb_vecs.h".
341 (struct process_info): Add syscalls_to_catch.
342 * inferiors.c (remove_process): Free syscalls_to_catch.
343 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
344 syscall_return stops.
345 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
346 * server.c (handle_general_set): Handle QCatchSyscalls.
347 (handle_query): Report support for QCatchSyscalls.
348 * target.h (struct target_ops): Add supports_catch_syscall.
349 (target_supports_catch_syscall): New macro.
350 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
351 (struct lwp_info): Add syscall_state.
352 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
353 Maintain syscall_state and syscalls_to_catch across exec.
354 (get_syscall_trapinfo): New function, proxy to the_low_target.
355 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
356 (linux_low_filter_event): Toggle syscall_state entry/return for
357 syscall traps, and set it ignored for all others.
358 (gdb_catching_syscalls_p): New function.
359 (gdb_catch_this_syscall_p): New function.
360 (linux_wait_1): Handle SYSCALL_SIGTRAP.
361 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
362 (linux_supports_catch_syscall): New function.
363 (linux_target_ops): Install it.
364 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
365 (the_low_target): Install it.
367 2016-01-12 Mike Frysinger <vapier@gentoo.org>
369 * acinclude.m4: Include new ../warning.m4 file.
370 * configure: Regenerated.
371 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
373 2016-01-12 Mike Frysinger <vapier@gentoo.org>
375 * ax.c (is_goto_target): Mark static.
376 * linux-low.c (register_addr): Likewise.
377 (linux_fetch_registers, linux_store_registers): Likewise.
378 * mem-break.c (any_persistent_commands): Fix old prototype.
379 (add_commands_to_breakpoint): Mark static.
380 * regcache.c (find_register_by_name): Delete unused func.
381 * remote-utils.c (hex_or_minus_one): Mark static.
382 * server.c (monitor_show_help): Mark static.
383 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
384 handle_v_requests): Likewise.
386 2016-01-12 Pedro Alves <palves@redhat.com>
388 Remove use of the registered trademark symbol throughout.
390 2016-01-08 Yao Qi <yao.qi@linaro.org>
392 * remote-utils.c (getpkt): If c is '\003', call target hook
395 2016-01-06 Yao Qi <yao.qi@linaro.org>
397 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
399 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
400 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
401 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
402 (thumb2_breakpoint): Declare.
403 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
405 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
406 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
407 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
409 2016-01-01 Joel Brobecker <brobecker@adacore.com>
411 * gdbreplay.c (gdbreplay_version): Change copyright year in
413 * server.c (gdbserver_version): Likewise.
415 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
417 * server.c (crc32_table): Delete.
418 (crc32): Use libiberty's xcrc32 function.
420 2015-12-22 Joel Brobecker <brobecker@adacore.com>
422 * lynx-low.c (lynx_delete_thread_callback): New function.
423 (lynx_mourn): Properly delete our process and all of its
424 threads. Remove call to clear_inferiors.
426 2015-12-22 Joel Brobecker <brobecker@adacore.com>
428 * target.c (thread_search_callback): Add check that
429 the thread_stopped target callback is not NULL before
432 2015-12-21 Yao Qi <yao.qi@linaro.org>
434 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
437 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
439 * server.c (handle_query): Call target_supports_software_single_step.
441 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
443 * linux-low.c (single_step): New function.
444 (linux_resume_one_lwp_throw): Call single_step.
445 (start_step_over): Likewise.
447 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
449 * Makefile.in (SFILES): Append arch/arm-linux.c,
450 arch/arm-get-next-pcs.c.
451 (arm-linux.o): New rule.
452 (arm-get-next-pcs.o): New rule.
453 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
455 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
456 to linux-aarch32-low.c.
457 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
458 (arm_breakpoint_len, thumb_breakpoint): Likewise.
459 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
460 (thumb2_breakpoint_len): Likewise.
461 (arm_is_thumb_mode): Make non-static.
462 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
463 from linux-aarch32-low.c.
464 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
465 (arm_breakpoint_len, thumb_breakpoint): Likewise.
466 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
467 (thumb2_breakpoint_len): Likewise.
468 (arm_is_thumb_mode): New declaration.
469 * linux-arm-low.c: Include arch/arm-linux.h
470 aarch/arm-get-next-pcs.h, sys/syscall.h.
471 (get_next_pcs_ops): New struct.
472 (get_next_pcs_addr_bits_remove): New function.
473 (get_next_pcs_is_thumb): New function.
474 (get_next_pcs_read_memory_unsigned_integer): Likewise.
475 (arm_sigreturn_next_pc): Likewise.
476 (get_next_pcs_syscall_next_pc): Likewise.
477 (arm_gdbserver_get_next_pcs): Likewise.
478 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
480 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
481 * server.h: Include gdb_vecs.h.
483 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
485 * Makefile.in (SFILES): Append common/common-regcache.c.
486 (OBS): Append common-regcache.o.
487 (common-regcache.o): New rule.
488 * regcache.c (init_register_cache): Initialize cache to
490 (regcache_raw_read_unsigned): New function.
491 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
492 register_status enum.
494 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
496 * linux-aarch64-low.c (the_low_targets): Rename
497 breakpoint_reinsert_addr to get_next_pcs.
498 * linux-arm-low.c (the_low_targets): Likewise.
499 * linux-bfin-low.c (the_low_targets): Likewise.
500 * linux-cris-low.c (the_low_targets): Likewise.
501 * linux-crisv32-low.c (the_low_targets): Likewise.
502 * linux-low.c (can_software_single_step): Likewise.
503 (install_software_single_step_breakpoints): New function.
504 (start_step_over): Use install_software_single_step_breakpoints.
505 * linux-low.h: New CORE_ADDR vector.
506 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
508 * linux-mips-low.c (the_low_targets): Likewise.
509 * linux-nios2-low.c (the_low_targets): Likewise.
510 * linux-sparc-low.c (the_low_targets): Likewise.
512 2015-12-17 Pedro Alves <palves@redhat.com>
514 * linux-low.c (linux_kill_one_lwp): Remove references to
516 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
518 (linux_init_signals): Delete.
519 (initialize_low): Adjust.
520 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
522 2015-12-16 Pedro Alves <palves@redhat.com>
524 * configure.ac (compiler warning flags): When testing a
525 -Wno-foo option, check whether -Wfoo works instead.
526 * configure: Regenerate.
528 2015-12-11 Don Breazeal <donb@codesourcery.com>
530 * server.c (process_serial_event): Don't exit from gdbserver
531 in remote mode if there are still active inferiors.
533 2015-12-11 Yao Qi <yao.qi@linaro.org>
535 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
536 arm_breakpoint_at if the process is 32-bit.
538 2015-12-11 Yao Qi <yao.qi@linaro.org>
540 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
543 2015-12-07 Yao Qi <yao.qi@linaro.org>
545 * configure.srv: Append arm.o to srv_tgtobj for
546 aarch64*-*-linux* target.
547 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
548 from linux-arm-low.c.
549 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
550 (arm_breakpoint_len, thumb_breakpoint): Likewise.
551 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
552 (thumb2_breakpoint_len): Likewise.
553 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
554 (arm_breakpoint_kinds): Likewise.
555 (arm_breakpoint_kind_from_pc): Likewise.
556 (arm_sw_breakpoint_from_kind): Likewise.
557 (arm_breakpoint_kind_from_current_state): Likewise.
558 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
559 (arm_sw_breakpoint_from_kind): Declare.
560 (arm_breakpoint_kind_from_current_state): Declare.
561 (arm_breakpoint_at): Declare.
562 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
563 arm_sw_breakpoint_from_kind if process is 32-bit.
564 (aarch64_breakpoint_kind_from_pc): New function.
565 (aarch64_breakpoint_kind_from_current_state): New function.
566 (the_low_target): Initialize fields breakpoint_kind_from_pc
567 and breakpoint_kind_from_current_state.
568 * linux-arm-low.c (arm_breakpoint_kinds): Move to
570 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
571 (arm_breakpoint, arm_breakpoint_len): Likewise.
572 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
573 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
574 (arm_is_thumb_mode): Likewise.
575 (arm_breakpoint_at): Likewise.
576 (arm_breakpoint_kind_from_pc): Likewise.
577 (arm_sw_breakpoint_from_kind): Likewise.
578 (arm_breakpoint_kind_from_current_state): Likewise.
581 2015-08-04 Yao Qi <yao.qi@linaro.org>
583 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
584 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
585 * server.c (extended_protocol): Remove "static".
586 * server.h (extended_protocol): Declare it.
588 2015-12-04 Josh Stone <jistone@redhat.com>
590 * target.h (struct target_ops) <arch_setup>: Rename to ...
591 (struct target_ops) <post_create_inferior>: ... this.
592 (target_arch_setup): Rename to ...
593 (target_post_create_inferior): ... this, calling post_create_inferior.
594 * server.c (start_inferior): Update target_arch_setup calls to
595 target_post_create_inferior.
596 * linux-low.c (linux_low_ptrace_options): Forward declare.
597 (linux_arch_setup): Update its comment for general use.
598 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
599 (struct linux_target_ops): Use linux_post_create_inferior.
600 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
601 to post_create_inferior.
602 * nto-low.c (struct nto_target_ops): Likewise.
603 * spu-low.c (struct spu_target_ops): Likewise.
604 * win32-low.c (struct win32_target_ops): Likewise.
606 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
608 * linux-arm-low.c: Remove duplicate arch/arm.h include.
610 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
612 * linux-arm-low.c (arm_reinsert_addr): Remove function.
613 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
614 * linux-cris-low.c (cris_reinsert_addr> Remove function.
615 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
616 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
617 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
618 * linux-mips-low.c (mips_reinsert_addr): Remove function.
619 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
620 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
621 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
622 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
623 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
625 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
627 * linux-low.c (linux_look_up_symbols): Don't call
628 linux_supports_traceclone.
629 * linux-low.h (thread_db_init): Remove use_events argument.
630 * thread-db.c (thread_db_use_event): Remove global variable.
631 (struct thread_db) <td_thr_event_enable_p>: Remove field.
632 (struct thread_db) <td_create_bp>: Remove field.
633 (thread_db_create_event): Remove function.
634 (thread_db_enable_reporting): Likewise.
635 (find_one_thread): Don't check for thread_db_use_events.
636 (attach_thread): Likewise.
637 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
638 (try_thread_db_load_1): Don't check for thread_db_use_events.
639 (thread_db_init): Remove use_events argument and thread events
641 (remove_thread_event_breakpoints): Remove function.
642 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
644 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
646 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
648 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
649 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
650 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
651 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
652 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
654 * linux-crisv32-low.c (cris_supports_hardware_single_step):
656 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
657 * linux-low.c (can_hardware_single_step): Use
658 supports_hardware_single_step.
659 (can_software_single_step): New function.
660 (start_step_over): Call can_software_single_step.
661 (linux_supports_hardware_single_step): New function.
662 (struct target_ops) <supports_software_single_step>: Initialize.
663 * linux-low.h (struct linux_target_ops)
664 <supports_hardware_single_step>: Initialize.
665 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
666 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
667 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
668 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
669 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
670 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
671 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
672 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
673 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
674 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
676 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
677 (struct linux_target_ops) <tile_supports_hardware_single_step>:
679 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
680 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
681 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
684 * target.h (struct target_ops): <supports_software_single_step>:
686 (target_supports_software_single_step): New macro.
688 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
690 * linux-low.c (linux_wait_1): Fix pc advance condition.
691 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
692 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
694 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
696 * linux-arm-low.c (arm_is_thumb_mode): New function.
697 (arm_breakpoint_at): Use arm_is_thumb_mode.
698 (arm_breakpoint_kind_from_current_state): New function.
699 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
701 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
702 (linux_breakpoint_kind_from_current_state): New function.
703 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
704 * linux-low.h (struct linux_target_ops)
705 <breakpoint_kind_from_current_state>: New field.
706 * target.h (struct target_ops): Likewise.
707 (target_breakpoint_kind_from_current_state): New macro.
709 2015-11-30 Pedro Alves <palves@redhat.com>
711 * linux-low.c (linux_resume): Wake up the event loop before
714 2015-11-30 Pedro Alves <palves@redhat.com>
716 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
718 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
720 * target.c (struct thread_search): New structure.
721 (thread_search_callback): New function.
722 (prev_general_thread): New global.
723 (prepare_to_access_memory, done_accessing_memory): New functions.
724 * target.h (prepare_to_access_memory, done_accessing_memory):
725 Replace macros with function declarations.
727 2015-11-30 Pedro Alves <palves@redhat.com>
730 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
731 report TARGET_WAITKIND_NO_RESUMED.
732 * remote-utils.c (prepare_resume_reply): Handle
733 TARGET_WAITKIND_NO_RESUMED.
734 * server.c (report_no_resumed): New global.
735 (handle_query) <qSupported>: Handle "no-resumed+". Report
736 "no-resumed+" support.
737 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
738 return error if the client doesn't support no-resumed events.
739 (push_stop_notification): New function.
740 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
741 events if the client supports them.
743 2015-11-30 Pedro Alves <palves@redhat.com>
745 * linux-low.c (thread_still_has_status_pending_p): Don't check
747 (lwp_resumed): New function.
748 (status_pending_p_callback): Return early if the LWP is not
749 supposed to be resumed.
751 2015-11-30 Pedro Alves <palves@redhat.com>
753 * linux-low.c (handle_extended_wait): Assert that the LWP's
754 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
755 thread create events, leave the new child's status pending.
756 (linux_low_filter_event): If GDB wants to hear about thread exit
757 events, leave the LWP marked dead and don't delete it.
758 (linux_wait_for_event_filtered): Don't check for thread exit.
759 (filter_exit_event): New function.
760 (linux_wait_1): Use it, when returning an exit event.
761 (linux_resume_one_lwp_throw): Assert that the LWP's
762 waitstatus is TARGET_WAITKIND_IGNORE.
763 * remote-utils.c (prepare_resume_reply): Handle
764 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
765 * server.c (report_thread_events): New global.
766 (handle_general_set): Handle QThreadEvents.
767 (handle_query) <qSupported>: Handle and report QThreadEvents+;
768 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
769 TARGET_WAITKIND_THREAD_EXITED.
770 * server.h (report_thread_events): Declare.
772 2015-11-30 Pedro Alves <palves@redhat.com>
774 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
775 the thread's last_resume_kind was resume_stop.
777 2015-11-30 Pedro Alves <palves@redhat.com>
779 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
782 2015-11-30 Pedro Alves <palves@redhat.com>
784 * server.c (handle_v_requests): Handle vCtrlC.
786 2015-11-30 Pedro Alves <palves@redhat.com>
788 * gdbthread.h (find_any_thread_of_pid): Declare.
789 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
791 * server.c (handle_query): If current_thread is NULL, look for
792 another thread of the selected process.
794 2015-11-26 Daniel Colascione <dancol@dancol.org>
795 Simon Marchi <simon.marchi@ericsson.com>
797 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
798 * server.c (handle_qxfer_threads_worker): Refactor to include thread
800 * target.h (struct target_ops) <thread_name>: New field.
801 (target_thread_name): New macro.
803 2015-11-23 Joel Brobecker <brobecker@adacore.com>
805 * regcache.h (regcache_invalidate_pid): Add declaration.
806 * regcache.c (regcache_invalidate_pid): New function, extracted
807 from regcache_invalidate.
808 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
809 Add trivial documentation comment.
810 * lynx-low.c: Use regcache_invalidate_pid instead of
813 2015-11-23 Joel Brobecker <brobecker@adacore.com>
815 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
816 and Elf64_auxv_t if the target is Android.
818 2015-11-22 Doug Evans <xdje42@gmail.com>
820 * target.h: #include <sys/types.h>.
822 2015-11-19 Pedro Alves <palves@redhat.com>
824 * linux-low.c (linux_process_qsupported): Change prototype.
826 * linux-low.h (struct linux_target_ops) <process_qsupported>:
828 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
829 and adjust to loop over all features.
830 * server.c (handle_query) <qSupported>: Adjust to call
831 target_process_qsupported once, passing it a vector of unprocessed
833 * target.h (struct target_ops) <process_qsupported>: Change
835 (target_process_qsupported): Adjust.
837 2015-11-19 Pedro Alves <palves@redhat.com>
839 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
841 * configure: Regenerate.
843 2015-11-19 Pedro Alves <palves@redhat.com>
845 * configure: Regenerate.
847 2015-11-19 Yao Qi <yao.qi@linaro.org>
849 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
852 2015-11-19 Yao Qi <yao.qi@linaro.org>
854 * linux-aarch64-low.c (enum aarch64_operand_type): New.
855 (struct aarch64_operand): Move enum out.
857 2015-11-19 Yao Qi <yao.qi@linaro.org>
859 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
860 struct user_fpsimd_state *.
861 (aarch64_store_fpregset): Likewise.
863 2015-11-19 Yao Qi <yao.qi@linaro.org>
865 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
866 struct user_pt_regs *.
867 (aarch64_store_gregset): Likewise.
869 2015-11-18 Pedro Alves <palves@redhat.com>
871 * Makefile.in (all_object_files): Add $IPA_OBJS.
873 2015-11-17 Pedro Alves <palves@redhat.com>
875 * win32-low.c (win32_resume): Use gdb_signal_from_host,
876 GDB_SIGNAL_0 and gdb_signal_to_string.
878 2015-11-17 Pedro Alves <palves@redhat.com>
880 * win32-low.c (handle_output_debug_string): Remove parameter.
881 (win32_kill): Remove our_status local and adjust call to
882 handle_output_debug_string.
883 (get_child_debug_event): Adjust call to
884 handle_output_debug_string.
886 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
888 * linux-mips-low.c (mips_fill_gregset): Add cast.
889 (mips_store_gregset): Likewise.
890 (mips_fill_fpregset): Likewise.
891 (mips_store_fpregset): Likewise.
893 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
895 * linux-mips-low.c (mips_add_watchpoint): Rename private to
898 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
900 * linux-mips-low.c (mips_linux_new_thread): Change type of
901 watch_type to enum target_hw_bp_type.
903 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
905 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
906 Change return type to arm_hwbp_type.
908 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
910 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
911 (arm_store_gregset): Likewise.
912 * linux-arm-low.c (arm_get_hwcap): Likewise.
913 (arm_read_description): Likewise.
915 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
917 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
919 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
921 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
922 (ppc_fill_vsxregset): Likewise.
923 (ppc_store_vsxregset): Likewise.
924 (ppc_fill_vrregset): Likewise.
925 (ppc_store_vrregset): Likewise.
926 (ppc_fill_evrregset): Likewise.
927 (ppc_store_evrregset): Likewise.
929 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
931 * linux-ppc-low.c (ppc_usrregs_info): Remove
933 (ppc_arch_setup): Move lower in file.
935 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
937 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
938 (ps_pdwrite): Likewise.
940 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
942 * linux-arm-low.c (arm_new_thread): Move pointer dereference
943 to after assert checks.
945 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
947 * proc-service.c (ps_pdread): Add/adjust casts.
948 (ps_pdwrite): Add/adjust casts.
950 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
952 * server.c (handle_search_memory_1): Cast return value of
955 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
957 * server.c (write_qxfer_response): Change type of data to
960 2015-10-29 Pedro Alves <palves@redhat.com>
962 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
964 2015-10-29 Pedro Alves <palves@redhat.com>
966 * tracepoint.c (clear_installed_tracepoints): Add casts.
968 2015-10-29 Pedro Alves <palves@redhat.com>
970 * server.c (handle_v_cont, process_serial_event): Add enum
971 gdb_signal casts to signal parsing code.
973 2015-10-29 Pedro Alves <palves@redhat.com>
975 * linux-low.h (NULL_REGSET): Define.
976 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
977 * linux-arm-low.c (arm_regsets): Likewise.
978 * linux-crisv32-low.c (cris_regsets): Likewise.
979 * linux-m68k-low.c (m68k_regsets): Likewise.
980 * linux-mips-low.c (mips_regsets): Likewise.
981 * linux-nios2-low.c (nios2_regsets): Likewise.
982 * linux-ppc-low.c (ppc_regsets): Likewise.
983 * linux-s390-low.c (s390_regsets): Likewise.
984 * linux-sh-low.c (sh_regsets): Likewise.
985 * linux-sparc-low.c (sparc_regsets): Likewise.
986 * linux-tic6x-low.c (tic6x_regsets): Likewise.
987 * linux-tile-low.c (tile_regsets): Likewise.
988 * linux-x86-low.c (x86_regsets): Likewise.
989 * linux-xtensa-low.c (xtensa_regsets): Likewise.
991 2015-10-29 Pedro Alves <palves@redhat.com>
993 * linux-low.h (NULL_REGSET): Define.
994 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
995 * linux-arm-low.c (arm_regsets): Likewise.
996 * linux-crisv32-low.c (cris_regsets): Likewise.
997 * linux-m68k-low.c (m68k_regsets): Likewise.
998 * linux-mips-low.c (mips_regsets): Likewise.
999 * linux-nios2-low.c (nios2_regsets): Likewise.
1000 * linux-ppc-low.c (ppc_regsets): Likewise.
1001 * linux-s390-low.c (s390_regsets): Likewise.
1002 * linux-sh-low.c (sh_regsets): Likewise.
1003 * linux-sparc-low.c (sparc_regsets): Likewise.
1004 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1005 * linux-tile-low.c (tile_regsets): Likewise.
1006 * linux-x86-low.c (x86_regsets): Likewise.
1007 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1009 2015-10-26 Doug Evans <dje@google.com>
1011 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1013 2015-10-26 Doug Evans <dje@google.com>
1015 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1017 2015-10-26 Doug Evans <dje@google.com>
1019 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1021 (attach_thread, find_new_threads_callback): Ditto.
1023 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1025 * mem-break.h (set_breakpoint_data): Remove.
1027 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1029 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1030 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1031 (initialize_low): Remove set_breakpoint_data call.
1032 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1033 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1034 (initialize_low): Remove set_breakpoint_data call.
1035 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1036 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1037 (initialize_low): Remove set_breakpoint_data call.
1039 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1041 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1042 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1043 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1044 * target.h (target_breakpoint_kind_from_pc): New macro.
1046 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1048 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1049 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1050 the default breakpoint kind.
1052 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1054 * linux-arm-low.c (arm_supports_z_point_type): Add software
1057 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1059 * linux-arm-low.c: Refactor breakpoint definitions.
1060 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1061 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1063 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1065 * Makefile.in: Add arm.c/o.
1066 * configure.srv: Likewise.
1067 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1068 (arm_breakpoint_kind_from_pc): New function.
1069 (arm_sw_breakpoint_from_kind): Return proper kind.
1070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1072 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1074 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1076 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1077 (struct raw_breakpoint) <size>: Remove.
1078 (struct raw_breakpoint) <kind>: Add.
1079 (bp_size): New function.
1080 (bp_opcode): Likewise.
1081 (find_raw_breakpoint_at): Adjust for kind.
1082 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1083 (remove_memory_breakpoint): Adjust for kind call bp_size.
1084 (set_raw_breakpoint_at): Adjust for kind.
1085 (set_breakpoint): Likewise.
1086 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1087 (delete_raw_breakpoint): Adjust for kind.
1088 (delete_breakpoint): Likewise.
1089 (find_gdb_breakpoint): Likewise.
1090 (set_gdb_breakpoint_1): Likewise.
1091 (set_gdb_breakpoint): Likewise.
1092 (delete_gdb_breakpoint_1): Likewise.
1093 (delete_gdb_breakpoint): Likewise.
1094 (uninsert_raw_breakpoint): Likewise.
1095 (reinsert_raw_breakpoint): Likewise.
1096 (set_breakpoint_data): Remove.
1097 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1098 (check_mem_read): Adjust for kind call bp_size.
1099 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1100 (clone_one_breakpoint): Adjust for kind.
1101 * mem-break.h (set_gdb_breakpoint): Likewise.
1102 (delete_gdb_breakpoint): Likewise.
1103 * server.c (process_serial_event): Likewise.
1105 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1107 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1108 (struct linux_target_ops) <breakpoint>: Remove.
1109 (struct linux_target_ops) <breakpoint_len>: Remove.
1110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1112 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1113 (arm_sw_breakpoint_from_kind): New function.
1114 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1115 (struct linux_target_ops) <breakpoint>: Remove.
1116 (struct linux_target_ops) <breakpoint_len>: Remove.
1117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1119 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1120 (struct linux_target_ops) <breakpoint>: Remove.
1121 (struct linux_target_ops) <breakpoint_len>: Remove.
1122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1124 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1125 (struct linux_target_ops) <breakpoint>: Remove.
1126 (struct linux_target_ops) <breakpoint_len>: Remove.
1127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1129 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1130 and sw_breakpoint_from_kind to increment the pc.
1131 (linux_breakpoint_kind_from_pc): New function.
1132 (linux_sw_breakpoint_from_kind): New function.
1133 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1134 (initialize_low): Call breakpoint_kind_from_pc and
1135 sw_breakpoint_from_kind to replace breakpoint_data/len.
1136 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1138 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1139 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1140 (struct linux_target_ops) <breakpoint>: Remove.
1141 (struct linux_target_ops) <breakpoint_len>: Remove.
1142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1144 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1145 (struct linux_target_ops) <breakpoint>: Remove.
1146 (struct linux_target_ops) <breakpoint_len>: Remove.
1147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1149 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1150 (struct linux_target_ops) <breakpoint>: Remove.
1151 (struct linux_target_ops) <breakpoint_len>: Remove.
1152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1154 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1155 (struct linux_target_ops) <breakpoint>: Remove.
1156 (struct linux_target_ops) <breakpoint_len>: Remove.
1157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1159 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1160 (struct linux_target_ops) <breakpoint>: Remove.
1161 (struct linux_target_ops) <breakpoint_len>: Remove.
1162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1164 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1165 (struct linux_target_ops) <breakpoint>: Remove.
1166 (struct linux_target_ops) <breakpoint_len>: Remove.
1167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1169 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1170 (struct linux_target_ops) <breakpoint>: Remove.
1171 (struct linux_target_ops) <breakpoint_len>: Remove.
1172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1174 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1175 (struct linux_target_ops) <breakpoint>: Remove.
1176 (struct linux_target_ops) <breakpoint_len>: Remove.
1177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1179 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1180 (struct linux_target_ops) <breakpoint>: Remove.
1181 (struct linux_target_ops) <breakpoint_len>: Remove.
1182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1184 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1185 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1186 (struct linux_target_ops) <breakpoint>: Remove.
1187 (struct linux_target_ops) <breakpoint_len>: Remove.
1188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1190 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1191 (struct linux_target_ops) <breakpoint>: Remove.
1192 (struct linux_target_ops) <breakpoint_len>: Remove.
1193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1196 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1198 * linux-cris-low.c (cris_get_pc): Remove void arg.
1200 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1202 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1205 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1207 * inferiors.c (thread_pid_matches_callback): New function.
1208 (find_thread_process): New function.
1209 (remove_thread): Reset current_thread.
1210 (remove_process): Assert threads have been removed first.
1212 2015-10-15 Yao Qi <yao.qi@linaro.org>
1214 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1216 (aarch64_remove_point): Likewise.
1217 * regcache.c (regcache_register_size): New function.
1219 2015-10-12 Yao Qi <yao.qi@linaro.org>
1221 * linux-aarch64-low.c: Update all callers as emit_load_store
1222 is renamed to aarch64_emit_load_store.
1224 2015-10-12 Yao Qi <yao.qi@linaro.org>
1226 * linux-aarch64-low.c: Update all callers of function renaming
1227 from emit_insn to aarch64_emit_insn.
1229 2015-10-12 Yao Qi <yao.qi@linaro.org>
1231 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1232 arch/aarch64-insn.h.
1233 (struct aarch64_memory_operand): Likewise.
1235 (emit_insn): Move to arch/aarch64-insn.c.
1236 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1237 (emit_load_store): Move to arch/aarch64-insn.c.
1238 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1239 (can_encode_int32): Remove.
1241 2015-10-12 Yao Qi <yao.qi@linaro.org>
1243 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1244 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1245 (aarch64_relocate_instruction): Likewise.
1246 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1247 (struct aarch64_insn_visitor): Likewise.
1249 2015-10-12 Yao Qi <yao.qi@linaro.org>
1251 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1252 (struct aarch64_insn_visitor): New.
1253 (struct aarch64_insn_relocation_data): New.
1254 (aarch64_ftrace_insn_reloc_b): New function.
1255 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1256 (aarch64_ftrace_insn_reloc_cb): Likewise.
1257 (aarch64_ftrace_insn_reloc_tb): Likewise.
1258 (aarch64_ftrace_insn_reloc_adr): Likewise.
1259 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1260 (aarch64_ftrace_insn_reloc_others): Likewise.
1262 (aarch64_relocate_instruction): Use visitor.
1264 2015-10-12 Yao Qi <yao.qi@linaro.org>
1266 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1267 int. Add argument buf.
1268 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1269 aarch64_relocate_instruction.
1271 2015-10-12 Yao Qi <yao.qi@linaro.org>
1273 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1274 argument insn. Remove local variable insn. Don't call
1276 (aarch64_install_fast_tracepoint_jump_pad): Call
1279 2015-09-30 Yao Qi <yao.qi@linaro.org>
1281 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1282 (emit_load_store_pair): Likewise.
1284 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1286 * dll.c (match_dll): Add cast(s).
1287 (unloaded_dll): Likewise.
1288 * linux-low.c (second_thread_of_pid_p): Likewise.
1289 (delete_lwp_callback): Likewise.
1290 (count_events_callback): Likewise.
1291 (select_event_lwp_callback): Likewise.
1292 (linux_set_resume_request): Likewise.
1293 * server.c (accumulate_file_name_length): Likewise.
1294 (emit_dll_description): Likewise.
1295 (handle_qxfer_threads_worker): Likewise.
1296 (visit_actioned_threads): Likewise.
1297 * thread-db.c (any_thread_of): Likewise.
1298 * tracepoint.c (same_process_p): Likewise.
1299 (match_blocktype): Likewise.
1300 (build_traceframe_info_xml): Likewise.
1302 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1304 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1306 (gdb_unparse_agent_expr): Likewise.
1307 * hostio.c (require_data): Likewise.
1308 (handle_pread): Likewise.
1309 * linux-low.c (disable_regset): Likewise.
1310 (fetch_register): Likewise.
1311 (store_register): Likewise.
1312 (get_dynamic): Likewise.
1313 (linux_qxfer_libraries_svr4): Likewise.
1314 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1315 (set_fast_tracepoint_jump): Likewise.
1316 (uninsert_fast_tracepoint_jumps_at): Likewise.
1317 (reinsert_fast_tracepoint_jumps_at): Likewise.
1318 (validate_inserted_breakpoint): Likewise.
1319 (clone_agent_expr): Likewise.
1320 * regcache.c (init_register_cache): Likewise.
1321 * remote-utils.c (putpkt_binary_1): Likewise.
1322 (decode_M_packet): Likewise.
1323 (decode_X_packet): Likewise.
1324 (look_up_one_symbol): Likewise.
1325 (relocate_instruction): Likewise.
1326 (monitor_output): Likewise.
1327 * server.c (handle_search_memory): Likewise.
1328 (handle_qxfer_exec_file): Likewise.
1329 (handle_qxfer_libraries): Likewise.
1330 (handle_qxfer): Likewise.
1331 (handle_query): Likewise.
1332 (handle_v_cont): Likewise.
1333 (handle_v_run): Likewise.
1334 (captured_main): Likewise.
1335 * target.c (write_inferior_memory): Likewise.
1336 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1337 * tracepoint.c (init_trace_buffer): Likewise.
1338 (add_tracepoint_action): Likewise.
1339 (add_traceframe): Likewise.
1340 (add_traceframe_block): Likewise.
1341 (cmd_qtdpsrc): Likewise.
1342 (cmd_qtdv): Likewise.
1343 (cmd_qtstatus): Likewise.
1344 (response_source): Likewise.
1345 (response_tsv): Likewise.
1346 (cmd_qtnotes): Likewise.
1347 (gdb_collect): Likewise.
1348 (initialize_tracepoint): Likewise.
1350 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1352 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1353 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1354 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1356 (enum aarch64_condition_codes): New enum.
1357 (w0): New static global.
1360 (struct aarch64_memory_operand) <type>: New
1361 MEMORY_OPERAND_POSTINDEX type.
1362 (postindex_memory_operand): New helper function.
1363 (emit_ret): New function.
1364 (emit_load_store_pair): New function, factored out of emit_stp
1365 with support for MEMORY_OPERAND_POSTINDEX.
1366 (emit_stp): Rewrite using emit_load_store_pair.
1367 (emit_ldp): New function.
1368 (emit_load_store): Likewise.
1369 (emit_ldr): Mention post-index instruction in comment.
1370 (emit_ldrh): New function.
1371 (emit_ldrb): New function.
1372 (emit_ldrsw): Mention post-index instruction in comment.
1373 (emit_str): Likewise.
1374 (emit_subs): New function.
1375 (emit_cmp): Likewise.
1376 (emit_and): Likewise.
1377 (emit_orr): Likewise.
1378 (emit_orn): Likewise.
1379 (emit_eor): Likewise.
1380 (emit_mvn): Likewise.
1381 (emit_lslv): Likewise.
1382 (emit_lsrv): Likewise.
1383 (emit_asrv): Likewise.
1384 (emit_mul): Likewise.
1385 (emit_sbfm): Likewise.
1386 (emit_sbfx): Likewise.
1387 (emit_ubfm): Likewise.
1388 (emit_ubfx): Likewise.
1389 (emit_csinc): Likewise.
1390 (emit_cset): Likewise.
1391 (emit_nop): Likewise.
1392 (emit_ops_insns): New helper function.
1393 (emit_pop): Likewise.
1394 (emit_push): Likewise.
1395 (aarch64_emit_prologue): New function.
1396 (aarch64_emit_epilogue): Likewise.
1397 (aarch64_emit_add): Likewise.
1398 (aarch64_emit_sub): Likewise.
1399 (aarch64_emit_mul): Likewise.
1400 (aarch64_emit_lsh): Likewise.
1401 (aarch64_emit_rsh_signed): Likewise.
1402 (aarch64_emit_rsh_unsigned): Likewise.
1403 (aarch64_emit_ext): Likewise.
1404 (aarch64_emit_log_not): Likewise.
1405 (aarch64_emit_bit_and): Likewise.
1406 (aarch64_emit_bit_or): Likewise.
1407 (aarch64_emit_bit_xor): Likewise.
1408 (aarch64_emit_bit_not): Likewise.
1409 (aarch64_emit_equal): Likewise.
1410 (aarch64_emit_less_signed): Likewise.
1411 (aarch64_emit_less_unsigned): Likewise.
1412 (aarch64_emit_ref): Likewise.
1413 (aarch64_emit_if_goto): Likewise.
1414 (aarch64_emit_goto): Likewise.
1415 (aarch64_write_goto_address): Likewise.
1416 (aarch64_emit_const): Likewise.
1417 (aarch64_emit_call): Likewise.
1418 (aarch64_emit_reg): Likewise.
1419 (aarch64_emit_pop): Likewise.
1420 (aarch64_emit_stack_flush): Likewise.
1421 (aarch64_emit_zero_ext): Likewise.
1422 (aarch64_emit_swap): Likewise.
1423 (aarch64_emit_stack_adjust): Likewise.
1424 (aarch64_emit_int_call_1): Likewise.
1425 (aarch64_emit_void_call_2): Likewise.
1426 (aarch64_emit_eq_goto): Likewise.
1427 (aarch64_emit_ne_goto): Likewise.
1428 (aarch64_emit_lt_goto): Likewise.
1429 (aarch64_emit_le_goto): Likewise.
1430 (aarch64_emit_gt_goto): Likewise.
1431 (aarch64_emit_ge_got): Likewise.
1432 (aarch64_emit_ops_impl): New static global variable.
1433 (aarch64_emit_ops): New target function, return
1434 &aarch64_emit_ops_impl.
1435 (struct linux_target_ops): Install it.
1437 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1439 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1440 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1442 * linux-aarch64-ipa.c: New file.
1443 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1445 (aarch64_get_thread_area): New target method.
1446 (extract_signed_bitfield): New helper function.
1447 (aarch64_decode_ldr_literal): New function.
1448 (enum aarch64_opcodes): New enum.
1449 (struct aarch64_register): New struct.
1450 (struct aarch64_operand): New struct.
1451 (x0): New static global.
1460 (aarch64_register): New helper function.
1461 (register_operand): Likewise.
1462 (immediate_operand): Likewise.
1463 (struct aarch64_memory_operand): New struct.
1464 (offset_memory_operand): New helper function.
1465 (preindex_memory_operand): Likewise.
1466 (enum aarch64_system_control_registers): New enum.
1467 (ENCODE): New macro.
1468 (emit_insn): New helper function.
1469 (emit_b): New function.
1470 (emit_bcond): Likewise.
1471 (emit_cb): Likewise.
1472 (emit_tb): Likewise.
1473 (emit_blr): Likewise.
1474 (emit_stp): Likewise.
1475 (emit_ldp_q_offset): Likewise.
1476 (emit_stp_q_offset): Likewise.
1477 (emit_load_store): Likewise.
1478 (emit_ldr): Likewise.
1479 (emit_ldrsw): Likewise.
1480 (emit_str): Likewise.
1481 (emit_ldaxr): Likewise.
1482 (emit_stxr): Likewise.
1483 (emit_stlr): Likewise.
1484 (emit_data_processing_reg): Likewise.
1485 (emit_data_processing): Likewise.
1486 (emit_add): Likewise.
1487 (emit_sub): Likewise.
1488 (emit_mov): Likewise.
1489 (emit_movk): Likewise.
1490 (emit_mov_addr): Likewise.
1491 (emit_mrs): Likewise.
1492 (emit_msr): Likewise.
1493 (emit_sevl): Likewise.
1494 (emit_wfe): Likewise.
1495 (append_insns): Likewise.
1496 (can_encode_int32_in): New helper function.
1497 (aarch64_relocate_instruction): New function.
1498 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1499 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1500 (struct linux_target_ops): Install aarch64_get_thread_area,
1501 aarch64_install_fast_tracepoint_jump_pad and
1502 aarch64_get_min_fast_tracepoint_insn_len.
1504 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1506 * Makefile.in (aarch64-insn.o): New rule.
1507 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1509 2015-09-21 Yao Qi <yao.qi@linaro.org>
1511 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1513 2015-09-21 Yao Qi <yao.qi@linaro.org>
1515 * tracepoint.c (max_jump_pad_size): Remove.
1517 2015-09-18 Yao Qi <yao.qi@linaro.org>
1519 * linux-aarch64-low.c: Don't include sys/uio.h.
1520 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1522 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1524 * tracepoint.c (eval_result_type): Change prototype.
1525 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1527 2015-09-15 Pedro Alves <palves@redhat.com>
1529 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1530 Check whether to report exec events instead of checking whether
1531 multiprocess is enabled.
1533 2015-09-15 Pedro Alves <palves@redhat.com>
1536 * remote-utils.c (prepare_resume_reply): Merge
1537 TARGET_WAITKIND_VFORK_DONE switch case with the
1538 TARGET_WAITKIND_FORKED case.
1540 2015-09-15 Yao Qi <yao.qi@linaro.org>
1542 * server.c (handle_query): Check string comparison using
1543 "else if" instead of "if".
1545 2015-09-15 Yao Qi <yao.qi@linaro.org>
1547 * server.c (vCont_supported): New global variable.
1548 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1549 matches. Append ";vContSupported+" to own_buf.
1550 (handle_v_requests): Append ";s;S" to own_buf if target supports
1551 hardware single step or vCont_supported is false.
1552 (capture_main): Set vCont_supported to zero.
1554 2015-09-15 Yao Qi <yao.qi@linaro.org>
1556 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1558 (linux_supports_hardware_single_step): ... New function.
1559 (linux_target_ops): Update.
1560 * lynx-low.c (lynx_target_ops): Set field
1561 supports_hardware_single_step to target_can_do_hardware_single_step.
1562 * nto-low.c (nto_target_ops): Likewise.
1563 * spu-low.c (spu_target_ops): Likewise.
1564 * win32-low.c (win32_target_ops): Likewise.
1565 * target.c (target_can_do_hardware_single_step): New function.
1566 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1567 Remove. <supports_hardware_single_step>: New field.
1568 (target_supports_conditional_breakpoints): Remove.
1569 (target_supports_hardware_single_step): New macro.
1570 (target_can_do_hardware_single_step): Declare.
1571 * server.c (handle_query): Use target_supports_hardware_single_step
1572 instead of target_supports_conditional_breakpoints.
1574 2015-09-15 Yao Qi <yao.qi@linaro.org>
1576 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1578 (struct linux_target_ops the_low_target): Install
1579 aarch64_linux_siginfo_fixup.
1581 2015-09-11 Don Breazeal <donb@codesourcery.com>
1582 Luis Machado <lgustavo@codesourcery.com>
1584 * linux-low.c (linux_mourn): Static declaration.
1585 (linux_arch_setup): Move in front of
1586 handle_extended_wait.
1587 (linux_arch_setup_thread): New function.
1588 (handle_extended_wait): Handle exec events. Call
1589 linux_arch_setup_thread. Make event_lwp argument a
1590 pointer-to-a-pointer.
1591 (check_zombie_leaders): Do not check stopped threads.
1592 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1593 (linux_low_filter_event): Add lwp and thread for exec'ing
1594 non-leader thread if leader thread has been deleted.
1595 Refactor code into linux_arch_setup_thread and call it.
1596 Pass child lwp pointer by reference to handle_extended_wait.
1597 (linux_wait_for_event_filtered): Update comment.
1598 (linux_wait_1): Prevent clobbering exec event status.
1599 (linux_supports_exec_events): New function.
1600 (linux_target_ops) <supports_exec_events>: Initialize new member.
1601 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1603 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1604 * server.c (report_exec_events): New global variable.
1605 (handle_query): Handle qSupported query for exec-events feature.
1606 (captured_main): Initialize report_exec_events.
1607 * server.h (report_exec_events): Declare new global variable.
1608 * target.h (struct target_ops) <supports_exec_events>: New
1610 (target_supports_exec_events): New macro.
1611 * win32-low.c (win32_target_ops) <supports_exec_events>:
1612 Initialize new member.
1614 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1616 * linux-low.c (linux_low_enable_btrace): Remove.
1617 (linux_target_ops): Replace linux_low_enable_btrace with
1618 linux_enable_btrace.
1620 2015-09-03 Yao Qi <yao.qi@linaro.org>
1622 * linux-aarch64-low.c (aarch64_insert_point): Call
1623 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1626 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1628 * linux-low.c (check_stopped_by_breakpoint): Use
1629 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1631 2015-08-27 Pedro Alves <palves@redhat.com>
1633 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1635 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1637 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1638 the XNEW-family equivalent.
1639 (compile_bytecodes): Likewise.
1640 * dll.c (loaded_dll): Likewise.
1641 * event-loop.c (append_callback_event): Likewise.
1642 (create_file_handler): Likewise.
1643 (create_file_event): Likewise.
1644 * hostio.c (handle_open): Likewise.
1645 * inferiors.c (add_thread): Likewise.
1646 (add_process): Likewise.
1647 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1648 * linux-arm-low.c (arm_new_process): Likewise.
1649 (arm_new_thread): Likewise.
1650 * linux-low.c (add_to_pid_list): Likewise.
1651 (linux_add_process): Likewise.
1652 (handle_extended_wait): Likewise.
1653 (add_lwp): Likewise.
1654 (enqueue_one_deferred_signal): Likewise.
1655 (enqueue_pending_signal): Likewise.
1656 (linux_resume_one_lwp_throw): Likewise.
1657 (linux_resume_one_thread): Likewise.
1658 (linux_read_memory): Likewise.
1659 (linux_write_memory): Likewise.
1660 * linux-mips-low.c (mips_linux_new_process): Likewise.
1661 (mips_linux_new_thread): Likewise.
1662 (mips_add_watchpoint): Likewise.
1663 * linux-x86-low.c (initialize_low_arch): Likewise.
1664 * lynx-low.c (lynx_add_process): Likewise.
1665 * mem-break.c (set_raw_breakpoint_at): Likewise.
1666 (set_breakpoint): Likewise.
1667 (add_condition_to_breakpoint): Likewise.
1668 (add_commands_to_breakpoint): Likewise.
1669 (clone_agent_expr): Likewise.
1670 (clone_one_breakpoint): Likewise.
1671 * regcache.c (new_register_cache): Likewise.
1672 * remote-utils.c (look_up_one_symbol): Likewise.
1673 * server.c (queue_stop_reply): Likewise.
1674 (start_inferior): Likewise.
1675 (queue_stop_reply_callback): Likewise.
1676 (handle_target_event): Likewise.
1677 * spu-low.c (fetch_ppc_memory): Likewise.
1678 (store_ppc_memory): Likewise.
1679 * target.c (set_target_ops): Likewise.
1680 * thread-db.c (thread_db_load_search): Likewise.
1681 (try_thread_db_load_1): Likewise.
1682 * tracepoint.c (add_tracepoint): Likewise.
1683 (add_tracepoint_action): Likewise.
1684 (create_trace_state_variable): Likewise.
1685 (cmd_qtdpsrc): Likewise.
1686 (cmd_qtro): Likewise.
1687 (add_while_stepping_state): Likewise.
1688 * win32-low.c (child_add_thread): Likewise.
1689 (get_image_name): Likewise.
1691 2015-08-25 Yao Qi <yao.qi@linaro.org>
1693 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1695 2015-08-25 Yao Qi <yao.qi@linaro.org>
1697 * Makefile.in (aarch64-linux.o): New rule.
1698 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1700 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1701 (aarch64_init_debug_reg_state): Make it extern.
1702 (aarch64_linux_prepare_to_resume): Remove.
1704 2015-08-25 Yao Qi <yao.qi@linaro.org>
1706 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1707 lwp_arch_private_info and ptid_of_lwp.
1709 2015-08-25 Yao Qi <yao.qi@linaro.org>
1711 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1712 Find proc_info by find_process_pid. All callers updated.
1714 2015-08-25 Yao Qi <yao.qi@linaro.org>
1716 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1718 (debug_reg_change_callback): Remove.
1719 (aarch64_notify_debug_reg_change): Remove.
1721 2015-08-25 Yao Qi <yao.qi@linaro.org>
1723 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1724 Call current_lwp_ptid.
1726 2015-08-25 Yao Qi <yao.qi@linaro.org>
1728 * linux-aarch64-low.c (debug_reg_change_callback): Use
1731 2015-08-25 Yao Qi <yao.qi@linaro.org>
1733 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1735 2015-08-25 Yao Qi <yao.qi@linaro.org>
1737 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1739 2015-08-25 Yao Qi <yao.qi@linaro.org>
1741 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1744 2015-08-25 Yao Qi <yao.qi@linaro.org>
1746 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1748 (debug_reg_change_callback): Remove argument entry and add argument
1749 lwp. Remove local variable thread. Don't print thread id in the
1750 debugging output. Don't check whether pid of thread equals to pid.
1751 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1752 iterate_over_lwps instead find_inferior.
1754 2015-08-24 Pedro Alves <palves@redhat.com>
1756 * inferiors.c (get_first_process): New function.
1757 * inferiors.h (get_first_process): New declaration.
1758 * remote-utils.c (read_ptid): Default to the first process in the
1759 list, instead of to the current thread's process.
1761 2015-08-24 Pedro Alves <palves@redhat.com>
1763 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1764 * event-loop.c: Likewise.
1765 * remote-utils.c: Likewise.
1766 * tracepoint.c: Likewise.
1768 2015-08-24 Pedro Alves <palves@redhat.com>
1770 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1773 2015-08-21 Pedro Alves <palves@redhat.com>
1775 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1776 instead of literal 1.
1778 2015-08-21 Pedro Alves <palves@redhat.com>
1780 * tdesc.c (default_description): Explicitly zero-initialize.
1782 2015-08-21 Pedro Alves <palves@redhat.com>
1785 * inferiors.c (remove_thread): Discard any pending stop reply for
1787 * server.c (remove_all_on_match_pid): Rename to ...
1788 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1790 (discard_queued_stop_replies): Change parameter to a ptid. Now
1792 (handle_v_kill, kill_inferior_callback, captured_main)
1793 (process_serial_event): Adjust.
1794 * server.h (discard_queued_stop_replies): Declare.
1796 2015-08-21 Pedro Alves <palves@redhat.com>
1798 * linux-low.c (wait_for_sigstop): Always switch to no thread
1799 selected if the previously current thread dies.
1800 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1801 process instead of the current thread's.
1802 * remote-utils.c (input_interrupt): Don't check if there's no
1804 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1805 current thread to the general thread fails, error out.
1806 (handle_qxfer_auxv, handle_qxfer_libraries)
1807 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1808 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1809 (handle_query): Check if there's a thread selected instead of
1810 checking whether there's any thread in the thread list.
1811 (handle_qxfer_threads, handle_qxfer_btrace)
1812 (handle_qxfer_btrace_conf): Don't error out early if there's no
1813 thread in the thread list.
1814 (handle_v_cont, myresume): Don't set the current thread to the
1816 (process_serial_event) <Hg handling>: Also set thread_id if the
1817 previous general thread is still alive.
1818 (process_serial_event) <g/G handling>: If setting the current
1819 thread to the general thread fails, error out.
1820 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1821 thread's lwp instead of the current thread's.
1822 * target.c (set_desired_thread): If the desired thread was not
1823 found, leave the current thread pointing to NULL. Return an int
1824 (boolean) indicating success.
1825 * target.h (set_desired_thread): Change return type to int.
1827 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1829 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1830 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1832 (ps_get_thread_area): New function.
1834 2015-08-19 Gary Benson <gbenson@redhat.com>
1836 * hostio.c (handle_pread): Do not attempt to read more data
1837 than hostio_reply_with_data can fit in a packet.
1839 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1841 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1843 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1845 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1847 2015-08-06 Pedro Alves <palves@redhat.com>
1849 * tracepoint.c (expr_eval_result): Now an int.
1851 2015-08-06 Pedro Alves <palves@redhat.com>
1853 * gdbthread.h (struct regcache): Forward declare.
1854 (struct thread_info) <regcache_data>: Now a struct regcache
1856 * inferiors.c (inferior_regcache_data)
1857 (set_inferior_regcache_data): Now work with struct regcache
1859 * inferiors.h (struct regcache): Forward declare.
1860 (inferior_regcache_data, set_inferior_regcache_data): Now work
1861 with struct regcache pointers.
1862 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1863 (free_register_cache_thread): Remove struct regcache pointer
1866 2015-08-06 Pedro Alves <palves@redhat.com>
1868 * server.c (captured_main): On error, print the exception message
1869 to stderr, and if run_once is set, throw a quit.
1871 2015-08-06 Pedro Alves <palves@redhat.com>
1873 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1876 2015-08-06 Pedro Alves <palves@redhat.com>
1878 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1879 reading beyond the passed in buffer length.
1881 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1883 * tracepoint.c (symbol_list) <required>: Remove.
1885 2015-08-06 Pedro Alves <palves@redhat.com>
1887 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1888 count if stopping and suspending threads.
1889 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1890 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1891 (linux_detach): Complete an ongoing step-over.
1892 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1894 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1895 (linux_wait_1): If passing a signal to the inferior after
1896 finishing a step-over, unsuspend and re-resume all lwps. If we
1897 see a single-step event but the thread should be continuing, don't
1898 pass the trap to gdb.
1899 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1900 internal_error instead of gdb_assert.
1901 (enqueue_pending_signal): New function.
1902 (check_ptrace_stopped_lwp_gone): Add debug output.
1903 (start_step_over): Use internal_error instead of gdb_assert.
1904 (complete_ongoing_step_over): New function.
1905 (linux_resume_one_thread): Don't resume a suspended thread.
1906 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1909 2015-08-06 Pedro Alves <palves@redhat.com>
1911 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1912 (linux_thread_alive): Use lwp_is_marked_dead.
1913 (extended_event_reported): Delete.
1914 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1915 instead of extended_event_reported.
1916 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1918 (lwp_is_marked_dead): New function.
1919 (lwp_running): Use lwp_is_marked_dead.
1920 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1923 2015-08-06 Pedro Alves <palves@redhat.com>
1925 * linux-low.c (linux_wait_1): Move fork event output out of the
1926 !report_to_gdb check. Pass event_child->waitstatus to
1927 target_waitstatus_to_string instead of ourstatus.
1929 2015-08-04 Yao Qi <yao.qi@linaro.org>
1931 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1932 if current_thread is 32 bit.
1934 2015-08-04 Yao Qi <yao.qi@linaro.org>
1936 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1937 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1938 * server.c (extended_protocol): Remove "static".
1939 * server.h (extended_protocol): Declare it.
1941 2015-08-04 Yao Qi <yao.qi@linaro.org>
1943 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1944 both aarch64 and aarch32.
1945 (aarch64_set_pc): Likewise.
1947 2015-08-04 Yao Qi <yao.qi@linaro.org>
1949 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1950 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1951 arm-with-neon.xml to srv_xmlfiles.
1952 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1953 (is_64bit_tdesc): New function.
1954 (aarch64_linux_read_description): New function.
1955 (aarch64_arch_setup): Call aarch64_linux_read_description.
1956 (regs_info): Rename to regs_info_aarch64.
1957 (aarch64_regs_info): Return right regs_info.
1958 (initialize_low_arch): Call initialize_low_arch_aarch32.
1960 2015-08-04 Yao Qi <yao.qi@linaro.org>
1962 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1963 * linux-aarch32-low.c: New file.
1964 * linux-aarch32-low.h: New file.
1965 * linux-arm-low.c (arm_fill_gregset): Move it to
1966 linux-aarch32-low.c.
1967 (arm_store_gregset): Likewise.
1968 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1969 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1970 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1971 (regs_info): Rename to regs_info_arm.
1972 (arm_regs_info): Return regs_info_aarch32 if
1973 have_ptrace_getregset is 1 and target description is
1974 arm_with_neon or arm_with_vfpv3.
1975 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1976 Call initialize_low_arch_aarch32 instead.
1978 2015-08-04 Yao Qi <yao.qi@linaro.org>
1980 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1981 * linux-low.c: ... here.
1982 * linux-low.h (have_ptrace_getregset): Declare it.
1984 2015-08-04 Pedro Alves <palves@redhat.com>
1986 * thread-db.c (struct thread_db): Use new typedefs.
1987 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1989 (disable_thread_event_reporting): Cast result of dlsym to
1990 destination function pointer type.
1991 (thread_db_mourn): Use td_ta_delete_ftype.
1993 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1995 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1997 (CDX_BREAKPOINT): Define for R2.
1998 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1999 (the_low_target): Add comments.
2001 2015-07-30 Yao Qi <yao.qi@linaro.org>
2003 * linux-arm-low.c (arm_hwcap): Remove it.
2004 (arm_read_description): New local variable arm_hwcap. Don't
2005 set arm_hwcap to zero.
2007 2015-07-30 Yao Qi <yao.qi@linaro.org>
2009 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2010 Use regcache->tdesc instead.
2011 (arm_store_wmmxregset): Likewise.
2012 (arm_fill_vfpregset): Likewise.
2013 (arm_store_vfpregset): Likewise.
2015 2015-07-30 Yao Qi <yao.qi@linaro.org>
2017 * linux-arm-low.c: Include arch/arm.h.
2018 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2019 (arm_store_gregset): Likewise.
2021 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2023 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2024 ptrace's 4th parameter.
2026 2015-07-27 Yao Qi <yao.qi@linaro.org>
2028 * configure.srv (case aarch64*-*-linux*): Don't set
2031 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2033 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2035 * linux-arm-low.c: Likewise.
2036 * linux-cris-low.c: Likewise.
2037 * linux-crisv32-low.c: Likewise.
2038 * linux-low.c: Likewise.
2039 * linux-m68k-low.c: Likewise.
2040 * linux-mips-low.c: Likewise.
2041 * linux-nios2-low.c: Likewise.
2042 * linux-s390-low.c: Likewise.
2043 * linux-sparc-low.c: Likewise.
2044 * linux-tic6x-low.c: Likewise.
2045 * linux-tile-low.c: Likewise.
2046 * linux-x86-low.c: Likewise.
2048 2015-07-24 Pedro Alves <palves@redhat.com>
2050 * config.in: Regenerate.
2051 * configure: Regenerate.
2053 2015-07-24 Pedro Alves <palves@redhat.com>
2055 * acinclude.m4: Include ../ptrace.m4.
2056 * configure.ac: Call GDB_AC_PTRACE.
2057 * config.in, configure: Regenerate.
2059 2015-07-24 Yao Qi <yao.qi@linaro.org>
2061 * linux-low.c (linux_create_inferior): Remove setting to
2062 proc->priv->new_inferior.
2063 (linux_attach): Likewise.
2064 (linux_low_filter_event): Likewise.
2065 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2067 2015-07-24 Yao Qi <yao.qi@linaro.org>
2069 * linux-low.c (linux_arch_setup): New function.
2070 (linux_low_filter_event): If proc->tdesc is NULL and
2071 proc->attached is true, call the_low_target.arch_setup.
2072 Otherwise, keep status pending, and return.
2073 (linux_resume_one_lwp_throw): Don't call get_pc if
2074 thread->while_stepping isn't NULL. Don't call
2075 get_thread_regcache if proc->tdesc is NULL.
2076 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2077 (linux_target_ops): Install arch_setup.
2078 * server.c (start_inferior): Call the_target->arch_setup.
2079 * target.h (struct target_ops) <arch_setup>: New field.
2080 (target_arch_setup): New marco.
2081 * lynx-low.c (lynx_target_ops): Update.
2082 * nto-low.c (nto_target_ops): Update.
2083 * spu-low.c (spu_target_ops): Update.
2084 * win32-low.c (win32_target_ops): Update.
2086 2015-07-24 Yao Qi <yao.qi@linaro.org>
2088 * linux-low.c (linux_add_process): Don't set
2089 proc->priv->new_inferior.
2090 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2091 (linux_attach): Likewise.
2093 2015-07-24 Yao Qi <yao.qi@linaro.org>
2095 * server.c (start_inferior): Code refactor.
2097 2015-07-24 Yao Qi <yao.qi@linaro.org>
2099 * server.c (process_serial_event): Set general_thread.
2101 2015-07-21 Yao Qi <yao.qi@linaro.org>
2103 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2104 aarch64_linux_get_debug_reg_capacity.
2106 2015-07-17 Yao Qi <yao.qi@linaro.org>
2108 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2109 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2110 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2111 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2112 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2113 (AARCH64_HWP_ALIGNMENT): Likewise.
2114 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2115 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2116 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2117 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2118 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2119 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2120 (struct aarch64_debug_reg_state): Likewise.
2121 (struct arch_lwp_info): Likewise.
2122 (aarch64_align_watchpoint): Likewise.
2123 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2124 (aarch64_watchpoint_length): Likewise.
2125 (aarch64_point_encode_ctrl_reg): Likewise
2126 (aarch64_point_is_aligned): Likewise.
2127 (aarch64_align_watchpoint): Likewise.
2128 (aarch64_linux_set_debug_regs):
2129 (aarch64_dr_state_insert_one_point): Likewise.
2130 (aarch64_dr_state_remove_one_point): Likewise.
2131 (aarch64_handle_breakpoint): Likewise.
2132 (aarch64_handle_aligned_watchpoint): Likewise.
2133 (aarch64_handle_unaligned_watchpoint): Likewise.
2134 (aarch64_handle_watchpoint): Likewise.
2136 2015-07-17 Yao Qi <yao.qi@linaro.org>
2138 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2139 and don't aarch64_get_debug_reg_state. All callers update.
2140 (aarch64_handle_aligned_watchpoint): Likewise.
2141 (aarch64_handle_unaligned_watchpoint): Likewise.
2142 (aarch64_handle_watchpoint): Likewise.
2143 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2144 (aarch64_remove_point): Likewise.
2146 2015-07-17 Yao Qi <yao.qi@linaro.org>
2148 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2150 (aarch64_handle_unaligned_watchpoint): Likewise.
2152 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2154 Revert the previous 3 commits:
2155 Move gdb_regex* to common/
2156 Move linux_find_memory_regions_full & co.
2157 gdbserver build-id attribute generator
2159 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2160 Jan Kratochvil <jan.kratochvil@redhat.com>
2162 gdbserver build-id attribute generator.
2163 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2164 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2165 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2167 (get_dynamic): Use find_pdhr to traverse program headers.
2168 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2169 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2170 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2171 (get_hex_build_id): New.
2172 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2173 to reply XML document.
2175 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2176 Jan Kratochvil <jan.kratochvil@redhat.com>
2178 * target.c: Include target/target-utils.h and fcntl.h.
2179 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2180 (target_fileio_read_stralloc): New functions.
2182 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2184 * Makefile.in (OBS): Add gdb_regex.o.
2186 * config.in: Rebuilt.
2187 * configure: Rebuilt.
2189 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2190 Jan Kratochvil <jan.kratochvil@redhat.com>
2192 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2193 * Makefile.in (OBS): Add target-utils.o.
2194 (linux-maps.o, target-utils.o): New.
2195 * configure.srv (srv_linux_obj): Add linux-maps.o.
2197 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2199 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2201 (the_low_target): Install it.
2203 2015-07-14 Pedro Alves <palves@redhat.com>
2205 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2206 Instead, ignore ECHILD, and throw an error for other errnos.
2208 2015-07-10 Pedro Alves <palves@redhat.com>
2210 * event-loop.c (struct callback_event) <data>: Change type to
2211 gdb_client_data instance instead of gdb_client_data pointer.
2212 (append_callback_event): Adjust.
2214 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2216 * linux-aarch64-low.c: Add comments for each linux_target_ops
2217 method. Remove comments already covered in target_ops and
2218 linux_target_ops definitions.
2219 (the_low_target): Add comments for each unimplemented method.
2221 2015-07-09 Yao Qi <yao.qi@linaro.org>
2223 * linux-aarch64-low.c (aarch64_regmap): Remove.
2224 (aarch64_usrregs_info): Remove.
2225 (regs_info): Set field usrregs to NULL.
2227 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2229 * linux-low.c: Include "rsp-low.h"
2230 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2231 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2232 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2233 (handle_btrace_enable_pt): New.
2234 (handle_btrace_general_set): Support "pt".
2235 (handle_btrace_conf_general_set): Support "pt:size".
2237 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2239 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2242 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2244 * linux-aarch64-low.c: Remove comment about endianness.
2245 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2246 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2249 2015-06-24 Gary Benson <gbenson@redhat.com>
2251 * linux-i386-ipa.c (stdint.h): Do not include.
2252 * lynx-i386-low.c (stdint.h): Likewise.
2253 * lynx-ppc-low.c (stdint.h): Likewise.
2254 * mem-break.c (stdint.h): Likewise.
2255 * thread-db.c (stdint.h): Likewise.
2256 * tracepoint.c (stdint.h): Likewise.
2257 * win32-low.c (stdint.h): Likewise.
2259 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2261 * server.c (write_qxfer_response): Update call to
2262 remote_escape_output.
2264 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2265 Jan Kratochvil <jan.kratochvil@redhat.com>
2267 Merge multiple hex conversions.
2268 * gdbreplay.c (tohex): Rename to 'fromhex'.
2269 (logchar): Use fromhex.
2271 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2273 * server.c (handle_qxfer_libraries): Set `version' attribute for
2276 2015-06-10 Gary Benson <gbenson@redhat.com>
2278 * target.h (struct target_ops) <multifs_open>: New field.
2279 <multifs_unlink>: Likewise.
2280 <multifs_readlink>: Likewise.
2281 * linux-low.c (nat/linux-namespaces.h): New include.
2282 (linux_target_ops): Initialize the_target->multifs_open,
2283 the_target->multifs_unlink and the_target->multifs_readlink.
2284 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2285 * hostio.c (hostio_fs_pid): New static variable.
2286 (hostio_handle_new_gdb_connection): New function.
2287 (handle_setfs): Likewise.
2288 (handle_open): Use the_target->multifs_open as appropriate.
2289 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2290 (handle_readlink): Use the_target->multifs_readlink as
2292 (handle_vFile): Handle vFile:setfs packets.
2293 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2294 after target_handle_new_gdb_connection.
2296 2015-06-10 Gary Benson <gbenson@redhat.com>
2298 * configure.ac (AC_CHECK_FUNCS): Add setns.
2299 * config.in: Regenerate.
2300 * configure: Likewise.
2301 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2302 (linux-namespaces.o): New rule.
2303 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2305 2015-06-09 Gary Benson <gbenson@redhat.com>
2307 * hostio.c (handle_open): Process mode argument with
2308 fileio_to_host_mode.
2310 2015-06-01 Yao Qi <yao.qi@linaro.org>
2312 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2313 * linux-x86-low.c: Likewise.
2315 2015-05-28 Don Breazeal <donb@codesourcery.com>
2317 * linux-low.c (handle_extended_wait): Initialize
2318 thread_info.last_resume_kind for new fork children.
2320 2015-05-15 Pedro Alves <palves@redhat.com>
2322 * target.h (target_handle_new_gdb_connection): Rewrite using if
2323 wrapped in do/while.
2325 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2327 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2328 * configure, config.in: Regenerate.
2329 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2332 2015-05-12 Don Breazeal <donb@codesourcery.com>
2334 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2335 PTRACE_EVENT_VFORK_DONE.
2336 (linux_low_ptrace_options, extended_event_reported): Add vfork
2338 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2339 and "vforkdone" for RSP 'T' Stop Reply Packet.
2340 * server.h (report_vfork_events): Declare
2343 2015-05-12 Don Breazeal <donb@codesourcery.com>
2345 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2346 (the_low_target) <new_fork>: Initialize new member.
2347 * linux-arm-low.c (arm_new_fork): New function.
2348 (the_low_target) <new_fork>: Initialize new member.
2349 * linux-low.c (handle_extended_wait): Call new target function
2351 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2352 * linux-mips-low.c (mips_add_watchpoint): New function
2353 extracted from mips_insert_point.
2354 (the_low_target) <new_fork>: Initialize new member.
2355 (mips_linux_new_fork): New function.
2356 (mips_insert_point): Call mips_add_watchpoint.
2357 * linux-x86-low.c (x86_linux_new_fork): New function.
2358 (the_low_target) <new_fork>: Initialize new member.
2360 2015-05-12 Don Breazeal <donb@codesourcery.com>
2362 * linux-low.c (handle_extended_wait): Implement return value,
2363 rename argument 'event_child' to 'event_lwp', handle
2364 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2365 (linux_low_ptrace_options): New function.
2366 (linux_low_filter_event): Call linux_low_ptrace_options,
2367 use different argument fo linux_enable_event_reporting,
2368 use return value from handle_extended_wait.
2369 (extended_event_reported): New function.
2370 (linux_wait_1): Call extended_event_reported and set
2371 status to report fork events.
2372 (linux_write_memory): Add pid to debug message.
2373 (reset_lwp_ptrace_options_callback): New function.
2374 (linux_handle_new_gdb_connection): New function.
2375 (linux_target_ops): Initialize new structure member.
2376 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2377 * lynx-low.c: Initialize new structure member.
2378 * remote-utils.c (prepare_resume_reply): Implement stop reason
2379 "fork" for "T" stop message.
2380 * server.c (handle_query): Call handle_new_gdb_connection.
2381 * server.h (report_fork_events): Declare global flag.
2382 * target.h (struct target_ops) <handle_new_gdb_connection>:
2384 (target_handle_new_gdb_connection): New macro.
2385 * win32-low.c: Initialize new structure member.
2387 2015-05-12 Don Breazeal <donb@codesourcery.com>
2389 * mem-break.c (APPEND_TO_LIST): Define macro.
2390 (clone_agent_expr): New function.
2391 (clone_one_breakpoint): New function.
2392 (clone_all_breakpoints): New function.
2393 * mem-break.h: Declare new functions.
2395 2015-05-12 Don Breazeal <donb@codesourcery.com>
2397 * linux-low.c (linux_supports_fork_events): New function.
2398 (linux_supports_vfork_events): New function.
2399 (linux_target_ops): Initialize new structure members.
2400 (initialize_low): Call linux_check_ptrace_features.
2401 * lynx-low.c (lynx_target_ops): Initialize new structure
2403 * server.c (report_fork_events, report_vfork_events):
2405 (handle_query): Add new features to qSupported packet and
2407 (captured_main): Initialize new global variables.
2408 * target.h (struct target_ops) <supports_fork_events>:
2410 <supports_vfork_events>: New member.
2411 (target_supports_fork_events): New macro.
2412 (target_supports_vfork_events): New macro.
2413 * win32-low.c (win32_target_ops): Initialize new structure
2416 2015-05-12 Gary Benson <gbenson@redhat.com>
2418 * server.c (handle_qxfer_exec_file): Use current process
2421 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2423 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2424 Remove HAVE_PTRACE_GETREGS conditionals.
2425 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2426 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2428 2015-05-08 Yao Qi <yao.qi@linaro.org>
2430 * linux-low.c (linux_supports_conditional_breakpoints): New
2432 (linux_target_ops): Install new target method.
2433 * lynx-low.c (lynx_target_ops): Install NULL hook for
2434 supports_conditional_breakpoints.
2435 * nto-low.c (nto_target_ops): Likewise.
2436 * spu-low.c (spu_target_ops): Likewise.
2437 * win32-low.c (win32_target_ops): Likewise.
2438 * server.c (handle_query): Check
2439 target_supports_conditional_breakpoints.
2440 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2442 (target_supports_conditional_breakpoints): New macro.
2444 2015-05-06 Pedro Alves <palves@redhat.com>
2447 * server.c (start_inferior): If the process exits, mourn it.
2449 2015-04-21 Gary Benson <gbenson@redhat.com>
2451 * hostio.c (fileio_open_flags_to_host): Factored out to
2452 fileio_to_host_openflags in common/fileio.c. Single use
2455 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2457 * linux-xtensa-low.c (xtensa_fill_gregset)
2458 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2461 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2463 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2464 (regs_info): Replace usrregs pointer with NULL.
2466 2015-04-17 Gary Benson <gbenson@redhat.com>
2468 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2469 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2470 * server.c (handle_qxfer_exec_file): New function.
2471 (qxfer_packets): Add exec-file entry.
2472 (handle_query): Report qXfer:exec-file:read as supported packet.
2474 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2476 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2478 2015-04-09 Gary Benson <gbenson@redhat.com>
2480 * hostio-errno.c (errno_to_fileio_error): Remove function.
2481 Update caller to use remote_fileio_to_fio_error.
2483 2015-04-09 Yao Qi <yao.qi@linaro.org>
2485 * linux-low.c (linux_insert_point): Call
2486 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2487 (linux_remove_point): Call remove_memory_breakpoint if type is
2489 * linux-x86-low.c (x86_insert_point): Don't call
2490 insert_memory_breakpoint.
2491 (x86_remove_point): Don't call remove_memory_breakpoint.
2493 2015-04-01 Pedro Alves <palves@redhat.com>
2494 Cleber Rosa <crosa@redhat.com>
2496 * server.c (gdbserver_usage): Reorganize and extend the usage
2499 2015-03-24 Pedro Alves <palves@redhat.com>
2501 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2502 output. Also dump TRAP_TRACE.
2503 (linux_low_filter_event): In debug output, distinguish a
2504 resume_stop SIGSTOP from a delayed SIGSTOP.
2506 2015-03-24 Gary Benson <gbenson@redhat.com>
2508 * linux-x86-low.c (x86_linux_new_thread): Moved to
2510 (x86_linux_prepare_to_resume): Likewise.
2512 2015-03-24 Gary Benson <gbenson@redhat.com>
2514 * Makefile.in (x86-linux-dregs.o): New rule.
2515 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2516 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2517 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2518 (x86_linux_dr_get): Likewise.
2519 (x86_linux_dr_set): Likewise.
2520 (update_debug_registers_callback): Likewise.
2521 (x86_linux_dr_set_addr): Likewise.
2522 (x86_linux_dr_get_addr): Likewise.
2523 (x86_linux_dr_set_control): Likewise.
2524 (x86_linux_dr_get_control): Likewise.
2525 (x86_linux_dr_get_status): Likewise.
2526 (x86_linux_update_debug_registers): Likewise.
2528 2015-03-24 Gary Benson <gbenson@redhat.com>
2530 * linux-x86-low.c (x86_linux_update_debug_registers):
2531 New function, factored out from...
2532 (x86_linux_prepare_to_resume): ...this.
2534 2015-03-24 Gary Benson <gbenson@redhat.com>
2536 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2537 (x86_linux_dr_set): Likewise.
2538 (update_debug_registers_callback): Likewise.
2539 (x86_linux_dr_set_addr): Likewise.
2540 (x86_linux_dr_get_addr): Likewise.
2541 (x86_linux_dr_set_control): Likewise.
2542 (x86_linux_dr_get_control): Likewise.
2543 (x86_linux_dr_get_status): Likewise.
2544 (x86_linux_prepare_to_resume): Likewise.
2546 2015-03-24 Gary Benson <gbenson@redhat.com>
2548 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2549 Use perror_with_name. Pass string through gettext.
2550 (x86_linux_dr_set): Likewise.
2552 2015-03-24 Gary Benson <gbenson@redhat.com>
2554 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2555 (x86_linux_dr_set_addr): ...this.
2556 (x86_dr_low_get_addr): Rename to...
2557 (x86_linux_dr_get_addr): ...this.
2558 (x86_dr_low_set_control): Rename to...
2559 (x86_linux_dr_set_control): ...this.
2560 (x86_dr_low_get_control): Rename to...
2561 (x86_linux_dr_get_control): ...this.
2562 (x86_dr_low_get_status): Rename to...
2563 (x86_linux_dr_get_status): ...this.
2564 (x86_dr_low): Update with new function names.
2566 2015-03-24 Gary Benson <gbenson@redhat.com>
2568 * Makefile.in (x86-linux.o): New rule.
2569 * configure.srv: Add x86-linux.o to relevant targets.
2570 * linux-low.c (lwp_set_arch_private_info): New function.
2571 (lwp_arch_private_info): Likewise.
2572 * linux-x86-low.c: Include nat/x86-linux.h.
2573 (arch_lwp_info): Removed structure.
2574 (update_debug_registers_callback):
2575 Use lwp_set_debug_registers_changed.
2576 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2577 and lwp_set_debug_registers_changed.
2578 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2580 2015-03-24 Gary Benson <gbenson@redhat.com>
2582 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2583 * linux-arm-low.c (arm_new_thread): Likewise.
2584 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2585 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2586 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2587 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2589 2015-03-24 Gary Benson <gbenson@redhat.com>
2591 * linux-low.c (ptid_of_lwp): New function.
2592 (lwp_is_stopped): Likewise.
2593 (lwp_stop_reason): Likewise.
2594 * linux-x86-low.c (update_debug_registers_callback):
2596 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2599 2015-03-24 Gary Benson <gbenson@redhat.com>
2601 * linux-low.h (linux_stop_lwp): Remove declaration.
2603 2015-03-24 Gary Benson <gbenson@redhat.com>
2605 * linux-low.h: Include nat/linux-nat.h.
2606 * linux-low.c (iterate_over_lwps_args): New structure.
2607 (iterate_over_lwps_filter): New function.
2608 (iterate_over_lwps): Likewise.
2609 * linux-x86-low.c (update_debug_registers_callback):
2610 Update signature to what iterate_over_lwps expects.
2611 Remove PID check that iterate_over_lwps now performs.
2612 (x86_dr_low_set_addr): Use iterate_over_lwps.
2613 (x86_dr_low_set_control): Likewise.
2615 2015-03-24 Gary Benson <gbenson@redhat.com>
2617 * linux-x86-low.c (x86_debug_reg_state): New function.
2618 (x86_linux_prepare_to_resume): Use the above.
2620 2015-03-24 Gary Benson <gbenson@redhat.com>
2622 * linux-low.c (current_lwp_ptid): New function.
2623 * linux-x86-low.c: Include nat/linux-nat.h.
2624 (x86_dr_low_get_addr): Use current_lwp_ptid.
2625 (x86_dr_low_get_control): Likewise.
2626 (x86_dr_low_get_status): Likewise.
2628 2015-03-20 Pedro Alves <palves@redhat.com>
2630 * tracepoint.c (cmd_qtstatus): Make "str" const.
2632 2015-03-20 Pedro Alves <palves@redhat.com>
2634 * server.c (handle_general_set): Make "req_str" const.
2636 2015-03-19 Pedro Alves <palves@redhat.com>
2638 * linux-low.c (linux_resume_one_lwp): Rename to ...
2639 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2640 instead call perror_with_name.
2641 (check_ptrace_stopped_lwp_gone): New function.
2642 (linux_resume_one_lwp): Reimplement as wrapper around
2643 linux_resume_one_lwp_throw that swallows errors if the LWP is
2646 2015-03-19 Pedro Alves <palves@redhat.com>
2648 * linux-low.c (count_events_callback, select_event_lwp_callback):
2649 No longer check whether the thread has resume_stop as last resume
2652 2015-03-19 Pedro Alves <palves@redhat.com>
2654 * linux-low.c (count_events_callback, select_event_lwp_callback):
2655 Use the lwp's status_pending_p field, not the thread's.
2657 2015-03-19 Pedro Alves <palves@redhat.com>
2659 * linux-low.c (select_event_lwp_callback): Update comments to
2660 no longer mention SIGTRAP.
2662 2015-03-18 Gary Benson <gbenson@redhat.com>
2664 * server.c (handle_query): Do not report vFile:fstat as supported.
2666 2015-03-11 Gary Benson <gbenson@redhat.com>
2668 * hostio.c (sys/types.h): New include.
2669 (sys/stat.h): Likewise.
2670 (common-remote-fileio.h): Likewise.
2671 (handle_fstat): New function.
2672 (handle_vFile): Handle vFile:fstat packets.
2674 2015-03-11 Gary Benson <gbenson@redhat.com>
2676 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2677 struct stat.st_blocks and struct stat.st_blksize.
2678 * configure: Regenerate.
2679 * config.in: Likewise.
2680 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2681 (OBS): Add common-remote-fileio.o.
2682 (common-remote-fileio.o): New rule.
2684 2015-03-09 Pedro Alves <palves@redhat.com>
2686 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2687 'struct sockaddr' pointer in 'accept' call.
2689 2015-03-09 Pedro Alves <palves@redhat.com>
2692 2015-03-07 Pedro Alves <palves@redhat.com>
2693 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2694 or <winsock2.h> here. Instead include "gdb_socket.h".
2695 (remote_open): Use union gdb_sockaddr_u.
2696 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2697 or <winsock2.h> here. Instead include "gdb_socket.h".
2698 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2699 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2701 (init_named_socket, gdb_agent_helper_thread): Use union
2704 2015-03-07 Pedro Alves <palves@redhat.com>
2706 * configure.ac (build_warnings): Move
2707 -Wdeclaration-after-statement to the C-specific set.
2708 * configure: Regenerate.
2710 2015-03-07 Pedro Alves <palves@redhat.com>
2712 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2713 or <winsock2.h> here. Instead include "gdb_socket.h".
2714 (remote_open): Use union gdb_sockaddr_u.
2715 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2716 or <winsock2.h> here. Instead include "gdb_socket.h".
2717 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2718 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2720 (init_named_socket, gdb_agent_helper_thread): Use union
2723 2015-03-07 Pedro Alves <palves@redhat.com>
2725 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2728 2015-03-06 Yao Qi <yao.qi@linaro.org>
2730 * linux-aarch64-low.c (aarch64_insert_point): Use
2731 show_debug_regs as a boolean.
2732 (aarch64_remove_point): Likewise.
2734 2015-03-05 Pedro Alves <palves@redhat.com>
2736 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2737 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2738 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2739 * nto-low.c (nto_target_ops): Likewise.
2740 * spu-low.c (spu_target_ops): Likewise.
2741 * win32-low.c (win32_target_ops): Likewise.
2743 2015-03-04 Pedro Alves <palves@redhat.com>
2745 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2746 Decide whether a breakpoint triggered based on the SIGTRAP's
2748 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2749 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2750 (linux_low_filter_event): Check for breakpoints before checking
2752 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2754 (linux_stopped_by_sw_breakpoint)
2755 (linux_supports_stopped_by_sw_breakpoint)
2756 (linux_stopped_by_hw_breakpoint)
2757 (linux_supports_stopped_by_hw_breakpoint): New functions.
2758 (linux_target_ops): Install new target methods.
2760 2015-03-04 Pedro Alves <palves@redhat.com>
2762 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2763 * server.c (swbreak_feature, hwbreak_feature): New globals.
2764 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2765 (captured_main): Clear swbreak_feature and hwbreak_feature.
2766 * server.h (swbreak_feature, hwbreak_feature): Declare.
2767 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2768 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2769 supports_stopped_by_hw_breakpoint>: New fields.
2770 (target_supports_stopped_by_sw_breakpoint)
2771 (target_stopped_by_sw_breakpoint)
2772 (target_supports_stopped_by_hw_breakpoint)
2773 (target_stopped_by_hw_breakpoint): Declare.
2775 2015-03-04 Pedro Alves <palves@redhat.com>
2777 enum lwp_stop_reason -> enum target_stop_reason
2778 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2779 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2780 (linux_wait_1, stuck_in_jump_pad_callback)
2781 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2782 (linux_stopped_by_watchpoint):
2783 * linux-low.h (enum lwp_stop_reason): Delete.
2784 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2785 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2787 2015-03-04 Yao Qi <yao.qi@linaro.org>
2789 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2791 2015-03-03 Gary Benson <gbenson@redhat.com>
2793 * hostio.c (handle_vFile): Fix prefix lengths.
2795 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2797 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2800 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2802 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2803 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2804 (clean): Add "rm -f" for above C files.
2805 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2806 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2807 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2808 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2809 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2810 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2811 (init_registers_s390x_vx_linux64)
2812 (init_registers_s390x_tevx_linux64)
2813 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2814 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2816 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2817 (s390_store_vxrs_high): New functions.
2818 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2820 (s390_arch_setup): Add logic for selecting one of the new target
2821 descriptions. Activate the new vector regsets if applicable.
2822 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2823 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2824 and init_registers_s390x_tevx_linux64.
2826 2015-03-01 Pedro Alves <palves@redhat.com>
2828 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2831 2015-02-27 Pedro Alves <palves@redhat.com>
2833 * linux-x86-low.c (u_debugreg_offset): New function.
2834 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2836 2015-02-27 Pedro Alves <palves@redhat.com>
2838 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2839 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2840 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2841 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2842 (ps_lsetfpregs, ps_getpid)
2843 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2844 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2845 (ps_lsetxregs, ps_plog): Declare.
2847 2015-02-27 Pedro Alves <palves@redhat.com>
2849 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2850 IP_AGENT_EXPORT_FUNC.
2851 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2852 IP_AGENT_EXPORT_FUNC.
2853 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2854 (IP_AGENT_EXPORT): Delete.
2855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2856 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2857 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2858 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2859 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2860 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2861 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2862 (traceframe_read_count, traceframe_write_count)
2863 (traceframes_created, trace_state_variables, get_raw_reg)
2864 (get_trace_state_variable_value, set_trace_state_variable_value)
2865 (ust_loaded, helper_thread_id, cmd_buf): Use
2866 IPA_SYM_EXPORTED_NAME.
2867 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2868 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2869 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2870 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2871 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2872 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2873 EXTERN_C_PUSH/EXTERN_C_POP.
2874 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2875 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2876 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2877 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2878 (traceframe_write_count, traceframe_read_count)
2879 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2880 (about_to_request_buffer_space, get_trace_state_variable_value)
2881 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2882 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2883 EXTERN_C_PUSH/EXTERN_C_POP.
2884 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2885 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2886 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2887 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2888 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2889 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2890 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2891 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2893 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2894 (IP_AGENT_EXPORT_VAR_DECL): Define.
2896 (gdb_agent_get_raw_reg): Declare.
2898 2015-02-27 Tom Tromey <tromey@redhat.com>
2899 Pedro Alves <palves@redhat.com>
2901 Rename symbols whose names are reserved C++ keywords throughout.
2903 2015-02-27 Pedro Alves <palves@redhat.com>
2905 * Makefile.in (COMPILER): New, get it from autoconf.
2906 (CXX): Get from autoconf instead.
2907 (COMPILE.pre): Use COMPILER.
2908 (CC-LD): Rename to ...
2909 (CC_LD): ... this. Use COMPILER.
2910 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2911 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2912 * acinclude.m4: Include build-with-cxx.m4.
2913 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2914 Disable -Werror by default if building in C++ mode.
2915 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2916 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2917 the C++ compiler. Save/restore CXXFLAGS too.
2918 * configure: Regenerate.
2920 2015-02-27 Pedro Alves <palves@redhat.com>
2922 * acinclude.m4: Include libiberty.m4.
2923 * configure.ac: Call libiberty_INIT.
2924 * config.in, configure: Regenerate.
2926 2015-02-26 Pedro Alves <palves@redhat.com>
2928 * linux-low.c (linux_wait_1): When incrementing the PC past a
2929 program breakpoint always use the_low_target.breakpoint_len as
2930 increment, rather than the maximum between that and
2931 the_low_target.decr_pc_after_break.
2933 2015-02-23 Pedro Alves <palves@redhat.com>
2935 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2936 thread was doing a step-over; always adjust the PC if
2937 we stepped over a permanent breakpoint.
2938 (linux_wait_1): If we stepped over breakpoint that was on top of a
2939 permanent breakpoint, manually advance the PC past it.
2941 2015-02-23 Pedro Alves <palves@redhat.com>
2943 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2945 (x86_fill_gregset, x86_store_gregset): Use it when handling
2948 2015-02-20 Pedro Alves <palves@redhat.com>
2950 * thread-db.c: Include "nat/linux-procfs.h".
2951 (thread_db_init): Skip listing new threads if the kernel supports
2952 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2954 2015-02-20 Pedro Alves <palves@redhat.com>
2956 * linux-low.c (status_pending_p_callback): Use ptid_match.
2958 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2960 PR breakpoints/16812
2961 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2962 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2963 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2965 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2967 PR breakpoints/15956
2968 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2970 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2972 * linux-low.c (linux_low_btrace_conf): Print size.
2973 * server.c (handle_btrace_conf_general_set): New.
2974 (hanle_general_set): Call handle_btrace_conf_general_set.
2975 (handle_query): Report Qbtrace-conf:bts:size as supported.
2977 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2979 * linux-low.c (linux_low_enable_btrace): Update parameters.
2980 (linux_low_btrace_conf): New.
2981 (linux_target_ops)<to_btrace_conf>: Initialize.
2982 * server.c (current_btrace_conf): New.
2983 (handle_btrace_enable): Rename to ...
2984 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2985 to target_enable_btrace. Update comment. Update users.
2986 (handle_qxfer_btrace_conf): New.
2987 (qxfer_packets): Add btrace-conf entry.
2988 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2989 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2990 (target_ops)<read_btrace_conf>: New.
2991 (target_enable_btrace): Update parameters.
2992 (target_read_btrace_conf): New.
2994 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2996 * server.c (handle_btrace_general_set): Remove call to
2997 target_supports_btrace.
2998 (supported_btrace_packets): New.
2999 (handle_query): Call supported_btrace_packets.
3000 * target.h: include btrace-common.h.
3001 (btrace_target_info): Removed.
3002 (supports_btrace, target_supports_btrace): Update parameters.
3004 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3006 * Makefile.in (SFILES): Add common/btrace-common.c.
3007 (OBS): Add common/btrace-common.o.
3008 (btrace-common.o): Add build rules.
3009 * linux-low: Include btrace-common.h.
3010 (linux_low_read_btrace): Use struct btrace_data. Call
3011 btrace_data_init and btrace_data_fini.
3013 2015-02-06 Pedro Alves <palves@redhat.com>
3015 * thread-db.c (find_new_threads_callback): Add debug output.
3017 2015-02-04 Pedro Alves <palves@redhat.com>
3019 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3020 (resume_stopped_resumed_lwps): New function.
3021 (linux_wait_for_event_filtered): Use it.
3023 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3025 * Makefile.in (SFILES): Add linux-personality.c.
3026 (linux-personality.o): New rule.
3027 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3028 list of objects to be built.
3029 * linux-low.c: Include nat/linux-personality.h.
3030 (linux_create_inferior): Remove code to disable address space
3031 randomization (moved to ../nat/linux-personality.c). Create
3032 cleanup to disable address space randomization.
3034 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3036 * Makefile.in (posix-strerror.o): New rule.
3037 (mingw-strerror.o): Likewise.
3038 * configure: Regenerated.
3039 * configure.ac: Source file ../common/common.host. Initialize new
3040 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3042 2015-01-14 Yao Qi <yao@codesourcery.com>
3044 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3045 (ppc-linux.o): New rule.
3046 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3047 * configure.ac: AC_CHECK_FUNCS(getauxval).
3048 * config.in: Re-generated.
3049 * configure: Re-generated.
3050 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3051 ppc64_64bit_inferior_p
3053 2015-01-14 Yao Qi <yao@codesourcery.com>
3055 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3056 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3057 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3058 (PT_ORIG_R3, PT_TRAP): Likewise.
3059 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3060 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3061 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3063 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3065 * i387-fp.c (i387_cache_to_xsave): In look over
3066 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3067 zmmh_low_space field by use of zmmh_high_space.
3069 2015-01-09 Pedro Alves <palves@redhat.com>
3071 * linux-low.c (step_over_bkpt): Move higher up in the file.
3072 (handle_extended_wait): Don't store the stop_pc here.
3073 (get_stop_pc): Adjust comments and rename to ...
3074 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3075 stopped for a software breakpoint or hardware breakpoint.
3076 (thread_still_has_status_pending_p): New function.
3077 (status_pending_p_callback): Use
3078 thread_still_has_status_pending_p. If the event is no longer
3079 interesting, resume the LWP.
3080 (handle_tracepoints): Add assert.
3081 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3082 (wstatus_maybe_breakpoint): New function.
3083 (cancel_breakpoint): Delete function.
3084 (check_stopped_by_watchpoint): New function, factored out from
3085 linux_low_filter_event.
3086 (lp_status_maybe_breakpoint): Delete function.
3087 (linux_low_filter_event): Remove filter_ptid argument.
3088 Leave thread group exits pending here. Store the LWP's stop PC.
3089 Always leave events pending.
3090 (linux_wait_for_event_filtered): Pull all events out of the
3091 kernel, and leave them all pending.
3092 (count_events_callback, select_event_lwp_callback): Consider all
3094 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3095 (select_event_lwp): Only give preference to the stepping LWP in
3096 all-stop mode. Adjust comments.
3097 (ignore_event): New function.
3098 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3099 references to cancel_breakpoints. Adjust to renames. Also give
3100 equal priority to all LWPs that have had events in non-stop mode.
3101 If reporting a software breakpoint event, unadjust the LWP's PC.
3102 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3103 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3105 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3106 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3107 (linux_stopped_by_watchpoint): Adjust.
3108 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3109 * linux-low.h (enum lwp_stop_reason): New.
3110 (struct lwp_info) <stop_pc>: Adjust comment.
3111 <stopped_by_watchpoint>: Delete field.
3112 <stop_reason>: New field.
3113 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3114 * mem-break.c (software_breakpoint_inserted_here)
3115 (hardware_breakpoint_inserted_here): New function.
3116 * mem-break.h (software_breakpoint_inserted_here)
3117 (hardware_breakpoint_inserted_here): Declare.
3118 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3119 (cancel_breakpoints): Delete.
3120 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3121 (upload_fast_traceframes): Remove references to
3124 2015-01-09 Pedro Alves <palves@redhat.com>
3126 * thread-db.c (find_new_threads_callback): Ignore thread if the
3127 kernel thread ID is -1.
3129 2015-01-09 Pedro Alves <palves@redhat.com>
3131 * linux-low.c (linux_attach_fail_reason_string): Move to
3132 nat/linux-ptrace.c, and rename.
3133 (linux_attach_lwp): Update comment.
3134 (attach_proc_task_lwp_callback): New function.
3135 (linux_attach): Adjust to rename and use
3136 linux_proc_attach_tgid_threads.
3137 (linux_attach_fail_reason_string): Delete declaration.
3139 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3141 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3142 * server.c (gdbserver_version): Likewise.
3144 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3146 * remote-utils.c: Include ctype.h.
3147 (input_interrupt): Explicitly handle the case when the char
3148 received is the NUL byte. Improve the printing of non-ASCII
3151 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3153 * linux-low.c (linux_low_filter_event): Update call to
3154 linux_enable_event_reporting following the addition of
3155 a new parameter to that function.
3157 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3160 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3161 (AARCH64_FPCR_REGNO): Likewise.
3162 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3163 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3164 (aarch64_store_fpregset): Likewise.
3166 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3168 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3169 Remove FIXME comment about assumption about N.
3171 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3173 * configure.ac: If large-file support is disabled in GDBserver,
3174 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3175 * configure: Regenerate.
3177 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3179 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3180 warning upon ENODATA from ptrace.
3181 * linux-s390-low.c (s390_store_tdb): New.
3182 (s390_regsets): Add regset for NT_S390_TDB.
3184 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3186 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3187 without a fill_function.
3188 * linux-s390-low.c (s390_fill_last_break): Remove.
3189 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3190 (s390_arch_setup): Use regset's size instead of fill_function for
3193 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3195 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3196 the regset's store function when ptrace returned an error.
3197 * regcache.c (get_thread_regcache): Invalidate register cache
3198 before fetching inferior's registers.
3200 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3202 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3203 while-loop as for-loop.
3204 (regsets_store_inferior_registers): Likewise.
3206 2014-11-28 Yao Qi <yao@codesourcery.com>
3208 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3209 * config.in, configure: Re-generate.
3210 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3213 2014-11-21 Yao Qi <yao@codesourcery.com>
3215 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3216 (AC_CHECK_HEADERS): Remove malloc.h.
3217 * configure: Re-generated.
3218 * config.in: Re-generated.
3219 * server.h: Don't include alloca.h and malloc.h.
3220 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3221 Don't include malloc.h.
3223 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3225 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3226 corresponding ERRNO check in same block.
3228 2014-11-12 Pedro Alves <palves@redhat.com>
3230 * server.c (cont_thread): Update comment.
3231 (start_inferior, attach_inferior): No longer clear cont_thread.
3232 (handle_v_cont): No longer set cont_thread.
3233 (captured_main): Clear cont_thread each time a GDB connects.
3235 2014-11-12 Pedro Alves <palves@redhat.com>
3237 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3238 thread, and don't resume all threads if the Hc thread has exited.
3240 2014-11-12 Pedro Alves <palves@redhat.com>
3242 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3243 the process group instead of to a specific LWP.
3245 2014-10-15 Pedro Alves <palves@redhat.com>
3248 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3250 (arm_set_thread_context): Delete.
3251 (the_low_target): Adjust.
3252 * win32-i386-low.c (debug_registers_changed)
3253 (debug_registers_used): Delete.
3254 (update_debug_registers_callback): New function.
3255 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3256 needing to update their debug registers.
3257 (win32_get_current_dr): New function.
3258 (x86_dr_low_get_addr, x86_dr_low_get_control)
3259 (x86_dr_low_get_status): Fetch the debug register from the thread
3261 (i386_initial_stuff): Adjust.
3262 (i386_get_thread_context): Remove current_event parameter. Don't
3263 clear debug_registers_changed nor copy DR values to
3265 (i386_set_thread_context): Delete.
3266 (i386_prepare_to_resume): New function.
3267 (i386_thread_added): Mark the thread as needing to update irs
3269 (the_low_target): Remove i386_set_thread_context and install
3270 i386_prepare_to_resume.
3271 * win32-low.c (win32_get_thread_context): Adjust.
3272 (win32_set_thread_context): Use SetThreadContext
3274 (win32_prepare_to_resume): New function.
3275 (win32_require_context): New function, factored out from ...
3276 (thread_rec): ... this.
3277 (continue_one_thread): Call win32_prepare_to_resume on each thread
3278 we're about to continue.
3279 (win32_resume): Call win32_prepare_to_resume on the event thread.
3280 * win32-low.h (struct win32_thread_info)
3281 <debug_registers_changed>: New field.
3282 (struct win32_target_ops): Change prototype of set_thread_context,
3283 delete set_thread_context and add prepare_to_resume.
3284 (win32_require_context): New declaration.
3286 2014-10-08 Gary Benson <gbenson@redhat.com>
3288 * server.h: Do not include common-exceptions.h.
3290 2014-10-08 Gary Benson <gbenson@redhat.com>
3292 * server.h: Do not include cleanups.h.
3294 2014-09-30 James Hogan <james.hogan@imgtec.com>
3296 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3299 2014-09-23 Yao Qi <yao@codesourcery.com>
3301 * linux-low.c (lp_status_maybe_breakpoint): New function.
3302 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3303 (count_events_callback): Likewise.
3304 (select_event_lwp_callback): Likewise.
3305 (cancel_breakpoints_callback): Likewise.
3307 2014-09-19 Don Breazeal <donb@codesourcery.com>
3309 * linux-low.c (handle_extended_wait): Call
3310 linux_ptrace_get_extended_event.
3311 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3312 linux_is_extended_waitstatus.
3314 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3316 * Makefile.in (CPPFLAGS): Define.
3317 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3318 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3320 2014-09-16 Gary Benson <gbenson@redhat.com>
3322 * inferiors.h (current_inferior): Renamed as...
3323 (current_thread): New variable. All uses updated.
3324 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3325 (maybe_move_out_of_jump_pad): Likewise.
3326 (cancel_breakpoint): Likewise.
3327 (linux_low_filter_event): Likewise.
3328 (wait_for_sigstop): Likewise.
3329 (linux_resume_one_lwp): Likewise.
3330 (need_step_over_p): Likewise.
3331 (start_step_over): Likewise.
3332 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3333 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3334 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3335 and save_inferior as saved_thread.
3336 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3338 (regcache_invalidate_thread): Likewise.
3339 * remote-utils.c (prepare_resume_reply): Likewise.
3340 * thread-db.c (thread_db_get_tls_address): Likewise.
3341 (disable_thread_event_reporting): Likewise.
3342 (remove_thread_event_breakpoints): Likewise.
3343 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3345 * target.h (set_desired_inferior): Renamed as...
3346 (set_desired_thread): New declaration. All uses updated.
3347 * server.c (myresume): Updated comment to reference thread instead
3349 (handle_serial_event): Likewise.
3350 (handle_target_event): Likewise.
3352 2014-09-12 Tom Tromey <tromey@redhat.com>
3353 Gary Benson <gbenson@redhat.com>
3355 * regcache.h: Include common-regcache.h.
3356 (regcache_read_pc): Don't declare.
3357 * regcache.c (get_thread_regcache_for_ptid): New function.
3359 2014-09-11 Tom Tromey <tromey@redhat.com>
3360 Gary Benson <gbenson@redhat.com>
3362 * symbol.c: New file.
3363 * Makefile.in (SFILES): Add symbol.c.
3364 (OBS): Add symbol.o.
3366 2014-09-11 Gary Benson <gbenson@redhat.com>
3368 * target.c (target_stop_ptid, target_continue_ptid): New
3371 2014-09-11 Tom Tromey <tromey@redhat.com>
3372 Gary Benson <gbenson@redhat.com>
3374 * target.h: Include target/target.h.
3375 * target.c (target_read_memory, target_read_uint32)
3376 (target_write_memory): New functions.
3378 2014-09-11 Gary Benson <gbenson@redhat.com>
3380 * server.h (debug_hw_points): Don't declare.
3381 * server.c (debug_hw_points): Don't define. Replace all uses
3382 with show_debug_regs.
3383 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3384 all uses with show_debug_regs.
3386 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3388 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3389 endianness into account.
3390 (ppc_supply_ptrace_register): Likewise.
3392 2014-09-03 James Hogan <james.hogan@imgtec.com>
3394 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3395 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3397 2014-09-03 Gary Benson <gbenson@redhat.com>
3399 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3400 ALL_DEBUG_ADDRESS_REGISTERS.
3402 2014-09-02 Gary Benson <gbenson@redhat.com>
3404 * i386-low.h: Renamed as...
3405 * x86-low.h: New file. All type, function and variable name
3406 prefixes changed from "i386_" to "x86_". All references updated.
3407 * i386-low.c: Renamed as...
3408 * x86-low.c: New file. All type, function and variable name
3409 prefixes changed from "i386_" to "x86_". All references updated.
3411 2014-09-02 Gary Benson <gbenson@redhat.com>
3413 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3414 (x86_linux_new_thread): Likewise.
3416 2014-08-29 Gary Benson <gbenson@redhat.com>
3418 * server.h (setjmp.h): Do not include.
3419 (toplevel): Do not declare.
3420 (common-exceptions.h): Include.
3421 (cleanups.h): Likewise.
3422 * server.c (toplevel): Do not define.
3423 (exit_code): New static global.
3424 (detach_or_kill_for_exit_cleanup): New function.
3425 (main): New function. Original main renamed to...
3426 (captured_main): New function.
3427 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3429 2014-08-29 Gary Benson <gbenson@redhat.com>
3431 * Makefile.in (SFILES): Add common/common-exceptions.c.
3432 (OBS): Add common-exceptions.o.
3433 (common-exceptions.o): New rule.
3434 * utils.c (prepare_to_throw_exception): New function.
3436 2014-08-29 Gary Benson <gbenson@redhat.com>
3438 * config.in: Regenerate.
3439 * configure: Likewise.
3441 2014-08-29 Gary Benson <gbenson@redhat.com>
3443 * Makefile.in (SFILES): Add common/cleanups.c.
3445 (cleanups.o): New rule.
3447 2014-08-29 Gary Benson <gbenson@redhat.com>
3449 * utils.c (internal_vwarning): New function.
3451 2014-08-28 Gary Benson <gbenson@redhat.com>
3453 * utils.h (fatal): Remove declaration.
3454 * utils.c (fatal): Remove function.
3456 2014-08-28 Gary Benson <gbenson@redhat.com>
3458 * tracepoint.c (gdb_agent_init): Replace fatal with
3460 (initialize_tracepoint): Likewise.
3462 2014-08-28 Gary Benson <gbenson@redhat.com>
3464 * remote-utils.c (remote_prepare): Replace fatal with error.
3466 2014-08-28 Gary Benson <gbenson@redhat.com>
3468 * linux-low.c (linux_async): Replace fatal with warning.
3470 (linux_start_non_stop): Return -1 if linux_async failed.
3472 2014-08-28 Gary Benson <gbenson@redhat.com>
3474 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3476 (i386_dr_low_get_addr): Remove vague comment.
3477 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3480 2014-08-28 Gary Benson <gbenson@redhat.com>
3482 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3483 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3485 (linux_resume_one_lwp): Likewise.
3486 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3488 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3489 with internal_error.
3490 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3491 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3492 (find_register_by_name): Replace fatal with internal_error.
3493 (find_regno): Likewise.
3494 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3495 * thread-db.c (thread_db_create_event): Likewise.
3496 (thread_db_load_search): Likewise.
3497 (try_thread_db_load_1): Likewise.
3498 * tracepoint.c (get_jump_space_head): Replace fatal with
3500 (claim_trampoline_space): Likewise.
3501 (have_fast_tracepoint_trampoline_buffer): Likewise.
3502 (cmd_qtstart): Likewise.
3503 (stop_tracing): Likewise.
3504 (fast_tracepoint_collecting): Likewise.
3505 (target_malloc): Likewise.
3506 (download_tracepoint): Likewise.
3507 (download_trace_state_variables): Replace check with gdb_assert.
3508 (upload_fast_traceframes): Replace fatal with internal_error.
3510 2014-08-19 Tom Tromey <tromey@redhat.com>
3511 Gary Benson <gbenson@redhat.com>
3513 * Makefile.in (SFILES): Add common/common-debug.c.
3514 (OBS): Add common-debug.o.
3515 (common-debug.o): New rule.
3516 * debug.h (debug_printf): Don't declare.
3517 * debug.c (debug_printf): Renamed and rewritten as...
3518 (debug_vprintf): New function.
3520 2014-08-19 Gary Benson <gbenson@redhat.com>
3522 * utils.h: Do not include print-utils.h.
3524 2014-08-19 Tom Tromey <tromey@redhat.com>
3525 Gary Benson <gbenson@redhat.com>
3527 * server.h: Add static assertion.
3528 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3530 2014-08-19 Tom Tromey <tromey@redhat.com>
3531 Gary Benson <gbenson@redhat.com>
3533 * Makefile.in (SFILES): Add common/errors.c.
3534 (OBS): Add errors.o.
3535 (IPA_OBS): Add errors-ipa.o.
3536 (errors.o): New rule.
3537 (errors-ipa.o): Likewise.
3538 * utils.h (perror_with_name, error, warning): Don't declare.
3539 * utils.c (warning): Renamed and rewritten as...
3540 (vwarning): New function.
3541 (error): Renamed and rewritten as...
3542 (verror): New function.
3543 (internal_error): Renamed and rewritten as...
3544 (internal_verror): New function.
3546 2014-08-07 Gary Benson <gbenson@redhat.com>
3548 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3549 * configure: Regenerate.
3550 * config.in: Likewise.
3551 * server.h: Do not include errno.h.
3552 * event-loop.c: Likewise.
3553 * hostio-errno.c: Likewise.
3554 * linux-low.c: Likewise.
3555 * remote-utils.c: Likewise.
3556 * spu-low.c: Likewise.
3557 * utils.c: Likewise.
3558 * gdbreplay.c: Unconditionally include errno.h.
3560 2014-08-07 Gary Benson <gbenson@redhat.com>
3562 * server.h: Do not include string.h.
3563 * event-loop.c: Likewise.
3564 * linux-low.c: Likewise.
3565 * regcache.c: Likewise.
3566 * remote-utils.c: Likewise.
3567 * spu-low.c: Likewise.
3568 * utils.c: Likewise.
3570 2014-08-07 Gary Benson <gbenson@redhat.com>
3572 * server.h: Do not include gdb_assert.h.
3574 2014-08-07 Gary Benson <gbenson@redhat.com>
3576 * server.h: Do not include common-utils.h.
3578 2014-08-07 Gary Benson <gbenson@redhat.com>
3580 * server.h: Do not include ptid.h.
3581 * notif.h: Likewise.
3583 2014-08-07 Gary Benson <gbenson@redhat.com>
3585 * server.h: Do not include gdb_locale.h.
3587 2014-08-07 Gary Benson <gbenson@redhat.com>
3589 * server.h: Do not include gdb/signals.h.
3590 * win32-low.c: Likewise.
3592 2014-08-07 Gary Benson <gbenson@redhat.com>
3594 * server.h: Do not include pathmax.h.
3596 2014-08-07 Gary Benson <gbenson@redhat.com>
3598 * server.h: Do not include libiberty.h.
3599 * linux-bfin-low.c: Likewise.
3601 2014-08-07 Gary Benson <gbenson@redhat.com>
3603 * server.h: Do not include ansidecl.h.
3605 2014-08-07 Gary Benson <gbenson@redhat.com>
3607 * linux-x86-low.c: Do not include stddef.h.
3608 * lynx-ppc-low.c: Likewise.
3609 * tracepoint.c: Likewise.
3611 2014-08-07 Gary Benson <gbenson@redhat.com>
3613 * server.h: Do not include stdarg.h.
3614 * nto-low.c: Likewise.
3616 2014-08-07 Gary Benson <gbenson@redhat.com>
3618 * server.h: Do not include stdlib.h.
3619 * inferiors.c: Likewise.
3620 * linux-low.c: Likewise.
3621 * regcache.c: Likewise.
3622 * spu-low.c: Likewise.
3623 * tracepoint.c: Likewise.
3624 * utils.c: Likewise.
3626 2014-08-07 Gary Benson <gbenson@redhat.com>
3628 * server.h: Do not include stdio.h.
3629 * linux-low.c: Likewise.
3630 * remote-utils.c: Likewise.
3631 * spu-low.c: Likewise.
3632 * utils.c: Likewise.
3633 * wincecompat.c: Likewise.
3635 2014-08-06 Gary Benson <gbenson@redhat.com>
3637 * regcache.c (init_register_cache): Move conditionals inside if.
3639 2014-08-06 Gary Benson <gbenson@redhat.com>
3641 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3643 2014-07-31 Gary Benson <gbenson@redhat.com>
3645 * ax.h: Do not include server.h.
3646 * gdbthread.h: Likewise.
3647 * lynx-low.h: Likewise.
3648 * notif.h: Likewise.
3650 2014-07-30 Gary Benson <gbenson@redhat.com>
3652 * server.h: Include common-defs.h.
3653 Do not include config.h or build-gnulib-gdbserver/config.h.
3655 2014-07-30 Gary Benson <gbenson@redhat.com>
3657 * hostio-errno.c: Move server.h to top of includes list.
3658 * inferiors.c: Likewise.
3659 * linux-x86-low.c: Likewise.
3660 * notif.c: Include server.h.
3662 2014-07-24 Tom Tromey <tromey@redhat.com>
3663 Gary Benson <gbenson@redhat.com>
3665 * server.h (CORE_ADDR): Now unsigned.
3667 2014-07-16 Pedro Alves <palves@redhat.com>
3669 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3671 2014-07-15 Pedro Alves <palves@redhat.com>
3673 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3676 2014-07-11 Pedro Alves <palves@redhat.com>
3678 * linux-low.c (kill_wait_lwp): New function, based on
3679 kill_one_lwp_callback, but use my_waitpid directly.
3680 (kill_one_lwp_callback, linux_kill): Use it.
3682 2014-06-23 Pedro Alves <palves@redhat.com>
3684 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3685 before setting DR0..DR3.
3687 2014-06-20 Gary Benson <gbenson@redhat.com>
3689 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3690 * configure: Regenerated.
3691 * config.in: Likewise.
3693 2014-06-20 Gary Benson <gbenson@redhat.com>
3695 * Makefile.in (SFILES): Update locations for files moved
3697 (object file files): Reordered.
3699 2014-06-20 Gary Benson <gbenson@redhat.com>
3701 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3702 (i386_dr_low_set_addr): Likewise.
3703 (i386_dr_low_get_addr): Likewise.
3704 (i386_dr_low_can_set_control): Likewise.
3705 (i386_dr_low_set_control): Likewise.
3706 (i386_dr_low_get_control): Likewise.
3707 (i386_dr_low_get_status): Likewise.
3708 (i386_get_debug_register_length): Likewise.
3709 * linux-x86-low.c (i386_dr_low_set_addr):
3710 Changed signature. Made static.
3711 (i386_dr_low_get_addr): Likewise.
3712 (i386_dr_low_set_control): Likewise.
3713 (i386_dr_low_get_control): Likewise.
3714 (i386_dr_low_get_status): Likewise.
3715 (i386_dr_low): New global variable.
3716 * win32-i386-low.c (i386_dr_low_set_addr):
3717 Changed signature. Made static.
3718 (i386_dr_low_get_addr): Likewise.
3719 (i386_dr_low_set_control): Likewise.
3720 (i386_dr_low_get_control): Likewise.
3721 (i386_dr_low_get_status): Likewise.
3722 (i386_dr_low): New global variable.
3724 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3726 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3727 * Makefile.in (AR, AR_FLAGS): Define.
3728 * configure: Regenerate.
3730 2014-06-19 Gary Benson <gbenson@redhat.com>
3732 * Makefile.in (i386-dregs.o): New rule.
3733 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3734 * i386-low.c (target.h): Remove include.
3735 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3736 (DR_CONTROL_SHIFT): Likewise.
3737 (DR_CONTROL_SIZE): Likewise.
3738 (DR_RW_EXECUTE): Likewise.
3739 (DR_RW_WRITE): Likewise.
3740 (DR_RW_READ): Likewise.
3741 (DR_RW_IORW): Likewise.
3742 (DR_LEN_1): Likewise.
3743 (DR_LEN_2): Likewise.
3744 (DR_LEN_4): Likewise.
3745 (DR_LEN_8): Likewise.
3746 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3747 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3748 (DR_ENABLE_SIZE): Likewise.
3749 (DR_LOCAL_SLOWDOWN): Likewise.
3750 (DR_GLOBAL_SLOWDOWN): Likewise.
3751 (DR_CONTROL_RESERVED): Likewise.
3752 (I386_DR_CONTROL_MASK): Likewise.
3753 (I386_DR_VACANT): Likewise.
3754 (I386_DR_LOCAL_ENABLE): Likewise.
3755 (I386_DR_GLOBAL_ENABLE): Likewise.
3756 (I386_DR_DISABLE): Likewise.
3757 (I386_DR_SET_RW_LEN): Likewise.
3758 (I386_DR_GET_RW_LEN): Likewise.
3759 (I386_DR_WATCH_HIT): Likewise.
3760 (i386_wp_op_t): Likewise.
3761 (i386_show_dr): Likewise.
3762 (i386_length_and_rw_bits): Likewise.
3763 (i386_insert_aligned_watchpoint): Likewise.
3764 (i386_remove_aligned_watchpoint): Likewise.
3765 (i386_handle_nonaligned_watchpoint): Likewise.
3766 i386_update_inferior_debug_regs(): Likewise.
3767 (i386_dr_insert_watchpoint): Likewise.
3768 (i386_dr_remove_watchpoint): Likewise.
3769 (i386_dr_region_ok_for_watchpoint): Likewise.
3770 (i386_dr_stopped_data_address): Likewise.
3771 (i386_dr_stopped_by_watchpoint): Likewise.
3773 2014-06-19 Gary Benson <gbenson@redhat.com>
3775 * i386-low.c (i386_dr_show): Renamed to
3776 i386_show_dr and made static. All uses updated.
3777 (i386_dr_length_and_rw_bits): Renamed to
3778 i386_length_and_rw_bits and made static.
3780 (i386_dr_insert_aligned_watchpoint): Renamed to
3781 i386_insert_aligned_watchpoint and made static.
3783 (i386_dr_remove_aligned_watchpoint): Renamed to
3784 i386_remove_aligned_watchpoint and made static.
3786 (i386_dr_update_inferior_debug_regs): Renamed to
3787 i386_update_inferior_debug_regs and made static.
3790 2014-06-18 Gary Benson <gbenson@redhat.com>
3792 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3793 (i386_dr_low_can_set_control): Likewise.
3794 (i386_get_debug_register_length): Likewise.
3795 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3796 (i386_dr_low_can_set_control): Likewise.
3797 (i386_get_debug_register_length): Likewise.
3799 2014-06-17 Gary Benson <gbenson@redhat.com>
3801 * i386-low.h (i386-dregs.h): New include.
3802 (DR_FIRSTADDR): Now in i386-dregs.h.
3803 (DR_LASTADDR): Likewise.
3804 (DR_NADDR): Likewise.
3805 (DR_STATUS): Likewise.
3806 (DR_CONTROL): Likewise.
3807 (i386_debug_reg_state): Likewise.
3808 (i386_dr_insert_watchpoint): Likewise.
3809 (i386_dr_remove_watchpoint): Likewise.
3810 (i386_dr_region_ok_for_watchpoint): Likewise.
3811 (i386_dr_stopped_data_address): Likewise.
3812 (i386_dr_stopped_by_watchpoint): Likewise.
3813 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3815 2014-06-18 Gary Benson <gbenson@redhat.com>
3817 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3818 i386_dr_insert_watchpoint.
3819 (i386_low_remove_watchpoint): Renamed to
3820 i386_dr_remove_watchpoint.
3821 (i386_low_region_ok_for_watchpoint): Renamed to
3822 i386_dr_region_ok_for_watchpoint.
3823 (i386_low_stopped_data_address): Renamed to
3824 i386_dr_stopped_data_address.
3825 (i386_low_stopped_by_watchpoint): Renamed to
3826 i386_dr_stopped_by_watchpoint.
3827 * i386-low.c (i386_show_dr): Renamed to
3828 i386_dr_show and made nonstatic. All uses updated.
3829 (i386_length_and_rw_bits): Renamed to
3830 i386_dr_length_and_rw_bits and made nonstatic.
3832 (i386_insert_aligned_watchpoint): Renamed to
3833 i386_dr_insert_aligned_watchpoint and made nonstatic.
3835 (i386_remove_aligned_watchpoint): Renamed to
3836 i386_dr_remove_aligned_watchpoint and made nonstatic.
3838 (i386_update_inferior_debug_regs): Renamed to
3839 i386_dr_update_inferior_debug_regs and made nonstatic.
3841 (i386_low_insert_watchpoint): Renamed to
3842 i386_dr_insert_watchpoint. All uses updated.
3843 (i386_low_remove_watchpoint): Renamed to
3844 i386_dr_remove_watchpoint. All uses updated.
3845 (i386_low_region_ok_for_watchpoint): Renamed to
3846 i386_dr_region_ok_for_watchpoint. All uses updated.
3847 (i386_low_stopped_data_address): Renamed to
3848 i386_dr_stopped_data_address. All uses updated.
3849 (i386_low_stopped_by_watchpoint): Renamed to
3850 i386_dr_stopped_by_watchpoint. All uses updated.
3852 2014-06-18 Gary Benson <gbenson@redhat.com>
3854 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3855 (i386_dr_low_can_set_control): Likewise.
3856 (i386_insert_aligned_watchpoint): New check.
3858 2014-06-18 Gary Benson <gbenson@redhat.com>
3860 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3863 2014-06-18 Gary Benson <gbenson@redhat.com>
3865 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3866 instead of fatal and error.
3867 (i386_handle_nonaligned_watchpoint): Likewise.
3869 2014-06-18 Gary Benson <gbenson@redhat.com>
3871 * i386-low.c (i386_get_debug_register_length): New macro.
3872 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3873 (i386_show_dr): Use debug_printf instead of fprintf. Use
3874 phex to format values.
3876 2014-06-18 Gary Benson <gbenson@redhat.com>
3878 * i386-low.h: Comment changes.
3879 * i386-low.c: Likewise.
3881 2014-06-18 Gary Benson <gbenson@redhat.com>
3883 * i386-low.c: Whitespace changes.
3885 2014-06-12 Tom Tromey <tromey@redhat.com>
3887 * utils.c (freeargv): Remove.
3889 2014-06-12 Tom Tromey <tromey@redhat.com>
3891 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3892 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3893 (parse_debug_format_options): Likewise.
3894 (gdbserver_usage): Likewise.
3895 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3896 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3897 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3899 ($(LIBGNU)): Depend on libiberty.
3900 (all-lib): Recurse into all subdirs.
3901 (install-only): Invoke "install" target in subdirs.
3902 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3904 * configure: Rebuild.
3905 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3906 for vasprintf, vsnprintf, or gettimeofday.
3907 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3910 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3912 * development.sh: Delete.
3913 * Makefile.in (config.status): Adjust dependency on development.sh.
3914 * configure.ac: Adjust development.sh source call.
3915 * configure: Regenerate.
3917 2014-06-02 Pedro Alves <palves@redhat.com>
3919 * ax.c (gdb_free_agent_expr): New function.
3920 * ax.h (gdb_free_agent_expr): New declaration.
3921 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3923 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3925 (clear_breakpoint_conditions_and_commands): New function.
3926 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3927 (clear_breakpoint_conditions_and_commands): New declaration.
3929 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3931 * linux-aarch64-low.c (asm/ptrace.h): Include.
3933 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3935 Fix TLS access for -static -pthread.
3936 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3937 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3938 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3940 2014-05-20 Pedro Alves <palves@redhat.com>
3942 * linux-aarch64-low.c (aarch64_insert_point)
3943 (aarch64_remove_point): No longer check whether the type is
3944 supported here. Adjust to new interface.
3945 (the_low_target): Install aarch64_supports_z_point_type as
3946 supports_z_point_type method.
3947 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3948 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3949 instead of a Z packet char. Adjust.
3950 (arm_supports_z_point_type): New function.
3951 (arm_insert_point, arm_remove_point): Adjust to new interface.
3952 (the_low_target): Install arm_supports_z_point_type.
3953 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3954 (cris_insert_point, cris_remove_point): Adjust to new interface.
3955 Don't check whether the type is supported here.
3956 (the_low_target): Install cris_supports_z_point_type.
3957 * linux-low.c (linux_supports_z_point_type): New function.
3958 (linux_insert_point, linux_remove_point): Adjust to new interface.
3959 * linux-low.h (struct linux_target_ops) <insert_point,
3960 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3961 raw_breakpoint pointer parameter.
3962 <supports_z_point_type>: New method.
3963 * linux-mips-low.c (mips_supports_z_point_type): New function.
3964 (mips_insert_point, mips_remove_point): Adjust to new interface.
3965 Use mips_supports_z_point_type.
3966 (the_low_target): Install mips_supports_z_point_type.
3967 * linux-ppc-low.c (the_low_target): Install NULL as
3968 supports_z_point_type method.
3969 * linux-s390-low.c (the_low_target): Install NULL as
3970 supports_z_point_type method.
3971 * linux-sparc-low.c (the_low_target): Install NULL as
3972 supports_z_point_type method.
3973 * linux-x86-low.c (x86_supports_z_point_type): New function.
3974 (x86_insert_point): Adjust to new insert_point interface. Use
3975 insert_memory_breakpoint. Adjust to new
3976 i386_low_insert_watchpoint interface.
3977 (x86_remove_point): Adjust to remove_point interface. Use
3978 remove_memory_breakpoint. Adjust to new
3979 i386_low_remove_watchpoint interface.
3980 (the_low_target): Install x86_supports_z_point_type.
3981 * lynx-low.c (lynx_target_ops): Install NULL as
3982 supports_z_point_type callback.
3983 * nto-low.c (nto_supports_z_point_type): New.
3984 (nto_insert_point, nto_remove_point): Adjust to new interface.
3985 (nto_target_ops): Install nto_supports_z_point_type.
3986 * mem-break.c: Adjust intro comment.
3987 (struct raw_breakpoint) <raw_type, size>: New fields.
3988 <inserted>: Update comment.
3989 <shlib_disabled>: Delete field.
3990 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3991 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3992 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3993 (raw_bkpt_type_to_target_hw_bp_type): New function.
3994 (find_enabled_raw_code_breakpoint_at): New function.
3995 (find_raw_breakpoint_at): New type and size parameters. Use them.
3996 (insert_memory_breakpoint): New function, based off
3997 set_raw_breakpoint_at.
3998 (remove_memory_breakpoint): New function.
3999 (set_raw_breakpoint_at): Reimplement.
4000 (set_breakpoint): New, based on set_breakpoint_at.
4001 (set_breakpoint_at): Reimplement.
4002 (delete_raw_breakpoint): Go through the_target->remove_point
4003 instead of assuming memory breakpoints.
4004 (find_gdb_breakpoint_at): Delete.
4005 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4006 (find_gdb_breakpoint): New function.
4007 (set_gdb_breakpoint_at): Delete.
4008 (z_type_supported): New function.
4009 (set_gdb_breakpoint_1): New function, loosely based off
4010 set_gdb_breakpoint_at.
4011 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4012 (delete_gdb_breakpoint_at): Delete.
4013 (delete_gdb_breakpoint_1): New function, loosely based off
4014 delete_gdb_breakpoint_at.
4015 (delete_gdb_breakpoint): New function.
4016 (clear_gdb_breakpoint_conditions): Rename to ...
4017 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4019 (add_condition_to_breakpoint): Make static.
4020 (add_breakpoint_condition): Take a struct breakpoint pointer
4021 instead of an address. Adjust.
4022 (gdb_condition_true_at_breakpoint): Rename to ...
4023 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4025 (gdb_condition_true_at_breakpoint): Reimplement.
4026 (add_breakpoint_commands): Take a struct breakpoint pointer
4027 instead of an address. Adjust.
4028 (gdb_no_commands_at_breakpoint): Rename to ...
4029 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4030 parameter. Return true if no breakpoint was found. Change debug
4032 (gdb_no_commands_at_breakpoint): Reimplement.
4033 (run_breakpoint_commands): Rename to ...
4034 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4035 and change return type to boolean.
4036 (run_breakpoint_commands): New function.
4037 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4038 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4039 breakpoint. Go through the_target->remove_point instead of
4040 assuming memory breakpoint.
4041 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4042 software and hardware breakpoints.
4043 (reinsert_raw_breakpoint): Go through the_target->insert_point
4044 instead of assuming memory breakpoint.
4045 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4046 software and hardware breakpoints.
4047 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4048 Check both software and hardware breakpoints.
4049 (validate_inserted_breakpoint): Assert the breakpoint is a
4050 software breakpoint. Set the inserted flag to -1 instead of
4051 setting shlib_disabled.
4052 (delete_disabled_breakpoints): Adjust.
4053 (validate_breakpoints): Only validate software breakpoints.
4054 Adjust to inserted flag change.
4055 (check_mem_read, check_mem_write): Skip breakpoint types other
4056 than software breakpoints. Adjust to inserted flag change.
4057 * mem-break.h (enum raw_bkpt_type): New enum.
4058 (raw_breakpoint, struct process_info): Forward declare.
4059 (Z_packet_to_target_hw_bp_type): Delete declaration.
4060 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4061 (set_gdb_breakpoint, delete_gdb_breakpoint)
4062 (clear_breakpoint_conditions): New declarations.
4063 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4064 (breakpoint_inserted_here): Update comment.
4065 (add_breakpoint_condition, add_breakpoint_commands): Replace
4066 address parameter with a breakpoint pointer parameter.
4067 (gdb_breakpoint_here): Update comment.
4068 (delete_gdb_breakpoint_at): Delete.
4069 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4070 * server.c (process_point_options): Take a struct breakpoint
4071 pointer instead of an address. Adjust.
4072 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4073 delete_gdb_breakpoint.
4074 * spu-low.c (spu_target_ops): Install NULL as
4075 supports_z_point_type method.
4076 * target.h: Include mem-break.h.
4077 (struct target_ops) <prepare_to_access_memory>: Update comment.
4078 <supports_z_point_type>: New field.
4079 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4080 instead of a char. Also take a raw breakpoint pointer.
4081 * win32-arm-low.c (the_low_target): Install NULL as
4082 supports_z_point_type.
4083 * win32-i386-low.c (i386_supports_z_point_type): New function.
4084 (i386_insert_point, i386_remove_point): Adjust to new interface.
4085 (the_low_target): Install i386_supports_z_point_type.
4086 * win32-low.c (win32_supports_z_point_type): New function.
4087 (win32_insert_point, win32_remove_point): Adjust to new interface.
4088 (win32_target_ops): Install win32_supports_z_point_type.
4089 * win32-low.h (struct win32_target_ops):
4090 <supports_z_point_type>: New method.
4091 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4092 instead of a char. Also take a raw breakpoint pointer.
4094 2014-05-20 Pedro Alves <palves@redhat.com>
4096 * mem-break.h: Include break-common.h.
4097 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4098 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4099 (Z_packet_to_target_hw_bp_type): New declaration.
4100 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4101 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4102 (Z_PACKET_ACCESS_WP): Delete macros.
4103 (Z_packet_to_hw_type): Delete function.
4104 * i386-low.h: Don't include break-common.h here.
4105 (Z_packet_to_hw_type): Delete declaration.
4106 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4107 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4108 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4109 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4110 * linux-aarch64-low.c: Don't include break-common.h here.
4111 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4112 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4113 (Z_packet_to_target_hw_bp_type): Delete function.
4114 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4116 (mips_insert_point, mips_remove_point): Use
4117 Z_packet_to_target_hw_bp_type.
4119 2014-05-20 Pedro Alves <palves@redhat.com>
4121 * linux-aarch64-low.c: Include break-common.h.
4122 (enum target_point_type): Delete.
4123 (Z_packet_to_point_type): Rename to ...
4124 (Z_packet_to_target_hw_bp_type): ... this, and return a
4125 target_hw_bp_type instead.
4126 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4127 instead of an enum target_point_type.
4128 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4130 (aarch64_dr_state_insert_one_point)
4131 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4132 (aarch64_handle_aligned_watchpoint)
4133 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4134 Take an enum target_hw_bp_type instead of an enum
4136 (aarch64_supports_z_point_type): New function.
4137 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4138 use Z_packet_to_target_hw_bp_type.
4140 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4142 * configure.ac: Only use -Werror by default when DEVELOPMENT
4144 * configure: Regenerate.
4146 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4148 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4149 * linux-x86-low.c (X86_64_USER_REGS): New.
4150 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4152 2014-04-28 Yao Qi <yao@codesourcery.com>
4154 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4157 2014-04-25 Pedro Alves <palves@redhat.com>
4160 * linux-low.c (linux_attach_fail_reason_string): New function.
4161 (linux_attach_lwp): Delete.
4162 (linux_attach_lwp_1): Rename to ...
4163 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4164 argument. Remove "initial" parameter. Return int instead of
4165 void. Don't error or warn here.
4166 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4167 failure to attach to the tgid. Call warning when failing to
4169 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4170 argument. Remove "initial" parameter. Return int instead of
4171 void. Don't error or warn here.
4172 (linux_attach_fail_reason_string): New declaration.
4173 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4174 interface change. Use linux_attach_fail_reason_string.
4176 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4177 Walfred Tedeschi <walfred.tedeschi@intel.com>
4179 * Makefile.in: Added rules to handle new files
4180 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4181 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4182 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4183 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4184 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4185 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4187 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4188 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4189 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4190 i386/x32-avx512.xml.
4191 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4192 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4193 i386/x32-avx512-linux.xml.
4194 * i387-fp.c (num_avx512_k_registers): New constant for number
4196 (num_avx512_zmmh_low_registers): New constant for number of
4197 lower ZMM registers (0-15).
4198 (num_avx512_zmmh_high_registers): New constant for number of
4199 higher ZMM registers (16-31).
4200 (num_avx512_ymmh_registers): New contant for number of higher
4201 YMM registers (ymm16-31 added by avx521 on x86_64).
4202 (num_avx512_xmm_registers): New constant for number of higher
4203 XMM registers (xmm16-31 added by AVX512 on x86_64).
4204 (struct i387_xsave): Add space for AVX512 registers.
4205 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4206 Add code to handle AVX512 registers.
4207 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4208 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4209 prototypei from generated file.
4210 (tdesc_amd64_avx512_linux): Likewise.
4211 (init_registers_x32_avx512_linux): Likewise.
4212 (tdesc_x32_avx512_linux): Likewise.
4213 (init_registers_i386_avx512_linux): Likewise.
4214 (tdesc_i386_avx512_linux): Likewise.
4215 (x86_64_regmap): Add AVX512 registers.
4216 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4218 (initialize_low_arch): Add code to initialize AVX512 registers.
4220 2014-04-23 Pedro Alves <palves@redhat.com>
4222 * mem-break.c (find_gdb_breakpoint_at): Make static.
4223 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4225 2014-04-23 Pedro Alves <palves@redhat.com>
4227 * i386-low.c: Don't include break-common.h here.
4228 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4229 prototype to take target_hw_bp_type as argument instead of a Z
4231 * i386-low.h: Include break-common.h here.
4232 (Z_packet_to_hw_type): Declare.
4233 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4235 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4236 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4237 (x86_remove_point): Convert the packet number to a
4238 target_hw_bp_type before calling i386_low_remove_watchpoint.
4239 * win32-i386-low.c (i386_insert_point): Convert the packet number
4240 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4241 (i386_remove_point): Convert the packet number to a
4242 target_hw_bp_type before calling i386_low_remove_watchpoint.
4244 2014-04-23 Pedro Alves <palves@redhat.com>
4246 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4248 2014-04-10 Pedro Alves <palves@redhat.com>
4250 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4251 Check if the condition or command is NULL before checking if the
4252 breakpoint is known. On success, return true.
4253 * mem-break.h (add_breakpoint_condition): Document return.
4254 (add_breakpoint_commands): Add describing comment.
4255 * server.c (skip_to_semicolon): New function.
4256 (process_point_options): Use it.
4258 2014-04-09 Pedro Alves <palves@redhat.com>
4260 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4263 2014-02-27 Pedro Alves <palves@redhat.com>
4266 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4268 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4270 (last_thread_of_process_p): Take a PID argument instead of a
4272 (linux_wait_for_lwp): Delete.
4273 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4275 (linux_low_filter_event): New function, party factored out from
4276 linux_wait_for_event.
4277 (linux_wait_for_event): Rename to ...
4278 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4279 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4280 sigsuspend. Check for zombie leaders.
4281 (linux_wait_for_event): Reimplement as wrapper around
4282 linux_wait_for_event_filtered.
4283 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4284 a normal or signal exit is seen, it's the whole process exiting.
4285 (wait_for_sigstop): No longer a for_each_inferior callback.
4286 Rewrite on top of linux_wait_for_event_filtered.
4287 (stop_all_lwps): Call wait_for_sigstop directly.
4288 * server.c (resume, handle_target_event): Handle
4289 TARGET_WAITKIND_NO_RESUMED.
4291 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4293 * win32-low.c (psapi_get_dll_name,
4294 * win32_CreateToolhelp32Snapshot): Delete.
4295 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4296 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4298 (handle_load_dll): Add function description.
4299 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4301 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4303 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4305 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4306 base address when calling win32_add_one_solib.
4307 (handle_load_dll): Delete local variable load_addr.
4308 Remove 0x1000 offset applied to DLL base address when calling
4309 win32_add_one_solib.
4310 (handle_unload_dll): Add comment.
4312 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4314 * win32-low.c (win32_add_all_dlls): Renames
4315 win32_ensure_ntdll_loaded. Rewrite function documentation.
4316 Adjust implementation to always load all DLLs.
4317 Add 0x1000 offset to DLL base address when calling
4318 win32_add_one_solib.
4319 (child_initialization_done): New static global.
4320 (do_initial_child_stuff): Set child_initialization_done to
4321 zero during child initialization, and 1 after. Replace call
4322 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4324 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4325 (handle_unload_dll): Add function documentation.
4326 (get_child_debug_event): Ignore load and unload DLL events
4327 during child initialization.
4329 2014-02-20 Doug Evans <dje@google.com>
4331 Remove global all_lwps.
4332 * inferiors.h (ptid_of): Move here from linux-low.h.
4333 (pid_of, lwpid_of): Ditto.
4334 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4335 parameter is a struct thread_info * now.
4336 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4337 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4338 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4340 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4341 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4342 * linux-arm-low.c (update_registers_callback): Update, "entry"
4343 parameter is a struct thread_info * now.
4344 Fetch lwpid from current_inferior directly.
4345 (arm_insert_point): Pass &all_threads to find_inferior instead of
4347 (arm_remove_point): Ditto.
4348 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4349 (arm_prepare_to_resume): Fetch pid from thread.
4350 (arm_read_description): Fetch lwpid from current_inferior directly.
4351 * linux-low.c (all_lwps): Delete.
4352 (delete_lwp): Delete call to remove_inferior.
4353 (handle_extended_wait): Fetch lwpid from thread.
4354 (add_lwp): Don't set lwp->entry.id. Remove call to
4355 add_inferior_to_list.
4356 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4357 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4358 (kill_one_lwp_callback): Ditto.
4359 (linux_kill): Don't dereference NULL pointer.
4360 Fetch ptid,lwpid from thread.
4361 (get_detach_signal): Fetch ptid from thread.
4362 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4363 Simplify call to regcache_invalidate_thread.
4364 (delete_lwp_callback): Update, "entry" parameter is a
4365 struct thread_info * now. Fetch pid from thread.
4366 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4367 (status_pending_p_callback): Update, "entry" parameter is a
4368 struct thread_info * now. Fetch ptid from thread.
4369 (find_lwp_pid): Update, "entry" parameter is a
4370 struct thread_info * now.
4371 (linux_wait_for_lwp): Fetch pid from thread.
4372 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4373 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4374 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4375 (dequeue_one_deferred_signal): Ditto.
4376 (cancel_breakpoint): Fetch ptid from current_inferior.
4377 (linux_wait_for_event): Pass &all_threads to find_inferior,
4378 not &all_lwps. Fetch ptid, lwpid from thread.
4379 (count_events_callback): Update, "entry" parameter is a
4380 struct thread_info * now.
4381 (select_singlestep_lwp_callback): Ditto.
4382 (select_event_lwp_callback): Ditto.
4383 (cancel_breakpoints_callback): Ditto.
4384 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4386 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4387 (unsuspend_one_lwp): Update, "entry" parameter is a
4388 struct thread_info * now.
4389 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4391 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4392 Fetch lwpid from thread, not lwp.
4393 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4394 Pass &all_threads to find_inferior, not &all_lwps.
4395 (send_sigstop): Fetch lwpid from thread, not lwp.
4396 (send_sigstop_callback): Update, "entry" parameter is a
4397 struct thread_info * now.
4398 (suspend_and_send_sigstop_callback): Ditto.
4399 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4400 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4401 struct thread_info * now.
4402 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4404 (lwp_running): Update, "entry" parameter is a
4405 struct thread_info * now.
4406 (stop_all_lwps): Fetch ptid from thread.
4407 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4408 (linux_resume_one_lwp): Fetch lwpid from thread.
4409 (linux_set_resume_request): Update, "entry" parameter is a
4410 struct thread_info * now. Fetch pid, lwpid from thread.
4411 (resume_status_pending_p): Update, "entry" parameter is a
4412 struct thread_info * now.
4413 (need_step_over_p): Ditto. Fetch lwpid from thread.
4414 (start_step_over): Fetch lwpid from thread.
4415 (linux_resume_one_thread): Update, "entry" parameter is a
4416 struct thread_info * now. Fetch lwpid from thread.
4417 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4418 (proceed_one_lwp): Update, "entry" parameter is a
4419 struct thread_info * now. Fetch lwpid from thread.
4420 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4421 struct thread_info * now.
4422 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4423 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4424 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4426 (regsets_store_inferior_registers): Ditto.
4427 (fetch_register, store_register): Ditto.
4428 (linux_read_memory, linux_write_memory): Ditto.
4429 (linux_request_interrupt): Ditto.
4430 (linux_read_auxv): Ditto.
4431 (linux_xfer_siginfo): Ditto.
4432 (linux_qxfer_spu): Ditto.
4433 (linux_qxfer_libraries_svr4): Ditto.
4434 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4435 moved to inferiors.h.
4437 (get_thread_lwp): Update.
4438 (struct lwp_info): Delete member "entry". Simplify comment for
4441 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4442 current_inferior directly.
4443 (update_watch_registers_callback): Update, "entry" parameter is a
4444 struct thread_info * now. Fetch pid from thread.
4445 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4446 (mips_insert_point): Fetch lwpid from current_inferior.
4447 Pass &all_threads to find_inferior, not &all_lwps.
4448 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4449 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4451 (mips_stopped_data_address): Ditto.
4452 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4454 * linux-tile-low.c (tile_arch_setup): Ditto.
4455 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4456 (update_debug_registers_callback): Update, "entry" parameter is a
4457 struct thread_info * now. Fetch pid from thread.
4458 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4459 Pass &all_threads to find_inferior, not &all_lwps.
4460 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4461 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4462 Pass &all_threads to find_inferior, not &all_lwps.
4463 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4464 (i386_dr_low_get_status): Ditto.
4465 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4466 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4467 (x86_linux_read_description): Ditto.
4468 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4470 2014-02-20 Doug Evans <dje@google.com>
4472 * inferiors.c (get_first_inferior): Fix buglet.
4474 2014-02-19 Doug Evans <dje@google.com>
4476 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4477 * inferiors.c (add_thread): Change result type to struct thread_info *.
4478 All callers updated.
4479 (add_lwp): Call add_thread here instead of in callers.
4480 All callers updated.
4481 * linux-low.h (get_lwp_thread): Rewrite.
4482 (struct lwp_info): New member "thread".
4484 2014-02-19 Doug Evans <dje@google.com>
4486 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4487 All callers updated.
4489 2014-02-19 Doug Evans <dje@google.com>
4491 * inferiors.c (add_thread): Fix whitespace.
4493 2014-02-19 Doug Evans <dje@google.com>
4495 * dll.c (clear_dlls): Replace accessing list implemention details
4497 * gdbthread.h (get_first_thread): Declare.
4498 * inferiors.c (for_each_inferior_with_data): New function.
4499 (get_first_thread): New function.
4500 (find_thread_ptid): Simplify.
4501 (get_first_inferior): New function.
4502 (clear_list): Delete.
4503 (one_inferior_p): New function.
4504 (clear_inferior_list): New function.
4505 (clear_inferiors): Update.
4506 * inferiors.h (for_each_inferior_with_data): Declare.
4507 (clear_inferior_list): Declare.
4508 (one_inferior_p): Declare.
4509 (get_first_inferior): Declare.
4510 * linux-low.c (linux_wait_for_event): Replace accessing list
4511 implemention details with API function.
4512 * server.c (target_running): Ditto.
4513 (accumulate_file_name_length): New function.
4514 (emit_dll_description): New function.
4515 (handle_qxfer_libraries): Replace accessing list implemention
4516 details with API function.
4517 (handle_qxfer_threads_worker): New function.
4518 (handle_qxfer_threads_proper): Replace accessing list implemention
4519 details with API function.
4520 (handle_query): Ditto.
4521 (visit_actioned_threads_callback_ftype): New typedef.
4522 (visit_actioned_threads_data): New struct.
4523 (visit_actioned_threads): Rewrite to be find_inferior callback.
4524 (resume): Call find_inferior.
4525 (handle_status): Replace accessing list implemention
4526 details with API function.
4527 (process_serial_event): Replace accessing list implemention details
4529 * target.c (set_desired_inferior): Replace accessing list implemention
4530 details with API function.
4531 * tracepoint.c (same_process_p): New function.
4532 (gdb_agent_about_to_close): Replace accessing list implemention
4533 details with API function.
4534 * win32-low.c (child_delete_thread): Replace accessing list
4535 implemention details with API function.
4536 (match_dll_by_basename): New function.
4537 (dll_is_loaded_by_basename): New function.
4538 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4539 details call to dll_is_loaded_by_basename.
4541 2014-02-19 Doug Evans <dje@google.com>
4543 * dll.h (struct dll_info): Add comment.
4544 * gdbthread.h (struct thread_info): Add comment.
4545 (current_ptid): Simplify.
4546 * inferiors.c (add_process): Update.
4547 (remove_process): Update.
4548 * inferiors.h (struct process_info): Rename member "head" to "entry".
4549 * linux-low.c (delete_lwp): Update.
4551 (last_thread_of_process_p): Update.
4552 (kill_one_lwp_callback, linux_kill): Update.
4553 (status_pending_p_callback): Update.
4554 (wait_for_sigstop): Update. Simplify read of ptid.
4555 (start_step_over): Update.
4556 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4557 (get_lwp_thread): Update.
4558 (struct lwp_info): Rename member "head" to "entry".
4559 * regcache.h (inferior_list_entry): Delete.
4560 * server.c (kill_inferior_callback): Update.
4561 (detach_or_kill_inferior_callback): Update.
4562 (print_started_pid): Update.
4563 (print_attached_pid): Update.
4564 (process_serial_event): Simplify read of ptid.
4565 * thread-db.c (thread_db_create_event): Update.
4566 (thread_db_get_tls_address): Update.
4567 * win32-low.c (current_inferior_ptid): Simplify.
4569 2014-02-19 Tom Tromey <tromey@redhat.com>
4571 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4573 (target_supports_btrace): Update.
4575 2014-02-14 Yao Qi <yao@codesourcery.com>
4577 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4578 (rsp-low-ipa.o): New target.
4580 2014-02-12 Tom Tromey <tromey@redhat.com>
4582 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4583 convert_ascii_to_int.
4584 * regcache.c (registers_to_string): Likewise.
4585 * remote-utils.c (decode_M_packet): Likewise.
4586 * server.c (process_serial_event): Likewise.
4588 2014-02-12 Tom Tromey <tromey@redhat.com>
4590 * server.c (handle_query, handle_v_run): Use hex2bin, not
4592 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4594 2014-02-12 Tom Tromey <tromey@redhat.com>
4596 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4597 convert_int_to_ascii.
4598 * regcache.c (registers_to_string, collect_register_as_string):
4600 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4602 * server.c (process_serial_event): Likewise.
4603 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4604 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4606 2014-02-12 Tom Tromey <tromey@redhat.com>
4608 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4609 bin2hex, not hexify.
4610 * tracepoint.c (cmd_qtstatus): Likewise.
4612 2014-02-12 Tom Tromey <tromey@redhat.com>
4614 * remote-utils.c (monitor_output): Pass explicit length to
4617 2014-02-12 Tom Tromey <tromey@redhat.com>
4619 * tracepoint.c: Include rsp-low.h.
4620 * server.c: Include rsp-low.h.
4621 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4622 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4624 * remote-utils.c: Include rsp-low.h.
4625 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4626 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4627 (convert_int_to_ascii, convert_ascii_to_int): Move to
4629 * regcache.c: Include rsp-low.h.
4630 * ax.c: Include rsp-low.h.
4631 * Makefile.in (SFILES): Add common/rsp-low.c.
4632 (OBS): Add rsp-low.o.
4633 (rsp-low.o): New target.
4635 2014-02-12 Tom Tromey <tromey@redhat.com>
4637 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4638 Include print-utils.h.
4639 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4640 (plongest, thirty_two, phex_nz): Remove.
4641 * Makefile.in (SFILES): Add common/print-utils.c.
4642 (OBS): Add print-utils.o.
4643 (print-utils-ipa.o): New target.
4644 (print-utils.o): New target.
4645 (IPA_OBJS): Add print-utils-ipa.o.
4647 2014-02-06 Tom Tromey <tromey@redhat.com>
4649 * Makefile.in (SFILES): Fix indentation.
4651 2014-02-05 Doug Evans <dje@google.com>
4653 * linux-low.c (linux_wait_for_event): Improve comment.
4654 (linux_wait_1): Keep current_inferior in sync with event_child.
4656 2014-01-22 Doug Evans <dje@google.com>
4658 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4660 2014-01-22 Doug Evans <dje@google.com>
4662 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4663 * configure: Regenerate.
4664 * config.in: Regenerate.
4665 * Makefile.in (SFILES): Add debug.c.
4667 * debug.c: New file.
4668 * debug.h: New file.
4669 * linux-aarch64-low.c (*): Update all debugging printfs to use
4670 debug_printf instead of fprintf.
4671 * linux-arm-low.c (*): Ditto.
4672 * linux-cris-low.c (*): Ditto.
4673 * linux-crisv32-low.c (*): Ditto.
4674 * linux-m32r-low.c (*): Ditto.
4675 * linux-sparc-low.c (*): Ditto.
4676 * linux-x86.c (*): Ditto.
4677 * linux-low.c (*): Ditto.
4678 (linux_wait_1): Add calls to debug_enter, debug_exit.
4679 (linux_wait): Remove redundant debugging printf.
4680 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4681 (linux_resume, unstop_all_lwps): Ditto.
4682 * mem-break.c (*): Update all debugging printfs to use
4683 debug_printf instead of fprintf.
4684 * remote-utils.c (*): Ditto.
4685 * thread-db.c (*): Ditto.
4686 * server.c #include <ctype.h>, "gdb_vecs.h".
4687 (debug_threads): Moved to debug.c.
4688 (*): Update all debugging printfs to use debug_printf instead of
4690 (start_inferior): Replace call to fflush with call to debug_flush.
4691 (monitor_show_help): Mention set debug-format.
4692 (parse_debug_format_options): New function.
4693 (handle_monitor_command): Handle "monitor set debug-format".
4694 (gdbserver_usage): Mention --debug-format.
4695 (main): Parse --debug-format.
4696 * server.h (debug_threads): Declaration moved to debug.h.
4698 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4699 trace_debug_1 that uses debug_printf.
4700 (tracepoint_look_up_symbols): Update all debugging printfs to use
4701 debug_printf instead of fprintf.
4703 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4705 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4708 2014-01-17 Pedro Alves <palves@redhat.com>
4711 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4712 defined after including gdb_proc_service.h.
4714 2014-01-16 Doug Evans <dje@google.com>
4716 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4717 (match_dll): Use it.
4719 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4721 * target.h (target_ops) <read_btrace>: Change parameters and
4722 return type to allow error reporting.
4723 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4724 trace reading errors on.
4725 * linux-low.c (linux_low_read_btrace): Pass trace reading
4727 (linux_low_disable_btrace): New.
4729 2014-01-15 Doug Evans <dje@google.com>
4731 * inferiors.c (thread_id_to_gdb_id): Delete.
4732 * inferiors.h (thread_id_to_gdb_id): Delete.
4734 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4736 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4737 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4740 2014-01-08 Pedro Alves <palves@redhat.com>
4742 * server.c (handle_status): Don't discard previous queued stop
4743 replies or thread's pending status here.
4744 (main) <disconnection>: Do it here instead.
4746 2014-01-08 Pedro Alves <palves@redhat.com>
4748 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4749 * server.c (visit_actioned_threads, handle_pending_status): New
4751 (handle_v_cont): Factor out parts to ...
4752 (resume): ... this new function. If in all-stop, and a thread
4753 being resumed has a pending status, report it without actually
4755 (myresume): Adjust to use the new 'resume' function.
4756 (clear_pending_status_callback, set_pending_status_callback)
4757 (find_status_pending_thread_callback): New functions.
4758 (handle_status): Handle the case of multiple threads having
4759 interesting statuses to report. Report threads' real last signal
4760 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4761 with an interesting thread to report the status for, instead of
4762 always reporting the status of the first thread.
4764 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4766 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4767 * gdbreplay.c (gdbreplay_version): Likewise.
4769 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4771 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4772 iov.iov_len with the real length in use.
4774 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4776 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4777 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4778 for all targets that use win32-low.c.
4779 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4780 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4782 2013-12-13 Pedro Alves <palves@redhat.com>
4784 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4785 if equal to TARGET_WAITKIND_LOADED.
4786 * win32-low.c (cached_status): New static global.
4787 (win32_wait): Add declaration.
4788 (do_initial_child_stuff): Flush all initial pending debug events
4789 up to the initial breakpoint.
4790 (win32_wait): If CACHED_STATUS was set, return that instead
4791 of doing a real wait. Remove the code resuming the execution
4792 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4793 during the initial phase. Also remove the code changing
4794 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4795 TARGET_WAITKIND_STOPPED.
4797 2013-12-11 Yao Qi <yao@codesourcery.com>
4799 * notif.c (handle_notif_ack): Return 0 if no notification
4802 2013-11-20 Doug Evans <dje@google.com>
4804 * linux-low.c (linux_set_resume_request): Fix comment.
4806 2013-11-20 Doug Evans <dje@google.com>
4808 * linux-low.c (resume_status_pending_p): Tweak comment.
4810 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4812 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4813 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4814 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4815 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4816 (srv_amd64_regobj): Add amd64-mpx.o.
4817 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4818 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4819 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4820 * i387-fp.c (num_pl_bnd_register) Added constant.
4821 (num_pl_bnd_cfg_registers) Added constant.
4822 (struct i387_xsave) Added reserved area and MPX fields.
4823 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4824 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4826 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4827 (init_registers_amd64_mpx_linux): Declare new function.
4828 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4829 (x86_64_regmap): Add MPX registers.
4830 (x86_linux_read_description): Add MPX case.
4831 (initialize_low_arch): Initialize MPX targets.
4833 2013-11-18 Tom Tromey <tromey@redhat.com>
4835 * configure: Rebuild.
4836 * configure.ac: Don't check for stdlib.h.
4837 * gdbreplay.c: Unconditionally include stdlib.h.
4839 2013-11-18 Tom Tromey <tromey@redhat.com>
4841 * config.in: Rebuild.
4842 * configure: Rebuild.
4843 * configure.ac: Don't use AC_HEADER_DIRENT.
4845 2013-11-18 Tom Tromey <tromey@redhat.com>
4847 * server.h: Don't check HAVE_STRING_H.
4848 * gdbreplay.c: Don't check HAVE_STRING_H.
4849 * configure: Rebuild.
4851 2013-11-18 Tom Tromey <tromey@redhat.com>
4853 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4856 2013-11-08 Tom Tromey <tromey@redhat.com>
4858 * configure, config.in: Rebuild.
4859 * configure.ac: Remove unused configury.
4861 2013-11-08 Tom Tromey <tromey@redhat.com>
4863 * acinclude.m4: Include common.m4, codeset.m4.
4864 * configure, config.in: Rebuild.
4865 * configure.ac: Use GDB_AC_COMMON.
4867 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4869 * linux-s390-low.c (HWCAP_S390_TE): New define.
4870 (s390_arch_setup): Consider the TE field in the HWCAP for
4871 determining 'have_regset_tdb'.
4873 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4876 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4879 2013-10-02 Pedro Alves <palves@redhat.com>
4881 * server.c (process_serial_event): Don't output "GDBserver
4882 exiting" if GDB is connected through stdio.
4883 * target.c (mywait): Likewise, be silent if GDB is connected
4886 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4888 * lynx-low.c (lynx_add_threads_after_attach): New function.
4889 (lynx_attach): Remove call to add_thread. Add call to
4890 lynx_add_threads_after_attach instead.
4892 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4894 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4895 * config.in, configure: Regenerated.
4897 2013-09-18 Yao Qi <yao@codesourcery.com>
4900 * server.c (start_inferior): Clear 'resume_info'.
4902 2013-09-16 Jiong Wang <jiwang@tilera.com>
4904 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4907 2013-09-16 Jiong Wang <jiwang@tilera.com>
4909 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4910 linux-tile-low.o to srv_tgtobj.
4912 2013-09-16 Will Newton <will.newton@linaro.org>
4914 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4917 2013-09-06 Pedro Alves <palves@redhat.com>
4919 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4920 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4921 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4922 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4923 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4924 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4926 2013-09-06 Pedro Alves <palves@redhat.com>
4928 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4929 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4931 2013-09-06 Pedro Alves <palves@redhat.com>
4933 * linux-amd64-ipa.c: Include tracepoint.h.
4934 * linux-i386-ipa.c: Include tracepoint.h.
4936 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4938 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4939 (ps_get_thread_area): New function.
4941 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4943 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4944 (initialize_low_arch): Call init_registers_crisv32 rather than
4945 init_register_crisv32.
4947 2013-09-05 Pedro Alves <palves@redhat.com>
4949 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4951 * hostio.h: ... this new file.
4952 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4953 win32-low.c: Include hostio.h.
4955 2013-09-05 Pedro Alves <palves@redhat.com>
4957 * server.h (gdb_client_data, handler_func, callback_handler_func)
4958 (delete_file_handler, add_file_handler, append_callback_event)
4959 (delete_callback_event, start_event_loop, initialize_event_loop):
4960 Move to event-loop.h and include it.
4961 * event-loop.h: New file.
4963 2013-09-05 Pedro Alves <palves@redhat.com>
4965 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4966 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4967 (loaded_dll, unloaded_dll): Move to ...
4968 * dll.h: ... this new file.
4969 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4971 2013-09-05 Pedro Alves <palves@redhat.com>
4973 * server.h (current_process, get_thread_process, all_processes)
4974 (add_inferior_to_list, for_each_inferior, current_inferior)
4975 (remove_inferior, add_process, remove_process, find_process_pid)
4976 (have_started_inferiors_p, have_attached_inferiors_p)
4977 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4978 (clear_inferiors, find_inferior, find_inferior_id)
4979 (inferior_target_data, set_inferior_target_data)
4980 (inferior_regcache_data, set_inferior_regcache_data): Move to
4981 inferiors.h, and include it.
4982 * inferiors.h: New file.
4984 2013-09-05 Pedro Alves <palves@redhat.com>
4986 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4990 2013-09-05 Pedro Alves <palves@redhat.com>
4992 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4994 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4995 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4996 (handle_tracepoint_general_set, handle_tracepoint_query)
4997 (tracepoint_finished_step, tracepoint_was_hit)
4998 (release_while_stepping_state_list, current_traceframe)
4999 (in_readonly_region, traceframe_read_mem)
5000 (fetch_traceframe_registers, traceframe_read_sdata)
5001 (traceframe_read_info, struct fast_tpoint_collect_status)
5002 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5003 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5004 (supply_fast_tracepoint_registers)
5005 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5006 (ipa_tdesc, claim_trampoline_space)
5007 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5008 (agent_mem_read, agent_get_trace_state_variable_value)
5009 (agent_set_trace_state_variable_value, agent_tsv_read)
5010 (agent_mem_read_string, get_raw_reg_func_addr)
5011 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5012 * tracepoint.h: ... this new file.
5014 2013-09-05 Pedro Alves <palves@redhat.com>
5016 * server.h (perror_with_name, error, fatal, warning, paddress)
5017 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5019 * utils.h: New file.
5021 2013-09-05 Pedro Alves <palves@redhat.com>
5023 * server.h (remote_debug, noack_mode, transport_is_reliable)
5024 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5025 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5026 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5027 (write_enn, initialize_async_io, enable_async_io)
5028 (disable_async_io, check_remote_input_interrupt_request)
5029 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5030 (dead_thread_notify, prepare_resume_reply)
5031 (decode_address_to_semicolon, decode_address, decode_m_packet)
5032 (decode_M_packet, decode_X_packet, decode_xfer_write)
5033 (decode_search_memory_packet, unhexify, hexify)
5034 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5035 (look_up_one_symbol, relocate_instruction)
5036 (monitor_output): Move to remote-utils.h, and include it.
5037 * remote-utils.h: New file.
5039 2013-09-05 Pedro Alves <palves@redhat.com>
5041 * server.h (_): Delete.
5043 2013-09-02 Pedro Alves <palves@redhat.com>
5045 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5046 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5048 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5050 2013-09-02 Pierre Muller <muller@sourceware.org>
5052 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5053 or WriteProcessMemory complete successfully and handle
5054 ERROR_PARTIAL_COPY error.
5056 2013-09-02 Pedro Alves <palves@redhat.com>
5058 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5059 error instead of EIO.
5061 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5064 * linux-low.c: Include filestuff.h.
5065 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5066 * lynx-low.c: Include filestuff.h.
5067 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5068 * server.c: Include filestuff.h.
5069 (main): Call notice_open_fds.
5070 * spu-low.c: Include filestuff.h.
5071 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5073 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5075 * Makefile.in: Explain why ../target and ../nat are not
5076 listed as include file search paths.
5077 (linux-waitpid.o): New object file rule.
5078 * configure.srv (srv_native_linux_obj): New variable.
5079 Replace all occurrences of linux native object files with
5080 $srv_native_linux_obj.
5081 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5082 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5083 (linux_enable_event_reporting): Remove declaration.
5084 (my_waitpid): Moved to common/linux-waitpid.c.
5085 (linux_wait_for_event): Pass ptid when calling
5086 linux_enable_event_reporting.
5087 (linux_supports_tracefork_flag): Remove.
5088 (linux_enable_event_reporting): Likewise.
5089 (linux_tracefork_grandchild): Remove.
5090 (STACK_SIZE): Moved to common/linux-ptrace.c.
5091 (linux_tracefork_child): Remove.
5092 (linux_test_for_tracefork): Remove.
5093 (linux_look_up_symbols): Call linux_supports_traceclone.
5094 (initialize_low): Remove call to linux_test_for_tracefork.
5095 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5096 common/linux-ptrace.h.
5097 (PTRACE_TYPE_ARG4): Likewise.
5098 Include linux-ptrace.h.
5100 2013-08-21 Pedro Alves <palves@redhat.com>
5102 * config.in: Renegerate.
5104 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5106 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5107 (SFILES): Remove $(srcdir)/common/target-common.c and
5108 add $(srcdir)/target/waitstatus.c.
5109 (OBS): Remove target-common.o and add waitstatus.o.
5110 (server_h): Remove $(srcdir)/../common/target-common.h and
5111 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5112 and $(srcdir)/../target/waitstatus.h.
5113 (target-common.o): Remove.
5114 (waitstatus.o): New target object file.
5115 * target.h: Do not include target-common.h and
5116 include target/resume.h, target/wait.h and
5117 target/waitstatus.h.
5119 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5121 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5122 to PTRACE_TYPE_ARG3.
5123 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5124 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5126 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5127 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5129 2013-07-27 Jie Zhang <jie@codesourcery.com>
5130 Daniel Jacobowitz <dan@codesourcery.com>
5131 Yao Qi <yao@codesourcery.com>
5133 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5134 (mips-linux-watch.o): New rule.
5135 (mips_linux_watch_h): New variable.
5136 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5138 * linux-mips-low.c: Include mips-linux-watch.h.
5139 (struct arch_process_info, struct arch_lwp_info): New.
5140 (update_watch_registers_callback): New function.
5141 (mips_linux_new_process, mips_linux_new_thread) New functions.
5142 (mips_linux_prepare_to_resume, mips_insert_point): New
5144 (mips_remove_point, mips_stopped_by_watchpoint): New
5146 (rsp_bp_type_to_target_hw_bp_type): New function.
5147 (mips_stopped_data_address): New function.
5148 (the_low_target): Add watchpoint support functions.
5150 2013-07-27 Yao Qi <yao@codesourcery.com>
5152 * i386-low.c: Include break-common.h.
5153 (enum target_hw_bp_type): Remove.
5155 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5157 * Makefile.in (SFILES): /common/target-common.c.
5158 (OBS): Add target-common.o.
5159 (server_h): Add $(srcdir)/../common/target-common.h.
5160 (target-common.o): New target.
5161 * server.c (queue_stop_reply_callback): Free
5162 status string after use.
5163 * target.c (target_waitstatus_to_string): Remove.
5164 * target.h: Include target-common.h.
5165 (resume_kind): Likewise.
5166 (target_waitkind): Likewise.
5167 (target_waitstatus): Likewise.
5168 (TARGET_WNOHANG): Likewise.
5170 2013-07-04 Yao Qi <yao@codesourcery.com>
5172 * Makefile.in (host_alias): Use @host_noncanonical@.
5173 (target_alias): Use @target_noncanonical@.
5174 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5175 ACX_NONCANONICAL_HOST.
5176 * configure: Regenerated.
5179 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5181 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5182 * configure: Rebuild.
5183 * Makefile.in (version_host, version_target): Get from configure.
5184 (version.c): Use $(version_host) and $(version_target).
5186 2013-07-03 Pedro Alves <palves@redhat.com>
5188 * Makefile.in (config.status): Depend on development.sh.
5189 * acinclude.m4: Include libmcheck.m4.
5190 * configure: Regenerate.
5192 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5194 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5195 attribute inside the parentheses.
5196 (winapi_DebugSetProcessKillOnExit): Ditto.
5197 (winapi_DebugBreakProcess): Ditto.
5198 (winapi_GenerateConsoleCtrlEvent): Ditto.
5200 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5202 * notif.h (notif_event): Add a dummy member to avoid compiler
5205 2013-07-01 Pedro Alves <palves@redhat.com>
5207 * hostio.c (HOSTIO_PATH_MAX): Define.
5208 (require_filename, handle_open, handle_unlink, handle_readlink):
5211 2013-07-01 Pedro Alves <palves@redhat.com>
5213 * server.h: Include "pathmax.h".
5214 * linux-low.c: Don't include sys/param.h.
5215 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5217 * win32-low.c: Don't include sys/param.h.
5218 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5220 2013-07-01 Pedro Alves <palves@redhat.com>
5222 * event-loop.c: Don't check HAVE_UNISTD_H before including
5224 * gdbreplay.c: Likewise.
5225 * remote-utils.c: Likewise.
5226 * server.c: Likewise.
5227 * configure.ac: Don't check for unistd.h.
5228 * configure: Regenerate.
5230 2013-06-28 Tom Tromey <tromey@redhat.com>
5232 * Makefile.in (version.c): Use version.in, not
5235 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5237 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5238 * configure: Rebuild.
5239 * Makefile.in (version_host, version_target): Get from configure.
5240 (version.c): Use $(version_host) and $(version_target).
5242 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5244 Fix trace-status to output user name without trailing colon.
5245 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5247 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5249 Fix trace-status to output proper start-time and stop-time.
5250 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5251 output start time and stop time in hex as gdb expects.
5253 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5255 * tracepoint.c (build_traceframe_info_xml): Output trace state
5256 variables present in the trace buffer.
5258 2013-06-24 Tom Tromey <tromey@redhat.com>
5260 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5262 (version.o): Remove.
5263 * gdbreplay.c: Include version.h.
5264 (version, host_name): Don't declare.
5265 * server.h: Include version.h.
5266 (version, host_name): Don't declare.
5268 2013-06-12 Pedro Alves <palves@redhat.com>
5270 * linux-x86-low.c (linux_is_elf64): Delete global.
5271 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5272 with local linux_pid_exe_is_elf_64_file use.
5274 2013-06-11 Pedro Alves <palves@redhat.com>
5276 * linux-low.c (regset_disabled, disable_regset): New functions.
5277 (regsets_fetch_inferior_registers)
5278 (regsets_store_inferior_registers): Use them.
5279 (initialize_regsets_info); Don't allocate the disabled_regsets
5281 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5284 2013-06-11 Pedro Alves <palves@redhat.com>
5286 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5289 2013-06-11 Pedro Alves <palves@redhat.com>
5291 * linux-x86-low.c (initialize_low_arch): Call
5292 init_registers_x32_avx_linux.
5294 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5296 Fix compatibility with Android Bionic.
5297 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5300 2013-06-07 Pedro Alves <palves@redhat.com>
5303 * Makefile.in (OBS): Add tdesc.o.
5304 (IPA_OBJS): Add tdesc-ipa.o.
5305 (tdesc-ipa.o): New rule.
5306 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5308 * linux-low.c (new_inferior): Delete.
5309 (disabled_regsets, num_regsets): Delete.
5310 (linux_add_process): Adjust to set the new per-process
5312 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5313 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5314 was a stop. When calling arch_setup, switch the current inferior
5315 to the thread that got an event.
5316 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5317 (regsets_fetch_inferior_registers)
5318 (regsets_store_inferior_registers): New regsets_info parameter.
5320 (linux_register_in_regsets): New regs_info parameter. Adjust to
5322 (register_addr, fetch_register, store_register): New usrregs_info
5323 parameter. Adjust to use it.
5324 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5325 parameter regs_info. Adjust to use it.
5326 (linux_fetch_registers): Get the current inferior's regs_info, and
5328 (linux_store_registers): Ditto.
5329 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5330 (initialize_low): Don't initialize the target_regsets here. Call
5331 initialize_low_arch.
5332 * linux-low.h (target_regsets): Delete declaration.
5333 (struct regsets_info): New.
5334 (struct usrregs_info): New.
5335 (struct regs_info): New.
5336 (struct process_info_private) <new_inferior>: New field.
5337 (struct linux_target_ops): Delete the num_regs, regmap, and
5338 regset_bitmap fields. New field regs_info.
5339 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5340 * i387-fp.c (num_xmm_registers): Delete.
5341 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5342 calls to new interface.
5343 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5344 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5345 Infer the number of xmm registers from the regcache's target
5347 * i387-fp.h (num_xmm_registers): Delete.
5348 * inferiors.c (add_thread): Don't install the thread's regcache
5350 * proc-service.c (gregset_info): Fetch the current inferior's
5351 regs_info. Adjust to use it.
5352 * regcache.c: Include tdesc.h.
5353 (register_bytes, reg_defs, num_registers)
5354 (gdbserver_expedite_regs): Delete.
5355 (get_thread_regcache): If the thread doesn't have a regcache yet,
5356 create one, instead of aborting gdbserver.
5357 (regcache_invalidate_one): Rename to ...
5358 (regcache_invalidate_thread): ... this.
5359 (regcache_invalidate_one): New.
5360 (regcache_invalidate): Only invalidate registers of the current
5362 (init_register_cache): Add target_desc parameter, and use it.
5363 (new_register_cache): Ditto. Assert the target description has a
5364 non zero registers_size.
5365 (regcache_cpy): Add assertions. Adjust.
5366 (realloc_register_cache, set_register_cache): Delete.
5367 (registers_to_string, registers_from_string): Adjust.
5368 (find_register_by_name, find_regno, find_register_by_number)
5369 (register_cache_size): Add target_desc parameter, and use it.
5370 (free_register_cache_thread, free_register_cache_thread_one)
5371 (regcache_release, register_cache_size): New.
5372 (register_size): Add target_desc parameter, and use it.
5373 (register_data, supply_register, supply_register_zeroed)
5374 (supply_regblock, supply_register_by_name, collect_register)
5375 (collect_register_as_string, collect_register_by_name): Adjust.
5376 * regcache.h (struct target_desc): Forward declare.
5377 (struct regcache) <tdesc>: New field.
5378 (init_register_cache, new_register_cache): Add target_desc
5380 (regcache_invalidate_thread): Declare.
5381 (regcache_invalidate_one): Delete declaration.
5382 (regcache_release): Declare.
5383 (find_register_by_number, register_cache_size, register_size)
5384 (find_regno): Add target_desc parameter.
5385 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5387 * remote-utils.c: Include tdesc.h.
5388 (outreg, prepare_resume_reply): Adjust.
5389 * server.c: Include tdesc.h.
5390 (gdbserver_xmltarget): Delete declaration.
5391 (get_features_xml, process_serial_event): Adjust.
5392 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5394 (struct process_info) <tdesc>: New field.
5395 (ipa_tdesc): Declare.
5396 * tdesc.c: New file.
5397 * tdesc.h: New file.
5398 * tracepoint.c: Include tdesc.h.
5399 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5400 (get_context_regcache): Adjust to pass ipa_tdesc down.
5401 (do_action_at_tracepoint): Adjust to get the register cache size
5402 from the context regcache's description.
5403 (traceframe_walk_blocks): Adjust to get the register cache size
5404 from the current trace frame's description.
5405 (traceframe_get_pc): Adjust to get current trace frame's
5406 description and pass it down.
5407 (gdb_collect): Adjust to get the register cache size from the
5409 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5410 (gdbserver_xmltarget): Delete.
5411 (initialize_low_tracepoint): Set the ipa's target description.
5412 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5413 (initialize_low_tracepoint): Set the ipa's target description.
5414 * linux-x86-low.c: Include tdesc.h.
5415 [__x86_64__] (is_64bit_tdesc): New.
5416 (ps_get_thread_area, x86_get_thread_area): Use it.
5417 (i386_cannot_store_register): Rename to ...
5418 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5419 (i386_cannot_fetch_register): Rename to ...
5420 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5421 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5423 (target_regsets): Rename to ...
5424 (x86_regsets): ... this.
5425 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5427 (x86_siginfo_fixup): Use is_64bit_tdesc.
5428 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5429 (tdesc_x32_avx_linux, tdesc_x32_linux)
5430 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5432 (x86_linux_update_xmltarget): Delete.
5433 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5434 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5435 (AMD64_LINUX_USER64_CS): New.
5436 (x86_linux_read_description): New, based on
5437 x86_linux_update_xmltarget.
5438 (same_process_callback): New.
5439 (x86_arch_setup_process_callback): New.
5440 (x86_linux_update_xmltarget): New.
5441 (x86_regsets_info): New.
5442 (amd64_linux_regs_info): New.
5443 (i386_linux_usrregs_info): New.
5444 (i386_linux_regs_info): New.
5445 (x86_linux_regs_info): New.
5446 (x86_arch_setup): Reimplement.
5447 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5448 (x86_emit_ops): Ditto.
5449 (the_low_target): Adjust. Install x86_linux_regs_info,
5450 x86_cannot_fetch_register, and x86_cannot_store_register.
5451 (initialize_low_arch): New.
5452 * linux-ia64-low.c (tdesc_ia64): Declare.
5453 (ia64_fetch_register): Adjust.
5454 (ia64_usrregs_info, regs_info): New globals.
5455 (ia64_regs_info): New function.
5456 (the_low_target): Adjust.
5457 (initialize_low_arch): New function.
5458 * linux-sparc-low.c (tdesc_sparc64): Declare.
5459 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5461 (sparc_arch_setup): New function.
5462 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5463 (the_low_target): Adjust.
5464 (initialize_low_arch): New function.
5465 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5466 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5467 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5468 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5469 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5470 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5471 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5472 (tdesc_powerpc_isa205_vsx64l): Declare.
5473 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5474 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5475 (ppc_set_pc, ppc_get_hwcap): Adjust.
5476 (ppc_usrregs_info): Forward declare.
5477 (!__powerpc64__) ppc_regmap_adjusted: New global.
5478 (ppc_arch_setup): Adjust to the current process'es target
5480 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5481 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5482 (ppc_store_evrregset): Adjust.
5483 (target_regsets): Rename to ...
5484 (ppc_regsets): ... this, and make static.
5485 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5486 (ppc_regs_info): New function.
5487 (the_low_target): Adjust.
5488 (initialize_low_arch): New function.
5489 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5490 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5491 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5492 (tdesc_s390x_linux64v2): Declare.
5493 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5494 (s390_fill_gregset, s390_store_last_break): Adjust.
5495 (target_regsets): Rename to ...
5496 (s390_regsets): ... this, and make static.
5497 (s390_get_pc, s390_set_pc): Adjust.
5498 (s390_get_hwcap): New target_desc parameter, and use it.
5499 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5500 (s390_arch_setup): Adjust to set the current process'es target
5501 description. Don't adjust the regmap.
5502 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5503 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5504 (regs_info_3264): New globals.
5505 (s390_regs_info): New function.
5506 (the_low_target): Adjust.
5507 (initialize_low_arch): New function.
5508 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5509 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5510 [__mips64] (init_registers_mips_linux)
5511 (init_registers_mips_dsp_linux): Delete defines.
5512 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5513 (have_dsp): New global.
5514 (mips_read_description): New, based on mips_arch_setup.
5515 (mips_arch_setup): Reimplement.
5516 (get_usrregs_info): New function.
5517 (mips_cannot_fetch_register, mips_cannot_store_register)
5518 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5519 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5520 (target_regsets): Rename to ...
5521 (mips_regsets): ... this, and make static.
5522 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5523 (dsp_regs_info, regs_info): New globals.
5524 (mips_regs_info): New function.
5525 (the_low_target): Adjust.
5526 (initialize_low_arch): New function.
5527 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5528 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5530 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5531 (arm_read_description): New, with bits factored from
5533 (arm_arch_setup): Reimplement.
5534 (target_regsets): Rename to ...
5535 (arm_regsets): ... this, and make static.
5536 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5537 (arm_regs_info): New function.
5538 (the_low_target): Adjust.
5539 (initialize_low_arch): New function.
5540 * linux-m68k-low.c (tdesc_m68k): Declare.
5541 (target_regsets): Rename to ...
5542 (m68k_regsets): ... this, and make static.
5543 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5544 (m68k_regs_info): New function.
5545 (m68k_arch_setup): New function.
5546 (the_low_target): Adjust.
5547 (initialize_low_arch): New function.
5548 * linux-sh-low.c (tdesc_sharch): Declare.
5549 (target_regsets): Rename to ...
5550 (sh_regsets): ... this, and make static.
5551 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5552 (sh_regs_info, sh_arch_setup): New functions.
5553 (the_low_target): Adjust.
5554 (initialize_low_arch): New function.
5555 * linux-bfin-low.c (tdesc_bfin): Declare.
5556 (bfin_arch_setup): New function.
5557 (bfin_usrregs_info, regs_info): New globals.
5558 (bfin_regs_info): New function.
5559 (the_low_target): Adjust.
5560 (initialize_low_arch): New function.
5561 * linux-cris-low.c (tdesc_cris): Declare.
5562 (cris_arch_setup): New function.
5563 (cris_usrregs_info, regs_info): New globals.
5564 (cris_regs_info): New function.
5565 (the_low_target): Adjust.
5566 (initialize_low_arch): New function.
5567 * linux-cris-low.c (tdesc_crisv32): Declare.
5568 (cris_arch_setup): New function.
5569 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5570 (cris_regs_info): New function.
5571 (the_low_target): Adjust.
5572 (initialize_low_arch): New function.
5573 * linux-m32r-low.c (tdesc_m32r): Declare.
5574 (m32r_arch_setup): New function.
5575 (m32r_usrregs_info, regs_info): New globals.
5576 (m32r_regs_info): Adjust.
5577 (initialize_low_arch): New function.
5578 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5579 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5580 (tic6x_usrregs_info): Forward declare.
5581 (tic6x_read_description): New function, based on ...
5582 (tic6x_arch_setup): ... this. Reimplement.
5583 (target_regsets): Rename to ...
5584 (tic6x_regsets): ... this, and make static.
5585 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5586 (tic6x_regs_info): New function.
5587 (the_low_target): Adjust.
5588 (initialize_low_arch): New function.
5589 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5590 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5591 (target_regsets): Rename to ...
5592 (xtensa_regsets): ... this, and make static.
5593 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5595 (xtensa_arch_setup, xtensa_regs_info): New functions.
5596 (the_low_target): Adjust.
5597 (initialize_low_arch): New function.
5598 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5599 (nios2_arch_setup): Set the current process'es tdesc.
5600 (target_regsets): Rename to ...
5601 (nios2_regsets): ... this.
5602 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5603 (nios2_regs_info): New function.
5604 (the_low_target): Adjust.
5605 (initialize_low_arch): New function.
5606 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5607 (aarch64_arch_setup): Set the current process'es tdesc.
5608 (target_regsets): Rename to ...
5609 (aarch64_regsets): ... this.
5610 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5611 (aarch64_regs_info): New function.
5612 (the_low_target): Adjust.
5613 (initialize_low_arch): New function.
5614 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5616 (target_regsets): Rename to ...
5617 (tile_regsets): ... this.
5618 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5619 (tile_regs_info): New function.
5620 (tile_arch_setup): Set the current process'es tdesc.
5621 (the_low_target): Adjust.
5622 (initialize_low_arch): New function.
5623 * spu-low.c (tdesc_spu): Declare.
5624 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5625 * win32-arm-low.c (tdesc_arm): Declare.
5626 (arm_arch_setup): New function.
5627 (the_low_target): Install arm_arch_setup instead of
5629 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5630 (init_windows_x86): Rename to ...
5631 (i386_arch_setup): ... this. Set `win32_tdesc'.
5632 (the_low_target): Adjust.
5633 * win32-low.c (win32_tdesc): New global.
5634 (child_add_thread): Don't create the thread cache here.
5635 (do_initial_child_stuff): Set the new process'es tdesc.
5636 * win32-low.h (struct target_desc): Forward declare.
5637 (win32_tdesc): Declare.
5638 * lynx-i386-low.c (tdesc_i386): Declare global.
5639 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5640 * lynx-low.c (lynx_tdesc): New global.
5641 (lynx_add_process): Set the new process'es tdesc.
5642 * lynx-low.h (struct target_desc): Forward declare.
5643 (lynx_tdesc): Declare global.
5644 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5645 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5646 * nto-low.c (nto_tdesc): New global.
5647 (do_attach): Set the new process'es tdesc.
5648 * nto-low.h (struct target_desc): Forward declare.
5649 (nto_tdesc): Declare.
5650 * nto-x86-low.c (tdesc_i386): Declare.
5651 (nto_x86_arch_setup): Set `nto_tdesc'.
5653 2013-06-04 Gary Benson <gbenson@redhat.com>
5655 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5656 to qSupported response when appropriate.
5657 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5658 with nonzero-length annex.
5659 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5660 arguments supplied in annex.
5662 2013-05-31 Doug Evans <dje@google.com>
5665 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5666 64 bits in 64-cross-32 environment.
5668 2013-05-28 Pedro Alves <palves@redhat.com>
5670 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5671 (aarch64-without-fpu.c): Delete rule.
5672 * configure.srv (aarch64*-*-linux*): Remove references to
5673 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5674 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5677 2013-05-24 Pedro Alves <palves@redhat.com>
5679 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5680 instead of strchr/decode_address. Error if the range isn't split
5681 with a ','. Don't assume there's be a ':' in the action.
5683 2013-05-23 Yao Qi <yao@codesourcery.com>
5684 Pedro Alves <palves@redhat.com>
5686 * linux-low.c (lwp_in_step_range): New function.
5687 (linux_wait_1): If the thread was range stepping and stopped
5688 outside the stepping range, report the stop to GDB. Otherwise,
5689 continue stepping. Add range stepping debug output.
5690 (linux_set_resume_request): Copy the step range from the resume
5692 (linux_supports_range_stepping): New.
5693 (linux_target_ops) <supports_range_stepping>: Set to
5694 linux_supports_range_stepping.
5695 * linux-low.h (struct linux_target_ops)
5696 <supports_range_stepping>: New field.
5697 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5698 * linux-x86-low.c (x86_supports_range_stepping): New.
5699 (the_low_target) <supports_range_stepping>: Set to
5700 x86_supports_range_stepping.
5701 * server.c (handle_v_cont): Handle 'r' action.
5702 (handle_v_requests): Append ";r" if the target supports range
5704 * target.h (struct thread_resume) <step_range_start,
5705 step_range_end>: New fields.
5706 (struct target_ops) <supports_range_stepping>:
5708 (target_supports_range_stepping): New macro.
5710 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5712 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5713 confusion in comment.
5715 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5717 * lynx-low.c (struct process_info_private): New type.
5718 (lynx_add_process): New function.
5719 (lynx_create_inferior, lynx_attach): Replace calls to
5720 add_process by calls to lynx_add_process.
5721 (lynx_resume): If PTID is null, then try using
5722 current_process()->private->last_wait_event_ptid.
5724 (lynx_clear_inferiors): Delete. The contents of that function
5725 has been inlined in lynx_mourn;
5726 (lynx_wait_1): Save the ptid in the process's private data.
5727 (lynx_mourn): Free the process' private data. Replace call
5728 to lynx_clear_inferiors by call to clear_inferiors.
5730 2013-05-17 Yao Qi <yao@codesourcery.com>
5732 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5735 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5737 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5738 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5739 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5740 PT_TEXT_END_ADDR guards. Update comments.
5741 (linux_target_op) <read_offsets>: Conditionally define to
5742 linux_read_offsets if the target is UCLIBC and if it defines
5743 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5745 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5746 Andrew Jenner <andrew@codesourcery.com>
5748 * Makefile.in (SFILES): Add linux-nios2-low.c.
5749 (clean): Add action to delete nios2-linux.c.
5750 (nios2-linux.c): New rule.
5751 * configure.srv: Add nios2*-*-linux*.
5752 * linux-nios2-low.c: New.
5754 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5756 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5758 2013-04-25 Hui Zhu <hui@codesourcery.com>
5761 * ax.c (ax_printf): Add fflush.
5763 2013-04-22 Tom Tromey <tromey@redhat.com>
5765 * Makefile.in (SFILES): Add filestuff.c.
5766 (OBS): Add filestuff.o.
5767 (filestuff.o): New target.
5768 * config.in, configure: Rebuild.
5769 * configure.ac: Check for fdwalk, pipe2.
5771 2013-04-17 Pedro Alves <palves@redhat.com>
5773 * configure.ac (USE_THREAD_DB): Delete variable.
5774 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5775 Don't AC_SUBST USE_THREAD_DB.
5776 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5777 * config.in, configure: Regenerate.
5779 2013-04-16 Pedro Alves <palves@redhat.com>
5781 * linux-low.h (struct lwp_info) <thread_known>: Move under
5782 the USE_THREAD_DB #ifdef.
5784 2013-04-16 Pedro Alves <palves@redhat.com>
5786 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5787 (linux-low.o): Delete rule.
5788 * linux-low.h: Always include "gdb_thread_db.h" instead of
5789 conditionally including thread_db.h.
5790 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5793 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5795 * Makefile.in (install-only): Fix make install regression.
5797 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5799 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5800 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5802 * gdbserver.1: Remove.
5804 2013-03-22 Pedro Alves <palves@redhat.com>
5806 * linux-low.c (handle_extended_wait): Don't call
5807 linux_enable_event_reporting.
5809 2013-03-15 Tony Theodore <tonyt@logyst.com>
5812 * Makefile.in (SHELL): Use @SHELL@.
5814 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5816 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5819 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5821 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5822 Remove extraneous NULL element.
5824 2013-03-13 Yao Qi <yao@codesourcery.com>
5826 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5827 'V' block in trace frame.
5829 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5831 * target.h (struct target_ops): Add btrace ops.
5832 (target_supports_btrace): New macro.
5833 (target_enable_btrace): New macro.
5834 (target_disable_btrace): New macro.
5835 (target_read_btrace): New macro.
5836 * gdbthread.h (struct thread_info): Add btrace field.
5837 * server.c: Include btrace-common.h.
5838 (handle_btrace_general_set): New function.
5839 (handle_btrace_enable): New function.
5840 (handle_btrace_disable): New function.
5841 (handle_general_set): Call handle_btrace_general_set.
5842 (handle_qxfer_btrace): New function.
5843 (struct qxfer qxfer_packets[]): Add btrace entry.
5844 * inferiors.c (remove_thread): Disable btrace.
5845 * linux-low: Include linux-btrace.h.
5846 (linux_low_enable_btrace): New function.
5847 (linux_low_read_btrace): New function.
5848 (linux_target_ops): Add btrace ops.
5849 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5850 Add srv_linux_btrace=yes.
5851 (x86_64-*-linux*): Add linux-btrace.o.
5852 Add srv_linux_btrace=yes.
5853 * configure.ac: Define HAVE_LINUX_BTRACE.
5854 * config.in: Regenerated.
5855 * configure: Regenerated.
5857 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5859 * server.c (handle_qxfer): Preserve error message if -3 is
5861 (qxfer): Document the -3 return value.
5863 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5865 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5866 (linux_btrace_h): New variable.
5867 (linux-btrace.o): New rule.
5869 2013-03-08 Stan Shebs <stan@codesourcery.com>
5870 Hafiz Abid Qadeer <abidh@codesourcery.com>
5872 * tracepoint.c (trace_buffer_size): New global.
5873 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5874 (init_trace_buffer): Change to one-argument function. Allocate
5875 trace buffer memory.
5876 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5877 handle QTBuffer:size packet.
5878 (cmd_bigqtbuffer_size): New function.
5879 (initialize_tracepoint): Call init_trace_buffer with
5880 DEFAULT_TRACE_BUFFER_SIZE.
5881 * server.c (handle_query): Add QTBuffer:size in the
5884 2013-03-07 Yao Qi <yao@codesourcery.com>
5886 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5887 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5889 (cmd_qtsp): Adjust condition. Do post increment.
5890 Set cur_action and cur_step_action back to 0.
5892 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5895 * linux-low.c (linux_write_memory): Return early success if LEN is
5898 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5900 * configure.srv: Add x86_64-*-cygwin* as target.
5902 2013-02-28 Tom Tromey <tromey@redhat.com>
5904 * configure.ac: Invoke AC_SYS_LARGEFILE.
5905 * configure, config.in: Rebuild.
5907 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5909 * win32-low.c: Throughout, fix format strings and casts of
5910 printf-like functions to avoid type related warnings on all
5912 (get_child_debug_event): Print dwDebugEventCode as hex since
5913 that's how it's usually documented.
5915 2013-02-28 Yao Qi <yao@codesourcery.com>
5917 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5920 2013-02-27 Jiong Wang <jiwang@tilera.com>
5922 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5923 (reg-tilegx32.c): New rule.
5924 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5925 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5926 different register info initializer according to elf class.
5927 (init_registers_tilgx32): New function. The tilegx32 register info
5929 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5930 (tile_store_gregset): Likewise.
5932 2013-02-27 Yao Qi <yao@codesourcery.com>
5934 * server.c (process_point_options): Print debug message when
5935 debug_threads is true.
5937 2013-02-26 Yao Qi <yao@codesourcery.com>
5939 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5941 2013-02-19 Pedro Alves <palves@redhat.com>
5942 Kai Tietz <ktietz@redhat.com>
5946 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5947 instead of strtoul to extract address from packet.
5948 (process_serial_event) <'z'>: Likewise.
5950 2013-02-18 Yao Qi <yao@codesourcery.com>
5952 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5954 2013-02-14 Pedro Alves <palves@redhat.com>
5958 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5959 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5961 2013-02-14 Pedro Alves <palves@redhat.com>
5963 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5965 2013-02-14 Pedro Alves <palves@redhat.com>
5967 * tracepoint.c (save_string): Delete.
5968 (add_tracepoint_action): Use savestring instead of save_string.
5970 2013-02-12 Pedro Alves <palves@redhat.com>
5972 * linux-xtensa-low.c: Ditto.
5973 * xtensa-xtregs.c: Ditto.
5975 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5977 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5980 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5982 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5983 aarch64_num_wp_regs and aarch64_num_bp_regs to
5984 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5986 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5988 * linux-aarch64-low.c (ps_get_thread_area): Replace
5989 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5991 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5992 Marcus Shawcroft <marcus.shawcroft@arm.com>
5993 Nigel Stephens <nigel.stephens@arm.com>
5994 Yufeng Zhang <yufeng.zhang@arm.com>
5996 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5997 (aarch64.c, aarch64-without-fpu.c): New targets.
5998 * configure.srv (aarch64*-*-linux*): New.
5999 * linux-aarch64-low.c: New file.
6001 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6003 * linux-low.c (handle_extended_wait, linux_create_inferior)
6004 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6005 (dequeue_one_deferred_signal, linux_resume_one_thread)
6006 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6007 (linux_tracefork_grandchild, linux_test_for_tracefork)
6008 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6009 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6010 where the argument is 0.
6012 2013-01-25 Yao Qi <yao@codesourcery.com>
6014 * event-loop.c: Include "queue.h".
6015 (gdb_event_p): New typedef.
6016 (struct gdb_event) <next_event>: Remove.
6017 (event_queue): Change to QUEUE(gdb_event_p).
6018 (async_queue_event): Remove.
6019 (gdb_event_xfree): New.
6020 (initialize_event_loop): New.
6021 (process_event): Use API from QUEUE.
6022 (wait_for_event): Likewise.
6023 * server.c (main): Call initialize_event_loop.
6024 * server.h (initialize_event_loop): Declare.
6026 2013-01-18 Yao Qi <yao@codesourcery.com>
6028 * ax.h (struct eval_agent_expr_context): New.
6029 (gdb_eval_agent_expr): Update declaration.
6030 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6031 TFRAME. Add new argument CTX.
6032 * server.h (struct eval_agent_expr_context): Declare.
6033 (agent_mem_read, agent_tsv_read): Update declaration.
6034 (agent_mem_read_string): Likewise.
6035 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6036 (add_traceframe_block): Add new argument TPOINT.
6037 Increase TPOINT->traceframe_usage.
6038 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6039 eval_tracepoint_agent_expr.
6040 (condition_true_at_tracepoint): Likewise.
6041 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6042 (agent_mem_read_string, agent_tsv_read): Likewise.
6044 2013-01-16 Yao Qi <yao@codesourcery.com>
6046 * linux-low.c (linux_resume_one_lwp): Don't check
6047 'lwp->bp_reinsert != 0'.
6049 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6050 Pedro Alves <palves@redhat.com>
6052 * lynx-low.c (ptrace_request_to_str): Define a temporary
6053 macro and use it to simplify this function's implementation.
6055 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6057 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6060 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6062 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6064 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6066 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6068 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6070 * lynx-low.c (lynx_resume): Use the resume_info parameter
6071 to determine the ptid for the lynx_ptrace call, unless
6072 it is equal to minus_one_ptid, in which case we use the
6073 ptid of the current_inferior.
6074 (lynx_wait_1): After having received a thread create/exit
6075 event, resume the inferior's execution using the signaling
6076 thread's ptid, rather than the old ptid.
6078 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6080 * lynx-low.c (lynx_resume): Delete variable ret.
6082 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6084 * gdbreplay.c (gdbreplay_version): Update copyright year.
6085 * server.c (gdbserver_version): Likewise.
6087 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6089 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6092 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6094 * lynx-low.c (ptrace_request_to_str): Add handling for
6097 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6099 * lynx-low.c (lynx_attach): Delete variable new_process.
6101 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6103 * lynx-low.c (lynx_create_inferior): Delete variable
6106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6108 * lynx-low.c (ptrace_request_to_str): Do not handle
6109 PTRACE_GETTHREADLIST if this macro does not exist.
6111 2012-12-15 Yao Qi <yao@codesourcery.com>
6113 * Makefile.in (OBS): Add notif.o.
6114 * notif.c, notif.h: New.
6115 * server.c: Include "notif.h".
6116 (struct vstop_notif) <next>: Remove.
6118 (queue_stop_reply): Update.
6119 (push_event, send_next_stop_reply): Remove.
6120 (discard_queued_stop_replies): Update.
6121 (notif_stop): New variable.
6122 (handle_v_stopped): Remove.
6123 (handle_v_requests): Don't call handle_v_stopped. Call
6124 handle_ack_notif instead.
6125 (queue_stop_reply_callback): Call notif_event_enque instead
6126 of queue_stop_reply.
6127 (handle_status): Don't call send_next_stop_reply, call
6128 notif_write_event instead.
6129 (kill_inferior_callback): Likewise.
6130 (detach_or_kill_inferior_callback): Likewise.
6131 (main): Call initialize_notif.
6132 (process_serial_event): Call QUEUE_is_empty.
6133 (handle_target_event): Call notif_push instead of push event.
6134 * server.h (push_event): Remove declaration.
6136 2012-12-10 Tom Tromey <tromey@redhat.com>
6138 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6139 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6142 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6143 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6144 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6145 (amd64-linux-ipa.o, ax.o): Rewrite.
6146 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6147 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6148 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6149 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6150 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6151 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6152 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6153 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6154 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6155 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6156 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6157 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6158 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6159 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6160 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6161 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6162 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6163 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6164 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6165 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6166 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6167 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6168 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6169 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6170 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6171 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6172 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6173 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6174 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6175 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6176 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6177 (reg-tilegx.o): Remove.
6178 (all_object_files): New macro.
6179 Include .deps files.
6180 * aclocal.m4, configure: Rebuild.
6181 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6182 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6183 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6185 2012-12-05 Tom Tromey <tromey@redhat.com>
6188 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6190 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6192 * configure.ac: Check for linux/perf_event.h.
6193 * config.in: Regenerated.
6194 * configure: Regenerated.
6196 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6198 * hostio.c (handle_readlink): Decrease buffer size
6199 parameter passed to readlink by one byte.
6201 2012-11-26 Yao Qi <yao@codesourcery.com>
6203 * configure.ac (build_warnings): Append '-Wempty-body'.
6204 * configure: Regenerated.
6205 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6208 2012-11-15 Pierre Muller <muller@sourceware.org>
6210 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6211 * config.in: Regenerate.
6212 * configure: Regenerate.
6213 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6214 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6215 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6216 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6218 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6219 instead of <sys/wait.h> header.
6220 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6222 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6224 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6225 (various make rules): Remove -DGDBSERVER
6227 2012-11-09 Yao Qi <yao@codesourcery.com>
6229 * spu-low.c (current_ptid): Move it to ..
6230 * gdbthread.h: ... here. New.
6231 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6232 * server.c (myresume, process_serial_event): Likewise.
6233 * thread-db.c (thread_db_find_new_threads): Likewise.
6234 * tracepoint.c (run_inferior_command): Likewise.
6236 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6238 * server.c (handle_search_memory_1): Include access length in
6241 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6243 * linux-crisv32-low.c: Fix compile errors.
6245 2012-09-04 Yao Qi <yao@codesourcery.com>
6247 * tracepoint.c (cmd_qtsv): Adjust debug message.
6248 Don't check CUR_TPOINT.
6250 2012-08-28 Yao Qi <yao@codesourcery.com>
6252 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6253 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6254 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6255 Remove declarations of xmalloc, xreallloc, xstrdup and
6257 * Makefile.in (libiberty_h): New.
6258 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6259 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6261 2012-08-23 Yao Qi <yao@codesourcery.com>
6263 * server.h: Remove declaration of 'xsnprintf'.
6265 2012-08-22 Keith Seitz <keiths@redhat.com>
6267 * server.h: Include build-gnulib-gbserver/config.h.
6268 * gdbreplay.c: Likewise.
6270 2012-08-08 Doug Evans <dje@google.com>
6272 * Makefile.in (SFILES): Add gdb_vecs.c.
6273 (OBS): Add gdb_vecs.o.
6274 (gdb_vecs_h, host_defs_h): New variables.
6275 (thread-db.o): Add $(gdb_vecs_h) dependency.
6276 (gdb_vecs.o): New rule.
6277 * thread-db.c: #include "gdb_vecs.h".
6278 (thread_db_load_search): Use a vector to iterate over path elements.
6279 Handle text appearing after "$pdir".
6281 * configure.ac: Add check for strstr.
6282 * config.in: Regenerate.
6283 * configure: Regenerate.
6285 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6287 * hostio.c (handle_pread): If pread fails, fall back to attempting
6289 (handle_pwrite): Likewise for pwrite.
6291 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6293 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6294 between unsupported TYPE and unimplementable ADDR/LEN combination.
6295 (arm_insert_point): Act on new return value.
6297 2012-07-31 Pedro Alves <palves@redhat.com>
6299 * server.c (process_point_options): Only skip tokens if we find
6300 one that is unrecognized. Don't treat 'X' specially while
6301 skipping unrecognized tokens.
6303 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6305 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6306 to 4-byte-align HW breakpoint addresses for Thumb.
6308 2012-07-27 Yao Qi <yao@codesourcery.com>
6312 * server.h: Declare gdb_agent_about_to_close.
6313 * target.c (kill_inferior): Include "agent.h".
6314 New. Send command 'kill'.
6315 * target.h (kill_inferior): Removed macro.
6316 * tracepoint.c (gdb_agent_about_to_close): New.
6317 (gdb_agent_helper_thread): Handle command 'close'.
6318 Wait endlessly until the inferior stops.
6319 Install gdb_agent_remove_socket to atexit hook.
6320 (agent_socket_name): New static variable.
6321 (gdb_agent_socket_init): Replace local variable 'name' with
6322 'agent_socket_name'.
6323 (gdb_agent_remove_socket): New.
6325 2012-07-27 Yao Qi <yao@codesourcery.com>
6327 * server.c (process_point_options): Stop at 'X' when parsing.
6329 2012-07-19 Michael Eager <eager@eagercon.com>
6331 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6333 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6334 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6335 hardware breakpoint.
6337 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6339 * gdbserver/linux-low.c (initialize_low): Call
6340 linux_ptrace_init_warnings.
6342 2012-07-02 Doug Evans <dje@google.com>
6344 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6347 2012-07-02 Stan Shebs <stan@codesourcery.com>
6349 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6350 (ax.o): Add it to build rule.
6352 (OBS): Add format.o.
6353 (IPA_OBS): Add format.o.
6354 * server.c (handle_query): Claim support for breakpoint commands.
6355 (process_point_options): Add command case.
6356 (process_serial_event): Leave running if there are printfs in
6358 * mem-break.h (any_persistent_commands): Declare.
6359 (add_breakpoint_commands): Declare.
6360 (gdb_no_commands_at_breakpoint): Declare.
6361 (run_breakpoint_commands): Declare.
6362 * mem-break.c (struct point_command_list): New struct.
6363 (struct breakpoint): New field command_list.
6364 (any_persistent_commands): New function.
6365 (add_commands_to_breakpoint): New function.
6366 (add_breakpoint_commands): New function.
6367 (gdb_no_commands_at_breakpoint): New function.
6368 (run_breakpoint_commands): New function.
6369 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6371 * ax.c: Include format.h.
6372 (ax_printf): New function.
6373 (gdb_eval_agent_expr): Add printf opcode.
6375 2012-06-13 Yao Qi <yao@codesourcery.com>
6377 * server.c (start_inferior): Remove duplicated writes to fields
6378 'last_resume_kind' and 'last_status' of 'current_inferior'.
6380 2012-06-12 Yao Qi <yao@codesourcery.com>
6381 Pedro Alves <palves@redhat.com>
6383 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6385 * server.c (handle_v_cont): Extend comment.
6387 2012-06-11 Yao Qi <yao@codesourcery.com>
6389 * linux-low.c (linux_attach): Add 'static'.
6391 2012-06-06 Yao Qi <yao@codesourcery.com>
6393 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6395 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6397 Fix gcc -flto compilation warning.
6398 * server.c (main): Make variable multi_mode and attach volatile.
6400 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6402 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6403 if the platform doesn't know about it.
6405 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6407 * Makefile.in (SFILES): Add linux-tile-low.c.
6408 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6409 * configure.srv: Handle tilegx-*-linux*.
6410 * linux-tile-low.c: New file.
6412 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6414 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6416 2012-05-24 Pedro Alves <palves@redhat.com>
6420 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6422 2012-05-24 Pedro Alves <palves@redhat.com>
6426 Replace target_signal with gdb_signal throughout.
6428 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6430 * linux-low.c (linux_store_registers): Avoid the copying sequence
6431 when no data has been retrieved by ptrace.
6433 2012-05-22 Will Deacon <will.deacon@arm.com>
6435 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6436 Include asm/ptrace.h.
6437 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6440 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6442 * linux-low.c (linux_store_registers): Don't re-retrieve data
6443 with ptrace that has already been obtained from /proc. Always
6444 copy any data retrieved with ptrace to the buffer supplied.
6446 2012-05-11 Yao Qi <yao@codesourcery.com>
6447 Pedro Alves <palves@redhat.com>
6449 * linux-low.c (enum stopping_threads_kind): New.
6450 (stopping_threads): Change type to `enum stopping_threads_kind'.
6451 (handle_extended_wait): If stopping and suspending threads, leave
6452 the new_lwp suspended too.
6453 (linux_wait_for_event): Adjust.
6454 (stop_all_lwps): Set `stopping_threads' to
6455 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6456 whether we're suspending threads or just stopping them. Assert no
6459 2012-04-29 Yao Qi <yao@codesourcery.com>
6461 * server.h: Move some code to ...
6462 * gdbthread.h: ... here. New.
6463 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6464 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6465 (nto-low.o, win32-low.o): Likewise.
6466 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6467 * regcache.c, remote-utils.c, server.c: Likewise.
6468 * target.c, tracepoint.c, win32-low.c: Likewise.
6470 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6472 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6473 (PTRACE_ARG4_TYPE): Likewise.
6474 (PTRACE_XFER_TYPE): Likewise.
6475 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6476 ptrace to PTRACE_ARG3_TYPE.
6477 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6478 (PTRACE_ARG4_TYPE): Likewise.
6479 (PTRACE_XFER_TYPE): Likewise.
6480 (linux_detach_one_lwp): Cast fourth argument of
6481 ptrace to long then PTRACE_ARG4_TYPE.
6482 (regsets_fetch_inferior_registers): Cast third argument of
6483 ptrace to long then PTRACE_ARG3_TYPE.
6484 (regsets_store_inferior_registers): Likewise.
6486 2012-04-20 Pedro Alves <palves@redhat.com>
6488 * configure: Regenerate.
6490 2012-04-19 Pedro Alves <palves@redhat.com>
6492 * Makefile.in (GNULIB_BUILDDIR): New.
6493 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6494 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6495 (all, install-only, uninstall, clean-info, all-lib, clean): No
6496 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6497 (maintainer-clean realclean distclean): Use subdir_do.
6499 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6500 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6501 * acinclude.m4: Include acx_configure_dir.m4.
6502 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6503 calls. Call AC_PROG_RANLIB. Configure gnulib using
6506 (GNULIB_STDINT_H): Adjust.
6507 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6508 * gdbreplay.c: Include build-gnulib/config.h.
6509 * server.h: Likewise.
6510 * aclocal.m4: Regenerate.
6511 * config.in: Regenerate.
6512 * configure: Regenerate.
6514 2012-04-19 Pedro Alves <palves@redhat.com>
6516 * Makefile.in (LIBGNU, INCGNU): Adjust.
6517 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6518 (all, install-only, uninstall, clean-info, all-lib, clean)
6519 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6520 * configure.ac: Adjust AC_OUTPUT output.
6521 * aclocal.m4: Regenerate.
6522 * configure: Regenerate.
6524 2012-04-19 Pedro Alves <palves@redhat.com>
6526 * Makefile.in (generated_files): New.
6527 (server_h): Remove the explicit dependency on config.h, and depend
6528 on $generated_files.
6530 2012-04-19 Pedro Alves <palves@redhat.com>
6532 * Makefile.in (INCGNU): Add -Ignulib.
6534 2012-04-19 Pedro Alves <palves@redhat.com>
6536 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6537 (INCGNU): ... this, and spell out -I here.
6538 (GNULIB_LIB): Rename to ...
6540 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6542 2012-04-19 Pedro Alves <palves@redhat.com>
6544 * config.in: Regenerate.
6546 2012-04-19 Pedro Alves <palves@redhat.com>
6548 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6549 * server.h (memmem): Remove declaration.
6550 * config.in: Regenerate.
6551 * configure: Regenerate.
6553 2012-04-19 Yao Qi <yao@codesourcery.com>
6555 * Makefile.in (SFILES): Add common/vec.c.
6559 2012-04-19 Yao Qi <yao@codesourcery.com>
6561 * remote-utils.c (prepare_resume_reply): Replace with macro
6562 target_core_of_thread.
6563 * server.c (handle_qxfer_threads_proper): Likewise.
6564 * target.h (traget_core_of_thread): New macro.
6566 2012-04-18 Pedro Alves <palves@redhat.com>
6568 * aclocal.m4: Regenerate.
6569 * configure: Regenerate.
6571 2012-04-16 Yao Qi <yao@codesourcery.com>
6573 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6574 duplicated on address.
6576 2012-04-16 Yao Qi <yao@codesourcery.com>
6578 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6579 (struct tracepoint_action_ops) <send>: New field.
6580 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6581 (agent_expr_send, x_tracepoint_action_send): New.
6582 (l_tracepoint_action_send): New.
6583 (cmd_qtdp): Download and install tracepoint
6584 according to `use_agent'.
6585 (run_inferior_command): Add one more parameter `len'.
6587 (tracepoint_send_agent): New.
6588 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6590 2012-04-16 Yao Qi <yao@codesourcery.com>
6592 * tracepoint.c (download_tracepoints): Moved to ...
6593 (cmd_qtstart): ... here.
6595 2012-04-14 Yao Qi <yao@codesourcery.com>
6597 * tracepoint.c: Include inttypes.h.
6598 (struct collect_memory_action): Use sized types.
6599 (struct tracepoint): Likewise.
6600 (cmd_qtdp, stop_tracing): Update print specifiers.
6601 (cmd_qtp, response_tracepoint): Likewise.
6602 (collect_data_at_tracepoint): Likewise.
6603 (collect_data_at_step): Likewise.
6605 2012-04-14 Yao Qi <yao@codesourcery.com>
6607 Import gnulib module inttypes.
6608 * aclocal.m4, config.in, configure: Regenerated.
6610 2012-04-14 Yao Qi <yao@codesourcery.com>
6612 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6613 Makefile and config.status at last.
6615 2012-04-13 Yao Qi <yao@codesourcery.com>
6617 * tracepoint.c: Include stdint.h unconditionally.
6619 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6621 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6622 on BFD_HAVE_SYS_PROCFS_TYPE.
6623 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6624 * configure: Regenerate.
6625 * config.in: Likewise.
6627 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6629 * Makefile.in (clean): Also remove x32.c x32-linux.c
6630 x32-avx.c x32-avx-linux.c.
6631 (x32.o): New target.
6633 (x32-linux.o): Likewise.
6634 (x32-linux.c): Likewise.
6635 (x32-avx.o): Likewise.
6636 (x32-avx.c): Likewise.
6637 (x32-avx-linux.o): Likewise.
6638 (x32-avx-linux.c): Likewise.
6640 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6641 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6642 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6643 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6644 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6645 i386/x32-avx-linux.xml.
6647 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6648 (init_registers_x32_avx_linux): Likwise.
6649 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6650 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6652 2012-04-13 Pedro Alves <palves@redhat.com>
6654 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6655 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6656 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6657 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6660 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6662 * linux-x86-low.c (compat_x32_clock_t): New.
6663 (compat_x32_siginfo_t): Likewise.
6664 (compat_x32_siginfo_from_siginfo): Likewise.
6665 (siginfo_from_compat_x32_siginfo): Likewise.
6666 (linux_is_elf64): Likewise.
6667 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6668 and siginfo_from_compat_x32_siginfo for x32.
6669 (x86_arch_setup): Set linux_is_elf64.
6671 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6674 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6676 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6677 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6678 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6679 compatible with process.
6681 2012-04-12 Yao Qi <yao@codesourcery.com>
6683 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6684 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6685 (install-only, install-info, clean): Handle sub dir gnulib.
6686 (all-lib, am--refresh): New targets.
6687 (memmem.o): Remove target.
6688 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6689 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6690 (AC_REPLACE_FUNCS): Remove memmem.
6691 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6692 (AC_OUTPUT): Generate Makefile in gnulib/.
6693 * aclocal.m4, config.in, configure: Regenerated.
6695 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6697 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6699 2012-04-05 Pedro Alves <palves@redhat.com>
6701 -Werror=strict-aliasing
6703 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6706 2012-04-04 Pedro Alves <palves@redhat.com>
6708 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6709 (sparc_store_gregset_from_stack, sparc_store_gregset)
6710 (sparc_breakpoint_at): Fix formatting.
6712 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6714 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6716 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6717 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6718 * config.in: Regenerate.
6719 * configure: Likewise.
6721 2012-03-29 Pedro Alves <palves@redhat.com>
6723 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6724 Correct ptrace arguments.
6726 2012-03-28 Pedro Alves <palves@redhat.com>
6728 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6729 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6730 (IA64_FR1_REGNUM): New defines.
6731 (ia64_fetch_register): New.
6732 (the_low_target): Install it.
6733 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6735 * linux-low.c (linux_fetch_registers): Try the
6736 the_low_target.fetch_register hook first.
6738 * linux-arm-low.c (the_low_target): Adjust.
6739 * linux-bfin-low.c (the_low_target): Adjust.
6740 * linux-cris-low.c (the_low_target): Adjust.
6741 * linux-crisv32-low.c (the_low_target): Adjust.
6742 * linux-m32r-low.c (the_low_target): Adjust.
6743 * linux-m68k-low.c (the_low_target): Adjust.
6744 * linux-mips-low.c (the_low_target): Adjust.
6745 * linux-ppc-low.c (the_low_target): Adjust.
6746 * linux-s390-low.c (the_low_target): Adjust.
6747 * linux-sh-low.c (the_low_target): Adjust.
6748 * linux-sparc-low.c (the_low_target): Adjust.
6749 * linux-tic6x-low.c (the_low_target): Adjust.
6750 * linux-x86-low.c (the_low_target): Adjust.
6751 * linux-xtensa-low.c (the_low_target): Adjust.
6753 2012-03-26 Pedro Alves <palves@redhat.com>
6755 * server.c (handle_qxfer_libraries): Don't bail early if
6756 the_target->qxfer_libraries_svr4 is not NULL.
6758 2012-03-26 Pedro Alves <palves@redhat.com>
6760 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6762 2012-03-23 Pedro Alves <palves@redhat.com>
6764 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6765 "library-list-svr4" element's start tag when the the DSO list is
6768 2012-03-23 Pedro Alves <palves@redhat.com>
6770 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6771 a variable whose type size is the same as the inferior's pointer
6774 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6776 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6778 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6779 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6780 * linux-low.h: Include <signal.h>.
6781 (struct siginfo): Remove forward declaration.
6782 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6785 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6787 * .gitignore: Ignore more files.
6789 2012-03-19 Pedro Alves <palves@redhat.com>
6790 Jan Kratochvil <jan.kratochvil@redhat.com>
6792 * server.c (cont_thread, general_thread): Add describing comments.
6793 (start_inferior): Clear `cont_thread'.
6794 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6797 2012-03-15 Yao Qi <yao@codesourcery.com>
6799 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6801 (cmd_qtdp): ... here.
6803 2012-03-15 Yao Qi <yao@codesourcery.com>
6805 * tracepoint.c (struct tracepoint_action_ops): New.
6806 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6807 (m_tracepoint_action_download): New.
6808 (r_tracepoint_action_download): New.
6809 (x_tracepoint_action_download): New.
6810 (l_tracepoint_action_download): New.
6811 (add_tracepoint_action): Install `action->ops' according type.
6812 (download_tracepoint_1): Move code `download' function pointer
6813 of various tracepoint_action_ops.
6815 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6817 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6818 linux_ptrace_attach_warnings.
6820 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6822 * Makefile.in (linux-ptrace.o): New.
6823 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6824 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6825 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6826 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6827 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6829 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6831 2012-03-08 Yao Qi <yao@codesourcery.com>
6832 Pedro Alves <palves@redhat.com>
6834 Fix PR server/13392.
6835 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6837 * tracepoint.c (remove_tracepoint): New.
6838 (cmd_qtdp): Call remove_tracepoint when failed to install.
6840 2012-03-07 Pedro Alves <palves@redhat.com>
6842 * linux-low.c (get_detach_signal): New.
6843 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6844 Pass on pending signals to PTRACE_DETACH. Check the result of the
6846 * server.c (program_signals, program_signals_p): New.
6847 (handle_general_set): Handle QProgramSignals.
6848 * server.h (program_signals, program_signals_p): Declare.
6850 2012-03-05 Pedro Alves <palves@redhat.com>
6851 Jan Kratochvil <jan.kratochvil@redhat.com>
6853 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6856 2012-03-03 Yao Qi <yao@codesourcery.com>
6858 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6859 agent_look_up_symbols.
6861 2012-03-03 Yao Qi <yao@codesourcery.com>
6863 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6864 (linux-x86-low.o): Likewise.
6865 * server.h: Remove in_process_agent_loaded.
6866 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6870 2012-03-03 Yao Qi <yao@codesourcery.com>
6872 * tracepoint.c (gdb_agent_capability): New global.
6873 (in_process_agent_loaded_ust): Renamed to
6874 `in_process_agent_supports_ust'.
6876 (in_process_agent_supports_ust): Call agent_capability_check.
6877 (clear_installed_tracepoints): Assert that agent supports
6880 2012-03-03 Yao Qi <yao@codesourcery.com>
6882 * linux-low.c (linux_supports_agent): New.
6883 (linux_target_ops): Initialize field `supports_agent' with
6884 linux_supports_agent.
6885 * target.h (struct target_ops) <supports_agent>: New.
6886 (target_supports_agent): New macro.
6887 * server.c (handle_general_set): Handle packet 'QAgent'.
6888 (handle_query): Send `QAgent+'.
6889 * Makefile.in (server.o): Depends on agent.h.
6891 2012-03-03 Yao Qi <yao@codesourcery.com>
6893 * Makefile.in (OBS): Add agent.o.
6894 Add new rule for agent.o.
6895 Track dependence of tracepoint.c on agent.h.
6896 * tracepoint.c (run_inferior_command_1):
6897 (run_inferior_command): Call agent_run_command.
6898 (gdb_ust_connect_sync_socket): Deleted. Move it to
6900 (resume_thread, stop_thread): Likewise.
6901 (gdb_ust_socket_init): Renamed to ...
6902 (gdb_agent_socket_init): ... New.
6903 (gdb_ust_thread): Renamed to ...
6904 (gdb_agent_helper_thread): ... New.
6905 (gdb_ust_init): Move some code to ...
6906 (gdb_agent_init): ... here. New.
6907 [HAVE_UST]: Call gdb_ust_init.
6908 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6909 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6910 * config.in, configure: Regenerated.
6912 2012-03-02 Pedro Alves <palves@redhat.com>
6914 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6915 * linux-low.c (struct simple_pid_list): New.
6916 (stopped_pids): New a struct simple_pid_list pointer.
6917 (add_to_pid_list, pull_pid_from_list): New.
6918 (handle_extended_wait): Don't assume the first signal new children
6919 report is SIGSTOP. Adjust call to pull_pid_from_list.
6920 (linux_wait_for_lwp): Adjust.
6922 2012-03-02 Yao Qi <yao@codesourcery.com>
6924 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6927 2012-03-02 Yao Qi <yao@codesourcery.com>
6929 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6930 `stop_pc' and `tpoint'. Update caller.
6932 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6934 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6935 * linux-low.c (use_linux_regsets): New macro.
6936 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6937 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6938 (linux_register_in_regsets): New function.
6939 (usr_fetch_inferior_registers): Skip registers covered by
6941 (usr_store_inferior_registers): Likewise.
6942 (usr_fetch_inferior_registers): New macro.
6943 (usr_store_inferior_registers): Likewise.
6944 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6945 (linux_store_registers): Likewise.
6946 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6948 (init_registers_mips64_dsp_linux): Likewise.
6949 (init_registers_mips_linux): New macro.
6950 (init_registers_mips_dsp_linux): Likewise.
6951 (mips_dsp_num_regs): Likewise.
6952 (DSP_BASE, DSP_CONTROL): New fallback macros.
6953 (mips_base_regs): New macro.
6954 (mips_regmap): Use it. Fix the size.
6955 (mips_dsp_regmap): New variable.
6956 (mips_dsp_regset_bitmap): Likewise.
6957 (mips_arch_setup): New function.
6958 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6960 (mips_cannot_store_register): Likewise.
6961 (the_low_target): Update .arch_setup, .num_regs and .regmap
6962 initializers. Add .regset_bitmap initializer.
6963 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6965 * linux-bfin-low.c (the_low_target): Likewise.
6966 * linux-cris-low.c (the_low_target): Likewise.
6967 * linux-crisv32-low.c (the_low_target): Likewise.
6968 * linux-ia64-low.c (the_low_target): Likewise.
6969 * linux-m32r-low.c (the_low_target): Likewise.
6970 * linux-m68k-low.c (the_low_target): Likewise.
6971 * linux-ppc-low.c (the_low_target): Likewise.
6972 * linux-s390-low.c (the_low_target): Likewise.
6973 * linux-sh-low.c (the_low_target): Likewise.
6974 * linux-sparc-low.c (the_low_target): Likewise.
6975 * linux-tic6x-low.c (the_low_target): Likewise.
6976 * linux-x86-low.c (the_low_target): Likewise.
6977 * linux-xtensa-low.c (the_low_target): Likewise.
6978 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6979 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6980 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6982 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6983 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6985 2012-02-29 Yao Qi <yao@codesourcery.com>
6986 Pedro Alves <palves@redhat.com>
6988 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6989 `step_over_finished' is true.
6991 2012-02-27 Pedro Alves <palves@redhat.com>
6993 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6994 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6996 2012-02-27 Pedro Alves <palves@redhat.com>
6999 * linux-low.c (pid_is_stopped): New.
7000 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7002 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7004 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7007 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7009 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7011 2012-02-24 Luis Machado <lgustavo@codesourcery>
7013 * server.c (handle_query): Advertise support for target-side
7014 breakpoint condition evaluation.
7015 (process_point_options): New function.
7016 (process_serial_event): When inserting a breakpoint, check for
7017 a target-side condition that should be evaluated.
7019 * mem-break.c: Include regcache.h and ax.h.
7020 (point_cond_list_t): New data structure.
7021 (breakpoint) <cond_list>: New field.
7022 (find_gdb_breakpoint_at): Make non-static.
7023 (delete_gdb_breakpoint_at): Clear any target-side
7025 (clear_gdb_breakpoint_conditions): New function.
7026 (add_condition_to_breakpoint): Likewise.
7027 (add_breakpoint_condition): Likewise.
7028 (gdb_condition_true_at_breakpoint): Likewise.
7029 (gdb_breakpoint_here): Return result directly instead
7030 of going through a local variable.
7032 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7033 (clear_gdb_breakpoint_conditions): Likewise.
7034 (add_breakpoint_condition): Likewise.
7035 (gdb_condition_true_at_breakpoint): Likewise.
7037 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7038 (need_step_over_p): Take target-side breakpoint condition into
7041 2012-02-24 Luis Machado <lgustavo@codesourcery>
7043 * server.h: Include tracepoint.h.
7044 (agent_mem_read, agent_get_trace_state_variable_value,
7045 agent_set_trace_state_variable_value,
7046 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7047 get_set_tsv_func_addr): New prototypes.
7049 * ax.h: New include file.
7050 * ax.c: New source file.
7052 * tracepoint.c: Include ax.h.
7053 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7054 agent_expr, eval_result_type): Move to ax.h.
7055 (parse_agent_expr): Rename to ...
7056 (gdb_parse_agent_expr): ... this, make it non-static and move
7058 (unparse_agent_expr) Rename to ...
7059 (gdb_unparse_agent_expr): ... this, make it non-static and move
7061 (eval_agent_expr): Rename to ...
7062 (eval_tracepoint_agent_expr): ... this.
7063 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7064 forward declarations.
7065 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7066 (agent_get_trace_state_variable_value): New function.
7067 (agent_set_trace_state_variable_value): New function.
7068 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7069 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7070 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7071 (condition_true_at_tracepoint): Likewise.
7072 (parse_agent_expr): Rename to ...
7073 (gdb_parse_agent_expr): ... this and move to ax.c.
7074 (unparse_agent_expr): Rename to ...
7075 (gdb_unparse_agent_expr): ... this and move to ax.c.
7076 (gdb_agent_op_name): Move to ax.c.
7077 (eval_agent_expr): Rename to ...
7078 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7080 (eval_tracepoint_agent_expr): New function.
7081 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7083 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7085 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7086 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7087 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7088 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7089 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7090 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7091 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7092 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7093 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7094 (compile_bytecodes): Remove forward declaration.
7095 (is_goto_target): Move to ax.c.
7096 (compile_bytecodes): Move to ax.c and call
7097 agent_get_trace_state_variable_value (...) and
7098 agent_set_trace_state_variable_value (...).
7100 * Makefile.in: Update ax.c and IPA dependencies.
7102 2012-02-24 Pedro Alves <palves@redhat.com>
7104 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7105 (cmd_bigqtbuffer_circular): ... this. Only handle
7106 'QTBuffer:circular:'.
7107 (handle_tracepoint_general_set): Adjust.
7109 2012-02-16 Yao Qi <yao@codesourcery.com>
7111 * inferiors.c: Move code to ...
7112 * dll.c: .... here. New.
7113 * server.h: Declare clear_dlls.
7114 * Makefile.in (SFILES): Add dll.c.
7118 2012-02-11 Yao Qi <yao@codesourcery.com>
7120 * server.c: (handle_monitor_command): Add a new parameter
7122 (handle_query): Update caller.
7124 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7126 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7127 * configure, config.in: Regenerate.
7128 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7131 2012-02-02 Pedro Alves <palves@redhat.com>
7133 Try SIGKILL first, then PTRACE_KILL.
7134 * linux-low.c (linux_kill_one_lwp): New.
7135 (linux_kill_one_lwp): Rename to ...
7136 (kill_one_lwp_callback): ... this. Use the new
7139 2012-02-02 Pedro Alves <palves@redhat.com>
7141 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7144 2012-01-27 Pedro Alves <palves@redhat.com>
7146 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7147 (elf_64_file_p): Make static.
7148 (linux_pid_exe_is_elf_64_file): New.
7149 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7150 Delete declarations.
7151 (linux_pid_exe_is_elf_64_file): Declare.
7152 * linux-x86-low.c (x86_arch_setup): Use
7153 linux_pid_exe_is_elf_64_file.
7155 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7157 * linux-low.c (linux_wait_for_event_1): Rename to ...
7158 (linux_wait_for_event): ... here and merge it with former
7159 linux_wait_for_event - new variable wait_ptid, use it.
7160 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7162 2012-01-23 Pedro Alves <palves@redhat.com>
7164 * server.c (main): Avoid yet another case of infinite loop while
7165 detaching/killing after a longjmp.
7167 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7170 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7172 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7174 * hostio.c (handle_readlink): New function.
7175 (handle_vFile): Call it to handle "vFile:readlink" packets.
7177 2012-01-20 Pedro Alves <palves@redhat.com>
7178 Ulrich Weigand <ulrich.weigand@linaro.org>
7180 * server.c (handle_v_requests): Only support vAttach and vRun to
7181 start multiple processes when in extended protocol mode.
7183 2012-01-17 Pedro Alves <palves@redhat.com>
7185 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7186 memalign plus mprotect to allocate the scratch buffer.
7188 2012-01-13 Pedro Alves <palves@redhat.com>
7190 * server.c (attach_inferior): Clear `cont_thread'.
7192 2012-01-13 Pedro Alves <palves@redhat.com>
7194 * server.c (main): Avoid infinite loop while detaching/killing
7197 2012-01-09 Doug Evans <dje@google.com>
7199 * server.c (start_inferior): Set last_ptid in --wrapper case.
7201 2012-01-06 Yao Qi <yao@codesourcery.com>
7203 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7205 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7207 2012-01-04 Yao Qi <yao@codesourcery.com>
7209 * tracepoint.c (cmd_qtdp): Print debug message
7210 for static tracepoint.
7212 2012-01-04 Yao Qi <yao@codesourcery.com>
7214 * tracepoint.c (trace_vdebug): Differentiate debug message
7215 between gdbserver and IPA.
7217 2012-01-03 Yao Qi <yao@codesourcery.com>
7219 * tracepoint.c (tracepoint_was_hit): Don't collect for
7222 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7224 * terminal.h: Reformat copyright header.
7226 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7228 * server.c (gdbserver_version): Update copyright year.
7229 * gdbreplay.c (gdbreplay_version): Likewise.
7231 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7233 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7236 2011-12-18 Hui Zhu <teawater@gmail.com>
7237 * linux-low.c (linux_create_inferior): Save return value to ret.
7239 2011-12-18 Hui Zhu <teawater@gmail.com>
7241 * linux-low.c (linux_create_inferior): Save return value to ret.
7243 2011-12-16 Doug Evans <dje@google.com>
7245 * linux-low.c (linux_create_inferior): If stdio connection,
7246 redirect stdin from /dev/null, stdout to stderr.
7247 * remote-utils.c (remote_is_stdio): New static global.
7248 (remote_connection_is_stdio): New function.
7249 (remote_prepare): Handle stdio connection.
7250 (remote_open): Ditto.
7251 (remote_close): Don't close stdin for stdio connections.
7252 (read_prim,write_prim): New functions. Replace all calls to
7253 read/write to these.
7254 * server.c (main): Watch for "-" argument. Move call to
7255 remote_prepare before start_inferior.
7256 * server.h (STDIO_CONNECTION_NAME): New macro.
7257 (remote_connection_is_stdio): Declare.
7259 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7260 in debugging output.
7262 2011-12-15 Yao Qi <yao@codesourcery.com>
7264 * tracepoint.c: Include sys/syscall.h.
7265 (gdb_ust_thread): Remove preprocessor conditional.
7267 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7269 * linux-low.c (linux_detach_one_lwp): Call
7270 the_low_target.prepare_to_resume before detaching.
7272 2011-12-14 Yao Qi <yao@codesourcery.com>
7274 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7277 2011-12-14 Yao Qi <yao@codesourcery.com>
7279 * i386-low.c (i386_low_stopped_data_address): Initialize local
7282 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7286 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7287 DR_CONTROL unless necessary. Extend comments.
7288 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7289 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7291 2011-12-13 Yao Qi <yao@codesourcery.com>
7293 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7295 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7297 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7299 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7300 Print new debug message for such case.
7302 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7304 Fix overlapping memcpy.
7305 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7306 the read_inferior_memory transfer.
7307 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7308 write_inferior_memory transfer.
7309 (set_fast_tracepoint_jump): New variable buf. Use it for the
7310 read_inferior_memory and write_inferior_memory transfers.
7311 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7312 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7313 Use it for the write_inferior_memory transfer.
7314 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7317 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7319 * linux-low.c (fetch_register, store_register): Make code
7320 consistent, fix formatting.
7322 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7324 * linux-low.c (usr_store_inferior_registers): Factor out code
7325 to handle individual registers into...
7326 (store_register): ... this new function.
7328 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7330 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7331 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7332 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7333 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7334 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7335 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7336 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7337 (srv_xmlfiles): Add new XML files.
7339 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7341 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7342 (init_registers_s390_linux32v1): Add prototype.
7343 (init_registers_s390_linux32v2): Likewise.
7344 (init_registers_s390_linux64v1): Likewise.
7345 (init_registers_s390_linux64v2): Likewise.
7346 (init_registers_s390x_linux64v1): Likewise.
7347 (init_registers_s390x_linux64v2): Likewise.
7348 (s390_num_regs): Increment to 52.
7349 (s390_regmap): Add orig_r2 register.
7350 (s390_num_regs_3264): Increment to 68.
7351 (s390_regmap_3264): Add orig_r2 register.
7352 (s390_collect_ptrace_register): Handle orig_r2 register.
7353 (s390_supply_ptrace_register): Likewise.
7354 (s390_fill_last_break): New function.
7355 (s390_store_last_break): Likewise.
7356 (s390_fill_system_call): New function.
7357 (s390_store_system_call): Likewise.
7358 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7360 (s390_check_regset): New function.
7361 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7362 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7363 Update target_regsets for available register sets.
7365 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7366 Jan Kratochvil <jan.kratochvil@redhat.com>
7368 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7369 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7371 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7372 * linux-low.h (struct process_info_private): New member r_debug.
7373 * server.c (handle_qxfer_libraries): Call
7374 the_target->qxfer_libraries_svr4.
7375 (handle_qxfer_libraries_svr4): New function.
7376 (qxfer_packets): New entry "libraries-svr4".
7377 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7378 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7379 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7380 PACKET_qXfer_libraries_svr4.
7382 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7384 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7385 PSW address/mask between 8-byte and 16-byte formats.
7386 (s390_supply_ptrace_register): Likewise.
7387 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7388 basic addressing mode bit.
7390 2011-11-24 Stan Shebs <stan@codesourcery.com>
7392 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7394 2011-11-17 Stan Shebs <stan@codesourcery.com>
7396 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7397 (tracing_start_time): New global.
7398 (tracing_stop_time): New global.
7399 (tracing_user_name): New global.
7400 (tracing_notes): New global.
7401 (tracing_stop_note): New global.
7402 (cmd_qtstart): Set traceframe_usage, start_time.
7403 (stop_tracing): Set stop_time.
7404 (cmd_qtstatus): Report additional status.
7405 (cmd_qtp): New function.
7406 (handle_tracepoint_query): Call it.
7407 (cmd_qtnotes): New function.
7408 (handle_tracepoint_general_set): Call it.
7409 (get_timestamp): Rename from tsv_get_timestamp.
7411 2011-11-14 Stan Shebs <stan@codesourcery.com>
7412 Kwok Cheung Yeung <kcy@codesourcery.com>
7414 * linux-x86-low.c (small_jump_insn): New.
7415 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7416 trampoline and error message, build a trampoline and issue a small
7417 jump instruction to it.
7418 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7419 trampoline and error message.
7420 (x86_get_min_fast_tracepoint_insn_len): New.
7421 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7422 * linux-low.h (struct linux_target_ops): Add arguments to
7423 install_fast_tracepoint_jump_pad operation, add new operation.
7424 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7426 (linux_get_min_fast_tracepoint_insn_len): New function.
7427 (linux_target_op): Add new operation.
7428 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7429 (gdb_trampoline_buffer_end): Ditto.
7430 (gdb_trampoline_buffer_error): Ditto.
7431 (struct ipa_sym_addresses): Add fields for new IPA variables.
7432 (symbol_list): Add entries for new IPA variables.
7433 (struct tracepoint): Add fields to hold the address range of the
7434 trampoline used by the tracepoint.
7435 (trampoline_buffer_head): New static variable.
7436 (trampoline_buffer_tail): Ditto.
7437 (claim_trampoline_space): New function.
7438 (have_fast_tracepoint_trampoline_buffer): New function.
7439 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7441 (install_fast_tracepoint): Ditto, also add error buffer argument.
7442 (cmd_qtminftpilen): New function.
7443 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7444 (fast_tracepoint_from_trampoline_address): New function.
7445 (fast_tracepoint_collecting): Handle trampoline as part of jump
7447 (set_trampoline_buffer_space): New function.
7448 (initialize_tracepoint): Initialize new IPA variables.
7449 * target.h (struct target_ops): Add arguments to
7450 install_fast_tracepoint_jump_pad operation, add new
7451 get_min_fast_tracepoint_insn_len operation.
7452 (target_get_min_fast_tracepoint_insn_len): New.
7453 (install_fast_tracepoint_jump_pad): Add arguments.
7454 * server.h (IPA_BUFSIZ): Define.
7455 * linux-i386-ipa.c: Include extra header files.
7456 (initialize_fast_tracepoint_trampoline_buffer): New function.
7457 (initialize_low_tracepoint): Call it.
7458 * server.h (set_trampoline_buffer_space): Declare.
7459 (claim_trampoline_space): Ditto.
7460 (have_fast_tracepoint_trampoline_buffer): Ditto.
7462 2011-11-14 Yao Qi <yao@codesourcery.com>
7464 * server.c (handle_query): Handle InstallInTrace for qSupported.
7465 * tracepoint.c (add_tracepoint): Sort list.
7466 (install_tracepoint, download_tracepoint): New.
7467 (cmd_qtdp): Call them to install and download tracepoints.
7468 (sort_tracepoints): Removed.
7469 (cmd_qtstart): Update.
7471 2011-11-14 Yao Qi <yao@codesourcery.com>
7473 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7474 * mem-break.h: Declare.
7475 * tracepoint.c (cmd_qtstart): Move some code to ...
7476 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7478 (download_tracepoints): Move some code to ...
7479 (download_tracepoint_1): ... here. New.
7481 2011-11-08 Yao Qi <yao@codesourcery.com>
7483 * remote-utils.c (relocate_instruction): A comment fix.
7485 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7487 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7488 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7489 dr_status_mirror and dr_control_mirror from debug_reg_state.
7490 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7491 (i386_initial_stuff): Remove use of deleted globals.
7492 (i386_get_thread_context, i386_set_thread_context,
7493 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7494 from debug_reg_state.
7496 2011-11-05 Yao Qi <yao@codesourcery.com>
7498 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7499 address as TPOINT's.
7501 2011-11-02 Stan Shebs <stan@codesourcery.com>
7503 * tracepoint.c (agent_mem_read_string): New function.
7504 (eval_agent_expr): Call it for tracenz.
7505 * server.c (handle_query): Report support for tracenz.
7507 2011-11-02 Yao Qi <yao@codesourcery.com>
7509 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7511 2011-11-02 Yao Qi <yao@codesourcery.com>
7513 * target.h: Fix a typo in comment.
7515 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7517 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7518 clobber the breakpoints' shadows with fast tracepoint jumps.
7519 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7520 * target.c (write_inferior_memory): Also pass MYADDR down to
7523 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7525 * configure.ac: Check support for personality routine.
7526 * configure: Regenerate.
7527 * config.in: Likewise.
7528 * linux-low.c: Include <sys/personality.h>.
7529 Define ADDR_NO_RANDOMIZE if necessary.
7530 (linux_create_inferior): Disable address space randomization when
7531 forking inferior, if requested.
7532 (linux_supports_disable_randomization): New function.
7533 (linux_target_ops): Install it.
7534 * server.h (disable_randomization): Declare.
7535 * server.c (disable_randomization): New global variable.
7536 (handle_general_set): Handle QDisableRandomization.
7537 (handle_query): Likewise for qSupported.
7538 (main): Support --disable-randomization and --no-disable-randomization
7539 command line arguments.
7540 * target.h (struct target_ops): Add supports_disable_randomization.
7541 (target_supports_disable_randomization): New macro.
7543 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7545 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7547 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7548 [!PT_GETDSBT] (target_loadmap): New definition.
7549 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7550 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7551 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7552 and PT_GETDSBT to LINUX_LOADMAP.
7553 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7554 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7556 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7558 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7559 (arm_linux_hwbp_cap): New static variable.
7560 (arm_linux_get_hwbp_cap): Replace by ...
7561 (arm_linux_init_hwbp_cap): ... this new function.
7562 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7563 (arm_linux_get_hw_watchpoint_count): Likewise.
7564 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7565 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7566 (arm_prepare_to_resume): Use perror_with_name instead of error.
7568 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7570 * linux-arm-low.c: Include <signal.h>.
7571 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7572 (struct arm_linux_hwbp_cap): New data type.
7573 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7574 (struct arm_linux_hw_breakpoint): New data type.
7575 (MAX_BPTS, MAX_WPTS): Define.
7576 (struct arch_process_info, struct arch_lwp_info): New data types.
7577 (arm_linux_get_hwbp_cap): New function.
7578 (arm_linux_get_hw_breakpoint_count): Likewise.
7579 (arm_linux_get_hw_watchpoint_count): Likewise.
7580 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7581 (arm_hwbp_control_initialize): Likewise.
7582 (arm_hwbp_control_is_enabled): Likewise.
7583 (arm_hwbp_control_is_initialized): Likewise.
7584 (arm_hwbp_control_disable): Likewise.
7585 (arm_linux_hw_breakpoint_equal): Likewise.
7586 (arm_linux_hw_point_initialize): Likewise.
7587 (struct update_registers_data): New data structure.
7588 (update_registers_callback: New function.
7589 (arm_insert_point): Likewise.
7590 (arm_remove_point): Likewise.
7591 (arm_stopped_by_watchpoint): Likewise.
7592 (arm_stopped_data_address): Likewise.
7593 (arm_new_process): Likewise.
7594 (arm_new_thread): Likewise.
7595 (arm_prepare_to_resume): Likewise.
7596 (the_low_target): Register arm_insert_point, arm_remove_point,
7597 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7598 arm_new_thread, and arm_prepare_to_resume.
7600 2011-09-15 Stan Shebs <stan@codesourcery.com>
7602 * server.h (struct emit_ops): Add compare-goto fields.
7603 * tracepoint.c (gdb_agent_op_sizes): New table.
7604 (emit_eq_goto): New function.
7605 (emit_ne_goto): New function.
7606 (emit_lt_goto): New function.
7607 (emit_le_goto): New function.
7608 (emit_gt_goto): New function.
7609 (emit_ge_goto): New function.
7610 (is_goto_target): New function.
7611 (compile_bytecodes): Recognize special cases of compare-goto
7612 combinations and call specialized emitters for them.
7613 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7614 (amd64_emit_ne_goto): New function.
7615 (amd64_emit_lt_goto): New function.
7616 (amd64_emit_le_goto): New function.
7617 (amd64_emit_gt_goto): New function.
7618 (amd64_emit_ge_goto): New function.
7619 (amd64_emit_ops): Add the new functions.
7620 (i386_emit_eq_goto): New function.
7621 (i386_emit_ne_goto): New function.
7622 (i386_emit_lt_goto): New function.
7623 (i386_emit_le_goto): New function.
7624 (i386_emit_gt_goto): New function.
7625 (i386_emit_ge_goto): New function.
7626 (i386_emit_ops): Add the new functions.
7628 2011-09-08 Stan Shebs <stan@codesourcery.com>
7630 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7631 (i386_emit_epilogue): Restore %ebx.
7633 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7635 * server.c (step_thread): Remove definition.
7636 (process_serial_event): Don't handle Hs.
7637 * server.h (step_thread): Remove declaration.
7638 * target.c (set_desired_inferior): Remove use of step_thread.
7640 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7642 * linux-low.c: Include linux-procfs.h.
7643 (linux_attach_lwp_1): Update comments.
7644 (linux_attach): Scan for existing threads when attaching to a
7645 process that is the tgid.
7646 * Makefile.in: Update dependencies.
7648 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7650 * configure.srv: Add linux-procfs.o dependencies.
7652 2011-08-14 Yao Qi <yao@codesourcery.com>
7654 * target.h (struct target_ops): Fix indent.
7655 * win32-low.c (win32_target_ops): Fix comment.
7657 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7658 Yao Qi <yao@codesourcery.com>
7660 * Makefile.in (clean): Remove tic6x-*.c files.
7661 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7662 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7663 (tic6x-c64xp-linux.c): Likewise.
7664 * configure.srv: Add support for tic6x-*-uclinux.
7665 * linux-tic6x-low.c: New.
7666 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7668 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7669 Yao Qi <yao@codesourcery.com>
7671 * target.h (struct target_ops): Add read_loadmap.
7672 * linux-low.c (struct target_loadseg): New type.
7673 (struct target_loadmap): New type.
7674 (linux_read_loadmap): New function.
7675 (linux_target_ops): Add linux_read_loadmap.
7676 * server.c (handle_query): Support qXfer:fdpic:read packet.
7677 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7680 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7682 * win32-low.c: Include <stdint.h>.
7684 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7686 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7687 to the inferior here.
7688 (i386_remove_aligned_watchpoint): Ditto.
7689 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7690 fit part of the watchpoint in the debug registers.
7691 (i386_update_inferior_debug_regs): New.
7692 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7693 registers, and only update the inferior on success.
7694 (i386_low_remove_watchpoint): Ditto.
7696 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7698 * linux-low.c (compare_ints, unique, list_threads, show_process,
7699 linux_core_of_thread): Delete.
7700 (linux_target_ops): Change linux_core_of_thread to
7701 linux_common_core_of_thread.
7702 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7703 * utils.c (malloc_failure): Change type of argument.
7704 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7705 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7706 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7707 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7708 (IPA_OBJS): Add common-utils-ipa.o.
7709 (ptid_h, linux_osdata_h): New macros.
7710 (server_h): Add common/common-utils.h, common/xml-utils.h,
7711 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7713 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7714 ptid.o, buffer.o): New rules.
7715 (linux-low.o): Add common/linux-osdata.h as a dependency.
7716 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7717 * configure.ac: Add AC_HEADER_DIRENT check.
7718 * config.in: Regenerate.
7719 * configure: Regenerate.
7720 * remote-utils.c (xml_escape_text): Delete.
7721 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7722 buffer_xml_printf): Move to common/buffer.c.
7723 * server.c (main): Remove call to initialize_inferiors.
7724 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7725 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7726 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7727 internal_error, gdb_assert, gdb_assert_fail): Delete.
7728 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7729 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7731 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7732 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7733 initialize_inferiors): Delete.
7735 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7737 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7740 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7742 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7744 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7746 2011-05-26 Yao Qi <yao@codesourcery.com>
7748 * Makefile.in (thread-db.o): Track dependence to
7749 common/gdb_thread_db.h.
7750 * thread-db.c: include gdb_thread_db.h from right place.
7752 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7754 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7755 __FILE__ and __LINE__ to internal_error.
7757 2011-05-13 Doug Evans <dje@google.com>
7759 * thread-db.c (try_thread_db_load_from_sdir): New function.
7760 (try_thread_db_load_from_dir): New function.
7761 (thread_db_load_search): Handle $sdir, ignore $pdir.
7762 Remove trying of system directories if search of
7763 libthread-db-search-path fails, that is now done via $sdir.
7765 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7767 * server.c (handle_query): Add EnableDisableTracepoints to the list
7768 of supported features.
7769 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7771 (cmd_qtenable_disable): New.
7772 (cmd_qtstart): Install tracepoints even if disabled.
7773 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7774 receiving a QTEnable or QTDisable packet.
7775 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7776 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7778 (gdb_probe): Skip data collection if static tracepoint is disabled.
7780 2011-05-10 Doug Evans <dje@google.com>
7782 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7784 2011-05-04 Doug Evans <dje@google.com>
7786 * linux-low.c (linux_join): Skip process lookup.
7787 * spu-low.c (spu_join): Ditto.
7788 * server.c (join_inferiors_callback): Delete.
7789 (process_serial_event): For 'D' packet (detach) call join_inferior
7792 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7794 * README: Don't mention xscale*-*-linux*.
7795 * configure.srv (xscale*-*-linux*): Don't handle target.
7797 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7799 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7801 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7802 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7803 (i386_emit_void_call_2): Likewise.
7805 2011-04-26 Yao Qi <yao@codesourcery.com>
7807 * linux-low.c: Move common macros to linux-ptrace.h.
7808 Include linux-ptrace.h.
7809 * Makefile.in (linux_ptrace_h): New.
7810 (linux-low.o): Depends on linux-ptrace.h.
7812 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7814 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7815 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7816 (remote_prepare): New function with most of the TCP code from ...
7817 (remote_open): ... here. Detect PORT here unconditionally. Move also
7818 setting transport_is_reliable.
7819 * server.c (run_once): New variable.
7820 (gdbserver_usage): Document it.
7821 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7822 the first run if RUN_ONCE.
7823 * server.h (run_once, remote_prepare): New declarations.
7825 2011-04-19 Tom Tromey <tromey@redhat.com>
7827 * win32-low.c (handle_load_dll): Remove duplicate "the".
7829 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7831 Remove support for old Cygwin 1.5 versions.
7832 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7833 function to avoid warning.
7834 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7837 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7839 * gdbserver/server.h (Macro _): Define it if not available.
7841 2011-03-14 Michael Snyder <msnyder@vmware.com>
7843 * hostio.c (handle_close): Remove unnecessary null test.
7845 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7847 * Makefile.in (maintainer-clean realclean distclean): Remove
7848 "make ... subdir_do" command.
7850 2011-03-10 Michael Snyder <msnyder@vmware.com>
7852 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7854 * server.c (handle_v_run): Free alloced buffer on early return.
7856 2011-03-09 Yao Qi <yao@codesourcery.com>
7859 2011-03-04 Yao Qi <yao@codesourcery.com>
7861 * Makefile.in: Remove GNU make feature --directory.
7863 2011-03-05 Yao Qi <yao@codesourcery.com>
7865 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7866 (subdir_do): New make target. Copied from gdb/Makefile.
7867 (maintainer-clean, realclean, distclean, clean): Call corresponding
7868 make targets in common/Makefile.
7870 2011-02-11 Yao Qi <yao@codesourcery.com>
7872 * configure.ac: Call AC_PROG_RANLIB.
7873 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7874 * configure: Regenerate.
7876 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7878 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7880 2011-03-06 Yao Qi <yao@codesourcery.com>
7882 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7884 2011-03-05 Yao Qi <yao@codesourcery.com>
7886 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7887 (subdir_do): New make target. Copied from gdb/Makefile.
7888 (maintainer-clean, realclean, distclean, clean): Call corresponding
7889 make targets in common/Makefile.
7891 2011-03-04 Yao Qi <yao@codesourcery.com>
7893 * Makefile.in: Remove GNU make feature --directory.
7895 2011-03-04 Michael Snyder <msnyder@vmware.com>
7897 * server.c (queue_stop_reply): Call xmalloc not malloc.
7899 2011-03-02 Michael Snyder <msnyder@vmware.com>
7901 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7903 2011-02-28 Michael Snyder <msnyder@vmware.com>
7905 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7906 (cmd_qtframe): Ditto.
7907 (cmd_qtbuffer): Ditto.
7908 (cmd_bigqtbuffer): Ditto.
7910 * utils.c (decimal2str): Initialize 'width' to nine, then
7913 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7915 * hostio.c (require_data): Free *data, not data.
7917 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7919 * hostio.c (require_data): Use free, not xfree.
7921 2011-02-27 Michael Snyder <msnyder@vmware.com>
7923 * server.c (handle_query): Discard unused value.
7925 * hostio.c (require_data): Free malloc memory before returning
7928 2011-02-26 Michael Snyder <msnyder@vmware.com>
7930 * linux-low.c (list_threads): Call closedir for dirent.
7932 2011-02-27 Michael Snyder <msnyder@vmware.com>
7934 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7935 a case statement falls through.
7937 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7939 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7942 2011-02-26 Michael Snyder <msnyder@vmware.com>
7944 * utils.c (decimal2str): Eliminate dead code and dead param.
7945 (pulongest): Drop dead param from call to decimal2str.
7948 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7950 Revert the following patch (not approved yet):
7951 2011-02-21 Hui Zhu <teawater@gmail.com>
7952 * tracepoint.c (tp_printf): New function.
7953 (eval_agent_expr): Handle gdb_agent_op_printf.
7955 2011-02-21 Hui Zhu <teawater@gmail.com>
7957 * tracepoint.c (tp_printf): New function.
7958 (eval_agent_expr): Handle gdb_agent_op_printf.
7960 2011-02-18 Tom Tromey <tromey@redhat.com>
7962 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7963 (tracepoint.o): Likewise.
7964 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7965 (gdb_agent_op_names): Likewise.
7967 2011-02-18 Tom Tromey <tromey@redhat.com>
7969 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7970 gdb_agent_op_rot>: New constants.
7971 (gdb_agent_op_names): Add pick and roll.
7972 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7975 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7977 * aclocal.m4: Regenerated with aclocal-1.11.1.
7979 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7981 * server.c (handle_qxfer_traceframe_info): New.
7982 (qxfer_packets): Register "traceframe-info".
7983 (handle_query): Report support for qXfer:traceframe-info:read+.
7984 * tracepoint.c (match_blocktype): New.
7985 (traceframe_find_block_type): Rename to ...
7986 (traceframe_walk_blocks): ... this. Add callback filter argument,
7988 (traceframe_find_block_type): New, reimplemented on top of
7989 traceframe_walk_blocks.
7990 (build_traceframe_info_xml): New.
7991 (traceframe_read_info): New.
7992 * server.h (traceframe_read_info): Declare.
7994 2011-02-11 Yao Qi <yao@codesourcery.com>
7996 * configure.ac: Call AC_PROG_RANLIB.
7997 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7998 * configure: Regenerate.
8000 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8002 * server.c (gdb_read_memory): Change return semantics to allow
8004 (handle_search_memory_1): Adjust.
8005 (process_serial_event) <'m' packet>: Handle partial transfers.
8006 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8008 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8010 * regcache.c (init_register_cache): Initialize
8011 regcache->register_status.
8012 (free_register_cache): Release regcache->register_status.
8013 (regcache_cpy): Copy register_status.
8014 (registers_to_string): Print 'x's for unavailable registers.
8015 (supply_register): Mark the register's status valid or
8016 unavailable, depending on whether a buffer was passed in or not.
8017 (supply_register_zeroed): New.
8018 (supply_regblock): Mark the registers' status valid or
8019 unavailable, depending on whether a buffer was passed in or not.
8020 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8021 (struct regcache): New `register_status' field.
8022 (supply_register_zeroed): Declare.
8023 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8024 supply_register_zeroed, rather than passing a NULL buffer to
8026 * tracepoint.c (fetch_traceframe_registers): Update comment.
8028 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8030 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8033 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8035 * server.h (decode_xfer_write): Change prototype.
8036 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8037 and don't extract the annex here.
8038 * server.c (decode_xfer_read): Remove `annex' parameter,
8039 and don't extract the annex here.
8041 (struct qxfer): New.
8042 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8043 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8044 (handle_qxfer_statictrace): New functions, abstracted out from
8045 handle_query, and made to use the struct qxfer interface.
8046 (handle_threads_qxfer_proper): Rename to ...
8047 (handle_qxfer_threads_proper): ... this.
8048 (handle_threads_qxfer): Rename to ...
8049 (handle_qxfer_threads): ... this. Adjust.
8050 (qxfer_packets): New array.
8051 (handle_qxfer): New function.
8052 (handle_query): Use handle_qxfer.
8054 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8056 * gdbreplay.c: Shorten lines of >= 80 columns.
8057 * linux-low.c: Ditto.
8058 * linux-ppc-low.c: Ditto.
8059 * linux-s390-low.c: Ditto.
8060 * linux-sparc-low.c: Ditto.
8061 * linux-x86-low.c: Ditto.
8062 * linux-xtensa-low.c: Ditto.
8063 * mem-break.c: Ditto.
8065 * regcache.h: Ditto.
8066 * remote-utils.c: Ditto.
8069 * thread-db.c: Ditto.
8070 * tracepoint.c: Ditto.
8072 * win32-low.h: Ditto.
8074 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8076 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8079 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8081 * server.c (gdbserver_version): Update copyright year in version
8083 * gdbreplay.c (gdbreplay_version): Ditto.
8085 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8087 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8088 * linux-bfin-low.c: New file.
8089 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8090 PT_DATA_ADDR for BFIN targets.
8091 * Makefile.in (SFILES): Add linux-bfin-low.c.
8092 (clean): Remove reg-bfin.c.
8093 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8094 * README: Mention supported Blackfin targets.
8096 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8098 * .gitignore: New file.
8100 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8102 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8104 2010-10-22 Jie Zhang <jie@codesourcery.com>
8106 * Makefile.in: Add FLAGS_TO_PASS variable.
8107 (install): Remove dependency of install-only and recursively
8108 invoke make for install-only.
8110 2010-10-04 Doug Evans <dje@google.com>
8112 * Makefile.in (uninstall): Use $(DESTDIR).
8114 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8118 * linux-x86-low.c (compat_siginfo_from_siginfo)
8119 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8120 si_code is < 0. Check for si_code == SI_TIMER before checking for
8123 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8125 * lynx-i386-low.c: New file.
8126 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8128 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8130 * lynx-low.c (ptrace_request_to_str): Remove handling for
8131 request values that have been removed in LynxOS 5.x.
8133 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8135 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8138 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8140 * configure.ac: Add --enable-inprocess-agent option.
8141 * configure: Rebuilt.
8143 2010-09-06 Yao Qi <yao@codesourcery.com>
8145 * linux-low.c (linux_kill): Remove unused variable.
8146 (linux_stabilize_threads): Likewise.
8147 * server.c (start_inferior): Likewise.
8148 (queue_stop_reply_callback): Likewise.
8149 * tracepoint.c (do_action_at_tracepoint): Likewise.
8151 2010-09-06 Yao Qi <yao@codesourcery.com>
8153 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8156 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8158 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8160 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8162 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8165 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8167 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8168 gdbserver/lynx-ppc-low.c: New files.
8169 * Makefile.in (lynx_low_h): New variable.
8170 (lynx-low.o, lynx-ppc-low.o): New rules.
8171 * configure.ac: On LynxOS, link with -lnetinet.
8172 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8173 * configure: regenerate.
8175 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8177 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8178 * configure.ac: Add check for vasprintf and vsnprintf.
8179 * configure, config.in: Regenerate.
8180 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8182 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8184 * gdbreplay.c: Move include of alloca.h up, next to include of
8186 * server.h: Add include of malloc.h.
8187 * mem-break.c: Remove include of malloc.h.
8188 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8190 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8192 * Makefile.in (memmem.o): Build with -Wno-error.
8194 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8196 * utils.c (xsnprintf): Make non-static.
8197 * server.h: Add xsnprintf declaration.
8198 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8199 replace calls to snprintf by calls to xsnprintf throughout.
8201 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8203 * configure.ac: Add configure check for alloca.
8204 * configure, config.in: Regenerate.
8205 * server.h: Include alloca.h if it exists.
8206 * gdbreplay.c: Include alloca.h if it exists.
8208 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8210 * linux-low.c (__SIGRTMIN): Define if not already defined.
8211 (linux_create_inferior): Check for __ANDROID__ rather than
8213 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8214 are already deferred.
8215 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8216 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8217 stopped and already has a pending signal to report.
8218 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8219 a pending signal to report or is moving out of a jump pad.
8220 (linux_init_signals): Check for __ANDROID__ rather than
8223 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8225 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8226 debug_threads check. Avoid a linear search when not doing debug
8229 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8231 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8232 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8233 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8234 (process_event): Change local fd's type to gdb_fildes_t.
8235 (create_file_handler): Adjust prototype.
8236 (delete_file_handler): Adjust prototype.
8237 (handle_file_event): Adjust prototype. Use pfildes.
8238 (create_file_event): Adjsut prototype.
8239 * remote-utils.c (remote_desc, listen_desc): Change type to
8241 * server.h: New gdb_fildes_t typedef.
8242 [USE_WIN32API]: Include winsock2.h.
8243 (delete_file_handler, add_file_handler): Adjust prototypes.
8245 * utils.c (pfildes): New.
8247 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8249 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8250 * configure: Regenerate.
8252 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8254 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8255 (linux_done_accessing_memory): ... this.
8256 (linux_target_ops): Adjust.
8257 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8258 * nto-low.c (nto_target_ops): Adjust comment.
8259 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8260 * spu-low.c (spu_target_ops): Adjust comment.
8261 * target.h (target_ops): Rename unprepare_to_access_memory field
8262 to done_accessing_memory.
8263 (unprepare_to_access_memory): Rename to ...
8264 (done_accessing_memory): ... this.
8266 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8268 * linux-low.c (linux_prepare_to_access_memory): New.
8269 (linux_unprepare_to_access_memory): New.
8270 (linux_target_ops): Install them.
8271 * server.c (read_memory): Rename to ...
8272 (gdb_read_memory): ... this. Use
8273 prepare_to_access_memory/prepare_to_access_memory.
8274 (write_memory): Rename to ...
8275 (gdb_write_memory): ... this. Use
8276 prepare_to_access_memory/prepare_to_access_memory.
8277 (handle_search_memory_1): Adjust.
8278 (process_serial_event): Adjust.
8279 * target.h (struct target_ops): New fields
8280 prepare_to_access_memory and unprepare_to_access_memory.
8281 (prepare_to_access_memory, unprepare_to_access_memory): New.
8282 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8283 prepare_to_access_memory/prepare_to_access_memory.
8284 * nto-low.c (nto_target_ops): Adjust.
8285 * spu-low.c (spu_target_ops): Adjust.
8286 * win32-low.c (win32_target_ops): Adjust.
8288 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8290 * Makefile.in (WARN_CFLAGS): Get it from configure.
8291 (WERROR_CFLAGS): New.
8292 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8293 * configure.ac: Introduce --enable-werror, which adds -Werror to
8294 the compiler command line. Enabled by default. Disable with
8295 --disable-werror. Add -Wdeclaration-after-statement
8296 Wpointer-arith and -Wformat-nonliteral to warning flags.
8297 * configure: Regenerate.
8299 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8301 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8303 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8305 * gdbreplay.c (remote_error): New.
8307 (expect): Use gdbchar. Check for error reading from GDB.
8308 Clarify sync error output.
8309 (play): Check for errors writing to GDB.
8310 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8311 * remote-utils.c (getpkt): Check for errors writing to the remote
8314 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8316 * linux-low.c (linux_wait_1): Move non-debugging code out of
8317 `debug_threads' control.
8319 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8321 * linux-low.c (linux_wait_1): Don't set last_status here.
8322 * server.c (push_event, queue_stop_reply_callback): Assert we're
8323 not pushing a TARGET_WAITKIND_IGNORE event.
8324 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8325 (myresume, handle_target_event): Set the thread's last_resume_kind
8326 and last_status from the target returned status.
8328 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8332 * linux-x86-low.c (update_debug_registers_callback): New.
8333 (i386_dr_low_set_addr): Use it.
8334 (i386_dr_low_get_addr): New.
8335 (i386_dr_low_set_control): Use update_debug_registers_callback.
8336 (i386_dr_low_get_control): New.
8337 (i386_dr_low_get_status): Adjust.
8338 * linux-low.c (linux_stop_lwp): New.
8339 * linux-low.h (linux_stop_lwp): Declare.
8341 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8342 argument instead of a i386_debug_reg_state.
8343 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8344 a i386_debug_reg_state.
8345 (i386_insert_aligned_watchpoint): Adjust.
8346 (i386_remove_aligned_watchpoint): Adjust.
8347 (i386_low_stopped_data_address): Read the debug registers from the
8348 inferior instead of from the mirrors.
8349 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8350 (i386_dr_low_get_addr): Declare.
8351 (i386_dr_low_get_control): Declare.
8352 (i386_dr_low_get_status): Change prototype.
8354 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8355 (i386_dr_low_get_addr): New.
8356 (i386_dr_low_get_control): New.
8357 (i386_dr_low_get_status): Adjust prototype. Return
8359 (i386_initial_stuff): Clear dr_status_mirror and
8361 (i386_get_thread_context): Adjust.
8362 (i386_set_thread_context): Adjust.
8363 (i386_thread_added): Adjust.
8365 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8367 * linux-low.h (linux_thread_area): Delete declaration.
8369 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8371 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8372 after its termination.
8374 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8376 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8377 (gdb_wants_all_stopped): Delete.
8378 (linux_wait_1): Don't call them.
8379 * server.c (handle_v_cont): Tag all threads as want-stopped.
8380 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8381 stopped as "client-wants-stopped".
8383 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8385 * Makefile.in (signals_h): New.
8386 (server_h): Depend on it.
8387 (server.o): Don't depend on $(signals_def).
8388 (signals.o): Depend on $(signals_def).
8390 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8392 * Makefile.in (signals_def): New.
8393 (server_h): Append include/gdb/signals.h and signals_def.
8394 (server.o): Append signals_def.
8396 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8398 * server.c (handle_target_event): Use target_signal_to_host for
8399 resume_info.sig initialization.
8400 * target.h (struct thread_resume) <sig>: New comment.
8402 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8404 * server.c (handle_query): strcpy() the returned string from paddress()
8405 instead of sprintf().
8406 * utils.c (paddress): Return phex_nz().
8408 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8410 * server.c (handle_v_cont): Call mourn_inferior if process
8412 (myresume): Likewise.
8414 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8416 Static tracepoints, and integration with UST.
8418 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8419 * mem-break.c (uninsert_all_breakpoints)
8420 (reinsert_all_breakpoints): New.
8421 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8422 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8423 (gdb_agent_ust_loaded, helper_thread_id)
8424 (gdb_agent_helper_thread_id): New macros.
8425 (struct ipa_sym_addresses): Add addr_ust_loaded,
8426 addr_helper_thread_id, addr_cmd_buf.
8427 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8428 (in_process_agent_loaded_ust): New.
8429 (write_e_ust_not_loaded): New.
8430 (maybe_write_ipa_ust_not_loaded): New.
8431 (struct collect_static_trace_data_action): New.
8432 (enum tracepoint_type) <static_tracepoint>: New.
8433 (struct tracepoint) <handle>: Mention static tracepoints.
8434 (struct static_tracepoint_ctx): New.
8435 (CMD_BUF_SIZE): New.
8436 (add_tracepoint_action): Handle static tracepoint actions.
8437 (unprobe_marker_at): New.
8438 (clear_installed_tracepoints): Handle static tracepoints.
8439 (cmd_qtdp): Handle static tracepoints.
8440 (probe_marker_at): New.
8441 (cmd_qtstart): Handle static tracepoints.
8442 (response_tracepoint): Handle static tracepoints.
8443 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8444 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8445 (get_context_regcache): Handle static tracepoints.
8446 (do_action_at_tracepoint): Handle static tracepoint actions.
8447 (traceframe_find_block_type): Handle static trace data blocks.
8448 (traceframe_read_sdata): New.
8449 (download_tracepoints): Download static tracepoint actions.
8450 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8451 (GDB_PROBE_NAME): New.
8456 (ust_marker_to_static_tracepoint): New.
8458 (collect_ust_data_at_tracepoint): New.
8459 (gdb_ust_probe): New.
8460 (UNIX_PATH_MAX, SOCK_DIR): New.
8461 (gdb_ust_connect_sync_socket): New.
8462 (resume_thread, stop_thread): New.
8463 (run_inferior_command): New.
8464 (init_named_socket): New.
8465 (gdb_ust_socket_init): New.
8466 (cstr_to_hexstr): New.
8468 (first_marker, next_marker): New.
8469 (response_ust_marker): New.
8470 (cmd_qtfstm, cmd_qtsstm): New.
8471 (unprobe_marker_at, probe_marker_at): New.
8472 (cmd_qtstmat, gdb_ust_thread): New.
8473 (gdb_ust_init): New.
8474 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8475 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8477 (x86_64_st_collect_regmap): New.
8478 (X86_64_NUM_ST_COLLECT_GREGS): New.
8479 (AMD64_RIP_REGNUM): New.
8480 (supply_static_tracepoint_registers): New.
8481 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8483 (i386_st_collect_regmap): New.
8484 (i386_NUM_ST_COLLECT_GREGS): New.
8485 (supply_static_tracepoint_registers): New.
8486 * server.c (handle_query): Handle qXfer:statictrace:read.
8487 <qSupported>: Report support for StaticTracepoints, and
8488 qXfer:statictrace:read features.
8489 * server.h (traceframe_read_sdata)
8490 (supply_static_tracepoint_registers): Declare.
8491 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8492 (unpack_varlen_hex): Include in IPA build.
8493 * Makefile.in (ustlibs, ustinc): New.
8494 (IPA_OBJS): Add remote-utils-ipa.o.
8495 ($(IPA_LIB)): Link -ldl and -lpthread.
8497 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8498 * config.in, configure: Regenerate.
8500 2010-06-20 Ian Lance Taylor <iant@google.com>
8501 Pedro Alves <pedro@codesourcery.com>
8503 * linux-x86-low.c (always_true): Delete.
8504 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8505 trying to fool the compiler with always_true.
8507 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8509 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8510 conditions in gdbserver.
8512 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8514 * spu-low.c (spu_read_memory): Wrap around local store limit.
8515 (spu_write_memory): Likewise.
8517 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8519 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8520 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8522 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8524 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8525 uses with LONGEST uses.
8527 2010-06-14 Stan Shebs <stan@codesourcery.com>
8528 Pedro Alves <pedro@codesourcery.com>
8532 * linux-x86-low.c: Include limits.h.
8537 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8538 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8539 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8540 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8541 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8542 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8543 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8544 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8545 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8546 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8547 (amd64_emit_void_call_2): New.
8548 (amd64_emit_ops): New.
8549 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8550 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8551 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8552 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8553 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8554 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8555 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8556 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8557 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8558 (i386_emit_stack_adjust, i386_emit_int_call_1)
8559 (i386_emit_void_call_2): New.
8560 (i386_emit_ops): New.
8561 (x86_emit_ops): New.
8562 (the_low_target): Install x86_emit_ops.
8563 * server.h (struct emit_ops): New.
8564 (get_raw_reg_func_addr): Declare.
8565 (current_insn_ptr, emit_error): Declare.
8566 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8567 (set_trace_state_variable_value): New defines.
8568 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8569 addr_get_trace_state_variable_value and
8570 addr_set_trace_state_variable_value.
8571 (symbol_list): New fields for get_raw_reg,
8572 get_trace_state_variable_value and set_trace_state_variable_value.
8573 (condfn): New typedef.
8574 (struct tracepoint): New field `compiled_cond'.
8575 (do_action_at_tracepoint): Clear compiled_cond.
8576 (get_trace_state_variable_value, set_trace_state_variable_value):
8578 (condition_true_at_tracepoint): If there's a compiled condition,
8580 (current_insn_ptr, emit_error): New globals.
8581 (struct bytecode_address): New.
8582 (get_raw_reg_func_addr): New.
8583 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8584 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8585 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8586 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8587 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8588 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8589 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8590 (compile_tracepoint_condition, compile_bytecodes): New.
8591 * target.h (emit_ops): Forward declare.
8592 (struct target_ops): New field emit_ops.
8593 (target_emit_ops): New.
8594 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8595 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8596 * linux-low.c (linux_emit_ops): New.
8597 (linux_target_ops): Install it.
8598 * linux-low.h (struct linux_target_ops): New field emit_ops.
8600 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8602 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8603 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8605 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8606 Stan Shebs <stan@codesourcery.com>
8608 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8609 (all): Depend on $(extra_libraries).
8610 (install-only): Install the IPA.
8611 (IPA_OBJS, IPA_LIB): New.
8612 (clean): Remove the IPA lib.
8613 (IPAGENT_CFLAGS): New.
8614 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8615 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8616 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8617 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8618 * configure.ac: Check for atomic builtins support in the compiler.
8619 (IPA_DEPFILES, extra_libraries): Define.
8620 * configure.srv (ipa_obj): Add description.
8621 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8622 (i[34567]86-*-linux*): Set ipa_obj.
8623 (x86_64-*-linux*): Set ipa_obj.
8624 * linux-low.c (stabilizing_threads): New.
8625 (supports_fast_tracepoints): New.
8626 (linux_detach): Stabilize threads before detaching.
8627 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8628 the lwp is either not stabilizing, or is moving out of a jump pad.
8629 (linux_fast_tracepoint_collecting): New.
8630 (maybe_move_out_of_jump_pad): New.
8631 (enqueue_one_deferred_signal): New.
8632 (dequeue_one_deferred_signal): New.
8633 (linux_wait_for_event_1): If moving out of a jump pad, defer
8634 pending signals to later.
8635 (linux_stabilize_threads): New.
8636 (linux_wait_1): Check if threads need moving out of jump pads, and
8638 (stuck_in_jump_pad_callback): New.
8639 (move_out_of_jump_pad_callback): New.
8641 (linux_resume_one_lwp): Handle moving out of jump pads.
8642 (linux_set_resume_request): Dequeue deferred signals.
8643 (need_step_over_p): Also step over fast tracepoint jumps.
8644 (start_step_over): Also uninsert fast tracepoint jumps.
8645 (finish_step_over): Also reinsert fast tracepoint jumps.
8646 (linux_install_fast_tracepoint_jump): New.
8647 (linux_target_ops): Install linux_stabilize_threads and
8648 linux_install_fast_tracepoint_jump_pad.
8649 * linux-low.h (linux_target_ops) <get_thread_area,
8650 install_fast_tracepoint_jump_pad>: New fields.
8651 (struct lwp_info) <collecting_fast_tracepoint,
8652 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8653 (linux_get_thread_area): Declare.
8654 * linux-x86-low.c (jump_insn): New.
8655 (x86_get_thread_area): New.
8656 (append_insns): New.
8658 (amd64_install_fast_tracepoint_jump_pad): New.
8659 (i386_install_fast_tracepoint_jump_pad): New.
8660 (x86_install_fast_tracepoint_jump_pad): New.
8661 (the_low_target): Install x86_get_thread_area and
8662 x86_install_fast_tracepoint_jump_pad.
8663 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8664 (struct fast_tracepoint_jump): New.
8665 (fast_tracepoint_jump_insn): New.
8666 (fast_tracepoint_jump_shadow): New.
8667 (find_fast_tracepoint_jump_at): New.
8668 (fast_tracepoint_jump_here): New.
8669 (delete_fast_tracepoint_jump): New.
8670 (set_fast_tracepoint_jump): New.
8671 (uninsert_fast_tracepoint_jumps_at): New.
8672 (reinsert_fast_tracepoint_jumps_at): New.
8673 (set_breakpoint_at): Use write_inferior_memory.
8674 (uninsert_raw_breakpoint): Use write_inferior_memory.
8675 (check_mem_read): Mask out fast tracepoint jumps.
8676 (check_mem_write): Mask out fast tracepoint jumps.
8677 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8678 (set_fast_tracepoint_jump): Declare.
8679 (delete_fast_tracepoint_jump)
8680 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8681 (reinsert_fast_tracepoint_jumps_at): Declare.
8682 * regcache.c: Don't compile many functions when building the
8683 in-process agent library.
8684 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8685 the register buffer in the heap.
8686 (free_register_cache): If the register buffer isn't owned by the
8687 regcache, don't free it.
8688 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8689 pre-existing register caches.
8690 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8692 (convert_ascii_to_int): : Constify `from' parameter type.
8693 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8694 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8695 the needed buffer in-place.
8696 (relocate_instruction): New.
8697 * server.c (handle_query) <qSymbols>: If the target supports
8698 tracepoints, give it a chance of looking up symbols. Report
8699 support for fast tracepoints.
8700 (handle_status): Stabilize threads.
8701 (process_serial_event): Adjust.
8702 * server.h (struct fast_tracepoint_jump): Forward declare.
8703 (struct process_info) <fast_tracepoint_jumps>: New field.
8704 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8705 (decode_X_packet, decode_M_packet): Adjust.
8706 (relocate_instruction): Declare.
8707 (in_process_agent_loaded): Declare.
8708 (tracepoint_look_up_symbols): Declare.
8709 (struct fast_tpoint_collect_status): Declare.
8710 (fast_tracepoint_collecting): Declare.
8711 (force_unlock_trace_buffer): Declare.
8712 (handle_tracepoint_bkpts): Declare.
8713 (initialize_low_tracepoint)
8714 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8715 * target.h (struct target_ops) <stabilize_threads,
8716 install_fast_tracepoint_jump_pad>: New fields.
8717 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8718 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8719 [HAVE_STDINT_H]: Include stdint.h.
8720 (trace_debug_1): Rename to ...
8721 (trace_vdebug): ... this.
8722 (trace_debug): Rename to ...
8723 (trace_debug_1): ... this. Add `level' parameter.
8725 (ATTR_USED, ATTR_NOINLINE): New.
8726 (IP_AGENT_EXPORT): New.
8727 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8728 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8729 (about_to_request_buffer_space, trace_buffer_is_full)
8730 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8731 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8732 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8733 (traceframe_write_count, traceframes_created)
8734 (trace_state_variables)
8735 New renaming defines.
8736 (struct ipa_sym_addresses): New.
8737 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8739 (ipa_sym_addrs): New.
8740 (all_tracepoint_symbols_looked_up): New.
8741 (in_process_agent_loaded): New.
8742 (write_e_ipa_not_loaded): New.
8743 (maybe_write_ipa_not_loaded): New.
8744 (tracepoint_look_up_symbols): New.
8745 (debug_threads) [IN_PROCESS_AGENT]: New.
8746 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8747 (UNKNOWN_SIDE_EFFECTS): New.
8748 (stop_tracing): New.
8749 (flush_trace_buffer): New.
8750 (stop_tracing_bkpt): New.
8751 (flush_trace_buffer_bkpt): New.
8752 (read_inferior_integer): New.
8753 (read_inferior_uinteger): New.
8754 (read_inferior_data_pointer): New.
8755 (write_inferior_data_pointer): New.
8756 (write_inferior_integer): New.
8757 (write_inferior_uinteger): New.
8758 (struct collect_static_trace_data_action): Delete.
8759 (enum tracepoint_type): New.
8760 (struct tracepoint) <type>: New field `type'.
8761 <actions_str, step_actions, step_actions_str>: Only include in
8763 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8764 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8765 (tracepoints): Use IP_AGENT_EXPORT.
8766 (last_tracepoint): Don't include in the IPA.
8767 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8768 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8769 (alloced_trace_state_variables): New.
8770 (trace_state_variables): Use IP_AGENT_EXPORT.
8771 (traceframe_t): Delete unused variable.
8772 (circular_trace_buffer): Don't include in the IPA.
8773 (trace_buffer_start): Delete.
8774 (struct trace_buffer_control): New.
8775 (trace_buffer_free): Delete.
8776 (struct ipa_trace_buffer_control): New.
8777 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8778 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8780 (trace_buffer_ctrl): New.
8781 (TRACE_BUFFER_CTRL_CURR): New.
8782 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8783 Reimplement as macros.
8784 (trace_buffer_wrap): Delete.
8785 (traceframe_write_count, traceframe_read_count)
8786 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8787 (struct tracepoint_hit_ctx) <type>: New field.
8788 (struct fast_tracepoint_ctx): New.
8789 (memory_barrier): New.
8791 (record_tracepoint_error): Update atomically in the IPA.
8792 (clear_inferior_trace_buffer): New.
8793 (about_to_request_buffer_space): New.
8794 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8795 updating the same buffer.
8796 (add_tracepoint): Default the tracepoint's type to trap
8797 tracepoint, and orig_size to -1.
8798 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8800 (create_trace_state_variable): New parameter `gdb'. Handle it.
8801 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8802 (cmd_qtdp): Handle fast tracepoints.
8804 (max_jump_pad_size): New.
8805 (gdb_jump_pad_head): New.
8806 (get_jump_space_head): New.
8807 (claim_jump_space): New.
8808 (sort_tracepoints): New.
8809 (MAX_JUMP_SIZE): New.
8810 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8812 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8813 support. Upload fast traceframes, and delete internal IPA
8815 (stop_tracing_handler): New.
8816 (flush_trace_buffer_handler): New.
8817 (cmd_qtstop): Upload fast tracepoints.
8818 (response_tracepoint): Handle fast tracepoints.
8819 (tracepoint_finished_step): Upload fast traceframes. Set the
8820 tracepoint hit context's tracepoint type.
8821 (handle_tracepoint_bkpts): New.
8822 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8823 type. Add comment about fast tracepoints.
8824 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8825 non-existing action_str field.
8826 (get_context_regcache): Handle fast tracepoints.
8827 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8829 (fast_tracepoint_from_jump_pad_address): New.
8830 (fast_tracepoint_from_ipa_tpoint_address): New.
8831 (collecting_t): New.
8832 (force_unlock_trace_buffer): New.
8833 (fast_tracepoint_collecting): New.
8836 (write_inferior_data_ptr): New.
8837 (target_tp_heap): New.
8838 (target_malloc): New.
8839 (download_agent_expr): New.
8841 (download_tracepoints): New.
8842 (download_trace_state_variables): New.
8843 (upload_fast_traceframes): New.
8844 (IPA_FIRST_TRACEFRAME): New.
8845 (IPA_NEXT_TRACEFRAME_1): New.
8846 (IPA_NEXT_TRACEFRAME): New.
8847 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8848 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8849 (gdb_jump_pad_buffer_end): New.
8850 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8851 (initialize_tracepoint): Adjust.
8852 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8853 buffer. Initialize the low module.
8854 * utils.c (PREFIX, TOOLNAME): New.
8855 (malloc_failure): Use PREFIX.
8856 (error): In the IPA, an error causes an exit.
8857 (fatal, warning): Use PREFIX.
8858 (internal_error): Use TOOLNAME.
8859 (NUMCELLS): Increase to 10.
8860 * configure, config.in: Regenerate.
8862 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8864 * server.c (handle_query) <qSupported>: Do two passes over the
8865 qSupported string to avoid nesting strtok.
8867 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8869 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8871 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8873 * configure: Regenerate.
8874 * proc-service.list: New.
8876 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8878 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8881 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8883 * gdbreplay.c (remote_open): Check error return from socket() call by
8884 its equality to -1 not by it being negative.
8885 * remote-utils.c (remote_open): Likewise.
8887 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8889 * config.h: Regenerate.
8891 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8893 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8894 doesn't provide PTRACE_GET_THREAD_AREA.
8896 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8898 * linux-m68k-low.c: Include <asm/ptrace.h>
8899 (ps_get_thread_area): Implement.
8901 2010-05-03 Doug Evans <dje@google.com>
8903 * event-loop.c (struct callback_event): New struct.
8904 (callback_list): New global.
8905 (append_callback_event, delete_callback_event): New functions.
8906 (process_callback): New function.
8907 (start_event_loop): Call it.
8908 * remote-utils.c (NOT_SCHEDULED): Define.
8909 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8910 moved out of readchar.
8911 (readchar): Rewrite. Call reschedule before returning.
8912 (reset_readchar): New function.
8913 (remote_close): Call it.
8914 (process_remaining, reschedule): New functions.
8915 * server.h (callback_handler_func): New typedef.
8916 (append_callback_event, delete_callback_event): Declare.
8918 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8920 * proc-service.c (ps_pglobal_lookup): Use
8921 thread_db_look_up_one_symbol.
8922 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8923 parameter. Use it instead of all_symbols_looked_up.
8924 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8926 (all_symbols_looked_up): Don't declare.
8927 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8928 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8930 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8931 Set all_symbols_looked_up here.
8932 (thread_db_look_up_one_symbol): New.
8933 (thread_db_get_tls_address): Adjust.
8934 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8935 thread_db object on the heap, and tentatively set it in the
8937 (thread_db_init): Don't set all_symbols_looked_up here.
8938 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8940 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8942 * linux-low.c (linux_kill, linux_detach): Adjust.
8943 (status_pending_p_callback): Remove redundant statement. Check
8944 for !TARGET_WAITIKIND_IGNORE, instead of
8945 TARGET_WAITKIND_STOPPED.
8946 (handle_tracepoints): Make sure LWP is locked. Adjust.
8947 (linux_wait_for_event_1): Adjust.
8948 (linux_cancel_breakpoints): New.
8949 (unsuspend_one_lwp): New.
8950 (unsuspend_all_lwps): New.
8951 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8952 (send_sigstop_callback): Change return type to int, add new
8953 `except' parameter and handle it.
8954 (suspend_and_send_sigstop_callback): New.
8955 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8956 pass them down. If SUSPEND, also increment the lwp's suspend
8958 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8959 (need_step_over_p): Don't consider suspended LWPs.
8960 (start_step_over): Adjust.
8961 (proceed_one_lwp): Change return type to int, add new `except'
8962 parameter and handle it.
8963 (unsuspend_and_proceed_one_lwp): New.
8964 (proceed_all_lwps): Use find_inferior instead of
8966 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8967 also decrement the suspend count of LWPs. Pass `except' down,
8968 instead of hacking its suspend count.
8969 (linux_pause_all): Add `freeze' parameter. Adjust.
8970 (linux_unpause_all): New.
8971 (linux_target_ops): Install linux_unpause_all.
8972 * server.c (handle_status): Adjust.
8973 * target.h (struct target_ops): New fields `unpause_all' and
8974 `cancel_breakpoints'. Add new parameter to `pause_all'.
8975 (pause_all): Add new `freeze' parameter.
8977 (cancel_breakpoints): New.
8978 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8980 (cmd_qtstart): Pause threads.
8981 (stop_tracing): Pause threads, and cancel breakpoints.
8982 * win32-low.c (win32_target_ops): Adjust.
8984 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8986 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8987 the inferior right away from here...
8988 (linux_wait_1): ... to here, and adjust to check the thread's
8989 last_resume_kind instead of the lwp's step or stop_expected flags.
8991 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8993 * README: Use consistent `GDB' and `GDBserver' spellings.
8995 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8997 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8998 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8999 (linux_detach_one_lwp): Assume the lwp is stopped.
9000 (any_thread_of): Delete.
9001 (linux_detach): Stop all lwps here. Don't blindly delete all
9003 (delete_lwp_callback): New.
9004 (linux_mourn): Delete all lwps of the process that is gone.
9005 (linux_wait_1): Don't delete the last lwp of the process here.
9006 * mem-break.h (mark_breakpoints_out): Declare.
9007 * mem-break.c (mark_breakpoints_out): New.
9008 (free_all_breakpoints): Use it.
9009 * server.c (handle_target_event): If the process is gone, mark
9011 * thread-db.c (struct thread_db) <create_bp>: New field.
9012 (thread_db_enable_reporting): Fix prototype. Store a thread event
9013 breakpoint reference in the thread_db struct.
9014 (thread_db_load_search): Clear the thread_db object.
9015 (try_thread_db_load_1): Ditto.
9016 (switch_to_process): New.
9017 (disable_thread_event_reporting): Use it.
9018 (remove_thread_event_breakpoints): New.
9019 (thread_db_detach, thread_db_mourn): Use it.
9021 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9023 * linux-low.c (linux_enable_event_reporting): New.
9024 (linux_wait_for_event_1, handle_extended_wait): Use it.
9026 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9028 * linux-low.c (linux_kill_one_lwp, linux_kill)
9029 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9030 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9031 SIGSTOP even if the LWP is stopped.
9032 (send_sigstop_callback): New.
9033 (stop_all_lwps): Use send_sigstop_callback instead.
9034 (linux_resume_one_thread): Adjust.
9035 (proceed_one_lwp): Still proceed an LWP that the client has
9036 requested to stop, if we haven't reported it as stopped yet. Make
9037 sure that LWPs the client want stopped, have a pending SIGSTOP.
9039 2010-04-26 Doug Evans <dje@google.com>
9041 * server.c (handle_general_set): Make static.
9043 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9044 Print received char after testing for error/eof instead of before.
9045 (input_interrupt): Tweak comment.
9047 2010-04-23 Doug Evans <dje@google.com>
9049 * server.c (start_inferior): Print inferior argv if --debug.
9051 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9053 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9054 * nto-x86-low.c: Include server.h
9056 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9058 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9059 be consistent with other sources of this directory.
9060 (init_registers_amd64): Correct name of source file of this function
9063 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9065 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9068 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9070 * win32-i386-low.c: Add 64-bit support.
9071 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9072 (init_registers_amd64): Declare.
9073 (mappings): Add 64-bit version of array.
9074 (init_windows_x86): New function.
9075 (the_low_target): Change init_arch field to init_windows_x86.
9077 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9079 * win32-low.c: Adapt to support also 64-bit architecture.
9080 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9081 (get_image_name): Use SIZE_T type for local variable `done'.
9082 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9083 (toolhelp_get_dll_name): Idem.
9084 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9085 Use uintptr_t typecast to avoid warning.
9086 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9087 (handle_exception): Use phex_nz to avoid warning.
9088 (win32_wait): Remove unused local variable `process'.
9090 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9092 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9095 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9097 * configure.ac: Use `ws2_32' library for srv_mingw.
9098 * configure: Regenerate.
9099 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9100 * remote-utils.c: Likewise.
9102 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9104 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9105 if __x86_64__ is defined.
9107 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9109 * configure: Regenerate.
9111 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9113 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9114 * target.h (target_ops): New get_tib_address field.
9115 * win32-low.h (win32_thread_info): Add thread_local_base field.
9116 * win32-low.c (child_add_thread): Add tlb argument.
9117 Set thread_local_base field to TLB.
9118 (get_child_debug_event): Adapt to child_add_thread change.
9119 (win32_get_tib_address): New function.
9120 (win32_target_ops): Set get_tib_address field to
9121 win32_get_tib_address.
9122 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9124 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9126 * linux-low.c (linux_mourn): Also remove the process.
9127 * server.c (handle_target_event): Don't remove the process here.
9128 * nto-low.c (nto_mourn): New.
9129 (nto_target_ops): Install it.
9130 * spu-low.c (spu_mourn): New.
9131 (spu_target_ops): Install it.
9132 * win32-low.c (win32_mourn): New.
9133 (win32_target_ops): Install it.
9135 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9137 * server.h (buffer_xml_printf): Remove redundant `;'.
9139 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9141 * regcache.c (set_register_cache): Invalidate regcaches before
9142 changing the register cache layout.
9143 (regcache_invalidate_one): Allow a NULL regcache.
9144 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9145 regcaches before changing the register cache layout or the target
9148 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9150 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9151 variable warning on Linux/x86-64.
9153 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9155 GDBserver disconnected tracing support.
9157 * linux-low.c (linux_remove_process): Delete.
9158 (add_lwp): Don't set last_resume_kind here.
9159 (linux_kill): Use `mourn'.
9160 (linux_detach): Use `thread_db_detach', and `mourn'.
9162 (linux_attach_lwp_1): Adjust comment.
9163 (linux_attach): last_resume_kind moved the thread_info; adjust.
9164 (status_pending_p_callback): Adjust.
9165 (linux_wait_for_event_1): Adjust.
9166 (count_events_callback, select_singlestep_lwp_callback)
9167 (select_event_lwp_callback, cancel_breakpoints_callback)
9168 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9169 (proceed_one_lwp): Adjust.
9170 (linux_async): Add debug output.
9171 (linux_thread_stopped): New.
9172 (linux_pause_all): New.
9173 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9175 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9176 (thread_db_free): Delete declaration.
9177 (thread_db_detach, thread_db_mourn): Declare.
9178 * thread-db.c (thread_db_init): Use thread_db_mourn.
9179 (thread_db_free): Delete, split in two.
9180 (disable_thread_event_reporting): New.
9181 (thread_db_detach): New.
9182 (thread_db_mourn): New.
9184 * server.h (struct thread_info) <last_resume_kind>: New field.
9185 <attached>: Add comment.
9186 <gdb_detached>: New field.
9187 (handler_func): Change return type to int.
9188 (handle_serial_event, handle_target_event): Ditto.
9189 (gdb_connected): Declare.
9191 (disconnected_tracing): Declare.
9192 (stop_tracing): Declare.
9194 * server.c (handle_query) <qSupported>: Report support for
9195 disconnected tracing.
9196 (queue_stop_reply_callback): Account for running threads.
9197 (gdb_wants_thread_stopped): New.
9198 (gdb_wants_all_threads_stopped): New.
9199 (gdb_reattached_process): New.
9200 (handle_status): Clear the `gdb_detached' flag of all processes.
9201 In all-stop, stop all threads.
9202 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9203 (process_serial_event): If the remote connection breaks, or if an
9204 exit was forced with "monitor exit", force an event loop exit.
9205 Handle disconnected tracing on detach.
9206 (handle_serial_event): Adjust.
9207 (handle_target_event): If GDB isn't connected, forward events back
9208 to the inferior, unless the last process exited, in which case,
9209 exit gdbserver. Adjust interface.
9211 * remote-utils.c (remote_open): Don't block in accept. Instead
9212 register an event loop source on the listen socket file
9213 descriptor. Refactor bits into ...
9214 (listen_desc): ... this new global.
9215 (gdb_connected): ... this new function.
9216 (enable_async_notification): ... this new function.
9217 (handle_accept_event): ... this new function.
9218 (remote_close): Clear remote_desc.
9220 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9222 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9224 (mourn_inferior): Define.
9225 (target_process_qsupported): Avoid the dangling else problem.
9226 (thread_stopped): Define.
9227 (pause_all): Define.
9228 (target_waitstatus_to_string): Declare.
9229 * target.c (target_waitstatus_to_string): New.
9231 * tracepoint.c (tracing): Make extern.
9232 (disconnected_tracing): New.
9233 (stop_tracing): Make extern. Handle tracing stops due to GDB
9235 (cmd_qtdisconnected): New.
9236 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9237 (handle_tracepoint_general_set): Handle QTDisconnected.
9239 * event-loop.c (event_handler_func): Change return type to int.
9240 (process_event): Bail out if the event handler wants the event
9242 (handle_file_event): Ditto.
9243 (start_event_loop): Bail out if the event handler wants the event
9246 * nto-low.c (nto_target_ops): Adjust.
9247 * spu-low.c (spu_wait): Don't remove the process here.
9248 (spu_target_ops): Adjust.
9249 * win32-low.c (win32_wait): Don't remove the process here.
9250 (win32_target_ops): Adjust.
9252 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9254 * regcache.c (realloc_register_cache): Invalidate inferior's
9255 regcache before recreating it.
9257 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9259 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9261 2010-04-09 Stan Shebs <stan@codesourcery.com>
9262 Pedro Alves <pedro@codesourcery.com>
9264 * server.h (LONGEST): New.
9265 (struct thread_info) <while_stepping>: New field.
9266 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9268 (initialize_tracepoint, handle_tracepoint_general_set)
9269 (handle_tracepoint_query, tracepoint_finished_step)
9270 (tracepoint_was_hit, release_while_stepping_state_list):
9271 (current_traceframe): Declare.
9272 * server.c (handle_general_set): Handle tracepoint packets.
9274 (write_memory): New.
9275 (handle_search_memory_1): Use read_memory.
9276 (handle_query): Report support for conditional tracepoints, trace
9277 state variables, and tracepoint sources. Handle tracepoint
9279 (main): Initialize the tracepoints module.
9280 (process_serial_event): Handle traceframe reads/writes.
9282 * linux-low.c (handle_tracepoints): New.
9283 (linux_wait_1): Call it.
9284 (linux_resume_one_lwp): Handle while-stepping.
9285 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9286 (linux_target_ops): Install them.
9287 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9289 * linux-x86-low.c (x86_supports_tracepoints): New.
9290 (the_low_target). Install it.
9292 * mem-break.h (delete_breakpoint): Declare.
9293 * mem-break.c (delete_breakpoint): Make external.
9295 * target.h (struct target_ops): Add `supports_tracepoints',
9296 `read_pc', and `write_pc' fields.
9297 (target_supports_tracepoints): Define.
9298 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9301 * regcache.h (struct regcache) <registers_owned>: New field.
9302 (init_register_cache, regcache_cpy): Declare.
9303 (regcache_read_pc, regcache_write_pc): Declare.
9304 (register_cache_size): Declare.
9305 (supply_regblock): Declare.
9306 * regcache.c (init_register_cache): New.
9307 (new_register_cache): Use it.
9308 (regcache_cpy): New.
9309 (register_cache_size): New.
9310 (supply_regblock): New.
9311 (regcache_read_pc, regcache_write_pc): New.
9313 * tracepoint.c: New.
9315 * Makefile.in (OBS): Add tracepoint.o.
9316 (tracepoint.o): New rule.
9318 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9320 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9322 (i386-mmx.c): Likewise.
9323 (i386-mmx-linux.o): Likewise.
9324 (i386-mmx-linux.c): Likewise.
9326 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9327 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9328 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9329 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9331 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9332 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9333 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9335 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9337 * Makefile.in (clean): Updated.
9339 (i386-avx.c): Likewise.
9340 (i386-avx-linux.o): Likewise.
9341 (i386-avx-linux.c): Likewise.
9342 (amd64-avx.o): Likewise.
9343 (amd64-avx.c): Likewise.
9344 (amd64-avx-linux.o): Likewise.
9345 (amd64-avx-linux.c): Likewise.
9347 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9348 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9349 (srv_amd64_regobj): Add amd64-avx.o.
9350 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9351 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9352 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9353 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9354 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9355 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9356 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9358 * i387-fp.c: Include "i386-xstate.h".
9360 (i387_cache_to_xsave): Likewise.
9361 (i387_xsave_to_cache): Likewise.
9362 (x86_xcr0): Likewise.
9364 * i387-fp.h (i387_cache_to_xsave): Likewise.
9365 (i387_xsave_to_cache): Likewise.
9366 (x86_xcr0): Likewise.
9368 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9369 * linux-crisv32-low.c (target_regsets): Likewise.
9370 * linux-m68k-low.c (target_regsets): Likewise.
9371 * linux-mips-low.c (target_regsets): Likewise.
9372 * linux-ppc-low.c (target_regsets): Likewise.
9373 * linux-s390-low.c (target_regsets): Likewise.
9374 * linux-sh-low.c (target_regsets): Likewise.
9375 * linux-sparc-low.c (target_regsets): Likewise.
9376 * linux-xtensa-low.c (target_regsets): Likewise.
9378 * linux-low.c: Include <sys/uio.h>.
9379 (regsets_fetch_inferior_registers): Support nt_type.
9380 (regsets_store_inferior_registers): Likewise.
9381 (linux_process_qsupported): New.
9382 (linux_target_ops): Add linux_process_qsupported.
9384 * linux-low.h (regset_info): Add nt_type.
9385 (linux_target_ops): Add process_qsupported.
9387 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9389 (init_registers_i386_avx_linux): New.
9390 (init_registers_amd64_avx_linux): Likewise.
9391 (xmltarget_i386_linux_no_xml): Likewise.
9392 (xmltarget_amd64_linux_no_xml): Likewise.
9393 (PTRACE_GETREGSET): Likewise.
9394 (PTRACE_SETREGSET): Likewise.
9395 (x86_fill_xstateregset): Likewise.
9396 (x86_store_xstateregset): Likewise.
9397 (use_xml): Likewise.
9398 (x86_linux_update_xmltarget): Likewise.
9399 (x86_linux_process_qsupported): Likewise.
9400 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9401 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9402 init_registers_i386_linux here. Call
9403 x86_linux_update_xmltarget.
9404 (the_low_target): Add x86_linux_process_qsupported.
9406 * server.c (handle_query): Call target_process_qsupported.
9408 * target.h (target_ops): Add process_qsupported.
9409 (target_process_qsupported): New.
9411 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9413 * inferiors.c (add_thread): Set last_status kind to
9414 TARGET_WAITKIND_IGNORE.
9415 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9416 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9417 (linux_wait_1): Move `thread' local definition to block that uses
9418 it. Don't NULL initialize `event_child'.
9419 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9420 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9421 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9423 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9425 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9426 an extended waitstatus, or by a watchpoint.
9427 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9428 thread was stepping or has been stopped by a watchpoint.
9430 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9432 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9433 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9434 of another, then delete the previous, and validate all
9436 (validate_inserted_breakpoint): New.
9437 (delete_disabled_breakpoints): New.
9438 (validate_breakpoints): New.
9439 (check_mem_read): Validate breakpoints before trusting their
9440 shadow. Delete disabled breakpoints.
9441 (check_mem_write): Validate breakpoints before trusting they
9442 should be inserted. Delete disabled breakpoints.
9443 * mem-break.h (validate_breakpoints):
9444 * server.c (handle_query): Validate breakpoints when we see a
9447 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9449 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9450 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9451 if we could tell there's a GDB breakpoint at stop_pc.
9452 (need_step_over_p): Don't do a step over if we find a GDB
9453 breakpoint at the resume PC.
9455 * mem-break.c (struct raw_breakpoint): New.
9456 (enum bkpt_type): New type `gdb_breakpoint'.
9457 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9458 fields. New field `raw'.
9459 (find_raw_breakpoint_at): New.
9460 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9462 (set_breakpoint_at): Adjust.
9463 (delete_raw_breakpoint): New.
9464 (release_breakpoint): New.
9465 (delete_breakpoint): Rename to...
9466 (delete_breakpoint_1): ... this. Add proc parameter. Use
9467 release_breakpoint. Return ENOENT.
9468 (delete_breakpoint): Reimplement.
9469 (find_breakpoint_at): Delete.
9470 (find_gdb_breakpoint_at): New.
9471 (delete_breakpoint_at): Delete.
9472 (set_gdb_breakpoint_at): New.
9473 (delete_gdb_breakpoint_at): New.
9474 (gdb_breakpoint_here): New.
9475 (set_reinsert_breakpoint): Use release_breakpoint.
9476 (uninsert_breakpoint): Rename to ...
9477 (uninsert_raw_breakpoint): ... this.
9478 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9479 (reinsert_raw_breakpoint): Change parameter type to
9481 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9483 (check_breakpoints): Adjust. Use release_breakpoint.
9484 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9485 (breakpoint_inserted_here): Ditto.
9486 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9487 Don't trust the breakpoint's shadow if it is not inserted.
9488 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9489 (delete_all_breakpoints): Adjust.
9490 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9491 use delete_breakpoint_1.
9493 * mem-break.h (breakpoints_supported): Delete declaration.
9494 (set_gdb_breakpoint_at): Declare.
9495 (gdb_breakpoint_here): Declare.
9496 (delete_breakpoint_at): Delete.
9497 (delete_gdb_breakpoint_at): Declare.
9499 * server.h (struct raw_breakpoint): Forward declare.
9500 (struct process_info): New field `raw_breakpoints'.
9502 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9505 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9507 * linux-low.c (status_pending_p_callback): Fix comment.
9508 (linux_wait_for_event_1): Move most of the internal breakpoint
9509 handling from here...
9510 (linux_wait_1): ... to here.
9511 (count_events_callback): New.
9512 (select_singlestep_lwp_callback): New.
9513 (select_event_lwp_callback): New.
9514 (cancel_breakpoints_callback): New.
9515 (select_event_lwp): New.
9516 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9517 priority to all LWPs that have had events that should be reported
9518 to the client. Cancel breakpoints when about to reporting the
9519 event to the client, not while stopping lwps. No longer cancel
9520 finished single-steps here.
9521 (cancel_finished_single_step): Delete.
9522 (cancel_finished_single_steps): Delete.
9524 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9526 * mem-break.c (enum bkpt_type): New.
9527 (struct breakpoint): New field `type'.
9528 (set_breakpoint_at): Change return type to struct breakpoint
9529 pointer. Set type to `other_breakpoint' by default.
9530 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9531 in the breakpoint list.
9532 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9533 (reinsert_breakpoint): Rename to ...
9534 (reinsert_raw_breakpoint): ... this.
9535 (reinsert_breakpoints_at): Adjust.
9536 * mem-break.h (struct breakpoint): Declare.
9537 (set_breakpoint_at): Change return type to struct breakpoint
9540 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9542 * server.c (handle_query): Assign, not compare.
9544 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9546 Teach linux gdbserver to step-over-breakpoints.
9548 * linux-low.c (can_hardware_single_step): New.
9549 (supports_breakpoints): New.
9550 (handle_extended_wait): If stopping threads, read the stop pc of
9553 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9554 low target doesn't support retrieving the PC.
9555 (add_lwp): Set last_resume_kind to resume_continue.
9556 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9557 (linux_attach): Don't clear stop_expected. Set the lwp's
9558 last_resume_kind to resume_stop.
9559 (linux_detach_one_lwp): Don't check for removed breakpoints.
9560 (check_removed_breakpoint): Delete.
9561 (status_pending_p): Rename to ...
9562 (status_pending_p_callback): ... this. Don't check for removed
9563 breakpoints. Don't consider threads that are stopped from GDB's
9565 (linux_wait_for_lwp): Always read the stop_pc here.
9566 (cancel_breakpoint): New.
9567 (step_over_bkpt): New global.
9568 (linux_wait_for_event_1): Implement stepping over breakpoints.
9569 (gdb_wants_lwp_stopped): New.
9570 (gdb_wants_all_stopped): New.
9571 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9572 single-step traps here. Store the thread's last reported target
9574 (send_sigstop): Don't clear stop_expected. Always set it,
9576 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9577 (cancel_finished_single_step): New.
9578 (cancel_finished_single_steps): New.
9579 (wait_for_sigstop): Don't cancel finished single-step traps here.
9580 (linux_resume_one_lwp): Don't check for removed breakpoints.
9581 Don't set `step' on non-hardware step archs.
9582 (linux_set_resume_request): Ignore resume_stop requests if already
9583 stopping or stopped. Set the lwp's last_resume_kind.
9584 (resume_status_pending_p): Don't check for removed breakpoints.
9585 (need_step_over_p): New.
9586 (start_step_over): New.
9587 (finish_step_over): New.
9588 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9589 requests. Clear the thread's last reported target waitstatus.
9590 Don't use the `suspended' flag. Don't consider pending breakpoints.
9591 (linux_resume): Start a step-over if necessary.
9592 (proceed_one_lwp): New.
9593 (proceed_all_lwps): New.
9594 (unstop_all_lwps): New.
9595 * linux-low.h (struct lwp_info): Rewrite comment for the
9596 `suspended' flag. Add the `stop_pc' field. Delete the
9597 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9598 Add `'last_resume_kind' and `need_step_over' fields.
9599 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9600 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9601 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9602 (set_raw_breakpoint_at): New.
9603 (set_breakpoint_at): Rewrite to use it.
9604 (reinsert_breakpoint_handler): Delete.
9605 (set_reinsert_breakpoint): New.
9606 (reinsert_breakpoint_by_bp): Delete.
9607 (delete_reinsert_breakpoints): New.
9608 (uninsert_breakpoint): Rewrite.
9609 (uninsert_breakpoints_at): New.
9610 (reinsert_breakpoint): Rewrite.
9611 (reinsert_breakpoints_at): New.
9612 (check_breakpoints): Rewrite.
9613 (breakpoint_here): New.
9614 (breakpoint_inserted_here): New.
9615 (check_mem_read): Adjust.
9616 * mem-break.h (breakpoints_supported, breakpoint_here)
9617 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9618 (reinsert_breakpoint_by_bp): Delete declaration.
9619 (delete_reinsert_breakpoints): Declare.
9620 (reinsert_breakpoint): Delete declaration.
9621 (reinsert_breakpoints_at): Declare.
9622 (uninsert_breakpoint): Delete declaration.
9623 (uninsert_breakpoints_at): Declare.
9624 (check_breakpoints): Adjust prototype.
9625 * server.h: Adjust include order.
9626 (struct thread_info): Declare here. Add a `last_status' field.
9628 2010-03-23 Michael Snyder <msnyder@vmware.com>
9630 * server.c (crc32): New function.
9631 (handle_query): Add handling for 'qCRC:' request.
9633 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9635 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9636 lwp had been stopped by a watchpoint.
9638 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9640 * server.h (internal_error): Declare.
9641 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9642 * utils.c (internal_error): New function.
9644 2010-03-15 Andreas Schwab <schwab@redhat.com>
9646 * configure.srv: Fix typo setting srv_regobj.
9648 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9650 * linux-low.c (fetch_register): Avoid passing a non string literal
9652 (usr_store_inferior_registers): Ditto.
9654 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9656 * linux-low.c (linux_write_memory): Bail out early if peeking
9659 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9661 * linux-low.h (struct lwp_info): New fields
9662 `stopped_by_watchpoint' and `stopped_data_address'.
9663 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9664 here, and cache them in the lwp object.
9665 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9667 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9669 (linux_stopped_by_watchpoint): Rewrite.
9670 (linux_stopped_data_address): Rewrite.
9672 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9674 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9675 switching the current inferior, not before.
9677 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9679 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9680 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9681 i386-linux.c and amd64-linux.c.
9682 (reg-i386.o): Removed.
9683 (reg-i386.c): Likewise.
9684 (reg-i386-linux.o): Likewise.
9685 (reg-i386-linux.c): Likewise.
9686 (reg-x86-64.o): Likewise.
9687 (reg-x86-64.c): Likewise.
9688 (reg-x86-64-linux.o): Likewise.
9689 (reg-x86-64-linux.c): Likewise.
9692 (i386-linux.o): Likewise.
9693 (i386-linux.c): Likewise.
9694 (amd64.o): Likewise.
9695 (amd64.c): Likewise.
9696 (amd64-linux.o): Likewise.
9697 (amd64-linux.c): Likewise.
9699 * configure.srv (srv_i386_regobj): New.
9700 (srv_i386_linux_regobj): Likewise.
9701 (srv_amd64_regobj): Likewise.
9702 (srv_amd64_linux_regobj): Likewise.
9703 (srv_i386_32bit_xmlfiles): Likewise.
9704 (srv_i386_64bit_xmlfiles): Likewise.
9705 (srv_i386_xmlfiles): Likewise.
9706 (srv_amd64_xmlfiles): Likewise.
9707 (srv_i386_linux_xmlfiles): Likewise.
9708 (srv_amd64_linux_xmlfiles): Likewise.
9709 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9710 srv_xmlfiles to $srv_i386_xmlfiles.
9711 (i[34567]86-*-mingw32ce*): Likewise.
9712 (i[34567]86-*-mingw*): Likewise.
9713 (i[34567]86-*-nto*): Likewise.
9714 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9715 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9716 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9717 (x86_64-*-linux*): Likewise.
9719 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9720 (init_registers_amd64_linux): New.
9721 (x86_arch_setup): Replace init_registers_x86_64_linux with
9722 init_registers_amd64_linux.
9724 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9726 * configure.ac: Check for libdl. If it is not available link against
9727 static libthread_db.
9728 * configure: Regenerate.
9730 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9734 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9735 handing a read watchpoint.
9736 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9738 2010-02-12 Doug Evans <dje@google.com>
9740 * linux-low.c (linux_supports_tracefork_flag): Document.
9741 (linux_look_up_symbols): Add comment.
9743 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9745 * regcache.c (supply_register): Clear regcache if buf is NULL.
9747 2010-02-02 Nicolas Roche <roche@sourceware.org>
9748 Joel Brobecker <brobecker@adacore.com>
9750 * inferiors.c (find_inferior): Add function documentation.
9751 (unloaded_dll): Handle the case where the unloaded dll has not
9752 been previously registered in the dll list.
9754 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9756 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9757 (thumb2_breakpoint): New.
9758 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9760 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9762 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9763 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9766 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9768 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9770 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9772 * linux-s390-low.c (s390_collect_ptrace_register)
9773 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9775 2010-01-21 Doug Evans <dje@google.com>
9777 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9778 (PTRACE_ARG4_TYPE): New macro.
9779 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9780 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9781 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9782 (usr_store_inferior_registers): Ditto.
9783 (linux_read_memory, linux_write_memory): Ditto.
9784 (linux_test_for_tracefork): Ditto.
9786 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9787 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9789 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9791 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9794 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9796 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9797 prototype to take a regcache. Adjust.
9799 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9801 * regcache.h (struct thread_info): Forward declare.
9802 (struct regcache): New.
9803 (new_register_cache): Adjust prototype.
9804 (get_thread_regcache): Declare.
9805 (free_register_cache): Adjust prototype.
9806 (registers_to_string, registers_from_string): Ditto.
9807 (supply_register, supply_register_by_name, collect_register)
9808 (collect_register_as_string, collect_register_by_name): Ditto.
9809 * regcache.c (struct inferior_regcache_data): Delete.
9810 (get_regcache): Rename to ...
9811 (get_thread_regcache): ... this. Adjust. Switch inferior before
9813 (regcache_invalidate_one): Adjust.
9814 (regcache_invalidate): Fix prototype.
9815 (new_register_cache): Return the new register cache.
9816 (free_register_cache): Change prototype.
9817 (realloc_register_cache): Adjust.
9818 (registers_to_string): Change prototype to take a regcache. Adjust.
9819 (registers_from_string): Ditto.
9820 (register_data): Ditto.
9821 (supply_register): Ditto.
9822 (supply_register_by_name): Ditto.
9823 (collect_register): Ditto.
9824 (collect_register_as_string): Ditto.
9825 (collect_register_by_name): Ditto.
9826 * server.c (process_serial_event): Adjust.
9827 * linux-low.h (regset_fill_func, regset_store_func): Change
9829 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9831 * linux-low.c (get_stop_pc): Adjust.
9832 (check_removed_breakpoint): Adjust.
9833 (linux_wait_for_event): Adjust.
9834 (linux_resume_one_lwp): Adjust.
9835 (fetch_register): Add regcache parameter. Adjust.
9836 (usr_store_inferior_registers): Ditto.
9837 (regsets_fetch_inferior_registers): Ditto.
9838 (regsets_store_inferior_registers): Ditto.
9839 (linux_fetch_registers, linux_store_registers): Ditto.
9840 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9842 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9844 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9845 prototype to take a regcache.
9846 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9847 * remote-utils.c (convert_ascii_to_int, outreg)
9848 (prepare_resume_reply): Change prototype to take a regcache.
9850 * target.h (struct target_ops) <fetch_registers, store_registers>:
9851 Change prototype to take a regcache.
9852 (fetch_inferior_registers, store_inferior_registers): Change
9853 prototype to take a regcache. Adjust.
9854 * proc-service.c (ps_lgetregs): Adjust.
9855 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9856 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9857 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9858 take a regcache. Adjust.
9859 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9860 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9861 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9862 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9863 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9864 (cris_cannot_fetch_register):
9865 (cris_breakpoint_at): Change prototype to take a regcache.
9867 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9868 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9869 to take a regcache. Adjust.
9870 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9872 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9873 take a regcache. Adjust.
9874 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9875 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9876 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9877 * linux-mips-low.c (mips_get_pc):
9878 (mips_set_pc): Change prototype to take a regcache. Adjust.
9879 (mips_reinsert_addr): Adjust.
9880 (mips_collect_register): Change prototype to take a regcache.
9882 (mips_supply_register):
9883 (mips_collect_register_32bit, mips_supply_register_32bit)
9884 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9885 (mips_store_fpregset): Ditto.
9886 * linux-ppc-low.c (ppc_supply_ptrace_register)
9887 (ppc_supply_ptrace_register): Ditto.
9888 (parse_spufs_run): Adjust.
9889 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9890 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9891 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9892 take a regcache. Adjust.
9893 * linux-s390-low.c (s390_collect_ptrace_register)
9894 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9895 (s390_set_pc): Change prototype to take a regcache. Adjust.
9896 (s390_arch_setup): Adjust.
9897 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9898 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9899 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9900 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9901 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9903 (sparc_breakpoint_at): Adjust.
9904 * linux-xtensa-low.c (xtensa_fill_gregset):
9905 (xtensa_store_gregset):
9906 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9907 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9908 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9909 prototype to take a regcache. Adjust.
9910 * win32-arm-low.c (arm_fetch_inferior_register)
9911 (arm_store_inferior_register): Change prototype to take a
9913 * win32-i386-low.c (i386_fetch_inferior_register)
9914 (i386_store_inferior_register): Change prototype to take a
9916 * win32-low.c (child_fetch_inferior_registers)
9917 (child_store_inferior_registers): Change prototype to take a
9919 (win32_wait): Adjust.
9920 (win32_fetch_inferior_registers): Change prototype to take a
9922 (win32_store_inferior_registers): Adjust.
9923 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9924 store_inferior_register>: Change prototype to take a regcache.
9926 2010-01-20 Doug Evans <dje@google.com>
9928 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9930 (linux_wait_for_event1, linux_init_signals): Ditto.
9931 (W_STOPCODE): Provide definition if missing.
9933 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9935 * linux-low.c (linux_core_of_thread): New.
9936 (compare_ints, show_process, list_threads): New.
9937 (linux_qxfer_osdata): Report threads and cores.
9938 (linux_target_op): Register linux_core_of_thread.
9939 * remote-utils.c (prepare_resume_reply): Report the core.
9940 (buffer_xml_printf): Support %d specifier.
9941 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9943 (handle_query): Handle qXfer:threads. Announce availability
9945 * target.h (struct target_ops): New field core_of_thread.
9947 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9949 * Makefile.in (clean): Remove new generated files.
9950 (reg-s390.o, reg-s390.c): Remove rules.
9951 (reg-s390x.o, reg-s390x.c): Likewise.
9952 (s390-linux32.o, s390-linux32.c): Add rules.
9953 (s390-linux64.o, s390-linux64.c): Likewise.
9954 (s390x-linux64.o, s390x-linux64.c): Likewise.
9955 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9956 * linux-s390-low.c: Include <elf.h>.
9957 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9958 (init_registers_s390): Remove prototype.
9959 (init_registers_s390x): Likewise.
9960 (init_registers_s390_linux32): Add prototype.
9961 (init_registers_s390_linux64): Likewise.
9962 (init_registers_s390x_linux64): Likewise.
9963 (s390_num_regs_3264): New define.
9964 (s390_regmap_3264): New global variable.
9965 (s390_cannot_fetch_register): Remove obsolete check.
9966 (s390_cannot_store_register): Likewise.
9967 (s390_collect_ptrace_register): Handle upper/lower register halves.
9968 (s390_supply_ptrace_register): Likewise.
9969 (s390_fill_gregset): Update to register number changes.
9970 (s390_get_hwcap): New routine.
9971 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9972 Install appropriate regmap and register set.
9974 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9976 * server.c (gdbserver_version): Update copyright year to 2010.
9977 * gdbreplay.c (gdbreplay_version): Likewise.
9979 2009-12-28 Doug Evans <dje@google.com>
9981 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9982 elf/external.h. Include <elf.h> instead but only if necessary.
9984 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9986 * linux-low.c (linux_remove_process): Remove `detaching'
9987 parameter. Don't release/detach from thread_db here.
9988 (linux_kill): Release/detach from thread_db here, ...
9989 (linux_detach): ... and here, before actually detaching.
9990 (linux_wait_1): ... and here, when a process exits.
9991 * thread-db.c (any_thread_of): New.
9992 (thread_db_free): Switch the current inferior to a thread of the
9995 2009-12-21 Doug Evans <dje@google.com>
9997 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9999 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10000 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10001 warning ifndef __NR_tkill. Move setting of errno there too.
10002 Delete unnecessary resetting of errno after syscall.
10003 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10005 * configure.ac: Check for dladdr.
10006 * config.in: Regenerate.
10007 * configure: Regenerate.
10008 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10009 (try_thread_db_load): Update.
10011 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10013 2009-12-18 Doug Evans <dje@google.com>
10015 * event-loop.c: Include unistd.h if it exists.
10017 * linux-low.c (my_waitpid): Move definition away from being in
10018 between linux_tracefork_child/linux_test_for_tracefork.
10020 * gdb_proc_service.h (psaddr_t): Fix type.
10021 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10022 signature to match glibc.
10024 2009-12-16 Doug Evans <dje@google.com>
10026 * linux-low.c (linux_read_memory): Fix argument to read.
10028 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10030 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10031 events, don't leave current_inferior pointing at null.
10033 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10035 * win32-low.c (LOG): Delete.
10036 (OUTMSG): Output to stderr.
10037 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10038 on compile time LOG macro.
10039 (win32_wait): Fix debug output.
10041 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10043 * win32-low.c (win32_add_one_solib): If the dll name is
10044 "ntdll.dll", prepend the system directory to the dll path.
10046 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10048 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10050 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10051 Vladimir Prus <vladimir@codesourcery.com>
10053 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10054 * configure.ac: Check for __mcoldfire__ and set
10055 gdb_cv_m68k_is_coldfire.
10056 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10057 reg-cf.o and reg-m68k.o.
10058 * configure: Regenerated.
10060 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10062 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10063 Pass it to thread_db_free.
10064 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10065 proper `detaching' argument to linux_remove_process.
10066 * linux-low.h (thread_db_free): Add `detaching' parameter.
10067 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10069 (thread_db_free): Add `detaching' parameter. Only
10070 call td_ta_clear_event if detaching from process.
10072 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10074 * thread-db.c (thread_db_free): Fix typo.
10076 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10079 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10081 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10083 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10084 with an i686 compiler.
10085 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10087 * configure: Rebuilt.
10089 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10093 * server.c (handle_search_memory_1): Correct read_addr initialization
10094 in loop for searching subsequent chunks.
10096 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10098 * configure.ac: New --with-libthread-db option.
10099 * thread-db.c: Allow direct dependence on libthread_db.
10100 (thread_db_free): Adjust.
10101 * config.in: Regenerate.
10102 * configure: Likewise.
10104 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10107 * thread-db.c (attach_thread): New function.
10108 (maybe_attach_thread): Return success/failure.
10109 (find_new_threads_callback): Adjust.
10110 (thread_db_find_new_threads): Loop until no new threads.
10112 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10114 * proc-service.c (ps_lgetregs): Formatting.
10116 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10118 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10119 * configure.ac: Adjust.
10120 * linux-low.h (struct process_info_private): Move members to struct
10122 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10123 * linux-low.c (linux_remove_process): Adjust.
10124 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10125 * server.c (handle_query): Move code ...
10126 (handle_monitor_command): ... here. New function.
10127 * target.h (struct target_ops): New member.
10128 * thread-db.c (struct thread_db): New.
10129 (libthread_db_search_path): New variable.
10130 (thread_db_create_event, thread_db_enable_reporting)
10131 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10132 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10133 (try_thread_db_load_1, dladdr_to_soname): New functions.
10134 (try_thread_db_load, thread_db_load_search): New functions.
10135 (thread_db_init): Search for libthread_db.
10136 (thread_db_free): New function.
10137 (thread_db_handle_monitor_command): Likewise.
10138 * config.in: Regenerate.
10139 * configure: Regenerate.
10141 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10143 * spu-low.c (spu_kill): Wait for inferior to terminate.
10144 Call clear_inferiors.
10145 (spu_detach): Call clear_inferiors.
10147 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10149 * aclocal.m4: Regenerate.
10150 * config.in: Likewise.
10151 * configure: Likewise.
10153 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10155 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10156 (parse_spufs_run): New function.
10157 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10158 (ppc_breakpoint_at): Handle SPU breakpoints.
10160 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10162 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10163 (SPUFS_MAGIC): Define.
10164 (spu_enumerate_spu_ids): New function.
10165 (linux_qxfer_spu): New function.
10166 (linux_target_ops): Install linux_qxfer_spu.
10168 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10170 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10171 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10172 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10173 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10174 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10175 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10176 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10177 (init_registers_powerpc_cell32l): Add prototype.
10178 (init_registers_powerpc_cell64l): Likewise.
10179 (ppc_arch_setup): Detect Cell/B.E. architecture.
10181 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10183 * Makefile.in (datarootdir): New variable.
10185 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10187 * linux-low.c (linux_write_memory): Update debugging output.
10188 * Makefile.in (clean): Add new descriptions.
10189 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10190 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10191 * configure.srv: Add new files for arm*-*-linux*.
10192 * linux-arm-low.c: Add new declarations.
10193 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10194 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10195 (HWCAP_VFPv3D16): New.
10196 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10197 instead of __IWMMXT__.
10198 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10199 (arm_arch_setup): New.
10200 (target_regsets): Remove #ifdef. Add VFP regset.
10201 (the_low_target): Use arm_arch_setup.
10203 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10205 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10206 the main thread again.
10208 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10210 Adding Neutrino gdbserver.
10211 * configure: Regenerated.
10212 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10213 * configure.srv (i[34567]86-*-nto*): New target.
10214 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10215 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10216 (nto_comctrl) [__QNX__]: New function.
10217 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10219 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10221 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10224 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10225 Pedro Alves <pedro@codesourcery.com>
10227 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10228 don't support CONTEXT_EXTENDED_REGISTERS.
10229 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10230 (the_low_target): Install them.
10231 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10232 failing with ERROR_PIPE_NOT_CONNECTED.
10234 2009-06-30 Doug Evans <dje@google.com>
10235 Pierre Muller <muller@ics.u-strasbg.fr>
10237 Add h/w watchpoint support to x86-linux, win32-i386.
10238 * Makefile.in (SFILES): Add i386-low.c
10239 (i386_low_h): Define.
10240 (i386-low.o): Add dependencies.
10241 (linux-x86-low.o): Add i386-low.h dependency.
10242 (win32-i386-low.o): Ditto.
10243 * i386-low.c: New file.
10244 * i386-low.h: New file.
10245 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10246 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10247 * linux-low.c (linux_add_process): Initialize arch_private.
10248 (linux_remove_process): Free arch_private.
10249 (add_lwp): Initialize arch_private.
10250 (delete_lwp): Free arch_private.
10251 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10253 * linux-low.h (process_info_private): New member arch_private.
10254 (lwp_info): New member arch_private.
10255 (linux_target_ops): New members new_process, new_thread,
10257 (ptid_of): New macro.
10258 * linux-x86-low.c: Include stddef.h, i386-low.h.
10259 (arch_process_info): New struct.
10260 (arch_lwp_info): New struct.
10261 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10262 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10263 (i386_dr_low_get_status): New function.
10264 (x86_insert_point, x86_remove_point): New functions.
10265 (x86_stopped_by_watchpoint): New function.
10266 (x86_stopped_data_address): New function.
10267 (x86_linux_new_process, x86_linux_new_thread): New functions.
10268 (x86_linux_prepare_to_resume): New function.
10269 (the_low_target): Add entries for insert_point, remove_point,
10270 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10272 * server.c (debug_hw_points): New global.
10273 (monitor_show_help): Document set debug-hw-points.
10274 (handle_query): Process "set debug-hw-points".
10275 * server.h (debug_hw_points): Declare.
10276 (paddress): Declare.
10277 * utils.c (NUMCELLS, CELLSIZE): New macros.
10278 (get_sell, xsnprintf, paddress): New functions.
10279 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10280 remove_point, stopped_by_watchpoint, stopped_data_address.
10281 * win32-i386-low.c: Include i386-low.h.
10282 (debug_reg_state): Replaces dr.
10283 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10284 (i386_dr_low_get_status): New function.
10285 (i386_insert_point, i386_remove_point): New functions.
10286 (i386_stopped_by_watchpoint): New function.
10287 (i386_stopped_data_address): New function.
10288 (i386_initial_stuff): Update.
10289 (get_thread_context,set_thread_context,i386_thread_added): Update.
10290 (the_low_target): Add entries for insert_point,
10291 remove_point, stopped_by_watchpoint, stopped_data_address.
10292 * win32-low.c (win32_insert_watchpoint): New function.
10293 (win32_remove_watchpoint): New function.
10294 (win32_stopped_by_watchpoint): New function.
10295 (win32_stopped_data_address): New function.
10296 (win32_target_ops): Add entries for insert_watchpoint,
10297 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10298 * win32-low.h (win32_target_ops): New members insert_point,
10299 remove_point, stopped_by_watchpoint, stopped_data_address.
10301 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10303 * server.c (process_serial_event): Re-return unsupported, not
10304 error, if the type isn't recognized. Re-allow supporting only
10305 insert or remove packets. Also call require_running for
10306 breakpoints. Add missing break statement to default case. Tidy.
10307 * target.h (struct target_ops): Rename insert_watchpoint to
10308 insert_point, and remove_watchpoint to remove_point.
10310 * linux-low.h (struct linux_target_ops): Likewise.
10311 * linux-low.c (linux_insert_watchpoint): Rename to ...
10312 (linux_insert_point): ... this. Adjust.
10313 (linux_remove_watchpoint): Rename to ...
10314 (linux_remove_point): ... this. Adjust.
10315 (linux_target_ops): Adjust.
10316 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10317 (cris_insert_point): ... this.
10318 (cris_remove_watchpoint): Rename to ...
10319 (cris_remove_point): ... this.
10320 (the_low_target): Adjust.
10322 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10324 * server.c (handle_v_kill): Pass signal_pid to
10325 kill_inferior if multi_process is zero.
10327 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10329 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10330 * target.h (target_ops): Comment for *_watchpoint to make it clear
10331 the functions can get types '0' and '1'.
10333 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10335 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10336 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10337 * regcache.c (get_regcache): Likewise.
10338 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10339 * win32-low.c (child_fetch_inferior_registers): Remove check for
10342 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10343 Pedro Alves <pedro@codesourcery.com>
10345 * target.h (struct target_ops) <supports_multi_process>: New
10347 (target_supports_multi_process): New.
10348 * server.c (handle_query): Even if GDB reports support, only
10349 enable multi-process if the target also supports it. Report
10350 multi-process support only if the target backend supports it.
10351 * linux-low.c (linux_supports_multi_process): New function.
10352 (linux_target_ops): Install it as target_supports_multi_process
10355 2009-05-24 Doug Evans <dje@google.com>
10357 Global renaming of find_thread_pid to find_thread_ptid.
10358 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10359 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10360 All callers updated.
10362 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10363 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10366 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10367 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10368 (linux_resume_one_lwp): Ditto.
10370 2009-05-23 Doug Evans <dje@google.com>
10372 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10373 from struct inferior_list_entry * to struct lwp_info *.
10374 All callers updated.
10376 2009-05-13 Doug Evans <dje@google.com>
10378 * linux-x86-low.c: Don't include assert.h.
10379 (x86_siginfo_fixup): Use fatal, not assert.
10380 (x86_arch_setup): Fix comment.
10382 2009-05-12 Doug Evans <dje@google.com>
10384 Biarch support for i386/amd64 gdbserver.
10385 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10386 Add linux-x86-low.c.
10387 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10388 (linux-x86-low.o): Add.
10389 * linux-x86-64-low.c: Delete.
10390 * linux-i386-low.c: Delete.
10391 * linux-x86-low.c: New file.
10392 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10394 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10396 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10397 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10398 (linux_child_pid_to_exec_file): New function.
10399 (elf_64_header_p, elf_64_file_p): New functions.
10400 (siginfo_fixup): New function.
10401 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10402 give target a chance to convert layout.
10403 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10404 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10406 2009-05-07 Doug Evans <dje@google.com>
10408 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10409 (regsets_store_inferior_registers): Ditto.
10411 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10415 * linux-low.c (must_set_ptrace_flags): Delete.
10416 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10418 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10419 `lwp->must_set_ptrace_flags' instead.
10420 (linux_wait_for_event_1): Set ptrace options here.
10421 (linux_wait_1): ... not here.
10423 2009-04-30 Doug Evans <dje@google.com>
10425 * inferiors.c (started_inferior_callback): New function.
10426 (attached_inferior_callback): New function.
10427 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10428 * server.c (print_started_pid, print_attached_pid): New functions.
10429 (detach_or_kill_for_exit): New function.
10430 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10431 * server.h (have_started_inferiors_p): Declare.
10432 (have_attached_inferiors_p): Declare.
10434 * inferiors.c (remove_process): Fix memory leak, free process.
10435 * linux-low.c (linux_remove_process): New function.
10436 (linux_kill): Call it instead of remove_process.
10437 (linux_detach, linux_wait_1): Ditto.
10439 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10441 * configure.srv: Add x86 Windows CE target.
10443 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10445 * inferiors.c (get_thread_process): Make global.
10446 * server.h (get_thread_process): Add prototype.
10447 * thread-db.c (find_one_thread): Use get_thread_process
10448 instead of current_process.
10449 (thread_db_get_tls_address): Do not crash if called when
10450 thread layer is not yet initialized.
10452 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10454 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10455 * spu-low.c (current_tid): Rename to ...
10456 (current_ptid): ... this.
10457 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10458 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10459 ptid_get_lwp (current_ptid) instead of current_tid.
10460 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10461 instead of current_tid. Use find_process_pid to verify pid
10462 argument is valid. Pass proper argument to remove_process.
10463 (spu_thread_alive): Compare current_ptid instead of current_tid.
10464 (spu_resume): Likewise.
10466 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10468 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10471 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10473 Implement the multiprocess extensions, and add linux multiprocess
10476 * server.h (ULONGEST): Declare.
10477 (struct ptid, ptid_t): New.
10478 (minus_one_ptid, null_ptid): Declare.
10479 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10480 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10481 (struct inferior_list_entry): Change `id' type from unsigned from
10483 (struct sym_cache, struct breakpoint, struct
10484 process_info_private): Forward declare.
10485 (struct process_info): Declare.
10486 (current_process): Declare.
10487 (all_processes): Declare.
10488 (initialize_inferiors): Declare.
10489 (add_thread): Adjust to use ptid_t.
10490 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10491 (add_process, remove_process, find_thread_pid): Declare.
10492 (find_inferior_id): Adjust to use ptid_t.
10493 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10494 (multi_process): Declare.
10495 (push_event): Adjust to use ptid_t.
10496 (read_ptid, write_ptid): Declare.
10497 (prepare_resume_reply): Adjust to use ptid_t.
10498 (clear_symbol_cache): Declare.
10499 * inferiors.c (all_processes): New.
10500 (null_ptid, minus_one_ptid): New.
10501 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10502 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10503 (add_thread): Change unsigned long to ptid. Remove gdb_id
10505 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10506 (gdb_id_to_thread): Rename to ...
10507 (find_thread_pid): ... this. Change unsigned long to ptid.
10508 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10509 (loaded_dll, pull_pid_from_list): Adjust.
10510 (add_process, remove_process, find_process_pid)
10511 (get_thread_process, current_process, initialize_inferiors): New.
10512 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10513 (struct target_waitstatus) <related_pid>: Ditto.
10514 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10515 return type to int.
10516 (struct target_ops) <join>: Add `pid' argument.
10517 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10518 (struct target_ops) <wait>: Add `ptid' field. Change return type
10520 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10521 (mywait): Add `ptid' argument. Change return type to ptid_t.
10522 (target_pid_to_str): Declare.
10523 * target.c (set_desired_inferior): Adjust to use ptids.
10524 (mywait): Add new `ptid' argument. Adjust.
10525 (target_pid_to_str): New.
10526 * mem-break.h (free_all_breakpoints): Declare.
10527 * mem-break.c (breakpoints): Delelete.
10528 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10529 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10530 to use per-process breakpoint list.
10531 (free_all_breakpoints): New.
10532 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10533 (symbol_cache, all_symbols_looked_up): Delete.
10535 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10537 (prepare_resume_reply): Change ptid argument's type from unsigned
10538 long to ptid_t. Adjust. Implement W;process and X;process.
10539 (free_sym_cache, clear_symbol_cache): New.
10540 (look_up_one_symbol): Adjust to per-process symbol cache. *
10541 * server.c (cont_thread, general_thread, step_thread): Change type
10543 (attached): Delete.
10544 (multi_process): New.
10545 (last_ptid): Change type to ptid_t.
10546 (struct vstop_notif) <ptid>: Change type to ptid_t.
10547 (queue_stop_reply, push_event): Change `ptid' argument's type to
10549 (discard_queued_stop_replies): Add `pid' argument.
10550 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10551 changes. Don't reference the `attached' global.
10552 (attach_inferior): Adjust to mywait interface changes.
10553 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10554 features. Handle and report "multiprocess+". Handle
10556 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10558 (handle_v_kill): New.
10559 (handle_v_stopped): Adjust to use target_pid_to_str.
10560 (handle_v_requests): Allow multiple attaches and runs when
10561 multiprocess extensions are in effect. Handle "vKill".
10562 (myresume): Adjust to use ptids.
10563 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10564 (handle_status): Adjust to discard_queued_stop_replies interface
10566 (first_thread_of, kill_inferior_callback)
10567 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10568 (main): Call initialize_inferiors. Adjust to use ptids, killing
10569 and detaching from all inferiors. Handle multiprocess packet
10571 * linux-low.h: Include gdb_proc_service.h.
10572 (struct process_info_private): New.
10573 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10574 <lwpid_of>: Use ptid_get_lwp.
10575 (get_lwp_thread): Adjust.
10576 (struct lwp_info): Add `dead' member.
10577 (find_lwp_pid): Declare.
10578 * linux-low.c (thread_db_active): Delete.
10579 (new_inferior): Adjust comment.
10580 (inferior_pid): Delete.
10581 (linux_add_process): New.
10582 (handle_extended_wait): Adjust.
10583 (add_lwp): Change unsigned long to ptid.
10584 (linux_create_inferior): Add process to processes table. Adjust
10585 to use ptids. Don't set new_inferior here.
10586 (linux_attach_lwp): Rename to ...
10587 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10588 it. Adjust to use ptids.
10589 (linux_attach_lwp): New.
10590 (linux_attach): Add process to processes table. Don't set
10592 (struct counter): New.
10593 (second_thread_of_pid_p, last_thread_of_process_p): New.
10594 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10595 multiple processes.
10596 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10597 processes. Remove process from process table.
10598 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10599 to multiple processes.
10600 (any_thread_of): New.
10601 (linux_detach): Add `pid' argument, and handle it. Remove process
10602 from processes table.
10603 (linux_join): Add `pid' argument. Handle it.
10604 (linux_thread_alive): Change unsighed long argument to ptid_t.
10605 Consider dead lwps as not being alive.
10606 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10607 threads we're not interested in.
10608 (same_lwp, find_lwp_pid): New.
10609 (linux_wait_for_lwp): Change `pid' argument's type from int to
10611 (linux_wait_for_event): Rename to ...
10612 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10613 from int to ptid_t. Adjust.
10614 (linux_wait_for_event): New.
10615 (linux_wait_1): Add `ptid' argument. Change return type to
10616 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10617 that exit from the process table.
10618 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10620 (mark_lwp_dead): New.
10621 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10622 stopping all threads, mark its main lwp as dead.
10623 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10625 (fetch_register, usr_store_inferior_registers)
10626 (regsets_fetch_inferior_registers)
10627 (regsets_store_inferior_registers, linux_read_memory)
10628 (linux_write_memory): Inline `inferior_pid'.
10629 (linux_look_up_symbols): Adjust to use per-process
10630 `thread_db_active'.
10631 (linux_request_interrupt): Adjust to use ptids.
10632 (linux_read_auxv): Inline `inferior_pid'.
10633 (initialize_low): Don't reference thread_db_active.
10634 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10635 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10636 (ps_getpid): Return the pid of the current inferior.
10637 * thread-db.c (proc_handle, thread_agent): Delete.
10638 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10640 (find_one_thread): Change argument type to ptid_t. Adjust to
10642 (maybe_attach_thread): Adjust to per-process data and ptids.
10643 (thread_db_find_new_threads): Ditto.
10644 (thread_db_init): Ditto.
10645 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10646 processes table. Adjust to use ptids.
10647 (spu_kill, spu_detach): Adjust interface. Remove process from
10649 (spu_join, spu_thread_alive): Adjust interface.
10650 (spu_wait): Adjust interface. Remove process from processes
10651 table. Adjust to use ptids.
10652 * win32-low.c (current_inferior_tid): Delete.
10653 (current_inferior_ptid): New.
10654 (debug_event_ptid): New.
10655 (thread_rec): Take a ptid. Adjust.
10656 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10657 (child_delete_thread): Ditto.
10658 (do_initial_child_stuff): Add `attached' argument. Add process to
10660 (child_fetch_inferior_registers, child_store_inferior_registers):
10662 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10663 (win32_attach): Pass 1 to do_initial_child_stuff.
10664 (win32_kill): Adjust interface. Remove process from processes
10666 (win32_detach): Ditto.
10667 (win32_join): Adjust interface.
10668 (win32_thread_alive): Take a ptid.
10669 (win32_resume): Adjust to use ptids.
10670 (get_child_debug_event): Ditto.
10671 (win32_wait): Adjust interface. Remove exiting process from
10674 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10676 Non-stop mode support.
10678 * server.h (non_stop): Declare.
10679 (gdb_client_data, handler_func): Declare.
10680 (delete_file_handler, add_file_handler, start_event_loop):
10682 (handle_serial_event, handle_target_event, push_event)
10683 (putpkt_notif): Declare.
10684 * target.h (enum resume_kind): New.
10685 (struct thread_resume): Replace `step' field by `kind' field.
10686 (TARGET_WNOHANG): Define.
10687 (struct target_ops) <wait>: Add `options' argument.
10688 <supports_non_stop, async, start_non_stop>: New fields.
10689 (target_supports_non_stop, target_async): New.
10690 (start_non_stop): Declare.
10691 (mywait): Add `options' argument.
10692 * target.c (mywait): Add `options' argument. Print child exit
10693 notifications here.
10694 (start_non_stop): New.
10695 * server.c (non_stop, own_buf, mem_buf): New globals.
10696 (struct vstop_notif): New.
10697 (notif_queue): New global.
10698 (queue_stop_reply, push_event, discard_queued_stop_replies)
10699 (send_next_stop_reply): New.
10700 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10702 (attach_inferior): In non-stop mode, don't wait for the target
10704 (handle_general_set): Handle QNonStop.
10705 (handle_query): When handling qC, return the current general
10706 thread, instead of the first thread of the list.
10707 (handle_query): If the backend supports non-stop mode, include
10708 QNonStop+ in the qSupported query response.
10709 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10711 (handle_v_attach, handle_v_run): Handle non-stop mode.
10712 (handle_v_stopped): New.
10713 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10714 (myresume): Adjust to use resume_kind. Handle non-stop.
10715 (queue_stop_reply_callback): New.
10716 (handle_status): Handle non-stop mode.
10717 (main): Clear non_stop flag on reconnection. Use the event-loop.
10718 Refactor serial protocol handling from here ...
10719 (process_serial_event): ... to this new function. When GDB
10720 selects any thread, select one here. In non-stop mode, wait until
10721 GDB acks all pending events before exiting.
10722 (handle_serial_event, handle_target_event): New.
10723 * remote-utils.c (remote_open): Install remote_desc in the event
10725 (remote_close): Remove remote_desc from the event loop.
10726 (putpkt_binary): Rename to...
10727 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10728 (putpkt_binary): New as wrapper around putpkt_binary_1.
10729 (putpkt_notif): New.
10730 (prepare_resume_reply): In non-stop mode, don't change the
10732 * event-loop.c: New.
10733 * Makefile.in (OBJ): Add event-loop.o.
10734 (event-loop.o): New rule.
10736 * linux-low.h (pid_of): Moved here.
10738 (get_lwp_thread): Use lwpid_of.
10739 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10740 * linux-low.c (pid_of): Delete.
10741 (inferior_pid): Use lwpid_of.
10742 (linux_event_pipe): New.
10743 (target_is_async_p): New.
10745 (handle_extended_wait): Use lwpid_of.
10746 (add_lwp): Don't set lwpid field.
10747 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10748 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10749 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10750 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10751 first. Adjust to linux_wait_for_event interface changes. Use
10753 (linux_detach): Don't delete the main lwp here.
10754 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10755 (status_pending_p): Don't consider explicitly suspended lwps.
10756 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10757 pointer. Add OPTIONS argument. Change return type to int. Use
10758 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10759 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10760 pointer. Add status pointer argument. Return a pid instead of a
10761 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10762 changes. In non-stop mode, don't switch to a random thread.
10763 (linux_wait): Rename to...
10764 (linux_wait_1): ... this. Add target_options argument, and handle
10765 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10766 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10767 clean exit and signal exit code. Don't stop all threads in
10768 non-stop mode. In all-stop mode, only stop all threads when
10769 reporting a stop to GDB. Handle explicit thread stop requests.
10770 (async_file_flush, async_file_mark): New.
10772 (send_sigstop): Use lwpid_of.
10773 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10774 interface changes. In non-stop mode, don't switch to a random
10776 (linux_resume_one_lwp): Use lwpid_of.
10777 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10778 (linux_resume_one_thread): ... this. Handle resume_stop. In
10779 non-stop mode, don't look for pending flag in all threads.
10780 (resume_status_pending_p): Don't consider explicitly suspended
10782 (my_waitpid): Reimplement. Emulate __WALL.
10783 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10785 (sigchld_handler, linux_supports_non_stop, linux_async)
10786 (linux_start_non_stop): New.
10787 (linux_target_ops): Register linux_supports_non_stop, linux_async
10788 and linux_start_non_stop.
10789 (initialize_low): Install SIGCHLD handler.
10790 * thread-db.c (thread_db_create_event, find_one_thread)
10791 (thread_db_get_tls_address): Use lwpid_of.
10792 * win32-low.c (win32_detach): Adjust to use resume_kind.
10793 (win32_wait): Add `options' argument.
10794 * spu-low.c (spu_resume): Adjust to use resume_kind.
10795 (spu_wait): Add `options' argument.
10797 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10799 Decouple target code from remote protocol.
10801 * target.h (enum target_waitkind): New.
10802 (struct target_waitstatus): New.
10803 (struct target_ops) <wait>: Return an unsigned long. Take a
10804 target_waitstatus pointer instead of a char pointer.
10805 (mywait): Likewise.
10806 * target.c (mywait): Change prototype to return an unsigned long.
10807 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10808 * server.h (thread_from_wait, old_thread_from_wait): Delete
10810 (prepare_resume_reply): Change prototype to take a
10812 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10813 (last_status, last_ptid): New.
10814 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10815 pid instead of a signal.
10816 (attach_inferior): Remove "status" and "signal" parameters.
10818 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10820 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10821 (handle_v_requests, myresume): Remove "status" and "signal"
10822 parameters. Adjust.
10823 (handle_status): New.
10824 (main): Delete local `status'. Adjust.
10825 * remote-utils.c: Include target.h.
10826 (prepare_resume_reply): Change prototype to take a
10827 target_waitstatus. Adjust.
10829 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10831 * spu-low.c (spu_wait): Adjust.
10832 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10834 (win32_wait): Adjust.
10836 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10838 * target.h (struct thread_resume): Delete leave_stopped member.
10839 (struct target_ops): Add a `n' argument to the `resume' callback.
10840 * server.c (start_inferior): Adjust.
10841 (handle_v_cont, myresume): Adjust.
10842 * linux-low.c (check_removed_breakpoint): Adjust to resume
10843 interface change, and to removed leave_stopped field.
10844 (resume_ptr): Delete.
10845 (struct thread_resume_array): New.
10846 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10847 resume interface change.
10848 (linux_continue_one_thread, linux_queue_one_thread)
10849 (resume_status_pending_p): Check if the resume field is NULL
10850 instead of checking the leave_stopped member.
10851 (linux_resume): Adjust to the target resume interface change.
10852 * spu-low.c (spu_resume): Adjust to the target resume interface
10854 * win32-low.c (win32_detach, win32_resume): Ditto.
10856 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10858 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10860 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10862 (linux_continue_one_thread): Only preserve the stepping flag if
10863 there's a pending breakpoint.
10865 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10867 * server.c (main): After the inferior having exited, call
10868 remote_close before exiting gdbserver.
10870 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10872 Fix size of FPSCR in Power 7 processors.
10873 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10874 (PPC_FEATURE_HAS_DFP): New #define.
10875 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10878 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10880 * server.c (handle_query) Whitespace and formatting.
10882 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10884 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10885 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10886 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10887 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10888 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10889 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10890 Makefile.in, configure.ac: Fix whitespace throughout.
10891 * configure: Regenerate.
10893 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10895 * inferiors.c (find_inferior): Make it safe for the callback
10896 function to delete the currently iterated inferior.
10898 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10900 * Makefile.in (linuw_low_h): Move higher.
10901 (thread-db.o): Depend on $(linux_low_h).
10903 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10905 Rename "process" to "lwp" throughout.
10907 * linux-low.c (all_processes): Rename to...
10908 (all_lwps): ... this.
10909 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10910 (add_process): Rename to ...
10911 (add_lwp): ... this. Adjust.
10912 (linux_create_inferior): Adjust.
10913 (linux_attach_lwp): Adjust.
10914 (linux_attach): Adjust.
10915 (linux_kill_one_process): Rename to ...
10916 (linux_kill_one_lwp): ... this. Adjust.
10917 (linux_kill): Adjust.
10918 (linux_detach_one_process): Rename to ...
10919 (linux_detach_one_lwp): ... this. Adjust.
10920 (linux_detach): Adjust.
10921 (check_removed_breakpoint): Adjust.
10922 (status_pending_p): Adjust.
10923 (linux_wait_for_process): Rename to ...
10924 (linux_wait_for_lwp): ... this. Adjust.
10925 (linux_wait_for_event): Adjust.
10926 (send_sigstop): Adjust.
10927 (wait_for_sigstop): Adjust.
10928 (stop_all_processes): Rename to ...
10929 (stop_all_lwps): ... this.
10930 (linux_resume_one_process): Rename to ...
10931 (linux_resume_one_lwp): ... this. Adjust.
10932 (linux_set_resume_request, linux_continue_one_thread)
10933 (linux_queue_one_thread, resume_status_pending_p)
10934 (usr_store_inferior_registers, regsets_store_inferior_registers)
10935 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10937 * linux-low.h (get_process): Rename to ...
10938 (get_lwp): ... this. Adjust.
10939 (get_thread_process): Rename to ...
10940 (get_thread_lwp): ... this. Adjust.
10941 (get_process_thread): Rename to ...
10942 (get_lwp_thread): ... this. Adjust.
10943 (struct process_info): Rename to ...
10944 (struct lwp_info): ... this.
10945 (all_processes): Rename to ...
10946 (all_lwps): ... this.
10947 * proc-service.c (ps_lgetregs): Adjust.
10948 * thread-db.c (thread_db_create_event, find_one_thread)
10949 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10951 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10953 * server.c (handle_query): Handle "qAttached".
10955 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10957 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10958 GPLv3, update license URL.
10960 2009-03-01 Doug Evans <dje@google.com>
10962 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10963 (server_h): Add gdb_signals.h.
10964 (signals.o): Update.
10965 * server.h (target_signal_from_host,target_signal_to_host_p)
10966 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10968 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10970 * remote-utils.c (getpkt): Also generate remote-debug
10971 information if noack_mode is set.
10973 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10975 * server.c (handle_query): Report qXfer:siginfo:read and
10976 qXfer:siginfo:write as supported and handle them.
10977 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10978 * linux-low.c (linux_xfer_siginfo): New.
10979 (linux_target_ops): Set it.
10981 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10983 * server.c (gdbserver_usage): Mention --remote-debug.
10984 (main): Accept '--remote-debug' switch.
10986 2009-01-18 Doug Evans <dje@google.com>
10988 * regcache.c (new_register_cache): No need to check result of xcalloc.
10989 * server.c (handle_search_memory): Back out calls to xmalloc,
10990 result is checked and error is returned to user upon failure.
10991 (handle_query): Ditto. Add more checks for result of malloc.
10992 (handle_v_cont): Check result of malloc, report error back to
10994 (handle_v_run): Ditto. Call freeargv.
10995 * server.h (freeargv): Declare.
10996 * utils.c (freeargv): New fn.
10998 2009-01-15 Doug Evans <dje@google.com>
11000 * gdbreplay.c (perror_with_name): Make arg const char *.
11001 * server.h (target_signal_to_name): Make return type const char *.
11002 * thread-db.c (thread_db_err_str): Make return type const char *.
11003 * utils.c (perror_with_name): Make arg const char *.
11005 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11007 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11008 when handling a EXIT_PROCESS_DEBUG_EVENT.
11010 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11012 * gdbreplay.c (gdbreplay_version): Update copyright year.
11013 * server.c (gdbserver_version): Likewise.
11015 2009-01-05 Doug Evans <dje@google.com>
11017 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11018 (handle_extended_wait): Improve comment.
11020 2008-12-13 Doug Evans <dje@google.com>
11022 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11023 * server.h (ATTR_MALLOC): New macro.
11024 (xmalloc,xcalloc,xstrdup): Declare.
11025 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11026 * inferiors.c: Ditto.
11027 * linux-low.c: Ditto.
11028 * mem-break.c: Ditto.
11029 * regcache.c: Ditto.
11030 * remote-utils.c: Ditto.
11033 * win32-low.c: Ditto.
11035 2008-12-12 Doug Evans <dje@google.com>
11037 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11038 in debugging printf.
11040 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11042 2008-12-09 Doug Evans <dje@google.com>
11044 * linux-low.h (struct process_info): Delete member tid, unused.
11045 * thread-db.c (find_one_thread): Update.
11046 (maybe_attach_thread): Update.
11048 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11050 * target.h (struct target_ops): Add qxfer_osdata member.
11051 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11053 (linux_qxfer_osdata): New functions.
11054 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11056 * server.c (handle_query): Handle "qXfer:osdata:read:".
11057 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11058 (buffer_xml_printf): New functions.
11059 * server.h (struct buffer): New.
11060 (buffer_grow_str, buffer_grow_str0): New macros.
11061 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11062 (buffer_xml_printf): Declare.
11064 2008-11-24 Doug Evans <dje@google.com>
11066 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11068 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11070 * server.c (handle_v_run): Always use the supplied argument list.
11072 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11074 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11075 (xtensa_regmap_table): Add entry for scompare1.
11077 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11079 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11080 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11081 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11082 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11083 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11084 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11085 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11086 XML target descriptions.
11087 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11088 when inferior is running on an ISA 2.05 or later processor. Add
11089 special case to return offset for full 64-bit slot of FPSCR when
11092 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11094 * Makefile.in (SFILES, clean): Added sparc64 files.
11095 (reg-sparc64.o, reg-sparc64.c): New.
11096 * configure.srv (sparc*-*-linux*): New configuration.
11097 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11098 syscall arguments for SPARC.
11099 (regsets_store_inferior_registers): Likewise.
11100 * linux-sparc-low.c: New file.
11102 2008-10-21 Doug Evans <dje@google.com>
11104 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11105 (READLINE_DIR,READLINE_DEP): Delete.
11106 (INTERNAL_CFLAGS): Update.
11107 (LINTFLAGS): Update.
11109 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11111 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11112 whole argv from the last run, not just argv[0].
11114 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11116 * regcache.c (new_register_cache): Return NULL if the register
11117 cache size isn't known yet.
11118 (free_register_cache): Avoid dereferencing a NULL regcache.
11120 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11122 * configure.srv: Merge MIPS and MIPS64.
11124 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11126 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11128 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11130 * Makefile.in: Add required vsx dependencies.
11132 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11133 Declare init_registers_powerpc_vsx32l.
11134 Declare init_registers_powerpc_vsx64l.
11135 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11136 (ppc_arch_setup): Check for VSX in hwcap.
11137 (ppc_fill_vsxregset): New function.
11138 (ppc_store_vsxregset): New function.
11139 Add new VSX entry in regset_info target_regsets.
11141 * configure.srv: Add new VSX dependencies.
11143 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11145 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11146 (remote_open): Set or clear transport_is_reliable.
11147 (putpkt_binary): Don't expect acks in noack mode.
11148 (getpkt): Don't send ack/nac in noack mode.
11149 * server.c (handle_general_set): Handle QStartNoAckMode.
11150 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11152 (main): Reset noack_mode on every connection.
11153 * server.h (noack_mode): Declare.
11155 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11157 * Makefile.in (GDBREPLAY_OBS): New variable.
11158 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11160 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11161 Daniel Jacobowitz <dan@codesourcery.com>
11163 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11164 (usr_store_inferior_registers): Likewise.
11165 (regsets_store_inferior_registers): Likewise.
11167 2008-07-31 Rolf Jansen <rj@surtec.com>
11168 Pedro Alves <pedro@codesourcery.com>
11170 * configure.ac: Check for memmem declaration.
11171 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11172 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11173 (disable_packet_qfThreadInfo): Unconditionally compile.
11174 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11175 * configure, config.in: Regenerate.
11177 2008-07-28 Doug Kwan <dougkwan@google.com>
11179 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11180 (linux_write_memory): Remove declaration of errno.
11182 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11184 * linux-low.c (handle_extended_wait): Do not use "status"
11185 variable uninitialized.
11187 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11189 * server.c (handle_v_attach): Inhibit reporting dll changes.
11191 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11193 * remote-utils.c (prepare_resume_reply): If requested, don't
11194 output "thread:TID" in the T stop reply.
11196 * server.c (disable_packet_vCont, disable_packet_Tthread)
11197 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11198 (handle_query): If requested, disable support for qC, qfThreadInfo
11200 (handle_v_requests): If requested, disable support for vCont.
11201 (gdbserver_show_disableable): New.
11202 (main): Handle --disable-packet and --disable-packet=LIST.
11204 * server.h (disable_packet_vCont, disable_packet_Tthread)
11205 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11207 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11209 * server.c (gdbserver_usage): Mention --version.
11211 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11213 * Makefile.in (gdbreplay.o): New rule.
11215 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11217 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11218 message, not gdbserver.
11220 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11221 Nathan Sidwell <nathan@codesourcery.com>
11222 Joseph Myers <joseph@codesourcery.com>
11224 * acinclude.m4: Include ../../config/acx.m4.
11225 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11226 * configure, config.in: Regenerate.
11227 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11228 * server.c (gdbserver_version): Print PKGVERSION.
11229 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11230 (main): Adjust gdbserver_usage calls.
11231 * gdbreplay.c (version, host_name): Add declarations.
11232 (gdbreplay_version, gdbreplay_usage): New.
11233 (main): Accept --version and --help options.
11235 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11237 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11238 (arm_breakpoint_at): Handle Thumb.
11239 (the_low_target): Add comment.
11241 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11243 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11245 2008-05-09 Doug Evans <dje@google.com>
11247 * server.h (decode_search_memory_packet): Declare.
11248 * remote-utils.c (decode_search_memory_packet): New fn.
11249 * server.c (handle_search_memory_1): New fn.
11250 (handle_search_memory): New fn.
11251 (handle_query): Process qSearch:memory packets.
11253 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11255 * regcache.c (registers_length): Remove.
11256 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11257 full register packet.
11258 * regcache.h (registers_length): Remove prototype.
11259 * server.h (PBUFSIZ): Define to 16384.
11261 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11263 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11264 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11265 powerpc-64l.o, and powerpc-altivec64l.o.
11266 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11267 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11268 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11269 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11270 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11273 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11274 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11275 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11276 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11277 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11278 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11279 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11280 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11281 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11282 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11285 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11286 (init_registers_powerpc_32l): ... this new prototype.
11287 (init_registers_powerpc_32): Remove, replace by ...
11288 (init_registers_powerpc_altivec32l): ... this new prototype.
11289 (init_registers_powerpc_e500): Remove, replace by ...
11290 (init_registers_powerpc_e500l): ... this new prototype.
11291 (init_registers_ppc64): Remove, replace by ...
11292 (init_registers_powerpc_64l): ... this new prototype.
11293 (init_registers_powerpc_64): Remove, replace by ...
11294 (init_registers_powerpc_altivec64l): ... this new prototype.
11295 (ppc_num_regs): Set to 73.
11296 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11297 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11298 (ppc_cannot_store_register): Handle orig_r3 and trap.
11299 (ppc_arch_setup): Update init_registers_... calls.
11300 (ppc_fill_gregset): Handle orig_r3 and trap.
11302 * inferiors.c (clear_inferiors): Reset current_inferior.
11304 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11306 * acinclude.m4: Add override.m4.
11307 * configure: Regenerate.
11309 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11311 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11312 initial call to init_register_ppc64.
11314 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11316 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11317 single powerpc*-*-linux* case.
11318 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11320 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11322 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11323 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11325 * linux-ppc-low.c: Include <elf.h>.
11326 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11327 (ppc_hwcap): New global variable.
11328 (ppc_regmap): Remove __SPE__ #ifdef sections.
11329 (ppc_regmap_e500): New global variable.
11330 (ppc_cannot_store_register): Update __SPE__ special case.
11331 (ppc_get_hwcap): New function.
11332 (ppc_arch_setup): Use it to determine whether inferior supports
11333 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11334 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11335 Do not access registers if target does not support AltiVec.
11336 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11337 Do not access registers if target does not support SPE.
11338 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11340 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11342 * linux-low.c (disabled_regsets, num_regsets): New.
11343 (use_regsets_p): Delete.
11344 (linux_wait_for_process): Clear disabled_regsets.
11345 (regsets_fetch_inferior_registers): Check and set it.
11346 (regsets_store_inferior_registers): Likewise.
11347 (linux_fetch_registers, linux_store_registers): Do not use
11349 (initialize_low): Allocate disabled_regsets.
11351 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11353 * Makefile.in (LIBOBJS): New.
11354 (OBS): Use LIBOBJS.
11355 (memmem.o): New rule.
11356 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11357 * configure: Regenerated.
11359 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11361 * server.c (handle_query): Never return "unsupported" for
11362 qXfer:features:read queries.
11364 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11366 * server.c (get_features_xml): Fix inverted condition.
11367 (handle_query): Always support qXfer:feature:read.
11369 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11371 * server.c (wrapper_argv): New.
11372 (start_inferior): Handle wrapper_argv. If set, expect an extra
11374 (gdbserver_usage): Document --wrapper.
11375 (main): Parse --wrapper.
11377 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11379 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11380 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11381 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11382 (ppc_set_pc): Likewise.
11383 (ppc_arch_setup): New function.
11384 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11385 of collect_register.
11386 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11388 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11390 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11391 instead of linux-ppc64-low.o.
11392 * linux-ppc64-low.c: Remove file.
11393 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11394 (linux-ppc64-low.o): Remove rule.
11396 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11397 (init_registers_powerpc_64): Likewise.
11398 (ppc_regmap): Conditionally define depending on __powerpc64__.
11399 (ppc_cannot_store_register): Do not special-case "fpscr" when
11400 compiled on __powerpc64__.
11401 (ppc_collect_ptrace_register): New function.
11402 (ppc_supply_ptrace_register): New function.
11403 (ppc_breakpoint): Change type to "unsigned int".
11404 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11405 (the_low_target): Conditionally provide initializers for the
11406 arch_setup member depending on __powerpc64__. Install
11407 collect_ptrace_register and supply_ptrace_register members.
11409 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11411 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11412 * server.c (gdbserver_xmltarget): Define.
11413 (get_features_xml): Use it to replace "target.xml" and arch_string.
11415 * configure.srv: Remove srv_xmltarget. Add XML files that were
11416 mentioned there to srv_xmlfiles instead. Remove conditional tests
11417 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11418 srv_xmlfiles and srv_regobj to include all possible choices.
11419 * configure.ac (srv_xmltarget): Remove.
11420 (srv_xmlfiles): Do not add "target.xml".
11421 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11422 checks for supplementary target information.
11423 * configure: Regenerate.
11424 * Makefile.in (XML_TARGET): Remove.
11425 (target.xml): Remove rule.
11426 (clean): Do not clean up target.xml.
11427 (.PRECIOUS): Do not mention target.xml.
11429 * target.h (struct target_ops): Remove arch_string member.
11430 * linux-low.c (linux_arch_string): Remove.
11431 (linux_target_ops): Remove arch_string initializer.
11432 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11433 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11434 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11435 * spu-low.c (spu_arch_string): Remove.
11436 (spu_target_ops): Remove arch_string initializer.
11437 * win32-low.c (win32_arch_string): Remove.
11438 (win32_target_ops): Remove arch_string initializer.
11439 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11440 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11441 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11443 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11445 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11446 by collect_ptrace_register and supply_ptrace_register hooks.
11447 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11448 instead of checking for the_low_target.left_pad_xfer.
11449 (usr_store_inferior_registers): Use collect_ptrace_register callback
11450 instead of checking for the_low_target.left_pad_xfer.
11452 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11453 (s390_supply_ptrace_register): Likewise.
11454 (s390_fill_gregset): Call s390_collect_ptrace_register.
11455 (the_low_target): Update.
11457 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11458 (ppc_supply_ptrace_register): Likewise.
11459 (the_low_target): Update.
11461 * linux-i386-low.c (the_low_target): Update.
11462 * linux-x86-64-low.c (the_low_target): Update.
11464 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11466 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11467 reg-s390.o and reg-s390x.o.
11469 * linux-low.c (new_inferior): New global variable.
11470 (linux_create_inferior, linux_attach): Set it.
11471 (linux_wait_for_process): Call the_low_target.arch_setup after the
11472 target has stopped for the first time.
11473 (initialize_low): Do not call the_low_target.arch_setup.
11475 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11476 (s390_set_pc): Likewise.
11477 (s390_arch_setup): New function.
11478 (the_low_target): Use s390_arch_setup as arch_setup routine.
11480 * regcache.c (realloc_register_cache): New function.
11481 (set_register_cache): Call it for each existing regcache.
11483 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11485 * server.h (init_registers): Remove prototype.
11487 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11488 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11489 instead of init_registers ().
11490 * linux-arm-low.c (init_registers_arm): Add prototype.
11491 (init_registers_arm_with_iwmmxt): Likewise.
11492 (the_low_target): Add initializer for arch_setup field.
11493 * linux-cris-low.c (init_registers_cris): Add prototype.
11494 (the_low_target): Add initializer for arch_setup field.
11495 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11496 (the_low_target): Add initializer for arch_setup field.
11497 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11498 (the_low_target): Add initializer for arch_setup field.
11499 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11500 (the_low_target): Add initializer for arch_setup field.
11501 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11502 (the_low_target): Add initializer for arch_setup field.
11503 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11504 (the_low_target): Add initializer for arch_setup field.
11505 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11506 (init_registers_mips64_linux): Likewise.
11507 (the_low_target): Add initializer for arch_setup field.
11508 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11509 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11510 (the_low_target): Add initializer for arch_setup field.
11511 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11512 (init_registers_powerpc_64): Likewise.
11513 (the_low_target): Add initializer for arch_setup field.
11514 * linux-s390-low.c (init_registers_s390): Add prototype.
11515 (init_registers_s390x): Likewise.
11516 (the_low_target): Add initializer for arch_setup field.
11517 * linux-sh-low.c (init_registers_sh): Add prototype.
11518 (the_low_target): Add initializer for arch_setup field.
11519 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11520 (the_low_target): Add initializer for arch_setup field.
11521 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11522 (the_low_target): Add initializer for arch_setup field.
11524 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11525 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11526 instead of init_registers ().
11527 * win32-arm-low.c (init_registers_arm): Add prototype.
11528 (the_low_target): Add initializer for arch_setup field.
11529 * win32-i386-low.c (init_registers_i386): Add prototype.
11530 (the_low_target): Add initializer for arch_setup field.
11532 * spu-low.c (init_registers_spu): Add prototype.
11533 (initialize_low): Call initialie_registers_spu () instead of
11534 initialize_registers ().
11536 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11538 * server.c (handle_v_requests): When handling the vRun and vAttach
11539 packets, if already debugging a process, don't kill it. Return an
11542 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11544 * server.c (handle_query): Correct length check.
11546 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11548 * win32-low.c (do_initial_child_stuff): Add process handle
11549 parameter. Set current_process_handle and current_process_id from the
11550 parameters. Clear globals.
11551 (win32_create_inferior): Don't set current_process_handle and
11552 current_process_id here. Instead pass them on the call to
11553 do_initial_child_stuff.
11554 (win32_attach): Likewise.
11555 (win32_clear_inferiors): New.
11556 (win32_kill): Don't close the current process handle or the
11557 current thread handle here. Instead call win32_clear_inferiors.
11558 (win32_detach): Don't open a new handle to the process. Call
11559 win32_clear_inferiors.
11560 (win32_join): Don't rely on current_process_handle; open a new
11561 handle using the process id.
11562 (win32_wait): Call win32_clear_inferiors when the inferior process
11565 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11567 * server.c (monitor_show_help): Add "exit".
11569 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11571 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11572 (clean): Add reg-xtensa.c.
11573 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11574 * configure.srv (xtensa*-*-linux*) New target.
11575 * linux-xtensa-low.c: New.
11576 * xtensa-xtregs.c: New.
11578 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11580 * hostio.c: Don't include errno.h.
11581 (errno_to_fileio_errno): Move to hostio-errno.
11582 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11583 error number outputting to the target->hostio_last_error callback.
11584 (hostio_packet_error): Use FILEIO_EINVAL directly.
11585 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11586 calls to hostio_error.
11587 * hostio-errno.c: New.
11588 * server.h (hostio_last_error_from_errno): Declare.
11589 * target.h (target_ops): Add hostio_last_error member.
11590 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11591 as hostio_last_error handler.
11592 * spu-low.c (spu_target_ops): Likewise.
11593 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11594 (wince_hostio_last_error): New functions.
11595 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11596 as hostio_last_error handler.
11597 (win32_target_ops) [!_WIN32_WCE]: Register
11598 hostio_last_error_from_errno as hostio_last_error handler.
11599 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11600 (hostio-errno.o): New rule.
11601 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11602 * configure.srv (srv_hostio_err_objs): New variable. Default to
11604 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11605 * configure: Regenerate.
11607 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11609 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11610 (linux_kill, linux_detach): Clean up the process list.
11611 * remote-utils.c (remote_open): Improve port number parsing.
11612 (putpkt_binary, input_interrupt): Only send interrupts if the target
11614 * server.c (extended_protocol): Make static.
11615 (attached): Define earlier.
11616 (exit_requested, response_needed, program_argv): New variables.
11617 (target_running): New.
11618 (start_inferior): Clear attached here.
11619 (attach_inferior): Set attached here.
11620 (require_running): Define.
11621 (handle_query): Use require_running and target_running. Implement
11623 (handle_v_attach, handle_v_run): New.
11624 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11625 (gdbserver_usage): Update.
11626 (main): Redo argument parsing. Handle --debug and --multi. Handle
11627 --attach along with other options or after the port. Save
11628 program_argv. Support no initial program. Resynchronize
11629 communication with GDB after an error. Handle "monitor exit".
11630 Use require_running and target_running. Always allow the extended
11631 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11632 restart in extended mode.
11633 * README: Refer to the GDB manual. Update --attach usage.
11635 2007-12-20 Andreas Schwab <schwab@suse.de>
11637 * linux-low.c (STACK_SIZE): Define.
11638 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11639 (linux_test_for_tracefork): Likewise.
11641 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11643 * linux-low.c (linux_wait_for_event): Update messages. Do not
11644 reinsert auto-delete breakpoints.
11645 * mem-break.c (struct breakpoint): Change return type of handler to
11647 (set_breakpoint_at): Update handler type.
11648 (reinsert_breakpoint_handler): Return 1 instead of calling
11650 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11652 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11653 * mem-break.h (set_breakpoint_at): Update handler type.
11654 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11655 * win32-low.c (auto_delete_breakpoint): New.
11656 (get_child_debug_event): Use it.
11658 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11660 * configure.ac: Check for pread and pwrite.
11661 * hostio.c (handle_pread): Fall back to lseek and read.
11662 (handle_pwrite): Fall back to lseek and write.
11663 * config.in, configure: Regenerated.
11665 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11667 * server.c (myresume): Add own_buf argument.
11668 (main): Update calls.
11670 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11672 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11673 * remote-utils.c (remote_open): Do not call disable_async_io.
11674 (block_async_io): Delete.
11675 (unblock_async_io): Make static.
11676 (initialize_async_io): New.
11677 * server.c (handle_v_cont): Handle async I/O here.
11678 (myresume): Likewise. Move other common resume tasks here...
11679 (main): ... from here. Call initialize_async_io. Disable async
11680 I/O before the main loop.
11681 * server.h (initialize_async_io): Declare.
11682 (block_async_io, unblock_async_io): Delete prototypes.
11683 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11685 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11687 * remote-utils.c (readchar): Allow binary data in received messages.
11689 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11691 * win32-low.c (attaching): New global.
11692 (win32_create_inferior): Clear the `attaching' global.
11693 (win32_attach): Set the `attaching' global.
11694 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11695 attaching. Only set a breakpoint at the entry point if not
11698 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11700 * server.c (main): Don't report dll events on the initial
11701 connection on attaches.
11703 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11705 * server.c (main): Relax numerical bases supported for the pid of
11706 the --attach command line argument.
11708 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11710 * win32-low.c (win32_attach): Call OpenProcess before
11711 DebugActiveProcess, not after. Add last error output to error
11714 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11716 * win32-low.c (win32_get_thread_context)
11717 (win32_set_thread_context): New functions.
11718 (thread_rec): Use win32_get_thread_context.
11719 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11720 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11723 2007-12-03 Leo Zayas
11724 Pedro Alves <pedro_alves@portugalmail.pt>
11726 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11728 (child_add_thread): Minor cleanup.
11729 (child_continue): Resume artificially suspended threads before
11730 calling ContinueDebugEvent.
11731 (suspend_one_thread): New.
11732 (fake_breakpoint_event): New.
11733 (get_child_debug_event): Change return type to int. Check here if
11734 gdb sent an interrupt request. If a soft interrupt was requested,
11735 fake a breakpoint event. Return 0 if there is no event to handle,
11737 (win32_wait): Don't check here if gdb sent an interrupt request.
11738 Ensure there is a valid event to handle.
11739 (win32_request_interrupt): Add soft interruption method as last
11742 2007-12-03 Leo Zayas
11743 Pedro Alves <pedro_alves@portugalmail.pt>
11745 * win32-low.h (win32_thread_info): Add descriptions to the
11746 structure members. Replace `suspend_count' counter by a
11748 * win32-low.c (thread_rec): Update condition of when to get the
11749 context from the inferior. Rely on ContextFlags being set if it
11750 has already been retrieved. Only suspend the inferior thread if
11751 we haven't already. Warn if that fails.
11752 (continue_one_thread): s/suspend_count/suspended/. Only call
11753 ResumeThread once. Warn if that fails.
11755 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11757 * win32-low.c (win32_wait): Don't read from the inferior when it
11758 has already exited.
11760 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11762 * Makefile.in (win32_low_h): New variable.
11763 (win32-low.o): Add dependency on $(win32_low_h).
11764 (win32-arm-low.o, win32-i386-low.o): New rules.
11766 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11768 * hostio.c: Correct copyright year.
11770 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11772 * Makefile.in (OBS): Add hostio.o.
11773 (hostio.o): New rule.
11774 * server.h (handle_vFile): Declare.
11775 * hostio.c: New file.
11776 * server.c (handle_v_requests): Take packet_len and new_packet_len
11777 for binary packets. Call handle_vFile.
11778 (main): Update call to handle_v_requests.
11780 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11782 * linux-low.c: Include <sched.h>.
11784 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11786 * linux-low.c (linux_tracefork_grandchild): New.
11787 (linux_tracefork_child): Use clone.
11788 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11790 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11792 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11794 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11796 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11798 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11800 * inferiors.c (change_inferior_id): Delete.
11801 (add_pid_to_list, pull_pid_from_list): New.
11802 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11803 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11804 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11805 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11806 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11807 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11808 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11809 (using_threads): Always set to 1.
11810 (handle_extended_wait): New.
11811 (add_process): Do not set TID.
11812 (linux_create_inferior): Set must_set_ptrace_flags.
11813 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11814 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11815 (linux_thread_alive): Rename TID argument to LWPID.
11816 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11817 (linux_wait_for_event): Do not use TID or check using_threads. Update
11818 call to dead_thread_notify. Call handle_extended_wait.
11819 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11820 (send_sigstop): Delete sigstop_sent.
11821 (wait_for_sigstop): Avoid TID.
11822 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11823 (linux_test_for_tracefork): New.
11824 (linux_lookup_signals): Use thread_db_active and
11825 linux_supports_tracefork_flag.
11826 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11827 * linux-low.h (get_process_thread): Avoid TID.
11828 (struct process_ifo): Move thread_known and tid to the end. Remove
11830 (linux_attach_lwp, thread_db_init): Update prototypes.
11831 * server.h (change_inferior_id): Delete prototype.
11832 (add_pid_to_list, pull_pid_from_list): New prototypes.
11833 * thread-db.c (thread_db_use_events): New.
11834 (find_first_thread): Rename to...
11835 (find_one_thread): ...this. Update callers and messages. Do not
11836 call fatal. Check thread_db_use_events. Do not call
11837 change_inferior_id or new_thread_notify.
11838 (maybe_attach_thread): Update. Do not call new_thread_notify.
11839 (thread_db_init): Set thread_db_use_events. Check use_events.
11840 * utils.c (fatal, warning): Correct message prefix.
11842 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11844 * Makefile.in (clean): Remove new files.
11845 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11846 (powerpc-64.o, powerpc-64.c): New rules.
11847 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11848 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11850 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11852 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11853 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11854 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11855 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11856 (target_regsets): Add AltiVec and SPE register sets.
11857 * configure.ac: Check for AltiVec and SPE.
11858 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11859 (ppc_fill_vrregset, ppc_store_vrregset): New.
11860 (target_regsets): Add AltiVec register set.
11861 * configure: Regenerated.
11863 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11865 * linux-low.c (O_LARGEFILE): Define.
11866 (linux_read_memory): Use /proc/PID/mem.
11867 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11868 * configure, config.in: Regenerated.
11870 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11872 * linux-low.c (linux_wait_for_event): Do not pass signals while
11875 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11877 * win32-low.c (create_process): New.
11878 (win32_create_inferior): Use create_process instead of
11879 CreateProcess. If create_process failed retry appending an ".exe"
11880 suffix. Store the GetLastError result immediatelly after
11881 create_process calls and use it on the call to error.
11883 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11885 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11887 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11889 * configure.ac: Switch license to GPLv3.
11891 2007-08-01 Michael Snyder <msnyder@access-company.com>
11893 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11895 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11897 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11899 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11900 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11901 CloseToolhelp32Snapshot.
11902 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11903 CloseToolhelp32Snapshot.
11905 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11907 * server.c (main): Check for inferior exit before main loop.
11909 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11911 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11912 instead of on tmp_desc.
11914 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11915 Daniel Jacobowitz <dan@codesourcery.com>
11917 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11918 (add_thread): Minor cleanups.
11919 (clear_inferiors): Move lower in the file. Clear the DLL
11921 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11922 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11923 (xml_escape_text): New.
11924 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11926 (handle_v_cont): Report errors.
11927 (gdbserver_version): Update.
11928 (main): Correct size of own_buf. Do not report initial DLL events.
11929 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11930 (unloaded_dll, xml_escape_text): New.
11931 * win32-low.c (enum target_waitkind): Update comments.
11932 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11933 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11934 (win32_EnumProcessModules, win32_GetModuleInformation)
11935 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11936 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11937 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11938 (win32_Module32First, win32_Module32Next, load_toolhelp)
11939 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11940 (get_child_debug_event): Handle DLL events.
11941 (win32_wait): Likewise.
11943 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11945 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11946 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11948 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11950 * win32-low.c (handle_output_debug_string): Ignore event if not
11953 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11955 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11957 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11959 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11961 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11963 * inferiors.c (change_inferior_id): Add comment.
11964 * linux-low.c (check_removed_breakpoint): Add an early
11965 prototype. Improve debug output.
11966 (linux_attach): Doc update.
11967 (linux_detach_one_process, linux_detach): Clean up before releasing
11969 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11970 * linux-low.h (struct process_info): Doc improvement.
11971 * mem-break.c (delete_all_breakpoints): New.
11972 * mem-break.h (delete_all_breakpoints): New prototype.
11973 * thread-db.c (find_first_thread): New.
11974 (thread_db_create_event): Call it instead of
11975 thread_db_find_new_threads. Clean up unused variables.
11976 (maybe_attach_thread): Remove first thread handling.
11977 (thread_db_find_new_threads): Use find_first_thread.
11978 (thread_db_get_tls_address): Likewise.
11980 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11982 * thread-db.c (thread_db_find_new_threads): Add prototype.
11983 (thread_db_create_event): Check for the main thread before adding
11985 (maybe_attach_thread): Only enable event reporting if TID == 0.
11986 (thread_db_get_tls_address): Check for new threads.
11988 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11990 * linux-low.c (linux_create_inferior): Try execv before execvp.
11991 * spu-low.c (spu_create_inferior): Likewise.
11993 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11995 * linux-low.c (linux_create_inferior): Change execv to execvp.
11996 * spu-low.c (spu_create_inferior): Likewies.
11998 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12000 * Makefile.in (clean): Clean new files instead of deleted ones.
12001 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12002 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12004 * configure.srv: Specify XML files and new regformats for MIPS and
12006 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12007 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12008 an entry for the restart register.
12009 (mips_cannot_fetch_register, mips_cannot_store_register)
12010 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12011 register names to match the XML descriptions.
12012 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12013 restart register instead of $0.
12015 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12016 Markus Deuling <deuling@de.ibm.com>
12018 * remote-utils.c (decode_xfer_write): New function.
12019 * server.h (decode_xfer_write): Add prototype.
12020 * server.c (handle_query): Add PACKET_LEN argument. Support
12021 qXfer:spu:read and qXfer:spu:write packets.
12022 (main): Pass packet_len to handle_query.
12023 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12024 * target.h (target_ops): Add qxfer_spu.
12026 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12028 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12029 accessing non-seekable spufs files.
12031 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12033 * server.c (handle_query): Add reply for qC packet.
12035 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12036 Leo Zayas <lerele@champenstudios@com>
12038 * server.h (check_remote_input_interrupt_request): New function.
12039 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12040 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12041 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12042 (check_remote_input_interrupt_request): New function.
12043 * server.h (check_remote_input_interrupt_request): Declare.
12044 * win32-low.c (winapi_DebugBreakProcess,
12045 winapi_GenerateConsoleCtrlEvent): New typedefs.
12046 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12048 (win32_wait): Check for remote interrupt request
12049 with check_remote_input_interrupt_request.
12050 (win32_request_interrupt): New function.
12051 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12053 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12055 * win32-low.c (debug_registers_changed,
12056 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12057 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12058 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12059 (thread_rec): Get context using the low target.
12060 (child_add_thread): Call thread_added on the low target,
12061 which does the same thing.
12063 (do_initial_child_stuff): Remove debug registers references.
12064 Set context using the low target. Resume threads after
12065 setting the contexts.
12066 (child_continue): Remove dead variable. Remove debug
12067 registers references.
12068 (child_fetch_inferior_registers): Go through the low target.
12069 (do_child_store_inferior_registers): Remove.
12070 (child_store_inferior_registers): Go through the low target.
12071 (win32_resume): Remove debug registers references.
12072 Set context using the low target.
12073 (handle_exception): Change return type to void. Don't record
12074 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12075 first chance exception.
12076 (get_child_debug_event): Change return type to void. Remove
12077 goto loop. Always return after waiting for debug event.
12078 (win32_wait): Convert to switch statement. Handle spurious
12081 * win32-i386-low.c (debug_registers_changed,
12082 debug_registers_used): New.
12083 (initial_stuff): Rename to ...
12084 (i386_initial_stuff): ... this. Clear debug registers
12086 (store_debug_registers): Delete.
12087 (i386_get_thread_context): New.
12088 (load_debug_registers): Delete.
12089 (i386_set_thread_context): New.
12090 (i386_thread_added): New.
12091 (single_step): Rename to ...
12092 (i386_single_step): ... this.
12093 (do_fetch_inferior_registers): Rename to ...
12094 (i386_fetch_inferior_register): ... this.
12095 (i386_store_inferior_register): New.
12096 (the_low_target): Adapt to new interface.
12098 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12099 (arm_get_thread_context): New.
12100 (arm_set_thread_context): New.
12102 (do_fetch_inferior_registers): Rename to ...
12103 (arm_fetch_inferior_register): ... this.
12104 (arm_store_inferior_register): New.
12105 (arm_wince_breakpoint): Reimplement as unsigned long.
12106 (arm_wince_breakpoint_len): Define.
12107 (the_low_target): Adapt to new interface.
12109 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12110 load_debug_registers. Add get_thread_context, set_thread_context,
12111 thread_added and store_inferior_register. Rename
12112 fetch_inferior_registers to fetch_inferior_register.
12113 (regptr): Remove declaration.
12115 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12117 * linux-low.c (linux_detach): Change return type to int. Return 0.
12118 * spu-low.c (spu_detach): Likewise.
12120 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12122 * target.h (target_ops): Change return type of detach to int.
12124 (join_inferior): New.
12125 * server.c (main): Don't skip detach support on mingw32.
12126 If the inferior doesn't support detaching return error.
12127 Call join_inferior instead of using waitpid.
12128 * linux-low.c (linux_join): New.
12129 (linux_target_op): Add linux_join.
12130 * spu-low.c (spu_join): New.
12131 (spu_target_ops): Add spu_join.
12132 * win32-low.c (win32_detach): Adapt to new interface.
12133 Reopen current_process_handle before detaching. Issue a child
12134 resume before detaching.
12136 (win32_target_op): Add win32_join.
12138 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12140 * win32-low.c (win32-attach): Fix return value.
12141 * target.h (target_ops): Describe ATTACH return values.
12143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12145 * win32-low.c (GETPROCADDRESS): Define.
12146 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12147 (winapi_DebugSetProcessKillOnExit): Likewise.
12148 (win32_create_inferior): Force usage of ansi CreateProcessA.
12149 (win32_attach): Use GETPROCADDRESS.
12150 (win32_detach): Likewise.
12152 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12154 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12156 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12158 * win32-low.c: Commit leftover changes from 2007-03-29.
12160 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12162 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12163 fields short instead of int. Add explicit padding.
12164 (i387_cache_to_fsave): Remove unnecessary casts.
12165 (i387_fsave_to_cache): Doc fix.
12166 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12168 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12170 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12171 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12173 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12175 * configure.srv (arm*-*-mingw32ce*): Move near the other
12178 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12180 * configure.ac: Add errno checking.
12181 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12182 sys/file.h and malloc.h.
12183 (AC_CHECK_DECLS): Add perror.
12184 (srv_mingwce): Handle.
12185 * configure.srv (i[34567]86-*-cygwin*): Add
12186 win32-i386-low.o to srv_tgtobj.
12187 (i[34567]86-*-mingw*): Likewise.
12188 (arm*-*-mingw32ce*): Add case.
12189 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12190 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12191 [__MINGW32CE__] (strerror): New function.
12192 [__MINGW32CE__] (errno): Define to GetLastError.
12193 [__MINGW32CE__] (COUNTOF): New macro.
12194 (remote_open): Remove extra close call.
12195 * mem-break.c (delete_breakpoint_at): New function.
12196 * mem-break.h (delete_breakpoint_at): Declare.
12197 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12198 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12199 [USE_WIN32API] (read, write): Add char* casts.
12200 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12201 * server.h: Include wincecompat.h on Windows CE.
12202 [HAVE_ERRNO_H]: Check.
12203 (perror): Declare if not declared.
12204 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12205 (perror_with_name): Remove errno declaration.
12206 * wincecompat.h: New.
12207 * wincecompat.c: New.
12208 * win32-low.h: New.
12209 * win32-arm-low.c: New.
12210 * win32-i386-low.c: New.
12211 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12212 (OUTMSG2): Make it safe.
12214 (COUNTOF): New macro.
12215 (NUM_REGS): Get it from the low target.
12216 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12217 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12218 (thread_rec): Let low target handle debug registers.
12219 (child_add_thread): Likewise.
12220 (child_init_thread_list): Likewise.
12221 (continue_one_thread): Likewise.
12223 (do_child_fetch_inferior_registers): Move to ...
12224 * win32-i386-low.c: ... here, and rename to ...
12225 (do_fetch_inferior_registers): ... this.
12226 * win32-low.c (child_fetch_inferior_registers):
12227 Go through the low target.
12228 (do_child_store_inferior_registers): Use regptr.
12229 (strwinerror): New function.
12230 (win32_create_inferior): Handle Windows CE.
12231 Use strwinerror instead of strerror on Windows error
12232 codes. Add program to the error output.
12233 Don't close the main thread handle on Windows CE.
12234 (win32_attach): Use coredll.dll on Windows CE.
12235 (win32_kill): Close current process and current
12237 (win32_detach): Use coredll.dll on Windows CE.
12238 (win32_resume): Let low target handle debug registers, and
12240 (handle_exception): Add/Remove initial breakpoint. Avoid
12241 non-existant WSTOPSIG on Windows CE.
12242 (win32_read_inferior_memory): Cast to remove warning.
12243 (win32_arch_string): Go through the low target.
12244 (initialize_low): Call set_breakpoint_data with the low
12245 target's breakpoint.
12246 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12247 FOP_REGNUM, mappings): Move to ...
12248 * win32-i386-low.c: ... here.
12249 * win32-low.c (win32_thread_info): Move to ...
12250 * win32-low.h: ... here.
12251 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12252 win32-arm-low.c and wincecompat.c.
12253 (all:): Add $EXEEXT.
12254 (install-only:): Likewise.
12255 (gdbserver:): Likewise.
12256 (gdbreplay:): Likewise.
12257 * config.in: Regenerate.
12258 * configure: Regenerate.
12260 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12262 * win32-low.c: Rename typedef thread_info to
12263 win32_thread_info throughout.
12265 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12267 * win32-i386-low.c: Rename to ...
12268 * win32-low.c: ... this.
12269 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12270 * Makefile.in: Likewise.
12272 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12274 * remote-utils.c (monitor_output): Constify msg parameter.
12275 * server.h (monitor_output): Likewise.
12276 * win32-i386-low.c (handle_output_debug_string): New.
12277 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12278 handle_output_debug_string.
12279 (get_child_debug_event): Likewise.
12281 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12283 * server.c (main): Correct strtoul check.
12285 2007-03-27 Jon Ringle <jon@ringle.org>
12287 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12289 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12291 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12293 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12295 * terminal.h: Check HAVE_SGTTY_H.
12297 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12299 * remote-utils.c (remote_open): Print out the assigned port number.
12301 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12303 * remote-utils.c (monitor_output): New function.
12304 * server.c (debug_threads): Define here.
12305 (monitor_show_help): New function.
12306 (handle_query): Handle qRcmd.
12307 (main): Do not handle 'd' packet.
12308 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12309 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12312 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12314 * Makefile.in (EXEEXT): New.
12315 (clean): Use $(EXEEXT).
12317 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12319 * target.h (target_ops): Rename send_signal to request_interrupt,
12320 and remove enum target_signal parameter.
12321 * linux-low.c (linux_request_interrupt): Rename from
12322 linux_send_signal, and always send SIGINT.
12323 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12324 and always send SIGINT.
12325 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12327 (input_interrupt): Likewise.
12329 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12331 * server.c (get_features_xml): Check if target implemented
12333 * win32-i386-low.c (win32_arch_string): New.
12334 (win32_target_ops): Add win32_arch_string as arch_string member.
12336 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12338 * spu-low.c (spu_arch_string): New.
12339 (spu_target_ops): Add spu_arch_string.
12341 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12343 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12344 * configure.ac: Do not check for terminal.h.
12345 * configure, config.in: Regenerated.
12347 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12349 * Makefile.in (OBS): Add $(XML_BUILTIN).
12350 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12352 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12353 (arm-with-iwmmxt.c): New.
12354 * config.in, configure: Regenerate.
12355 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12356 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12357 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12358 (arm*-*-linux*): Add iWMMXt and regset support.
12359 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12360 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12361 (arm_store_wmmxregset, target_regsets): New.
12362 * server.c (get_features_xml): Take annex argument. Check builtin
12364 (handle_query): Handle multiple annexes.
12366 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12368 * remote-utils.c [USE_WIN32API] (read, write): Define.
12369 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12372 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12374 * linux-i386-low.c (the_low_target): Set arch_string.
12375 * linux-x86-64-low.c (the_low_target): Likewise.
12376 * linux-low.c (linux_arch_string): New.
12377 (linux_target_ops): Add it.
12378 * linux-low.h (struct linux_target_ops): Add arch_string.
12379 * server.c (write_qxfer_response): Use const void * for DATA.
12380 (get_features_xml): New.
12381 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12382 * target.h (struct target_ops): Add arch_string method.
12384 2007-01-03 Denis Pilat <denis.pilat@st.com>
12385 Daniel Jacobowitz <dan@codesourcery.com>
12387 * linux-low.c (linux_kill): Handle being called with no threads.
12388 * win32-i386-low.c (win32_kill): Likewise.
12389 (get_child_debug_event): Clear current_process_handle.
12391 2006-12-30 Denis PILAT <denis.pilat@st.com>
12392 Daniel Jacobowitz <dan@codesourcery.com>
12394 * remote-utils.c (remote_open): Check the type of specified
12395 serial port devices before opening them.
12396 * server.c (main): Kill the inferior if an error occurs during
12397 the first remote_open.
12399 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12401 * README: Update supported targets.
12403 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12405 * Makefile.in (clean): Remove reg-mips64.c.
12406 (reg-mips64.c, reg-mips64.o): New rules.
12407 * configure.srv: Handle mips64. Include regset support for mips.
12408 * linux-mips-low.c (union mips_register): New.
12409 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12410 (mips_breakpoint, mips_breakpoint_at): Use int.
12411 (mips_collect_register, mips_supply_register)
12412 (mips_collect_register_32bit, mips_supply_register_32bit)
12413 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12414 (mips_store_fpregset, target_regsets): New.
12415 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12417 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12419 * configure.srv: Add target "spu*-*-*".
12420 * Makefile.in (clean): Remove reg-spu.c.
12421 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12422 * spu-low.c: New file.
12424 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12426 * configure.ac: Correct td_thr_tls_get_addr test.
12427 * configure: Regenerated.
12429 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12431 * linux-low.c (linux_wait_for_event): Reformat. Use the
12432 pass_signals array.
12433 * remote-utils.c (decode_address_to_semicolon): New.
12434 * server.c (pass_signals, handle_general_set): New.
12435 (handle_query): Mention QPassSignals for qSupported.
12436 (main): Call handle_general_set.
12437 * server.h (pass_signals, decode_address_to_semicolon): New.
12439 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12441 * server.c (handle_query): Correct error handling for read_auxv.
12443 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12445 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12446 and srv_linux_thread_db to yes.
12447 * linux-s390-low.c (s390_fill_gregset): New function.
12448 (target_regsets): Define data structure.
12450 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12452 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12453 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12454 * config.in, configure: Regenerated.
12455 * inferiors.c (gdb_id_to_thread): New function.
12456 (gdb_id_to_thread_id): Use it.
12457 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12458 * linux-low.h (struct process_info): Add th member.
12459 (thread_db_get_tls_address): New prototype.
12460 * remote-utils.c (decode_address): Make non-static.
12461 * server.c (handle_query): Handle qGetTLSAddr.
12462 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12463 * target.h (struct target_ops): Add get_tls_address.
12464 * thread-db.c (maybe_attach_thread): Save the thread handle.
12465 (thread_db_get_tls_address): New.
12467 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12469 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12470 (linux_resume_one_process): Take a siginfo_t *. Update all
12471 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12472 (struct pending_signals): Add a siginfo_t.
12473 (linux_wait_for_process): Always set last_status.
12474 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12475 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12476 * linux-low.h (struct process_info): Add last_status.
12478 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12480 * remote-utils.c (try_rle): New function.
12481 (putpkt_binary): Use it.
12483 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12485 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12486 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12487 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12488 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12489 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12492 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12494 * server.c (terminal_fd): New variable.
12495 (old_foreground_pgrp): Likewise.
12496 (restore_old_foreground_pgrp): New function.
12497 (start_inferior): Record the terminal file descriptor in terminal_fd
12498 and its original foreground group in old_foreground_pgrp. Register
12499 restore_old_foreground_pgrp with atexit().
12501 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12503 * server.c (handle_query): Correct qPart to qXfer.
12505 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12507 * configure.ac: Check for more headers which are missing on
12508 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12509 * configure.srv: Add Cygwin and mingw32.
12510 * remote-utils.c: Don't include headers unconditionally which
12511 are missing on mingw32. Include <winsock.h> for mingw32.
12512 (remote_open): Adjust for mingw32 support. Flush
12513 standard error after writing to it.
12514 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12515 (unblock_async_io, enable_async_io, disable_async_io)
12516 (readchar, getpkt): Update for Winsock support.
12517 (prepare_resume_reply): Expect a protocol signal number.
12518 * server.c: Disable <sys/wait.h> on mingw32.
12519 (start_inferior): Adjust for mingw32 support. Flush
12520 standard error after writing to it.
12521 (attach_inferior): Likewise. Use protocol signal
12523 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12525 * win32-i386-low.c: New file.
12526 * Makefile.in (XM_CLIBS): Set.
12527 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12528 (win32-i386-low.o): New dependency rule.
12529 * linux-low.c (linux_wait): Use target signal numbers.
12530 * target.h (struct target_ops): Doc fix.
12531 * server.h (target_signal_to_name): New prototype.
12532 * gdbreplay.c: Don't include headers unconditionally which
12533 are missing on mingw32. Include <winsock.h> for mingw32.
12534 (remote_close, remote_open): Adjust for Winsock support.
12535 * configure, config.in: Regenerated.
12537 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12539 * server.c (decode_xfer_read, write_qxfer_response): New.
12540 (handle_query): Take a packet length argument. Handle
12541 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12542 the qSupported response.
12543 (main): Update call to handle_query.
12545 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12547 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12548 (putpkt_binary): Renamed from putpkt and adjusted for binary
12550 (putpkt): New wrapper for putpkt_binary.
12551 (readchar): Don't mask off the high bit.
12552 (decode_X_packet): New function.
12553 * server.c (main): Call putpkt_binary if a handler sets the packet
12554 length. Save the length of the incoming packet. Handle 'X'.
12555 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12557 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12559 * server.c (handle_query): Handle qSupported.
12561 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12563 * remote-utils.c (all_symbols_looked_up): New variable.
12564 (look_up_one_symbol): Check it.
12565 * server.h (look_up_one_symbol): New declaration.
12566 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12568 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12570 * Makefile.in (linux-arm-low.o): Update dependencies.
12571 * linux-arm-low.c: Include "gdb_proc_service.h".
12572 (PTRACE_GET_THREAD_AREA): Define.
12573 (ps_get_thread_area): New function.
12575 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12577 * configure.srv (m68k*-*-uclinux*): New target.
12578 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12579 (linux_resume_one_process): Remove extraneous cast.
12580 (linux_read_offsets): New.
12581 (linux_target_op): Add linux_read_offsets on mmuless systems.
12582 * server.c (handle_query): Add qOffsets logic.
12583 * target.h (struct target_ops): Add read_offsets.
12585 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12587 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12588 (PTRACE_GET_THREAD_AREA): Define.
12589 (ps_get_thread_area): New function.
12590 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12591 (linux-x86-64-low.o): Update.
12593 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12595 * configure.ac: Remove checks for prfpregset_t.
12596 * gdb_proc_service.h: New file.
12597 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12598 new "gdb_proc_service.h".
12599 * proc-service.c: Likewise.
12600 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12601 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12602 * Makefile.in (gdb_proc_service_h): Updated.
12603 * configure, config.in: Regenerated.
12605 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12607 * remote-utils.c (prepare_resume_reply): Move declaration
12608 of gdb_id_from_wait to the top of the block.
12610 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12612 * linux-low.c (regsets_store_inferior_registers): Read the regset
12613 from the target before filling it.
12615 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12617 * server.c (attach_inferior): Return SIGTRAP for a successful
12620 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12622 * Makefile.in (OBS): Add version.o.
12623 (STAGESTUFF): Delete.
12624 (version.o): Add dependencies.
12625 (version.c): Replace rule.
12626 (clean): Remove version.c.
12627 * server.c (gdbserver_version): New.
12628 (gdbserver_usage): Use printf.
12629 (main): Handle --version and --help.
12630 * server.h (version, host_name): Add declarations.
12632 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12644 * linux-x86-64-low.c:
12646 * linux-s390-low.c:
12647 * linux-ppc64-low.c:
12649 * linux-mips-low.c:
12650 * linux-m68k-low.c:
12651 * linux-m32r-low.c:
12654 * linux-ia64-low.c:
12655 * linux-i386-low.c:
12656 * linux-crisv32-low.c:
12668 * gdbserver.1: Add (C) after Copyright. Update the FSF
12671 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12673 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12674 (arm_breakpoint_at): Recognize both breakpoints.
12675 (the_low_target): Use the correct breakpoint instruction.
12677 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12679 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12680 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12681 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12682 (the_low_target): Update.
12684 2005-10-25 Andreas Schwab <schwab@suse.de>
12686 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12688 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12689 (ia64_num_regs): Reduce to 462.
12691 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12693 * acinclude.m4: Correct quoting.
12694 * aclocal.m4: Regenerated.
12696 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12697 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12698 (thread_db_init): Call thread_db_err_str.
12699 * configure.ac: Check for TD_VERSION.
12700 * config.in, configure: Regenerated.
12702 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12704 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12706 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12708 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12709 is not available. Define HAVE_PTRACE_GETREGS if it is.
12710 * config.in, configure: Regenerated.
12711 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12712 * linux-i386-low.c, linux-m68k-low.c: Update to use
12713 HAVE_PTRACE_GETREGS.
12714 * linux-low.c (regsets_fetch_inferior_registers)
12715 (regsets_store_inferior_registers): Only return 0 if we processed
12717 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12718 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12720 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12722 * inferiors.c (struct thread_info): Add gdb_id.
12723 (add_thread): Add gdb_id argument.
12724 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12725 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12726 calls to add_thread.
12727 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12728 * server.c (handle_query): Use thread_to_gdb_id.
12729 (handle_v_cont, main): Use gdb_id_to_thread_id.
12730 * server.h (add_thread): Update prototype.
12731 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12734 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12736 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12737 left-padded registers.
12738 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12739 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12741 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12743 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12744 * configure: Regenerate.
12745 * config.in: Regenerate.
12746 * server.h (NEED_DECLARATION_STRERROR):
12747 Replace with !HAVE_DECL_STRERROR.
12749 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12751 * linux-low.c (linux_wait, linux_send_signal): Don't test
12752 an unsigned long variable for > 0 if it could be MAX_ULONG.
12753 * server.c (myresume): Likewise.
12754 * target.c (set_desired_inferior): Likewise.
12756 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12758 * configure.ac: Simplify and improve check for socklen_t.
12759 * configure, config.in: Regenerate.
12761 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12763 * acconfig.h: Remove.
12764 * configure.ac: Add a test for socklen_t. Use three-argument
12765 AC_DEFINE throughout.
12766 * config.in: Regenerated using autoheader 2.59.
12767 * configure: Regenerated.
12769 * gdbreplay.c (socklen_t): Provide a default.
12770 (remote_open): Use socklen_t.
12771 * remote-utils.c (socklen_t): Provide a default.
12772 (remote_open): Use socklen_t.
12773 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12776 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12778 * linux-low.c (linux_read_memory, linux_write_memory)
12779 (linux_read_auxv): Likewise.
12780 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12781 (check_mem_write): Likewise.
12782 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12784 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12785 (registers_from_string, register_data): Likewise.
12786 * server.c (handle_query, main): Likewise.
12787 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12788 (decode_M_packet): Likewise.
12789 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12790 * target.h (struct target_ops): Update read_memory, write_memory,
12792 (read_inferior_memory, write_inferior_memory): Update.
12793 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12794 to unsigned char *.
12795 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12796 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12797 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12798 linux-s390-low.c, linux-sh-low.c: Update for changes in
12799 read_inferior_memory and the_low_target->breakpoint.
12801 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12803 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12804 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12805 * configure.srv: Add powerpc64-*-linux*.
12806 * linux-ppc64-low.c: New file.
12808 2005-05-23 Orjan Friberg <orjanf@axis.com>
12810 * linux-cris-low.c: New file with support for CRIS.
12811 * linux-crisv32-low.c: Ditto for CRISv32.
12812 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12813 (clean): Add reg-cris.c and reg-crisv32.c.
12814 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12815 reg-crisv32.o, and reg-crisv32.c to make rules.
12816 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12817 recognized targets.
12819 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12821 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12822 of sizeof (PTRACE_XFER_TYPE).
12823 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12825 2005-05-12 Orjan Friberg <orjanf@axis.com>
12827 * target.h (struct target_ops): Add insert_watchpoint,
12828 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12829 pointers for hardware watchpoint support.
12830 * linux-low.h (struct linux_target_ops): Ditto.
12831 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12832 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12833 to linux_target_ops.
12834 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12836 * server.c (main): Recognize 'Z' and 'z' packets.
12838 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12840 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12841 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12842 (the_low_target): Add new members.
12844 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12846 * proc-service.c (ps_lgetregs): Search all_processes instead of
12849 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12851 * server.c (start_inferior): Change return type to int.
12852 (attach_inferior): Change sigptr to int *.
12853 (handle_v_cont, handle_v_requests): Change signal to int *.
12854 (main): Change signal to int.
12856 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12858 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12859 * configure.srv: Add m32r*-*-linux*.
12860 * linux-m32r-low.c: New file.
12862 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12864 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12866 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12868 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12869 Take unsigned long arguments for PIDs.
12870 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12871 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12872 (wait_for_sigstop, linux_resume_one_process)
12873 (regsets_fetch_inferior_registers, linux_send_signal)
12874 (linux_read_auxv): Likewise. Update the types of variables holding
12875 PIDs. Update format string specifiers.
12876 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12877 * remote-utils.c (prepare_resume_reply): Likewise.
12878 * server.c (cont_thread, general_thread, step_thread)
12879 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12881 (handle_query): Update format specifiers.
12882 (handle_v_cont, main): Use strtoul for thread IDs.
12883 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12884 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12885 (general_thread, step_thread, thread_from_wait)
12886 (old_thread_from_wait): Update.
12887 * target.h (struct thread_resume): Use unsigned long for THREAD.
12888 (struct target_ops): Use unsigned long for arguments to attach and
12891 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12893 * acinclude.m4: Include bfd/bfd.m4 directly.
12894 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12895 <agriffis@toolchain.org>.
12896 * aclocal.m4, configure: Regenerated.
12898 2005-01-07 Andrew Cagney <cagney@gnu.org>
12900 * configure.ac: Rename configure.in, require autoconf 2.59.
12901 * configure: Re-generate.
12903 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12905 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12906 LIBS when finished.
12907 * aclocal.m4: Regenerated.
12908 * configure: Regenerated.
12910 2004-11-21 Andreas Schwab <schwab@suse.de>
12912 * linux-m68k-low.c (m68k_num_gregs): Define.
12913 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12914 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12915 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12916 (m68k_breakpoint_at): New. Add to the_low_target.
12918 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12919 srv_linux_thread_db to yes.
12921 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12923 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12924 (ARCH_SET_FS): Likewise.
12925 (ARCH_GET_FS): Likewise.
12926 (ARCH_GET_GS): Likewise.
12928 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12930 * linux-i386-low.c (ps_get_thread_area): New.
12931 * linux-x86-64-low.c (ps_get_thread_area): New.
12932 * linux-low.c: Include <sys/syscall.h>.
12933 (linux_kill_one_process): Don't kill the first thread here.
12934 (linux_kill): Kill the first thread here.
12935 (kill_lwp): New function.
12936 (send_sigstop, linux_send_signal): Use it.
12937 * proc-service.c: Clean up #ifdefs.
12938 (fpregset_info): Delete.
12939 (ps_lgetregs): Update and enable implementation.
12940 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12942 * remote-utils.c (struct sym_cache, symbol_cache): New.
12943 (input_interrupt): Print a clearer message.
12944 (async_io_enabled): New variable.
12945 (enable_async_io, disable_async_io): Use it. Update comments.
12946 (look_up_one_symbol): Use the symbol cache.
12947 * thread-db.c (thread_db_look_up_symbols): New function.
12948 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12950 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12952 * configure.in: Test for -rdynamic.
12953 * configure: Regenerated.
12954 * Makefile (INTERNAL_LDFLAGS): New.
12955 (gdbserver, gdbreplay): Use it.
12957 2004-09-02 Andrew Cagney <cagney@gnu.org>
12959 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12961 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12963 * linux-low.c (linux_wait): Clear all_processes list also.
12965 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12967 * linux-low.c: Include <errno.h>. Remove extern declaration of
12970 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12972 * gdbreplay.c, server.h, utils.c: Update copyright years.
12974 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12976 * server.c (main): Print child status or termination signal from
12977 variable 'signal', not 'sig'.
12979 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12981 * linux-low.c (linux_read_memory): Change return type to
12982 int. Check for and return error from ptrace().
12983 * target.c (read_inferior_memory): Change return type to int. Pass
12984 back return status from the_target->read_memory().
12985 * target.h (struct target_ops): Adapt *read_memory() prototype.
12987 (read_inferior_memory): Adapt prototype.
12988 * server.c (main): Return an error packet if
12989 read_inferior_memory() returns an error.
12991 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12993 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12994 Unify with other clean targets.
12996 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12998 * server.c (handle_v_cont): Call set_desired_inferior.
13000 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13002 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13004 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13006 * linux-low.c (linux_wait): Unblock async I/O.
13007 (linux_resume): Block and enable async I/O.
13008 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13009 * server.h (block_async_io, unblock_async_io): Add prototypes.
13011 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13013 * remote-utils.c (remote_open): Print a status notice after
13014 opening a TCP port.
13015 * server.c (attach_inferior): Print a status notice after
13018 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13020 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13022 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13024 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13026 * server.c, target.h: Update copyright years.
13028 2004-02-25 Roland McGrath <roland@redhat.com>
13030 * target.h (struct target_ops): New member `read_auxv'.
13031 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13032 * linux-low.c (linux_read_auxv): New function.
13033 (linux_target_ops): Initialize `read_auxv' member to that.
13035 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13037 Committed by Jim Blandy <jimb@redhat.com>.
13039 * linux-s390-low.c (s390_num_regs): Update.
13040 (s390_regmap): Remove control registers. Use __s390x__ predefine
13041 instead of GPR_SIZE to distiguish s390 and s390x targets.
13043 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13045 * linux-low.c: Update copyright year.
13046 (check_removed_breakpoint): Clear pending_is_breakpoint.
13047 (linux_set_resume_request, linux_queue_one_thread)
13048 (resume_status_pending_p): New functions.
13049 (linux_continue_one_thread): Use process->resume.
13050 (linux_resume): Only resume threads if there are no pending events.
13051 * linux-low.h (struct process_info): Add resume request
13054 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13056 * regcache.c (new_register_cache): Clear the allocated register
13057 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13059 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13061 * linux-low.c (linux_resume): Take a struct thread_resume *
13063 (linux_wait): Update call.
13064 (resume_ptr): New static variable.
13065 (linux_continue_one_thread): Renamed from
13066 linux_continue_one_process. Use resume_ptr.
13067 (linux_resume): Use linux_continue_one_thread.
13068 * server.c (handle_v_cont, handle_v_requests): New functions.
13069 (myresume): New function.
13070 (main): Handle 'v' case.
13071 * target.h (struct thread_resume): New type.
13072 (struct target_ops): Change argument of "resume" to struct
13074 (myresume): Delete macro.
13076 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13078 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13079 (uninstall): Support DESTDIR.
13081 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13083 * configure.srv: Add xscale*linux copy of arm*linux entry.
13085 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13087 * linux-arm-low.c (arm_reinsert_addr): New function.
13088 (the_low_target): Add arm_reinsert_addr.
13090 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13092 * mem-break.c: Remove whitespace at end of file.
13094 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13096 * configure.in: Check whether we need to prototype strerror.
13097 * server.h: Optionally prototype strerror.
13098 * gdbreplay.c (perror_with_name): Use strerror.
13099 * linux-low.c (linux_attach_lwp): Use strerror.
13100 * utils.c (perror_with_name): Use strerror.
13101 * config.in, configure: Regenerated.
13103 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13105 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13106 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13108 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13110 * Makefile.in (SFILES): Update.
13111 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13112 low-sun3.c: Remove files.
13114 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13116 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13117 (linux_detach_one_process, linux_detach): New functions.
13118 (linux_target_ops): Add linux_detach.
13119 * server.c (main): Handle 'D' packet.
13120 * target.h (struct target_ops): Add "detach" member.
13121 (detach_inferior): Define.
13123 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13125 From Kelley Cook <kelleycook@wideopenwest.com>:
13126 * configure.srv: Accept i[34567]86 variants.
13128 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13130 * linux-low.c (linux_wait_for_event): Correct comment typos.
13131 (linux_resume_one_process): Call check_removed_breakpoint.
13132 (linux_send_signal): New function.
13133 (linux_target_ops): Add linux_send_signal.
13134 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13136 * target.h (struct target_ops): Add send_signal.
13138 2003-05-29 Jim Blandy <jimb@redhat.com>
13140 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13141 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13142 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13143 away part of the register's value.
13145 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13147 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13148 (linux_wait_for_event, linux_init_signals): Likewise.
13150 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13152 * configure.in: Check for stdlib.h.
13153 * configure: Regenerated.
13154 * config.in: Regenerated.
13156 2003-01-04 Andreas Schwab <schwab@suse.de>
13158 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13160 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13162 * Makefile.in: Remove obsolete code.
13164 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13166 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13167 defined(PT_FPR0_HI).
13169 2002-11-17 Stuart Hughes <seh@zee2.com>
13171 * linux-arm-low.c (arm_num_regs): Increase.
13172 (arm_regmap): Include status register.
13174 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13176 * linux-low.c (register_addr): Remove incorrect -1 check.
13178 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13180 * linux-low.c (linux_create_inferior): Call setpgid. Return
13182 (unstopped_p, linux_signal_pid): Remove.
13183 (linux_target_ops): Remove linux_signal_pid.
13184 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13185 global instead of target method.
13186 * target.h (struct target_ops): Remove signal_pid. Update comment
13187 for create_inferior.
13188 * server.c (signal_pid): New variable.
13189 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13190 gdbserver. Set the child to be the foreground process group.
13191 (attach_inferior): Set signal_pid.
13193 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13195 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13197 2002-08-20 Jim Blandy <jimb@redhat.com>
13199 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13202 2002-08-01 Andrew Cagney <cagney@redhat.com>
13204 * Makefile.in: Make chill references obsolete.
13206 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13208 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13209 * configure: Regenerate.
13210 * config.in: Regenerate.
13212 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13214 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13215 (perror_with_name, remote_close, remote_open, expect, play): Static.
13217 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13219 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13220 byte offsets instead of an array of indexes.
13221 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13223 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13225 * regcache.c: Add comment.
13227 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13229 * thread-db.c: New file.
13230 * proc-service.c: New file.
13231 * acinclude.m4: New file.
13232 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13233 proc-service.o, and thread-db.o.
13234 (linux-low.o): Add USE_THREAD_DB.
13235 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13236 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13237 * aclocal.m4: Regenerated.
13238 * config.in: Regenerated.
13239 * configure: Regenerated.
13240 * configure.in: Check for proc_service.h, sys/procfs.h,
13241 thread_db.h, and linux/elf.h headrs.
13242 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13243 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13244 Check for -lthread_db and thread support.
13245 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13246 PowerPC, and SuperH.
13247 * i387-fp.c: Constify arguments.
13248 * i387-fp.h: Likewise.
13249 * inferiors.c: (struct thread_info): Renamed from
13250 `struct inferior_info'. Remove PID member. Use generic inferior
13251 list header. All uses updated.
13252 (inferiors, signal_pid): Removed.
13253 (all_threads): New variable.
13254 (get_thread): Define.
13255 (add_inferior_to_list): New function.
13256 (for_each_inferior): New function.
13257 (change_inferior_id): New function.
13258 (add_inferior): Removed.
13259 (remove_inferior): New function.
13260 (add_thread): New function.
13261 (free_one_thread): New function.
13262 (remove_thread): New function.
13263 (clear_inferiors): Use for_each_inferior and free_one_thread.
13264 (find_inferior): New function.
13265 (find_inferior_id): New function.
13266 (inferior_target_data): Update argument type.
13267 (set_inferior_target_data): Likewise.
13268 (inferior_regcache_data): Likewise.
13269 (set_inferior_regcache_data): Likewise.
13270 * linux-low.c (linux_bp_reinsert): Remove.
13271 (all_processes, stopping_threads, using_thrads)
13272 (struct pending_signals, debug_threads, pid_of): New.
13273 (inferior_pid): Replace with macro.
13274 (struct inferior_linux_data): Remove.
13275 (get_stop_pc, add_process): New functions.
13276 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13277 Use add_process and add_thread.
13278 (linux_attach_lwp): New function, based on old linux_attach. Use
13279 add_process and add_thread. Set stop_expected for new threads.
13280 (linux_attach): New function.
13281 (linux_kill_one_process): New function.
13282 (linux_kill): Kill all LWPs.
13283 (linux_thread_alive): Use find_inferior_id.
13284 (check_removed_breakpoints, status_pending_p): New functions.
13285 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13286 Update. Use WNOHANG. Wait for cloned processes also. Update process
13287 struct for the found process.
13288 (linux_wait_for_event): New function.
13289 (linux_wait): Use it. Support LWPs.
13290 (send_sigstop, wait_for_sigstop, stop_all_processes)
13291 (linux_resume_one_process, linux_continue_one_process): New functions.
13292 (linux_resume): Support LWPs.
13293 (REGISTER_RAW_SIZE): Remove.
13294 (fetch_register): Use register_size instead. Call supply_register.
13295 (usr_store_inferior_registers): Likewise. Call collect_register.
13296 Fix recursive case.
13297 (regsets_fetch_inferior_registers): Improve error message.
13298 (regsets_store_inferior_registers): Add debugging.
13299 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13300 (unstopped_p, linux_signal_pid): New functions.
13301 (linux_target_ops): Add linux_signal_pid.
13302 (linux_init_signals): New function.
13303 (initialize_low): Call it. Initialize using_threads.
13304 * regcache.c (inferior_regcache_data): Add valid
13306 (get_regcache): Fetch registers lazily. Add fetch argument
13307 and update all callers.
13308 (regcache_invalidate_one, regcache_invalidate): New
13310 (new_register_cache): Renamed from create_register_cache.
13311 Return the new regcache.
13312 (free_register_cache): Change argument to a void *.
13313 (registers_to_string, registers_from_string): Call get_regcache
13314 with fetch flag set.
13315 (register_data): Make static. Pass fetch flag to get_regcache.
13316 (supply_register): Call get_regcache with fetch flag clear.
13317 (collect_register): Call get_regcache with fetch flag set.
13318 (collect_register_as_string): New function.
13319 * regcache.h: Update.
13320 * remote-utils.c (putpkt): Flush after debug output and use
13322 Handle input interrupts while waiting for an ACK.
13323 (input_interrupt): Use signal_pid method.
13324 (getpkt): Flush after debug output and use stderr.
13325 (outreg): Use collect_register_as_string.
13326 (new_thread_notify, dead_thread_notify): New functions.
13327 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13328 and general_thread.
13329 (look_up_one_symbol): Flush after debug output.
13330 * server.c (step_thread, server_waiting): New variables.
13331 (start_inferior): Don't use signal_pid. Update call to mywait.
13332 (attach_inferior): Update call to mywait.
13333 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13334 (main): Don't fetch/store registers explicitly. Use
13335 set_desired_inferior. Support proposed ``Hs'' packet. Update
13337 * server.h: Update.
13338 (struct inferior_list, struct_inferior_list_entry): New.
13339 * target.c (set_desired_inferior): New.
13340 (write_inferior_memory): Constify.
13341 (mywait): New function.
13342 * target.h: Update.
13343 (struct target_ops): New signal_pid method.
13344 (mywait): Removed macro, added prototype.
13346 * linux-low.h (regset_func): Removed.
13347 (regset_fill_func, regset_store_func): New.
13348 (enum regset_type): New.
13349 (struct regset_info): Add type field. Use new operation types.
13350 (struct linux_target_ops): stop_pc renamed to get_pc.
13351 Add decr_pc_after_break and breakpoint_at.
13352 (get_process, get_thread_proess, get_process_thread)
13353 (strut process_info, all_processes, linux_attach_lwp)
13354 (thread_db_init): New.
13356 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13357 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13358 (the_low_target): Add new members.
13359 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13360 (i386_store_fpxregset): Constify.
13361 (target_regsets): Add new kind identifier.
13362 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13363 (i386_set_pc): Add debugging.
13364 (i386_breakpoint_at): New function.
13365 (the_low_target): Add new members.
13366 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13367 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13368 (mips_breakpoint_at): New.
13369 (the_low_target): Add new members.
13370 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13371 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13372 (the_low_target): Add new members.
13373 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13374 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13375 (the_low_target): Add new members.
13376 * linux-x86-64-low.c (target_regsets): Add new kind
13379 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13381 From Martin Pool <mbp@samba.org>:
13382 * server.c (gdbserver_usage): New function.
13385 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13387 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13388 stop_at -> stop_pc.
13390 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13392 * Makefile.in: Remove obsolete code.
13394 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13396 * linux-low.c (regsets_fetch_inferior_registers),
13397 (regsets_store_inferior_registers): Removed cast to int from
13399 * regcache.h: Added declaration of struct inferior_info.
13401 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13403 * inferiors.c (struct inferior_info): Add regcache_data.
13404 (add_inferior): Call create_register_cache.
13405 (clear_inferiors): Call free_register_cache.
13406 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13407 * regcache.c (struct inferior_regcache_data): New.
13408 (registers): Remove.
13409 (get_regcache): New function.
13410 (create_register_cache, free_register_cache): New functions.
13411 (set_register_cache): Don't initialize the register cache here.
13412 (registers_to_string, registers_from_string, register_data): Call
13414 * regcache.h: Add prototypes.
13415 * server.h: Likewise.
13417 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13419 * mem-break.c: New file.
13420 * mem-break.h: New file.
13421 * Makefile.in: Add mem-break.o rule; update server.h
13423 * inferiors.c (struct inferior_info): Add target_data
13425 (clear_inferiors): Free target_data member if set.
13426 (inferior_target_data, set_inferior_target_data): New functions.
13427 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13428 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13429 * linux-low.c (linux_bp_reinsert): New variable.
13430 (struct inferior_linux_data): New.
13431 (linux_create_inferior): Use set_inferior_target_data.
13432 (linux_attach): Likewise. Call add_inferior.
13433 (linux_wait_for_one_inferior): New function.
13434 (linux_wait): Call it.
13435 (linux_write_memory): Add const.
13436 (initialize_low): Call set_breakpoint_data.
13437 * linux-low.h (struct linux_target_ops): Add breakpoint
13439 * server.c (attach_inferior): Remove extra add_inferior
13441 * server.h: Include mem-break.h. Update inferior.c
13443 * target.c (read_inferior_memory)
13444 (write_inferior_memory): New functions.
13445 * target.h (read_inferior_memory)
13446 (write_inferior_memory): Change macros to prototypes.
13447 (struct target_ops): Update comments. Add const to write_memory
13450 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13452 * linux-low.c (usr_store_inferior_registers): Support
13453 registers which are allowed to fail to store.
13454 * linux-low.h (linux_target_ops): Likewise.
13455 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13456 (ppc_cannot_store_register): FPSCR may not be storable.
13458 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13460 * server.h: Include <string.h> if HAVE_STRING_H.
13461 * ChangeLog: Correct paths in last ChangeLog entry.
13463 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13465 * linux-low.h: Remove obsolete prototypes.
13466 (struct linux_target_ops): New.
13467 (extern the_low_target): New.
13468 * linux-low.c (num_regs, regmap): Remove declarations.
13469 (register_addr): Use the_low_target explicitly.
13470 (fetch_register): Likewise.
13471 (usr_fetch_inferior_registers): Likewise.
13472 (usr_store_inferior_registers): Likewise.
13473 * linux-arm-low.c (num_regs): Remove.
13474 (arm_num_regs): Define.
13475 (arm_regmap): Renamed from regmap, made static.
13476 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13478 (arm_cannot_store_register): Renamed from cannot_store_register,
13480 (the_low_target): New.
13481 * linux-i386-low.c (num_regs): Remove.
13482 (i386_num_regs): Define.
13483 (i386_regmap): Renamed from regmap, made static.
13484 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13486 (i386_cannot_store_register): Renamed from cannot_store_register,
13488 (the_low_target): New.
13489 * linux-ia64-low.c (num_regs): Remove.
13490 (ia64_num_regs): Define.
13491 (ia64_regmap): Renamed from regmap, made static.
13492 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13494 (ia64_cannot_store_register): Renamed from cannot_store_register,
13496 (the_low_target): New.
13497 * linux-m68k-low.c (num_regs): Remove.
13498 (m68k_num_regs): Define.
13499 (m68k_regmap): Renamed from regmap, made static.
13500 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13502 (m68k_cannot_store_register): Renamed from cannot_store_register,
13504 (the_low_target): New.
13505 * linux-mips-low.c (num_regs): Remove.
13506 (mips_num_regs): Define.
13507 (mips_regmap): Renamed from regmap, made static.
13508 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13510 (mips_cannot_store_register): Renamed from cannot_store_register,
13512 (the_low_target): New.
13513 * linux-ppc-low.c (num_regs): Remove.
13514 (ppc_num_regs): Define.
13515 (ppc_regmap): Renamed from regmap, made static.
13516 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13518 (ppc_cannot_store_register): Renamed from cannot_store_register,
13520 (the_low_target): New.
13521 * linux-s390-low.c (num_regs): Remove.
13522 (s390_num_regs): Define.
13523 (s390_regmap): Renamed from regmap, made static.
13524 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13526 (s390_cannot_store_register): Renamed from cannot_store_register,
13528 (the_low_target): New.
13529 * linux-sh-low.c (num_regs): Remove.
13530 (sh_num_regs): Define.
13531 (sh_regmap): Renamed from regmap, made static.
13532 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13534 (sh_cannot_store_register): Renamed from cannot_store_register,
13536 (the_low_target): New.
13537 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13538 (the_low_target): New.
13540 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13542 * Makefile.in: Add stamp-h target.
13543 * configure.in: Create stamp-h.
13544 * configure: Regenerated.
13546 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13548 * inferiors.c: New file.
13549 * target.c: New file.
13550 * target.h: New file.
13551 * Makefile.in: Add target.o and inferiors.o. Update
13553 * linux-low.c (inferior_pid): New static variable,
13554 moved from server.c.
13555 (linux_create_inferior): Renamed from create_inferior.
13556 Call add_inferior. Return 0 on success instead of a PID.
13557 (linux_attach): Renamed from myattach.
13558 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13559 (linux_thread_alive): Renamed from mythread_alive.
13560 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13562 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13563 (regsets_store_inferior_registers): Correct error message.
13564 Add missing ``return 0''.
13565 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13566 (linux_store_registers): Renamed from store_inferior_registers.
13567 (linux_read_memory): Renamed from read_inferior_memory.
13568 (linux_write_memory): Renamed from write_inferior_memory.
13569 (linux_target_ops): New structure.
13570 (initialize_low): Call set_target_ops ().
13571 * remote-utils.c (unhexify): New function.
13572 (hexify): New function.
13573 (input_interrupt): Send signals to ``signal_pid''.
13574 * server.c (inferior_pid): Remove.
13575 (start_inferior): Update create_inferior call.
13576 (attach_inferior): Call add_inferior.
13577 (handle_query): New function.
13578 (main): Call handle_query for `q' packets.
13579 * server.h: Include "target.h". Remove obsolete prototypes.
13580 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13582 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13584 * Makefile.in: Add WARN_CFLAGS. Update configury
13586 * configure.in: Check for <string.h>
13587 * configure: Regenerate.
13588 * config.in: Regenerate.
13589 * gdbreplay.c: Include needed system headers.
13590 (remote_open): Remove strchr prototype.
13591 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13592 * regcache.c (supply_register): Change buf argument to const void *.
13593 (supply_register_by_name): Likewise.
13594 (collect_register): Change buf argument to void *.
13595 (collect_register_by_name): Likewise.
13596 * regcache.h: Add missing prototypes.
13597 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13598 * server.c (handle_query): New function.
13599 (attached): New static variable, moved out of main.
13600 (main): Quiet longjmp clobber warnings.
13601 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13602 * utils.c (error): Remove NORETURN.