1 2016-02-24 Pedro Alves <palves@redhat.com>
3 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6 Factor out common code between the USE_SIGTRAP_SIGINFO and
7 !USE_SIGTRAP_SIGINFO blocks.
8 (linux_low_filter_event): Call save_stop_reason instead of
9 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
11 (linux_wait_1): Update comments.
13 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
15 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
16 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
17 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
18 ppc_insert_point, ppc_remove_point.
20 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
22 * linux-s390-low.c (s390_supports_z_point_type): New function.
23 (struct linux_target_ops): Wire s390_supports_z_point_type in.
25 2016-02-16 Yao Qi <yao.qi@linaro.org>
27 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
28 PC. Get pc from regcache_read_pc.
30 2016-02-12 Yao Qi <yao.qi@linaro.org>
32 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
33 or linux_get_pc_32bit.
34 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
36 2016-02-12 Yao Qi <yao.qi@linaro.org>
38 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
39 arm_linux_get_next_pcs_fixup.
41 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
43 * tracepoint.c (x_tracepoint_action_download): Change
44 write_inferior_data_ptr to write_inferior_data_pointer.
45 (cmd_qtstart): Likewise.
46 (write_inferior_data_ptr): Remove.
47 (download_agent_expr): Change write_inferior_data_ptr to
48 write_inferior_data_pointer.
49 (download_tracepoint_1): Likewise.
50 (download_tracepoint): Likewise.
51 (download_trace_state_variables): Likewise.
53 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
54 Marcin Kościelnicki <koriakin@0x04.net>
56 * tracepoint.c (struct tracepoint_action_ops): Remove.
57 (struct tracepoint_action): Remove ops.
58 (m_tracepoint_action_download, r_tracepoint_action_download)
59 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
60 size and offset accordingly.
61 (m_tracepoint_action_ops, r_tracepoint_action_ops)
62 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
63 (tracepoint_action_send, tracepoint_action_download): New functions.
64 Helpers for trace action handlers.
65 (add_tracepoint_action): Remove setup actions ops.
66 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
68 2016-02-10 Yao Qi <yao.qi@linaro.org>
70 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
72 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
74 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
76 * configure: Regenerate.
78 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
80 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
82 * linux-low.c (siginfo_fixup): Likewise.
83 (linux_xfer_siginfo): Likewise.
84 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
86 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
88 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
90 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
92 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
94 * linux-x86-low.c [__x86_64__]: Include
95 "nat/amd64-linux-siginfo.h".
96 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
97 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
98 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
99 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
100 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
101 (cpt_si_fd, si_timerid, si_overrun): Move from
102 nat/amd64-linux-siginfo.c.
103 * Makefile.in (amd64-linux-siginfo.o:): New rule.
105 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
107 * server.c (skip_to_semicolon): Remove.
108 (process_point_options): Use strchrnul instead of
111 2016-01-26 Yao Qi <yao.qi@linaro.org>
113 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
114 * linux-low.c (install_software_single_step_breakpoints): Don't
115 call regcache_read_pc.
116 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
119 2016-01-26 Yao Qi <yao.qi@linaro.org>
121 * linux-low.c (install_software_single_step_breakpoints): Call
122 regcache_read_pc instead of get_pc.
124 2016-01-26 Yao Qi <yao.qi@linaro.org>
126 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
127 (unblock_async_io): Rename to ...
128 (block_unblock_async_io): ... it. New function.
129 (enable_async_io): Don't install SIGIO handler. Unblock it
131 (disable_async_io): Don't ignore SIGIO. Block it instead.
132 (initialize_async_io): Install SIGIO handler. Don't call
135 2016-01-26 Yao Qi <yao.qi@linaro.org>
137 * remote-utils.c (getpkt): If the buffer isn't empty, and the
138 first character is '\003', call *the_target->request_interrupt.
140 2016-01-25 Yao Qi <yao.qi@linaro.org>
142 * remote-utils.c (new_thread_notify): Remove.
143 (dead_thread_notify): Likewise.
144 * remote-utils.h (new_thread_notify): Remove declaration.
145 (dead_thread_notify): Likewise.
147 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
149 * gdb.trace/pending.exp: Fix expected message on continue.
151 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
153 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
154 it works properly on big-endian machines where sizeof (CORE_ADDR)
157 2016-01-21 Pedro Alves <palves@redhat.com>
159 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
160 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
161 * configure: Regenerate.
163 2016-01-21 Yao Qi <yao.qi@linaro.org>
165 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
166 is_thumb and set it according to CPSR saved on the stack.
167 (get_next_pcs_syscall_next_pc): Pass is_thumb to
168 arm_sigreturn_next_pc.
170 2016-01-18 Yao Qi <yao.qi@linaro.org>
172 * linux-low.c (linux_set_pc_64bit): New function.
173 (linux_get_pc_64bit): New function.
174 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
176 * linux-sparc-low.c (debug_threads): Remove declaration.
177 (sparc_get_pc): Remove.
178 (the_low_target): Use linux_get_pc_64bit instead of
180 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
181 (the_low_target): Use linux_get_pc_64bit and
184 2016-01-18 Yao Qi <yao.qi@linaro.org>
186 * linux-arm-low.c (debug_threads): Remove declaration.
187 (arm_get_pc, arm_set_pc): Remove.
188 (the_low_target): Use linux_get_pc_32bit and
190 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
191 (the_low_target): Use linux_get_pc_32bit and
193 * linux-cris-low.c (debug_threads): Remove declaration.
194 (cris_get_pc, cris_set_pc,): Remove.
195 (the_low_target): Use linux_get_pc_32bit and
197 * linux-crisv32-low.c (debug_threads): Remove declaration.
198 (cris_get_pc, cris_set_pc): Remove.
199 (the_low_target): Use linux_get_pc_32bit and
201 * linux-low.c: Include inttypes.h.
202 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
203 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
204 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
205 (the_low_target): Use linux_get_pc_32bit and
207 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
208 (the_low_target): Use linux_get_pc_32bit and
210 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
211 (the_low_target): Use linux_get_pc_32bit and
213 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
214 (the_low_target): Use linux_get_pc_32bit and
216 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
217 (the_low_target): Use linux_get_pc_32bit and
220 2016-01-18 Gary Benson <gbenson@redhat.com>
222 * configure.ac (AC_FUNC_FORK): New check.
223 * config.in: Regenerate.
224 * configure: Likewise.
226 2016-01-14 Yao Qi <yao.qi@linaro.org>
228 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
229 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
230 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
231 arm_get_next_pcs_ctor.
233 2016-01-12 Josh Stone <jistone@redhat.com>
234 Philippe Waroquiers <philippe.waroquiers@skynet.be>
236 * inferiors.h: Include "gdb_vecs.h".
237 (struct process_info): Add syscalls_to_catch.
238 * inferiors.c (remove_process): Free syscalls_to_catch.
239 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
240 syscall_return stops.
241 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
242 * server.c (handle_general_set): Handle QCatchSyscalls.
243 (handle_query): Report support for QCatchSyscalls.
244 * target.h (struct target_ops): Add supports_catch_syscall.
245 (target_supports_catch_syscall): New macro.
246 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
247 (struct lwp_info): Add syscall_state.
248 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
249 Maintain syscall_state and syscalls_to_catch across exec.
250 (get_syscall_trapinfo): New function, proxy to the_low_target.
251 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
252 (linux_low_filter_event): Toggle syscall_state entry/return for
253 syscall traps, and set it ignored for all others.
254 (gdb_catching_syscalls_p): New function.
255 (gdb_catch_this_syscall_p): New function.
256 (linux_wait_1): Handle SYSCALL_SIGTRAP.
257 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
258 (linux_supports_catch_syscall): New function.
259 (linux_target_ops): Install it.
260 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
261 (the_low_target): Install it.
263 2016-01-12 Mike Frysinger <vapier@gentoo.org>
265 * acinclude.m4: Include new ../warning.m4 file.
266 * configure: Regenerated.
267 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
269 2016-01-12 Mike Frysinger <vapier@gentoo.org>
271 * ax.c (is_goto_target): Mark static.
272 * linux-low.c (register_addr): Likewise.
273 (linux_fetch_registers, linux_store_registers): Likewise.
274 * mem-break.c (any_persistent_commands): Fix old prototype.
275 (add_commands_to_breakpoint): Mark static.
276 * regcache.c (find_register_by_name): Delete unused func.
277 * remote-utils.c (hex_or_minus_one): Mark static.
278 * server.c (monitor_show_help): Mark static.
279 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
280 handle_v_requests): Likewise.
282 2016-01-12 Pedro Alves <palves@redhat.com>
284 Remove use of the registered trademark symbol throughout.
286 2016-01-08 Yao Qi <yao.qi@linaro.org>
288 * remote-utils.c (getpkt): If c is '\003', call target hook
291 2016-01-06 Yao Qi <yao.qi@linaro.org>
293 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
295 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
296 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
297 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
298 (thumb2_breakpoint): Declare.
299 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
301 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
302 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
303 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
305 2016-01-01 Joel Brobecker <brobecker@adacore.com>
307 * gdbreplay.c (gdbreplay_version): Change copyright year in
309 * server.c (gdbserver_version): Likewise.
311 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
313 * server.c (crc32_table): Delete.
314 (crc32): Use libiberty's xcrc32 function.
316 2015-12-22 Joel Brobecker <brobecker@adacore.com>
318 * lynx-low.c (lynx_delete_thread_callback): New function.
319 (lynx_mourn): Properly delete our process and all of its
320 threads. Remove call to clear_inferiors.
322 2015-12-22 Joel Brobecker <brobecker@adacore.com>
324 * target.c (thread_search_callback): Add check that
325 the thread_stopped target callback is not NULL before
328 2015-12-21 Yao Qi <yao.qi@linaro.org>
330 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
333 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
335 * server.c (handle_query): Call target_supports_software_single_step.
337 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
339 * linux-low.c (single_step): New function.
340 (linux_resume_one_lwp_throw): Call single_step.
341 (start_step_over): Likewise.
343 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
345 * Makefile.in (SFILES): Append arch/arm-linux.c,
346 arch/arm-get-next-pcs.c.
347 (arm-linux.o): New rule.
348 (arm-get-next-pcs.o): New rule.
349 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
351 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
352 to linux-aarch32-low.c.
353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
354 (arm_breakpoint_len, thumb_breakpoint): Likewise.
355 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
356 (thumb2_breakpoint_len): Likewise.
357 (arm_is_thumb_mode): Make non-static.
358 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
359 from linux-aarch32-low.c.
360 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
361 (arm_breakpoint_len, thumb_breakpoint): Likewise.
362 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
363 (thumb2_breakpoint_len): Likewise.
364 (arm_is_thumb_mode): New declaration.
365 * linux-arm-low.c: Include arch/arm-linux.h
366 aarch/arm-get-next-pcs.h, sys/syscall.h.
367 (get_next_pcs_ops): New struct.
368 (get_next_pcs_addr_bits_remove): New function.
369 (get_next_pcs_is_thumb): New function.
370 (get_next_pcs_read_memory_unsigned_integer): Likewise.
371 (arm_sigreturn_next_pc): Likewise.
372 (get_next_pcs_syscall_next_pc): Likewise.
373 (arm_gdbserver_get_next_pcs): Likewise.
374 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
376 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
377 * server.h: Include gdb_vecs.h.
379 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
381 * Makefile.in (SFILES): Append common/common-regcache.c.
382 (OBS): Append common-regcache.o.
383 (common-regcache.o): New rule.
384 * regcache.c (init_register_cache): Initialize cache to
386 (regcache_raw_read_unsigned): New function.
387 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
388 register_status enum.
390 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
392 * linux-aarch64-low.c (the_low_targets): Rename
393 breakpoint_reinsert_addr to get_next_pcs.
394 * linux-arm-low.c (the_low_targets): Likewise.
395 * linux-bfin-low.c (the_low_targets): Likewise.
396 * linux-cris-low.c (the_low_targets): Likewise.
397 * linux-crisv32-low.c (the_low_targets): Likewise.
398 * linux-low.c (can_software_single_step): Likewise.
399 (install_software_single_step_breakpoints): New function.
400 (start_step_over): Use install_software_single_step_breakpoints.
401 * linux-low.h: New CORE_ADDR vector.
402 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
404 * linux-mips-low.c (the_low_targets): Likewise.
405 * linux-nios2-low.c (the_low_targets): Likewise.
406 * linux-sparc-low.c (the_low_targets): Likewise.
408 2015-12-17 Pedro Alves <palves@redhat.com>
410 * linux-low.c (linux_kill_one_lwp): Remove references to
412 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
414 (linux_init_signals): Delete.
415 (initialize_low): Adjust.
416 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
418 2015-12-16 Pedro Alves <palves@redhat.com>
420 * configure.ac (compiler warning flags): When testing a
421 -Wno-foo option, check whether -Wfoo works instead.
422 * configure: Regenerate.
424 2015-12-11 Don Breazeal <donb@codesourcery.com>
426 * server.c (process_serial_event): Don't exit from gdbserver
427 in remote mode if there are still active inferiors.
429 2015-12-11 Yao Qi <yao.qi@linaro.org>
431 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
432 arm_breakpoint_at if the process is 32-bit.
434 2015-12-11 Yao Qi <yao.qi@linaro.org>
436 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
439 2015-12-07 Yao Qi <yao.qi@linaro.org>
441 * configure.srv: Append arm.o to srv_tgtobj for
442 aarch64*-*-linux* target.
443 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
444 from linux-arm-low.c.
445 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
446 (arm_breakpoint_len, thumb_breakpoint): Likewise.
447 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
448 (thumb2_breakpoint_len): Likewise.
449 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
450 (arm_breakpoint_kinds): Likewise.
451 (arm_breakpoint_kind_from_pc): Likewise.
452 (arm_sw_breakpoint_from_kind): Likewise.
453 (arm_breakpoint_kind_from_current_state): Likewise.
454 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
455 (arm_sw_breakpoint_from_kind): Declare.
456 (arm_breakpoint_kind_from_current_state): Declare.
457 (arm_breakpoint_at): Declare.
458 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
459 arm_sw_breakpoint_from_kind if process is 32-bit.
460 (aarch64_breakpoint_kind_from_pc): New function.
461 (aarch64_breakpoint_kind_from_current_state): New function.
462 (the_low_target): Initialize fields breakpoint_kind_from_pc
463 and breakpoint_kind_from_current_state.
464 * linux-arm-low.c (arm_breakpoint_kinds): Move to
466 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
467 (arm_breakpoint, arm_breakpoint_len): Likewise.
468 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
469 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
470 (arm_is_thumb_mode): Likewise.
471 (arm_breakpoint_at): Likewise.
472 (arm_breakpoint_kind_from_pc): Likewise.
473 (arm_sw_breakpoint_from_kind): Likewise.
474 (arm_breakpoint_kind_from_current_state): Likewise.
477 2015-08-04 Yao Qi <yao.qi@linaro.org>
479 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
480 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
481 * server.c (extended_protocol): Remove "static".
482 * server.h (extended_protocol): Declare it.
484 2015-12-04 Josh Stone <jistone@redhat.com>
486 * target.h (struct target_ops) <arch_setup>: Rename to ...
487 (struct target_ops) <post_create_inferior>: ... this.
488 (target_arch_setup): Rename to ...
489 (target_post_create_inferior): ... this, calling post_create_inferior.
490 * server.c (start_inferior): Update target_arch_setup calls to
491 target_post_create_inferior.
492 * linux-low.c (linux_low_ptrace_options): Forward declare.
493 (linux_arch_setup): Update its comment for general use.
494 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
495 (struct linux_target_ops): Use linux_post_create_inferior.
496 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
497 to post_create_inferior.
498 * nto-low.c (struct nto_target_ops): Likewise.
499 * spu-low.c (struct spu_target_ops): Likewise.
500 * win32-low.c (struct win32_target_ops): Likewise.
502 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
504 * linux-arm-low.c: Remove duplicate arch/arm.h include.
506 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
508 * linux-arm-low.c (arm_reinsert_addr): Remove function.
509 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
510 * linux-cris-low.c (cris_reinsert_addr> Remove function.
511 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
512 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
513 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
514 * linux-mips-low.c (mips_reinsert_addr): Remove function.
515 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
516 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
517 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
518 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
519 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
521 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
523 * linux-low.c (linux_look_up_symbols): Don't call
524 linux_supports_traceclone.
525 * linux-low.h (thread_db_init): Remove use_events argument.
526 * thread-db.c (thread_db_use_event): Remove global variable.
527 (struct thread_db) <td_thr_event_enable_p>: Remove field.
528 (struct thread_db) <td_create_bp>: Remove field.
529 (thread_db_create_event): Remove function.
530 (thread_db_enable_reporting): Likewise.
531 (find_one_thread): Don't check for thread_db_use_events.
532 (attach_thread): Likewise.
533 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
534 (try_thread_db_load_1): Don't check for thread_db_use_events.
535 (thread_db_init): Remove use_events argument and thread events
537 (remove_thread_event_breakpoints): Remove function.
538 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
540 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
542 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
544 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
545 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
547 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
548 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
550 * linux-crisv32-low.c (cris_supports_hardware_single_step):
552 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
553 * linux-low.c (can_hardware_single_step): Use
554 supports_hardware_single_step.
555 (can_software_single_step): New function.
556 (start_step_over): Call can_software_single_step.
557 (linux_supports_hardware_single_step): New function.
558 (struct target_ops) <supports_software_single_step>: Initialize.
559 * linux-low.h (struct linux_target_ops)
560 <supports_hardware_single_step>: Initialize.
561 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
562 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
563 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
564 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
565 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
566 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
567 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
568 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
569 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
570 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
572 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
573 (struct linux_target_ops) <tile_supports_hardware_single_step>:
575 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
577 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
580 * target.h (struct target_ops): <supports_software_single_step>:
582 (target_supports_software_single_step): New macro.
584 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
586 * linux-low.c (linux_wait_1): Fix pc advance condition.
587 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
588 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
590 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
592 * linux-arm-low.c (arm_is_thumb_mode): New function.
593 (arm_breakpoint_at): Use arm_is_thumb_mode.
594 (arm_breakpoint_kind_from_current_state): New function.
595 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
597 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
598 (linux_breakpoint_kind_from_current_state): New function.
599 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
600 * linux-low.h (struct linux_target_ops)
601 <breakpoint_kind_from_current_state>: New field.
602 * target.h (struct target_ops): Likewise.
603 (target_breakpoint_kind_from_current_state): New macro.
605 2015-11-30 Pedro Alves <palves@redhat.com>
607 * linux-low.c (linux_resume): Wake up the event loop before
610 2015-11-30 Pedro Alves <palves@redhat.com>
612 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
614 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
616 * target.c (struct thread_search): New structure.
617 (thread_search_callback): New function.
618 (prev_general_thread): New global.
619 (prepare_to_access_memory, done_accessing_memory): New functions.
620 * target.h (prepare_to_access_memory, done_accessing_memory):
621 Replace macros with function declarations.
623 2015-11-30 Pedro Alves <palves@redhat.com>
626 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
627 report TARGET_WAITKIND_NO_RESUMED.
628 * remote-utils.c (prepare_resume_reply): Handle
629 TARGET_WAITKIND_NO_RESUMED.
630 * server.c (report_no_resumed): New global.
631 (handle_query) <qSupported>: Handle "no-resumed+". Report
632 "no-resumed+" support.
633 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
634 return error if the client doesn't support no-resumed events.
635 (push_stop_notification): New function.
636 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
637 events if the client supports them.
639 2015-11-30 Pedro Alves <palves@redhat.com>
641 * linux-low.c (thread_still_has_status_pending_p): Don't check
643 (lwp_resumed): New function.
644 (status_pending_p_callback): Return early if the LWP is not
645 supposed to be resumed.
647 2015-11-30 Pedro Alves <palves@redhat.com>
649 * linux-low.c (handle_extended_wait): Assert that the LWP's
650 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
651 thread create events, leave the new child's status pending.
652 (linux_low_filter_event): If GDB wants to hear about thread exit
653 events, leave the LWP marked dead and don't delete it.
654 (linux_wait_for_event_filtered): Don't check for thread exit.
655 (filter_exit_event): New function.
656 (linux_wait_1): Use it, when returning an exit event.
657 (linux_resume_one_lwp_throw): Assert that the LWP's
658 waitstatus is TARGET_WAITKIND_IGNORE.
659 * remote-utils.c (prepare_resume_reply): Handle
660 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
661 * server.c (report_thread_events): New global.
662 (handle_general_set): Handle QThreadEvents.
663 (handle_query) <qSupported>: Handle and report QThreadEvents+;
664 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
665 TARGET_WAITKIND_THREAD_EXITED.
666 * server.h (report_thread_events): Declare.
668 2015-11-30 Pedro Alves <palves@redhat.com>
670 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
671 the thread's last_resume_kind was resume_stop.
673 2015-11-30 Pedro Alves <palves@redhat.com>
675 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
678 2015-11-30 Pedro Alves <palves@redhat.com>
680 * server.c (handle_v_requests): Handle vCtrlC.
682 2015-11-30 Pedro Alves <palves@redhat.com>
684 * gdbthread.h (find_any_thread_of_pid): Declare.
685 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
687 * server.c (handle_query): If current_thread is NULL, look for
688 another thread of the selected process.
690 2015-11-26 Daniel Colascione <dancol@dancol.org>
691 Simon Marchi <simon.marchi@ericsson.com>
693 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
694 * server.c (handle_qxfer_threads_worker): Refactor to include thread
696 * target.h (struct target_ops) <thread_name>: New field.
697 (target_thread_name): New macro.
699 2015-11-23 Joel Brobecker <brobecker@adacore.com>
701 * regcache.h (regcache_invalidate_pid): Add declaration.
702 * regcache.c (regcache_invalidate_pid): New function, extracted
703 from regcache_invalidate.
704 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
705 Add trivial documentation comment.
706 * lynx-low.c: Use regcache_invalidate_pid instead of
709 2015-11-23 Joel Brobecker <brobecker@adacore.com>
711 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
712 and Elf64_auxv_t if the target is Android.
714 2015-11-22 Doug Evans <xdje42@gmail.com>
716 * target.h: #include <sys/types.h>.
718 2015-11-19 Pedro Alves <palves@redhat.com>
720 * linux-low.c (linux_process_qsupported): Change prototype.
722 * linux-low.h (struct linux_target_ops) <process_qsupported>:
724 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
725 and adjust to loop over all features.
726 * server.c (handle_query) <qSupported>: Adjust to call
727 target_process_qsupported once, passing it a vector of unprocessed
729 * target.h (struct target_ops) <process_qsupported>: Change
731 (target_process_qsupported): Adjust.
733 2015-11-19 Pedro Alves <palves@redhat.com>
735 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
737 * configure: Regenerate.
739 2015-11-19 Pedro Alves <palves@redhat.com>
741 * configure: Regenerate.
743 2015-11-19 Yao Qi <yao.qi@linaro.org>
745 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
748 2015-11-19 Yao Qi <yao.qi@linaro.org>
750 * linux-aarch64-low.c (enum aarch64_operand_type): New.
751 (struct aarch64_operand): Move enum out.
753 2015-11-19 Yao Qi <yao.qi@linaro.org>
755 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
756 struct user_fpsimd_state *.
757 (aarch64_store_fpregset): Likewise.
759 2015-11-19 Yao Qi <yao.qi@linaro.org>
761 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
762 struct user_pt_regs *.
763 (aarch64_store_gregset): Likewise.
765 2015-11-18 Pedro Alves <palves@redhat.com>
767 * Makefile.in (all_object_files): Add $IPA_OBJS.
769 2015-11-17 Pedro Alves <palves@redhat.com>
771 * win32-low.c (win32_resume): Use gdb_signal_from_host,
772 GDB_SIGNAL_0 and gdb_signal_to_string.
774 2015-11-17 Pedro Alves <palves@redhat.com>
776 * win32-low.c (handle_output_debug_string): Remove parameter.
777 (win32_kill): Remove our_status local and adjust call to
778 handle_output_debug_string.
779 (get_child_debug_event): Adjust call to
780 handle_output_debug_string.
782 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
784 * linux-mips-low.c (mips_fill_gregset): Add cast.
785 (mips_store_gregset): Likewise.
786 (mips_fill_fpregset): Likewise.
787 (mips_store_fpregset): Likewise.
789 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
791 * linux-mips-low.c (mips_add_watchpoint): Rename private to
794 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
796 * linux-mips-low.c (mips_linux_new_thread): Change type of
797 watch_type to enum target_hw_bp_type.
799 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
801 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
802 Change return type to arm_hwbp_type.
804 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
806 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
807 (arm_store_gregset): Likewise.
808 * linux-arm-low.c (arm_get_hwcap): Likewise.
809 (arm_read_description): Likewise.
811 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
813 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
815 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
817 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
818 (ppc_fill_vsxregset): Likewise.
819 (ppc_store_vsxregset): Likewise.
820 (ppc_fill_vrregset): Likewise.
821 (ppc_store_vrregset): Likewise.
822 (ppc_fill_evrregset): Likewise.
823 (ppc_store_evrregset): Likewise.
825 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
827 * linux-ppc-low.c (ppc_usrregs_info): Remove
829 (ppc_arch_setup): Move lower in file.
831 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
833 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
834 (ps_pdwrite): Likewise.
836 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
838 * linux-arm-low.c (arm_new_thread): Move pointer dereference
839 to after assert checks.
841 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
843 * proc-service.c (ps_pdread): Add/adjust casts.
844 (ps_pdwrite): Add/adjust casts.
846 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
848 * server.c (handle_search_memory_1): Cast return value of
851 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
853 * server.c (write_qxfer_response): Change type of data to
856 2015-10-29 Pedro Alves <palves@redhat.com>
858 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
860 2015-10-29 Pedro Alves <palves@redhat.com>
862 * tracepoint.c (clear_installed_tracepoints): Add casts.
864 2015-10-29 Pedro Alves <palves@redhat.com>
866 * server.c (handle_v_cont, process_serial_event): Add enum
867 gdb_signal casts to signal parsing code.
869 2015-10-29 Pedro Alves <palves@redhat.com>
871 * linux-low.h (NULL_REGSET): Define.
872 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
873 * linux-arm-low.c (arm_regsets): Likewise.
874 * linux-crisv32-low.c (cris_regsets): Likewise.
875 * linux-m68k-low.c (m68k_regsets): Likewise.
876 * linux-mips-low.c (mips_regsets): Likewise.
877 * linux-nios2-low.c (nios2_regsets): Likewise.
878 * linux-ppc-low.c (ppc_regsets): Likewise.
879 * linux-s390-low.c (s390_regsets): Likewise.
880 * linux-sh-low.c (sh_regsets): Likewise.
881 * linux-sparc-low.c (sparc_regsets): Likewise.
882 * linux-tic6x-low.c (tic6x_regsets): Likewise.
883 * linux-tile-low.c (tile_regsets): Likewise.
884 * linux-x86-low.c (x86_regsets): Likewise.
885 * linux-xtensa-low.c (xtensa_regsets): Likewise.
887 2015-10-29 Pedro Alves <palves@redhat.com>
889 * linux-low.h (NULL_REGSET): Define.
890 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
891 * linux-arm-low.c (arm_regsets): Likewise.
892 * linux-crisv32-low.c (cris_regsets): Likewise.
893 * linux-m68k-low.c (m68k_regsets): Likewise.
894 * linux-mips-low.c (mips_regsets): Likewise.
895 * linux-nios2-low.c (nios2_regsets): Likewise.
896 * linux-ppc-low.c (ppc_regsets): Likewise.
897 * linux-s390-low.c (s390_regsets): Likewise.
898 * linux-sh-low.c (sh_regsets): Likewise.
899 * linux-sparc-low.c (sparc_regsets): Likewise.
900 * linux-tic6x-low.c (tic6x_regsets): Likewise.
901 * linux-tile-low.c (tile_regsets): Likewise.
902 * linux-x86-low.c (x86_regsets): Likewise.
903 * linux-xtensa-low.c (xtensa_regsets): Likewise.
905 2015-10-26 Doug Evans <dje@google.com>
907 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
909 2015-10-26 Doug Evans <dje@google.com>
911 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
913 2015-10-26 Doug Evans <dje@google.com>
915 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
917 (attach_thread, find_new_threads_callback): Ditto.
919 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
921 * mem-break.h (set_breakpoint_data): Remove.
923 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
925 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
926 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
927 (initialize_low): Remove set_breakpoint_data call.
928 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
929 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
930 (initialize_low): Remove set_breakpoint_data call.
931 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
932 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
933 (initialize_low): Remove set_breakpoint_data call.
935 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
937 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
938 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
939 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
940 * target.h (target_breakpoint_kind_from_pc): New macro.
942 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
944 * linux-low.c (default_breakpoint_kind_from_pc): New function.
945 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
946 the default breakpoint kind.
948 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
950 * linux-arm-low.c (arm_supports_z_point_type): Add software
953 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
955 * linux-arm-low.c: Refactor breakpoint definitions.
956 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
957 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
959 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
961 * Makefile.in: Add arm.c/o.
962 * configure.srv: Likewise.
963 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
964 (arm_breakpoint_kind_from_pc): New function.
965 (arm_sw_breakpoint_from_kind): Return proper kind.
966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
970 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
972 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
973 (struct raw_breakpoint) <size>: Remove.
974 (struct raw_breakpoint) <kind>: Add.
975 (bp_size): New function.
976 (bp_opcode): Likewise.
977 (find_raw_breakpoint_at): Adjust for kind.
978 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
979 (remove_memory_breakpoint): Adjust for kind call bp_size.
980 (set_raw_breakpoint_at): Adjust for kind.
981 (set_breakpoint): Likewise.
982 (set_breakpoint_at): Call breakpoint_kind_from_pc.
983 (delete_raw_breakpoint): Adjust for kind.
984 (delete_breakpoint): Likewise.
985 (find_gdb_breakpoint): Likewise.
986 (set_gdb_breakpoint_1): Likewise.
987 (set_gdb_breakpoint): Likewise.
988 (delete_gdb_breakpoint_1): Likewise.
989 (delete_gdb_breakpoint): Likewise.
990 (uninsert_raw_breakpoint): Likewise.
991 (reinsert_raw_breakpoint): Likewise.
992 (set_breakpoint_data): Remove.
993 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
994 (check_mem_read): Adjust for kind call bp_size.
995 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
996 (clone_one_breakpoint): Adjust for kind.
997 * mem-break.h (set_gdb_breakpoint): Likewise.
998 (delete_gdb_breakpoint): Likewise.
999 * server.c (process_serial_event): Likewise.
1001 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1003 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1004 (struct linux_target_ops) <breakpoint>: Remove.
1005 (struct linux_target_ops) <breakpoint_len>: Remove.
1006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1008 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1009 (arm_sw_breakpoint_from_kind): New function.
1010 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1011 (struct linux_target_ops) <breakpoint>: Remove.
1012 (struct linux_target_ops) <breakpoint_len>: Remove.
1013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1015 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1016 (struct linux_target_ops) <breakpoint>: Remove.
1017 (struct linux_target_ops) <breakpoint_len>: Remove.
1018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1020 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1021 (struct linux_target_ops) <breakpoint>: Remove.
1022 (struct linux_target_ops) <breakpoint_len>: Remove.
1023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1025 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1026 and sw_breakpoint_from_kind to increment the pc.
1027 (linux_breakpoint_kind_from_pc): New function.
1028 (linux_sw_breakpoint_from_kind): New function.
1029 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1030 (initialize_low): Call breakpoint_kind_from_pc and
1031 sw_breakpoint_from_kind to replace breakpoint_data/len.
1032 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1034 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1035 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1036 (struct linux_target_ops) <breakpoint>: Remove.
1037 (struct linux_target_ops) <breakpoint_len>: Remove.
1038 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1039 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1040 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1041 (struct linux_target_ops) <breakpoint>: Remove.
1042 (struct linux_target_ops) <breakpoint_len>: Remove.
1043 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1044 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1045 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1046 (struct linux_target_ops) <breakpoint>: Remove.
1047 (struct linux_target_ops) <breakpoint_len>: Remove.
1048 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1049 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1050 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1051 (struct linux_target_ops) <breakpoint>: Remove.
1052 (struct linux_target_ops) <breakpoint_len>: Remove.
1053 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1054 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1055 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1056 (struct linux_target_ops) <breakpoint>: Remove.
1057 (struct linux_target_ops) <breakpoint_len>: Remove.
1058 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1059 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1060 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1061 (struct linux_target_ops) <breakpoint>: Remove.
1062 (struct linux_target_ops) <breakpoint_len>: Remove.
1063 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1064 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1065 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1066 (struct linux_target_ops) <breakpoint>: Remove.
1067 (struct linux_target_ops) <breakpoint_len>: Remove.
1068 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1069 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1070 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1071 (struct linux_target_ops) <breakpoint>: Remove.
1072 (struct linux_target_ops) <breakpoint_len>: Remove.
1073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1075 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1076 (struct linux_target_ops) <breakpoint>: Remove.
1077 (struct linux_target_ops) <breakpoint_len>: Remove.
1078 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1079 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1080 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1081 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1082 (struct linux_target_ops) <breakpoint>: Remove.
1083 (struct linux_target_ops) <breakpoint_len>: Remove.
1084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1086 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1087 (struct linux_target_ops) <breakpoint>: Remove.
1088 (struct linux_target_ops) <breakpoint_len>: Remove.
1089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1092 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1094 * linux-cris-low.c (cris_get_pc): Remove void arg.
1096 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1098 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1101 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1103 * inferiors.c (thread_pid_matches_callback): New function.
1104 (find_thread_process): New function.
1105 (remove_thread): Reset current_thread.
1106 (remove_process): Assert threads have been removed first.
1108 2015-10-15 Yao Qi <yao.qi@linaro.org>
1110 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1112 (aarch64_remove_point): Likewise.
1113 * regcache.c (regcache_register_size): New function.
1115 2015-10-12 Yao Qi <yao.qi@linaro.org>
1117 * linux-aarch64-low.c: Update all callers as emit_load_store
1118 is renamed to aarch64_emit_load_store.
1120 2015-10-12 Yao Qi <yao.qi@linaro.org>
1122 * linux-aarch64-low.c: Update all callers of function renaming
1123 from emit_insn to aarch64_emit_insn.
1125 2015-10-12 Yao Qi <yao.qi@linaro.org>
1127 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1128 arch/aarch64-insn.h.
1129 (struct aarch64_memory_operand): Likewise.
1131 (emit_insn): Move to arch/aarch64-insn.c.
1132 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1133 (emit_load_store): Move to arch/aarch64-insn.c.
1134 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1135 (can_encode_int32): Remove.
1137 2015-10-12 Yao Qi <yao.qi@linaro.org>
1139 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1140 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1141 (aarch64_relocate_instruction): Likewise.
1142 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1143 (struct aarch64_insn_visitor): Likewise.
1145 2015-10-12 Yao Qi <yao.qi@linaro.org>
1147 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1148 (struct aarch64_insn_visitor): New.
1149 (struct aarch64_insn_relocation_data): New.
1150 (aarch64_ftrace_insn_reloc_b): New function.
1151 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1152 (aarch64_ftrace_insn_reloc_cb): Likewise.
1153 (aarch64_ftrace_insn_reloc_tb): Likewise.
1154 (aarch64_ftrace_insn_reloc_adr): Likewise.
1155 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1156 (aarch64_ftrace_insn_reloc_others): Likewise.
1158 (aarch64_relocate_instruction): Use visitor.
1160 2015-10-12 Yao Qi <yao.qi@linaro.org>
1162 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1163 int. Add argument buf.
1164 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1165 aarch64_relocate_instruction.
1167 2015-10-12 Yao Qi <yao.qi@linaro.org>
1169 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1170 argument insn. Remove local variable insn. Don't call
1172 (aarch64_install_fast_tracepoint_jump_pad): Call
1175 2015-09-30 Yao Qi <yao.qi@linaro.org>
1177 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1178 (emit_load_store_pair): Likewise.
1180 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1182 * dll.c (match_dll): Add cast(s).
1183 (unloaded_dll): Likewise.
1184 * linux-low.c (second_thread_of_pid_p): Likewise.
1185 (delete_lwp_callback): Likewise.
1186 (count_events_callback): Likewise.
1187 (select_event_lwp_callback): Likewise.
1188 (linux_set_resume_request): Likewise.
1189 * server.c (accumulate_file_name_length): Likewise.
1190 (emit_dll_description): Likewise.
1191 (handle_qxfer_threads_worker): Likewise.
1192 (visit_actioned_threads): Likewise.
1193 * thread-db.c (any_thread_of): Likewise.
1194 * tracepoint.c (same_process_p): Likewise.
1195 (match_blocktype): Likewise.
1196 (build_traceframe_info_xml): Likewise.
1198 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1200 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1202 (gdb_unparse_agent_expr): Likewise.
1203 * hostio.c (require_data): Likewise.
1204 (handle_pread): Likewise.
1205 * linux-low.c (disable_regset): Likewise.
1206 (fetch_register): Likewise.
1207 (store_register): Likewise.
1208 (get_dynamic): Likewise.
1209 (linux_qxfer_libraries_svr4): Likewise.
1210 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1211 (set_fast_tracepoint_jump): Likewise.
1212 (uninsert_fast_tracepoint_jumps_at): Likewise.
1213 (reinsert_fast_tracepoint_jumps_at): Likewise.
1214 (validate_inserted_breakpoint): Likewise.
1215 (clone_agent_expr): Likewise.
1216 * regcache.c (init_register_cache): Likewise.
1217 * remote-utils.c (putpkt_binary_1): Likewise.
1218 (decode_M_packet): Likewise.
1219 (decode_X_packet): Likewise.
1220 (look_up_one_symbol): Likewise.
1221 (relocate_instruction): Likewise.
1222 (monitor_output): Likewise.
1223 * server.c (handle_search_memory): Likewise.
1224 (handle_qxfer_exec_file): Likewise.
1225 (handle_qxfer_libraries): Likewise.
1226 (handle_qxfer): Likewise.
1227 (handle_query): Likewise.
1228 (handle_v_cont): Likewise.
1229 (handle_v_run): Likewise.
1230 (captured_main): Likewise.
1231 * target.c (write_inferior_memory): Likewise.
1232 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1233 * tracepoint.c (init_trace_buffer): Likewise.
1234 (add_tracepoint_action): Likewise.
1235 (add_traceframe): Likewise.
1236 (add_traceframe_block): Likewise.
1237 (cmd_qtdpsrc): Likewise.
1238 (cmd_qtdv): Likewise.
1239 (cmd_qtstatus): Likewise.
1240 (response_source): Likewise.
1241 (response_tsv): Likewise.
1242 (cmd_qtnotes): Likewise.
1243 (gdb_collect): Likewise.
1244 (initialize_tracepoint): Likewise.
1246 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1248 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1249 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1250 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1252 (enum aarch64_condition_codes): New enum.
1253 (w0): New static global.
1256 (struct aarch64_memory_operand) <type>: New
1257 MEMORY_OPERAND_POSTINDEX type.
1258 (postindex_memory_operand): New helper function.
1259 (emit_ret): New function.
1260 (emit_load_store_pair): New function, factored out of emit_stp
1261 with support for MEMORY_OPERAND_POSTINDEX.
1262 (emit_stp): Rewrite using emit_load_store_pair.
1263 (emit_ldp): New function.
1264 (emit_load_store): Likewise.
1265 (emit_ldr): Mention post-index instruction in comment.
1266 (emit_ldrh): New function.
1267 (emit_ldrb): New function.
1268 (emit_ldrsw): Mention post-index instruction in comment.
1269 (emit_str): Likewise.
1270 (emit_subs): New function.
1271 (emit_cmp): Likewise.
1272 (emit_and): Likewise.
1273 (emit_orr): Likewise.
1274 (emit_orn): Likewise.
1275 (emit_eor): Likewise.
1276 (emit_mvn): Likewise.
1277 (emit_lslv): Likewise.
1278 (emit_lsrv): Likewise.
1279 (emit_asrv): Likewise.
1280 (emit_mul): Likewise.
1281 (emit_sbfm): Likewise.
1282 (emit_sbfx): Likewise.
1283 (emit_ubfm): Likewise.
1284 (emit_ubfx): Likewise.
1285 (emit_csinc): Likewise.
1286 (emit_cset): Likewise.
1287 (emit_nop): Likewise.
1288 (emit_ops_insns): New helper function.
1289 (emit_pop): Likewise.
1290 (emit_push): Likewise.
1291 (aarch64_emit_prologue): New function.
1292 (aarch64_emit_epilogue): Likewise.
1293 (aarch64_emit_add): Likewise.
1294 (aarch64_emit_sub): Likewise.
1295 (aarch64_emit_mul): Likewise.
1296 (aarch64_emit_lsh): Likewise.
1297 (aarch64_emit_rsh_signed): Likewise.
1298 (aarch64_emit_rsh_unsigned): Likewise.
1299 (aarch64_emit_ext): Likewise.
1300 (aarch64_emit_log_not): Likewise.
1301 (aarch64_emit_bit_and): Likewise.
1302 (aarch64_emit_bit_or): Likewise.
1303 (aarch64_emit_bit_xor): Likewise.
1304 (aarch64_emit_bit_not): Likewise.
1305 (aarch64_emit_equal): Likewise.
1306 (aarch64_emit_less_signed): Likewise.
1307 (aarch64_emit_less_unsigned): Likewise.
1308 (aarch64_emit_ref): Likewise.
1309 (aarch64_emit_if_goto): Likewise.
1310 (aarch64_emit_goto): Likewise.
1311 (aarch64_write_goto_address): Likewise.
1312 (aarch64_emit_const): Likewise.
1313 (aarch64_emit_call): Likewise.
1314 (aarch64_emit_reg): Likewise.
1315 (aarch64_emit_pop): Likewise.
1316 (aarch64_emit_stack_flush): Likewise.
1317 (aarch64_emit_zero_ext): Likewise.
1318 (aarch64_emit_swap): Likewise.
1319 (aarch64_emit_stack_adjust): Likewise.
1320 (aarch64_emit_int_call_1): Likewise.
1321 (aarch64_emit_void_call_2): Likewise.
1322 (aarch64_emit_eq_goto): Likewise.
1323 (aarch64_emit_ne_goto): Likewise.
1324 (aarch64_emit_lt_goto): Likewise.
1325 (aarch64_emit_le_goto): Likewise.
1326 (aarch64_emit_gt_goto): Likewise.
1327 (aarch64_emit_ge_got): Likewise.
1328 (aarch64_emit_ops_impl): New static global variable.
1329 (aarch64_emit_ops): New target function, return
1330 &aarch64_emit_ops_impl.
1331 (struct linux_target_ops): Install it.
1333 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1335 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1336 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1338 * linux-aarch64-ipa.c: New file.
1339 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1341 (aarch64_get_thread_area): New target method.
1342 (extract_signed_bitfield): New helper function.
1343 (aarch64_decode_ldr_literal): New function.
1344 (enum aarch64_opcodes): New enum.
1345 (struct aarch64_register): New struct.
1346 (struct aarch64_operand): New struct.
1347 (x0): New static global.
1356 (aarch64_register): New helper function.
1357 (register_operand): Likewise.
1358 (immediate_operand): Likewise.
1359 (struct aarch64_memory_operand): New struct.
1360 (offset_memory_operand): New helper function.
1361 (preindex_memory_operand): Likewise.
1362 (enum aarch64_system_control_registers): New enum.
1363 (ENCODE): New macro.
1364 (emit_insn): New helper function.
1365 (emit_b): New function.
1366 (emit_bcond): Likewise.
1367 (emit_cb): Likewise.
1368 (emit_tb): Likewise.
1369 (emit_blr): Likewise.
1370 (emit_stp): Likewise.
1371 (emit_ldp_q_offset): Likewise.
1372 (emit_stp_q_offset): Likewise.
1373 (emit_load_store): Likewise.
1374 (emit_ldr): Likewise.
1375 (emit_ldrsw): Likewise.
1376 (emit_str): Likewise.
1377 (emit_ldaxr): Likewise.
1378 (emit_stxr): Likewise.
1379 (emit_stlr): Likewise.
1380 (emit_data_processing_reg): Likewise.
1381 (emit_data_processing): Likewise.
1382 (emit_add): Likewise.
1383 (emit_sub): Likewise.
1384 (emit_mov): Likewise.
1385 (emit_movk): Likewise.
1386 (emit_mov_addr): Likewise.
1387 (emit_mrs): Likewise.
1388 (emit_msr): Likewise.
1389 (emit_sevl): Likewise.
1390 (emit_wfe): Likewise.
1391 (append_insns): Likewise.
1392 (can_encode_int32_in): New helper function.
1393 (aarch64_relocate_instruction): New function.
1394 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1395 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1396 (struct linux_target_ops): Install aarch64_get_thread_area,
1397 aarch64_install_fast_tracepoint_jump_pad and
1398 aarch64_get_min_fast_tracepoint_insn_len.
1400 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1402 * Makefile.in (aarch64-insn.o): New rule.
1403 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1405 2015-09-21 Yao Qi <yao.qi@linaro.org>
1407 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1409 2015-09-21 Yao Qi <yao.qi@linaro.org>
1411 * tracepoint.c (max_jump_pad_size): Remove.
1413 2015-09-18 Yao Qi <yao.qi@linaro.org>
1415 * linux-aarch64-low.c: Don't include sys/uio.h.
1416 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1418 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1420 * tracepoint.c (eval_result_type): Change prototype.
1421 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1423 2015-09-15 Pedro Alves <palves@redhat.com>
1425 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1426 Check whether to report exec events instead of checking whether
1427 multiprocess is enabled.
1429 2015-09-15 Pedro Alves <palves@redhat.com>
1432 * remote-utils.c (prepare_resume_reply): Merge
1433 TARGET_WAITKIND_VFORK_DONE switch case with the
1434 TARGET_WAITKIND_FORKED case.
1436 2015-09-15 Yao Qi <yao.qi@linaro.org>
1438 * server.c (handle_query): Check string comparison using
1439 "else if" instead of "if".
1441 2015-09-15 Yao Qi <yao.qi@linaro.org>
1443 * server.c (vCont_supported): New global variable.
1444 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1445 matches. Append ";vContSupported+" to own_buf.
1446 (handle_v_requests): Append ";s;S" to own_buf if target supports
1447 hardware single step or vCont_supported is false.
1448 (capture_main): Set vCont_supported to zero.
1450 2015-09-15 Yao Qi <yao.qi@linaro.org>
1452 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1454 (linux_supports_hardware_single_step): ... New function.
1455 (linux_target_ops): Update.
1456 * lynx-low.c (lynx_target_ops): Set field
1457 supports_hardware_single_step to target_can_do_hardware_single_step.
1458 * nto-low.c (nto_target_ops): Likewise.
1459 * spu-low.c (spu_target_ops): Likewise.
1460 * win32-low.c (win32_target_ops): Likewise.
1461 * target.c (target_can_do_hardware_single_step): New function.
1462 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1463 Remove. <supports_hardware_single_step>: New field.
1464 (target_supports_conditional_breakpoints): Remove.
1465 (target_supports_hardware_single_step): New macro.
1466 (target_can_do_hardware_single_step): Declare.
1467 * server.c (handle_query): Use target_supports_hardware_single_step
1468 instead of target_supports_conditional_breakpoints.
1470 2015-09-15 Yao Qi <yao.qi@linaro.org>
1472 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1474 (struct linux_target_ops the_low_target): Install
1475 aarch64_linux_siginfo_fixup.
1477 2015-09-11 Don Breazeal <donb@codesourcery.com>
1478 Luis Machado <lgustavo@codesourcery.com>
1480 * linux-low.c (linux_mourn): Static declaration.
1481 (linux_arch_setup): Move in front of
1482 handle_extended_wait.
1483 (linux_arch_setup_thread): New function.
1484 (handle_extended_wait): Handle exec events. Call
1485 linux_arch_setup_thread. Make event_lwp argument a
1486 pointer-to-a-pointer.
1487 (check_zombie_leaders): Do not check stopped threads.
1488 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1489 (linux_low_filter_event): Add lwp and thread for exec'ing
1490 non-leader thread if leader thread has been deleted.
1491 Refactor code into linux_arch_setup_thread and call it.
1492 Pass child lwp pointer by reference to handle_extended_wait.
1493 (linux_wait_for_event_filtered): Update comment.
1494 (linux_wait_1): Prevent clobbering exec event status.
1495 (linux_supports_exec_events): New function.
1496 (linux_target_ops) <supports_exec_events>: Initialize new member.
1497 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1499 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1500 * server.c (report_exec_events): New global variable.
1501 (handle_query): Handle qSupported query for exec-events feature.
1502 (captured_main): Initialize report_exec_events.
1503 * server.h (report_exec_events): Declare new global variable.
1504 * target.h (struct target_ops) <supports_exec_events>: New
1506 (target_supports_exec_events): New macro.
1507 * win32-low.c (win32_target_ops) <supports_exec_events>:
1508 Initialize new member.
1510 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1512 * linux-low.c (linux_low_enable_btrace): Remove.
1513 (linux_target_ops): Replace linux_low_enable_btrace with
1514 linux_enable_btrace.
1516 2015-09-03 Yao Qi <yao.qi@linaro.org>
1518 * linux-aarch64-low.c (aarch64_insert_point): Call
1519 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1522 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1524 * linux-low.c (check_stopped_by_breakpoint): Use
1525 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1527 2015-08-27 Pedro Alves <palves@redhat.com>
1529 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1531 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1533 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1534 the XNEW-family equivalent.
1535 (compile_bytecodes): Likewise.
1536 * dll.c (loaded_dll): Likewise.
1537 * event-loop.c (append_callback_event): Likewise.
1538 (create_file_handler): Likewise.
1539 (create_file_event): Likewise.
1540 * hostio.c (handle_open): Likewise.
1541 * inferiors.c (add_thread): Likewise.
1542 (add_process): Likewise.
1543 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1544 * linux-arm-low.c (arm_new_process): Likewise.
1545 (arm_new_thread): Likewise.
1546 * linux-low.c (add_to_pid_list): Likewise.
1547 (linux_add_process): Likewise.
1548 (handle_extended_wait): Likewise.
1549 (add_lwp): Likewise.
1550 (enqueue_one_deferred_signal): Likewise.
1551 (enqueue_pending_signal): Likewise.
1552 (linux_resume_one_lwp_throw): Likewise.
1553 (linux_resume_one_thread): Likewise.
1554 (linux_read_memory): Likewise.
1555 (linux_write_memory): Likewise.
1556 * linux-mips-low.c (mips_linux_new_process): Likewise.
1557 (mips_linux_new_thread): Likewise.
1558 (mips_add_watchpoint): Likewise.
1559 * linux-x86-low.c (initialize_low_arch): Likewise.
1560 * lynx-low.c (lynx_add_process): Likewise.
1561 * mem-break.c (set_raw_breakpoint_at): Likewise.
1562 (set_breakpoint): Likewise.
1563 (add_condition_to_breakpoint): Likewise.
1564 (add_commands_to_breakpoint): Likewise.
1565 (clone_agent_expr): Likewise.
1566 (clone_one_breakpoint): Likewise.
1567 * regcache.c (new_register_cache): Likewise.
1568 * remote-utils.c (look_up_one_symbol): Likewise.
1569 * server.c (queue_stop_reply): Likewise.
1570 (start_inferior): Likewise.
1571 (queue_stop_reply_callback): Likewise.
1572 (handle_target_event): Likewise.
1573 * spu-low.c (fetch_ppc_memory): Likewise.
1574 (store_ppc_memory): Likewise.
1575 * target.c (set_target_ops): Likewise.
1576 * thread-db.c (thread_db_load_search): Likewise.
1577 (try_thread_db_load_1): Likewise.
1578 * tracepoint.c (add_tracepoint): Likewise.
1579 (add_tracepoint_action): Likewise.
1580 (create_trace_state_variable): Likewise.
1581 (cmd_qtdpsrc): Likewise.
1582 (cmd_qtro): Likewise.
1583 (add_while_stepping_state): Likewise.
1584 * win32-low.c (child_add_thread): Likewise.
1585 (get_image_name): Likewise.
1587 2015-08-25 Yao Qi <yao.qi@linaro.org>
1589 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1591 2015-08-25 Yao Qi <yao.qi@linaro.org>
1593 * Makefile.in (aarch64-linux.o): New rule.
1594 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1596 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1597 (aarch64_init_debug_reg_state): Make it extern.
1598 (aarch64_linux_prepare_to_resume): Remove.
1600 2015-08-25 Yao Qi <yao.qi@linaro.org>
1602 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1603 lwp_arch_private_info and ptid_of_lwp.
1605 2015-08-25 Yao Qi <yao.qi@linaro.org>
1607 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1608 Find proc_info by find_process_pid. All callers updated.
1610 2015-08-25 Yao Qi <yao.qi@linaro.org>
1612 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1614 (debug_reg_change_callback): Remove.
1615 (aarch64_notify_debug_reg_change): Remove.
1617 2015-08-25 Yao Qi <yao.qi@linaro.org>
1619 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1620 Call current_lwp_ptid.
1622 2015-08-25 Yao Qi <yao.qi@linaro.org>
1624 * linux-aarch64-low.c (debug_reg_change_callback): Use
1627 2015-08-25 Yao Qi <yao.qi@linaro.org>
1629 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1631 2015-08-25 Yao Qi <yao.qi@linaro.org>
1633 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1635 2015-08-25 Yao Qi <yao.qi@linaro.org>
1637 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1640 2015-08-25 Yao Qi <yao.qi@linaro.org>
1642 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1644 (debug_reg_change_callback): Remove argument entry and add argument
1645 lwp. Remove local variable thread. Don't print thread id in the
1646 debugging output. Don't check whether pid of thread equals to pid.
1647 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1648 iterate_over_lwps instead find_inferior.
1650 2015-08-24 Pedro Alves <palves@redhat.com>
1652 * inferiors.c (get_first_process): New function.
1653 * inferiors.h (get_first_process): New declaration.
1654 * remote-utils.c (read_ptid): Default to the first process in the
1655 list, instead of to the current thread's process.
1657 2015-08-24 Pedro Alves <palves@redhat.com>
1659 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1660 * event-loop.c: Likewise.
1661 * remote-utils.c: Likewise.
1662 * tracepoint.c: Likewise.
1664 2015-08-24 Pedro Alves <palves@redhat.com>
1666 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1669 2015-08-21 Pedro Alves <palves@redhat.com>
1671 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1672 instead of literal 1.
1674 2015-08-21 Pedro Alves <palves@redhat.com>
1676 * tdesc.c (default_description): Explicitly zero-initialize.
1678 2015-08-21 Pedro Alves <palves@redhat.com>
1681 * inferiors.c (remove_thread): Discard any pending stop reply for
1683 * server.c (remove_all_on_match_pid): Rename to ...
1684 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1686 (discard_queued_stop_replies): Change parameter to a ptid. Now
1688 (handle_v_kill, kill_inferior_callback, captured_main)
1689 (process_serial_event): Adjust.
1690 * server.h (discard_queued_stop_replies): Declare.
1692 2015-08-21 Pedro Alves <palves@redhat.com>
1694 * linux-low.c (wait_for_sigstop): Always switch to no thread
1695 selected if the previously current thread dies.
1696 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1697 process instead of the current thread's.
1698 * remote-utils.c (input_interrupt): Don't check if there's no
1700 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1701 current thread to the general thread fails, error out.
1702 (handle_qxfer_auxv, handle_qxfer_libraries)
1703 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1704 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1705 (handle_query): Check if there's a thread selected instead of
1706 checking whether there's any thread in the thread list.
1707 (handle_qxfer_threads, handle_qxfer_btrace)
1708 (handle_qxfer_btrace_conf): Don't error out early if there's no
1709 thread in the thread list.
1710 (handle_v_cont, myresume): Don't set the current thread to the
1712 (process_serial_event) <Hg handling>: Also set thread_id if the
1713 previous general thread is still alive.
1714 (process_serial_event) <g/G handling>: If setting the current
1715 thread to the general thread fails, error out.
1716 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1717 thread's lwp instead of the current thread's.
1718 * target.c (set_desired_thread): If the desired thread was not
1719 found, leave the current thread pointing to NULL. Return an int
1720 (boolean) indicating success.
1721 * target.h (set_desired_thread): Change return type to int.
1723 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1725 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1726 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1728 (ps_get_thread_area): New function.
1730 2015-08-19 Gary Benson <gbenson@redhat.com>
1732 * hostio.c (handle_pread): Do not attempt to read more data
1733 than hostio_reply_with_data can fit in a packet.
1735 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1737 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1739 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1741 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1743 2015-08-06 Pedro Alves <palves@redhat.com>
1745 * tracepoint.c (expr_eval_result): Now an int.
1747 2015-08-06 Pedro Alves <palves@redhat.com>
1749 * gdbthread.h (struct regcache): Forward declare.
1750 (struct thread_info) <regcache_data>: Now a struct regcache
1752 * inferiors.c (inferior_regcache_data)
1753 (set_inferior_regcache_data): Now work with struct regcache
1755 * inferiors.h (struct regcache): Forward declare.
1756 (inferior_regcache_data, set_inferior_regcache_data): Now work
1757 with struct regcache pointers.
1758 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1759 (free_register_cache_thread): Remove struct regcache pointer
1762 2015-08-06 Pedro Alves <palves@redhat.com>
1764 * server.c (captured_main): On error, print the exception message
1765 to stderr, and if run_once is set, throw a quit.
1767 2015-08-06 Pedro Alves <palves@redhat.com>
1769 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1772 2015-08-06 Pedro Alves <palves@redhat.com>
1774 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1775 reading beyond the passed in buffer length.
1777 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1779 * tracepoint.c (symbol_list) <required>: Remove.
1781 2015-08-06 Pedro Alves <palves@redhat.com>
1783 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1784 count if stopping and suspending threads.
1785 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1786 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1787 (linux_detach): Complete an ongoing step-over.
1788 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1790 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1791 (linux_wait_1): If passing a signal to the inferior after
1792 finishing a step-over, unsuspend and re-resume all lwps. If we
1793 see a single-step event but the thread should be continuing, don't
1794 pass the trap to gdb.
1795 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1796 internal_error instead of gdb_assert.
1797 (enqueue_pending_signal): New function.
1798 (check_ptrace_stopped_lwp_gone): Add debug output.
1799 (start_step_over): Use internal_error instead of gdb_assert.
1800 (complete_ongoing_step_over): New function.
1801 (linux_resume_one_thread): Don't resume a suspended thread.
1802 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1805 2015-08-06 Pedro Alves <palves@redhat.com>
1807 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1808 (linux_thread_alive): Use lwp_is_marked_dead.
1809 (extended_event_reported): Delete.
1810 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1811 instead of extended_event_reported.
1812 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1814 (lwp_is_marked_dead): New function.
1815 (lwp_running): Use lwp_is_marked_dead.
1816 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1819 2015-08-06 Pedro Alves <palves@redhat.com>
1821 * linux-low.c (linux_wait_1): Move fork event output out of the
1822 !report_to_gdb check. Pass event_child->waitstatus to
1823 target_waitstatus_to_string instead of ourstatus.
1825 2015-08-04 Yao Qi <yao.qi@linaro.org>
1827 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1828 if current_thread is 32 bit.
1830 2015-08-04 Yao Qi <yao.qi@linaro.org>
1832 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1833 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1834 * server.c (extended_protocol): Remove "static".
1835 * server.h (extended_protocol): Declare it.
1837 2015-08-04 Yao Qi <yao.qi@linaro.org>
1839 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1840 both aarch64 and aarch32.
1841 (aarch64_set_pc): Likewise.
1843 2015-08-04 Yao Qi <yao.qi@linaro.org>
1845 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1846 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1847 arm-with-neon.xml to srv_xmlfiles.
1848 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1849 (is_64bit_tdesc): New function.
1850 (aarch64_linux_read_description): New function.
1851 (aarch64_arch_setup): Call aarch64_linux_read_description.
1852 (regs_info): Rename to regs_info_aarch64.
1853 (aarch64_regs_info): Return right regs_info.
1854 (initialize_low_arch): Call initialize_low_arch_aarch32.
1856 2015-08-04 Yao Qi <yao.qi@linaro.org>
1858 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1859 * linux-aarch32-low.c: New file.
1860 * linux-aarch32-low.h: New file.
1861 * linux-arm-low.c (arm_fill_gregset): Move it to
1862 linux-aarch32-low.c.
1863 (arm_store_gregset): Likewise.
1864 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1865 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1866 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1867 (regs_info): Rename to regs_info_arm.
1868 (arm_regs_info): Return regs_info_aarch32 if
1869 have_ptrace_getregset is 1 and target description is
1870 arm_with_neon or arm_with_vfpv3.
1871 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1872 Call initialize_low_arch_aarch32 instead.
1874 2015-08-04 Yao Qi <yao.qi@linaro.org>
1876 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1877 * linux-low.c: ... here.
1878 * linux-low.h (have_ptrace_getregset): Declare it.
1880 2015-08-04 Pedro Alves <palves@redhat.com>
1882 * thread-db.c (struct thread_db): Use new typedefs.
1883 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1885 (disable_thread_event_reporting): Cast result of dlsym to
1886 destination function pointer type.
1887 (thread_db_mourn): Use td_ta_delete_ftype.
1889 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1891 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1893 (CDX_BREAKPOINT): Define for R2.
1894 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1895 (the_low_target): Add comments.
1897 2015-07-30 Yao Qi <yao.qi@linaro.org>
1899 * linux-arm-low.c (arm_hwcap): Remove it.
1900 (arm_read_description): New local variable arm_hwcap. Don't
1901 set arm_hwcap to zero.
1903 2015-07-30 Yao Qi <yao.qi@linaro.org>
1905 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1906 Use regcache->tdesc instead.
1907 (arm_store_wmmxregset): Likewise.
1908 (arm_fill_vfpregset): Likewise.
1909 (arm_store_vfpregset): Likewise.
1911 2015-07-30 Yao Qi <yao.qi@linaro.org>
1913 * linux-arm-low.c: Include arch/arm.h.
1914 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1915 (arm_store_gregset): Likewise.
1917 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1919 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1920 ptrace's 4th parameter.
1922 2015-07-27 Yao Qi <yao.qi@linaro.org>
1924 * configure.srv (case aarch64*-*-linux*): Don't set
1927 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1929 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1931 * linux-arm-low.c: Likewise.
1932 * linux-cris-low.c: Likewise.
1933 * linux-crisv32-low.c: Likewise.
1934 * linux-low.c: Likewise.
1935 * linux-m68k-low.c: Likewise.
1936 * linux-mips-low.c: Likewise.
1937 * linux-nios2-low.c: Likewise.
1938 * linux-s390-low.c: Likewise.
1939 * linux-sparc-low.c: Likewise.
1940 * linux-tic6x-low.c: Likewise.
1941 * linux-tile-low.c: Likewise.
1942 * linux-x86-low.c: Likewise.
1944 2015-07-24 Pedro Alves <palves@redhat.com>
1946 * config.in: Regenerate.
1947 * configure: Regenerate.
1949 2015-07-24 Pedro Alves <palves@redhat.com>
1951 * acinclude.m4: Include ../ptrace.m4.
1952 * configure.ac: Call GDB_AC_PTRACE.
1953 * config.in, configure: Regenerate.
1955 2015-07-24 Yao Qi <yao.qi@linaro.org>
1957 * linux-low.c (linux_create_inferior): Remove setting to
1958 proc->priv->new_inferior.
1959 (linux_attach): Likewise.
1960 (linux_low_filter_event): Likewise.
1961 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1963 2015-07-24 Yao Qi <yao.qi@linaro.org>
1965 * linux-low.c (linux_arch_setup): New function.
1966 (linux_low_filter_event): If proc->tdesc is NULL and
1967 proc->attached is true, call the_low_target.arch_setup.
1968 Otherwise, keep status pending, and return.
1969 (linux_resume_one_lwp_throw): Don't call get_pc if
1970 thread->while_stepping isn't NULL. Don't call
1971 get_thread_regcache if proc->tdesc is NULL.
1972 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1973 (linux_target_ops): Install arch_setup.
1974 * server.c (start_inferior): Call the_target->arch_setup.
1975 * target.h (struct target_ops) <arch_setup>: New field.
1976 (target_arch_setup): New marco.
1977 * lynx-low.c (lynx_target_ops): Update.
1978 * nto-low.c (nto_target_ops): Update.
1979 * spu-low.c (spu_target_ops): Update.
1980 * win32-low.c (win32_target_ops): Update.
1982 2015-07-24 Yao Qi <yao.qi@linaro.org>
1984 * linux-low.c (linux_add_process): Don't set
1985 proc->priv->new_inferior.
1986 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1987 (linux_attach): Likewise.
1989 2015-07-24 Yao Qi <yao.qi@linaro.org>
1991 * server.c (start_inferior): Code refactor.
1993 2015-07-24 Yao Qi <yao.qi@linaro.org>
1995 * server.c (process_serial_event): Set general_thread.
1997 2015-07-21 Yao Qi <yao.qi@linaro.org>
1999 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2000 aarch64_linux_get_debug_reg_capacity.
2002 2015-07-17 Yao Qi <yao.qi@linaro.org>
2004 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2005 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2006 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2007 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2008 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2009 (AARCH64_HWP_ALIGNMENT): Likewise.
2010 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2011 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2012 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2013 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2014 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2015 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2016 (struct aarch64_debug_reg_state): Likewise.
2017 (struct arch_lwp_info): Likewise.
2018 (aarch64_align_watchpoint): Likewise.
2019 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2020 (aarch64_watchpoint_length): Likewise.
2021 (aarch64_point_encode_ctrl_reg): Likewise
2022 (aarch64_point_is_aligned): Likewise.
2023 (aarch64_align_watchpoint): Likewise.
2024 (aarch64_linux_set_debug_regs):
2025 (aarch64_dr_state_insert_one_point): Likewise.
2026 (aarch64_dr_state_remove_one_point): Likewise.
2027 (aarch64_handle_breakpoint): Likewise.
2028 (aarch64_handle_aligned_watchpoint): Likewise.
2029 (aarch64_handle_unaligned_watchpoint): Likewise.
2030 (aarch64_handle_watchpoint): Likewise.
2032 2015-07-17 Yao Qi <yao.qi@linaro.org>
2034 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2035 and don't aarch64_get_debug_reg_state. All callers update.
2036 (aarch64_handle_aligned_watchpoint): Likewise.
2037 (aarch64_handle_unaligned_watchpoint): Likewise.
2038 (aarch64_handle_watchpoint): Likewise.
2039 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2040 (aarch64_remove_point): Likewise.
2042 2015-07-17 Yao Qi <yao.qi@linaro.org>
2044 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2046 (aarch64_handle_unaligned_watchpoint): Likewise.
2048 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2050 Revert the previous 3 commits:
2051 Move gdb_regex* to common/
2052 Move linux_find_memory_regions_full & co.
2053 gdbserver build-id attribute generator
2055 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2056 Jan Kratochvil <jan.kratochvil@redhat.com>
2058 gdbserver build-id attribute generator.
2059 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2060 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2061 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2063 (get_dynamic): Use find_pdhr to traverse program headers.
2064 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2065 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2066 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2067 (get_hex_build_id): New.
2068 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2069 to reply XML document.
2071 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2072 Jan Kratochvil <jan.kratochvil@redhat.com>
2074 * target.c: Include target/target-utils.h and fcntl.h.
2075 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2076 (target_fileio_read_stralloc): New functions.
2078 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2080 * Makefile.in (OBS): Add gdb_regex.o.
2082 * config.in: Rebuilt.
2083 * configure: Rebuilt.
2085 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2086 Jan Kratochvil <jan.kratochvil@redhat.com>
2088 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2089 * Makefile.in (OBS): Add target-utils.o.
2090 (linux-maps.o, target-utils.o): New.
2091 * configure.srv (srv_linux_obj): Add linux-maps.o.
2093 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2095 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2097 (the_low_target): Install it.
2099 2015-07-14 Pedro Alves <palves@redhat.com>
2101 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2102 Instead, ignore ECHILD, and throw an error for other errnos.
2104 2015-07-10 Pedro Alves <palves@redhat.com>
2106 * event-loop.c (struct callback_event) <data>: Change type to
2107 gdb_client_data instance instead of gdb_client_data pointer.
2108 (append_callback_event): Adjust.
2110 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2112 * linux-aarch64-low.c: Add comments for each linux_target_ops
2113 method. Remove comments already covered in target_ops and
2114 linux_target_ops definitions.
2115 (the_low_target): Add comments for each unimplemented method.
2117 2015-07-09 Yao Qi <yao.qi@linaro.org>
2119 * linux-aarch64-low.c (aarch64_regmap): Remove.
2120 (aarch64_usrregs_info): Remove.
2121 (regs_info): Set field usrregs to NULL.
2123 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2125 * linux-low.c: Include "rsp-low.h"
2126 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2127 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2128 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2129 (handle_btrace_enable_pt): New.
2130 (handle_btrace_general_set): Support "pt".
2131 (handle_btrace_conf_general_set): Support "pt:size".
2133 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2135 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2138 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2140 * linux-aarch64-low.c: Remove comment about endianness.
2141 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2142 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2145 2015-06-24 Gary Benson <gbenson@redhat.com>
2147 * linux-i386-ipa.c (stdint.h): Do not include.
2148 * lynx-i386-low.c (stdint.h): Likewise.
2149 * lynx-ppc-low.c (stdint.h): Likewise.
2150 * mem-break.c (stdint.h): Likewise.
2151 * thread-db.c (stdint.h): Likewise.
2152 * tracepoint.c (stdint.h): Likewise.
2153 * win32-low.c (stdint.h): Likewise.
2155 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2157 * server.c (write_qxfer_response): Update call to
2158 remote_escape_output.
2160 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2161 Jan Kratochvil <jan.kratochvil@redhat.com>
2163 Merge multiple hex conversions.
2164 * gdbreplay.c (tohex): Rename to 'fromhex'.
2165 (logchar): Use fromhex.
2167 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2169 * server.c (handle_qxfer_libraries): Set `version' attribute for
2172 2015-06-10 Gary Benson <gbenson@redhat.com>
2174 * target.h (struct target_ops) <multifs_open>: New field.
2175 <multifs_unlink>: Likewise.
2176 <multifs_readlink>: Likewise.
2177 * linux-low.c (nat/linux-namespaces.h): New include.
2178 (linux_target_ops): Initialize the_target->multifs_open,
2179 the_target->multifs_unlink and the_target->multifs_readlink.
2180 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2181 * hostio.c (hostio_fs_pid): New static variable.
2182 (hostio_handle_new_gdb_connection): New function.
2183 (handle_setfs): Likewise.
2184 (handle_open): Use the_target->multifs_open as appropriate.
2185 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2186 (handle_readlink): Use the_target->multifs_readlink as
2188 (handle_vFile): Handle vFile:setfs packets.
2189 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2190 after target_handle_new_gdb_connection.
2192 2015-06-10 Gary Benson <gbenson@redhat.com>
2194 * configure.ac (AC_CHECK_FUNCS): Add setns.
2195 * config.in: Regenerate.
2196 * configure: Likewise.
2197 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2198 (linux-namespaces.o): New rule.
2199 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2201 2015-06-09 Gary Benson <gbenson@redhat.com>
2203 * hostio.c (handle_open): Process mode argument with
2204 fileio_to_host_mode.
2206 2015-06-01 Yao Qi <yao.qi@linaro.org>
2208 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2209 * linux-x86-low.c: Likewise.
2211 2015-05-28 Don Breazeal <donb@codesourcery.com>
2213 * linux-low.c (handle_extended_wait): Initialize
2214 thread_info.last_resume_kind for new fork children.
2216 2015-05-15 Pedro Alves <palves@redhat.com>
2218 * target.h (target_handle_new_gdb_connection): Rewrite using if
2219 wrapped in do/while.
2221 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2223 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2224 * configure, config.in: Regenerate.
2225 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2228 2015-05-12 Don Breazeal <donb@codesourcery.com>
2230 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2231 PTRACE_EVENT_VFORK_DONE.
2232 (linux_low_ptrace_options, extended_event_reported): Add vfork
2234 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2235 and "vforkdone" for RSP 'T' Stop Reply Packet.
2236 * server.h (report_vfork_events): Declare
2239 2015-05-12 Don Breazeal <donb@codesourcery.com>
2241 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2242 (the_low_target) <new_fork>: Initialize new member.
2243 * linux-arm-low.c (arm_new_fork): New function.
2244 (the_low_target) <new_fork>: Initialize new member.
2245 * linux-low.c (handle_extended_wait): Call new target function
2247 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2248 * linux-mips-low.c (mips_add_watchpoint): New function
2249 extracted from mips_insert_point.
2250 (the_low_target) <new_fork>: Initialize new member.
2251 (mips_linux_new_fork): New function.
2252 (mips_insert_point): Call mips_add_watchpoint.
2253 * linux-x86-low.c (x86_linux_new_fork): New function.
2254 (the_low_target) <new_fork>: Initialize new member.
2256 2015-05-12 Don Breazeal <donb@codesourcery.com>
2258 * linux-low.c (handle_extended_wait): Implement return value,
2259 rename argument 'event_child' to 'event_lwp', handle
2260 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2261 (linux_low_ptrace_options): New function.
2262 (linux_low_filter_event): Call linux_low_ptrace_options,
2263 use different argument fo linux_enable_event_reporting,
2264 use return value from handle_extended_wait.
2265 (extended_event_reported): New function.
2266 (linux_wait_1): Call extended_event_reported and set
2267 status to report fork events.
2268 (linux_write_memory): Add pid to debug message.
2269 (reset_lwp_ptrace_options_callback): New function.
2270 (linux_handle_new_gdb_connection): New function.
2271 (linux_target_ops): Initialize new structure member.
2272 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2273 * lynx-low.c: Initialize new structure member.
2274 * remote-utils.c (prepare_resume_reply): Implement stop reason
2275 "fork" for "T" stop message.
2276 * server.c (handle_query): Call handle_new_gdb_connection.
2277 * server.h (report_fork_events): Declare global flag.
2278 * target.h (struct target_ops) <handle_new_gdb_connection>:
2280 (target_handle_new_gdb_connection): New macro.
2281 * win32-low.c: Initialize new structure member.
2283 2015-05-12 Don Breazeal <donb@codesourcery.com>
2285 * mem-break.c (APPEND_TO_LIST): Define macro.
2286 (clone_agent_expr): New function.
2287 (clone_one_breakpoint): New function.
2288 (clone_all_breakpoints): New function.
2289 * mem-break.h: Declare new functions.
2291 2015-05-12 Don Breazeal <donb@codesourcery.com>
2293 * linux-low.c (linux_supports_fork_events): New function.
2294 (linux_supports_vfork_events): New function.
2295 (linux_target_ops): Initialize new structure members.
2296 (initialize_low): Call linux_check_ptrace_features.
2297 * lynx-low.c (lynx_target_ops): Initialize new structure
2299 * server.c (report_fork_events, report_vfork_events):
2301 (handle_query): Add new features to qSupported packet and
2303 (captured_main): Initialize new global variables.
2304 * target.h (struct target_ops) <supports_fork_events>:
2306 <supports_vfork_events>: New member.
2307 (target_supports_fork_events): New macro.
2308 (target_supports_vfork_events): New macro.
2309 * win32-low.c (win32_target_ops): Initialize new structure
2312 2015-05-12 Gary Benson <gbenson@redhat.com>
2314 * server.c (handle_qxfer_exec_file): Use current process
2317 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2319 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2320 Remove HAVE_PTRACE_GETREGS conditionals.
2321 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2322 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2324 2015-05-08 Yao Qi <yao.qi@linaro.org>
2326 * linux-low.c (linux_supports_conditional_breakpoints): New
2328 (linux_target_ops): Install new target method.
2329 * lynx-low.c (lynx_target_ops): Install NULL hook for
2330 supports_conditional_breakpoints.
2331 * nto-low.c (nto_target_ops): Likewise.
2332 * spu-low.c (spu_target_ops): Likewise.
2333 * win32-low.c (win32_target_ops): Likewise.
2334 * server.c (handle_query): Check
2335 target_supports_conditional_breakpoints.
2336 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2338 (target_supports_conditional_breakpoints): New macro.
2340 2015-05-06 Pedro Alves <palves@redhat.com>
2343 * server.c (start_inferior): If the process exits, mourn it.
2345 2015-04-21 Gary Benson <gbenson@redhat.com>
2347 * hostio.c (fileio_open_flags_to_host): Factored out to
2348 fileio_to_host_openflags in common/fileio.c. Single use
2351 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2353 * linux-xtensa-low.c (xtensa_fill_gregset)
2354 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2357 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2359 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2360 (regs_info): Replace usrregs pointer with NULL.
2362 2015-04-17 Gary Benson <gbenson@redhat.com>
2364 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2365 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2366 * server.c (handle_qxfer_exec_file): New function.
2367 (qxfer_packets): Add exec-file entry.
2368 (handle_query): Report qXfer:exec-file:read as supported packet.
2370 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2372 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2374 2015-04-09 Gary Benson <gbenson@redhat.com>
2376 * hostio-errno.c (errno_to_fileio_error): Remove function.
2377 Update caller to use remote_fileio_to_fio_error.
2379 2015-04-09 Yao Qi <yao.qi@linaro.org>
2381 * linux-low.c (linux_insert_point): Call
2382 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2383 (linux_remove_point): Call remove_memory_breakpoint if type is
2385 * linux-x86-low.c (x86_insert_point): Don't call
2386 insert_memory_breakpoint.
2387 (x86_remove_point): Don't call remove_memory_breakpoint.
2389 2015-04-01 Pedro Alves <palves@redhat.com>
2390 Cleber Rosa <crosa@redhat.com>
2392 * server.c (gdbserver_usage): Reorganize and extend the usage
2395 2015-03-24 Pedro Alves <palves@redhat.com>
2397 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2398 output. Also dump TRAP_TRACE.
2399 (linux_low_filter_event): In debug output, distinguish a
2400 resume_stop SIGSTOP from a delayed SIGSTOP.
2402 2015-03-24 Gary Benson <gbenson@redhat.com>
2404 * linux-x86-low.c (x86_linux_new_thread): Moved to
2406 (x86_linux_prepare_to_resume): Likewise.
2408 2015-03-24 Gary Benson <gbenson@redhat.com>
2410 * Makefile.in (x86-linux-dregs.o): New rule.
2411 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2412 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2413 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2414 (x86_linux_dr_get): Likewise.
2415 (x86_linux_dr_set): Likewise.
2416 (update_debug_registers_callback): Likewise.
2417 (x86_linux_dr_set_addr): Likewise.
2418 (x86_linux_dr_get_addr): Likewise.
2419 (x86_linux_dr_set_control): Likewise.
2420 (x86_linux_dr_get_control): Likewise.
2421 (x86_linux_dr_get_status): Likewise.
2422 (x86_linux_update_debug_registers): Likewise.
2424 2015-03-24 Gary Benson <gbenson@redhat.com>
2426 * linux-x86-low.c (x86_linux_update_debug_registers):
2427 New function, factored out from...
2428 (x86_linux_prepare_to_resume): ...this.
2430 2015-03-24 Gary Benson <gbenson@redhat.com>
2432 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2433 (x86_linux_dr_set): Likewise.
2434 (update_debug_registers_callback): Likewise.
2435 (x86_linux_dr_set_addr): Likewise.
2436 (x86_linux_dr_get_addr): Likewise.
2437 (x86_linux_dr_set_control): Likewise.
2438 (x86_linux_dr_get_control): Likewise.
2439 (x86_linux_dr_get_status): Likewise.
2440 (x86_linux_prepare_to_resume): Likewise.
2442 2015-03-24 Gary Benson <gbenson@redhat.com>
2444 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2445 Use perror_with_name. Pass string through gettext.
2446 (x86_linux_dr_set): Likewise.
2448 2015-03-24 Gary Benson <gbenson@redhat.com>
2450 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2451 (x86_linux_dr_set_addr): ...this.
2452 (x86_dr_low_get_addr): Rename to...
2453 (x86_linux_dr_get_addr): ...this.
2454 (x86_dr_low_set_control): Rename to...
2455 (x86_linux_dr_set_control): ...this.
2456 (x86_dr_low_get_control): Rename to...
2457 (x86_linux_dr_get_control): ...this.
2458 (x86_dr_low_get_status): Rename to...
2459 (x86_linux_dr_get_status): ...this.
2460 (x86_dr_low): Update with new function names.
2462 2015-03-24 Gary Benson <gbenson@redhat.com>
2464 * Makefile.in (x86-linux.o): New rule.
2465 * configure.srv: Add x86-linux.o to relevant targets.
2466 * linux-low.c (lwp_set_arch_private_info): New function.
2467 (lwp_arch_private_info): Likewise.
2468 * linux-x86-low.c: Include nat/x86-linux.h.
2469 (arch_lwp_info): Removed structure.
2470 (update_debug_registers_callback):
2471 Use lwp_set_debug_registers_changed.
2472 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2473 and lwp_set_debug_registers_changed.
2474 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2476 2015-03-24 Gary Benson <gbenson@redhat.com>
2478 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2479 * linux-arm-low.c (arm_new_thread): Likewise.
2480 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2481 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2482 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2483 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2485 2015-03-24 Gary Benson <gbenson@redhat.com>
2487 * linux-low.c (ptid_of_lwp): New function.
2488 (lwp_is_stopped): Likewise.
2489 (lwp_stop_reason): Likewise.
2490 * linux-x86-low.c (update_debug_registers_callback):
2492 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2495 2015-03-24 Gary Benson <gbenson@redhat.com>
2497 * linux-low.h (linux_stop_lwp): Remove declaration.
2499 2015-03-24 Gary Benson <gbenson@redhat.com>
2501 * linux-low.h: Include nat/linux-nat.h.
2502 * linux-low.c (iterate_over_lwps_args): New structure.
2503 (iterate_over_lwps_filter): New function.
2504 (iterate_over_lwps): Likewise.
2505 * linux-x86-low.c (update_debug_registers_callback):
2506 Update signature to what iterate_over_lwps expects.
2507 Remove PID check that iterate_over_lwps now performs.
2508 (x86_dr_low_set_addr): Use iterate_over_lwps.
2509 (x86_dr_low_set_control): Likewise.
2511 2015-03-24 Gary Benson <gbenson@redhat.com>
2513 * linux-x86-low.c (x86_debug_reg_state): New function.
2514 (x86_linux_prepare_to_resume): Use the above.
2516 2015-03-24 Gary Benson <gbenson@redhat.com>
2518 * linux-low.c (current_lwp_ptid): New function.
2519 * linux-x86-low.c: Include nat/linux-nat.h.
2520 (x86_dr_low_get_addr): Use current_lwp_ptid.
2521 (x86_dr_low_get_control): Likewise.
2522 (x86_dr_low_get_status): Likewise.
2524 2015-03-20 Pedro Alves <palves@redhat.com>
2526 * tracepoint.c (cmd_qtstatus): Make "str" const.
2528 2015-03-20 Pedro Alves <palves@redhat.com>
2530 * server.c (handle_general_set): Make "req_str" const.
2532 2015-03-19 Pedro Alves <palves@redhat.com>
2534 * linux-low.c (linux_resume_one_lwp): Rename to ...
2535 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2536 instead call perror_with_name.
2537 (check_ptrace_stopped_lwp_gone): New function.
2538 (linux_resume_one_lwp): Reimplement as wrapper around
2539 linux_resume_one_lwp_throw that swallows errors if the LWP is
2542 2015-03-19 Pedro Alves <palves@redhat.com>
2544 * linux-low.c (count_events_callback, select_event_lwp_callback):
2545 No longer check whether the thread has resume_stop as last resume
2548 2015-03-19 Pedro Alves <palves@redhat.com>
2550 * linux-low.c (count_events_callback, select_event_lwp_callback):
2551 Use the lwp's status_pending_p field, not the thread's.
2553 2015-03-19 Pedro Alves <palves@redhat.com>
2555 * linux-low.c (select_event_lwp_callback): Update comments to
2556 no longer mention SIGTRAP.
2558 2015-03-18 Gary Benson <gbenson@redhat.com>
2560 * server.c (handle_query): Do not report vFile:fstat as supported.
2562 2015-03-11 Gary Benson <gbenson@redhat.com>
2564 * hostio.c (sys/types.h): New include.
2565 (sys/stat.h): Likewise.
2566 (common-remote-fileio.h): Likewise.
2567 (handle_fstat): New function.
2568 (handle_vFile): Handle vFile:fstat packets.
2570 2015-03-11 Gary Benson <gbenson@redhat.com>
2572 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2573 struct stat.st_blocks and struct stat.st_blksize.
2574 * configure: Regenerate.
2575 * config.in: Likewise.
2576 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2577 (OBS): Add common-remote-fileio.o.
2578 (common-remote-fileio.o): New rule.
2580 2015-03-09 Pedro Alves <palves@redhat.com>
2582 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2583 'struct sockaddr' pointer in 'accept' call.
2585 2015-03-09 Pedro Alves <palves@redhat.com>
2588 2015-03-07 Pedro Alves <palves@redhat.com>
2589 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2590 or <winsock2.h> here. Instead include "gdb_socket.h".
2591 (remote_open): Use union gdb_sockaddr_u.
2592 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2593 or <winsock2.h> here. Instead include "gdb_socket.h".
2594 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2595 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2597 (init_named_socket, gdb_agent_helper_thread): Use union
2600 2015-03-07 Pedro Alves <palves@redhat.com>
2602 * configure.ac (build_warnings): Move
2603 -Wdeclaration-after-statement to the C-specific set.
2604 * configure: Regenerate.
2606 2015-03-07 Pedro Alves <palves@redhat.com>
2608 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2609 or <winsock2.h> here. Instead include "gdb_socket.h".
2610 (remote_open): Use union gdb_sockaddr_u.
2611 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2612 or <winsock2.h> here. Instead include "gdb_socket.h".
2613 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2614 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2616 (init_named_socket, gdb_agent_helper_thread): Use union
2619 2015-03-07 Pedro Alves <palves@redhat.com>
2621 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2624 2015-03-06 Yao Qi <yao.qi@linaro.org>
2626 * linux-aarch64-low.c (aarch64_insert_point): Use
2627 show_debug_regs as a boolean.
2628 (aarch64_remove_point): Likewise.
2630 2015-03-05 Pedro Alves <palves@redhat.com>
2632 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2633 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2634 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2635 * nto-low.c (nto_target_ops): Likewise.
2636 * spu-low.c (spu_target_ops): Likewise.
2637 * win32-low.c (win32_target_ops): Likewise.
2639 2015-03-04 Pedro Alves <palves@redhat.com>
2641 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2642 Decide whether a breakpoint triggered based on the SIGTRAP's
2644 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2645 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2646 (linux_low_filter_event): Check for breakpoints before checking
2648 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2650 (linux_stopped_by_sw_breakpoint)
2651 (linux_supports_stopped_by_sw_breakpoint)
2652 (linux_stopped_by_hw_breakpoint)
2653 (linux_supports_stopped_by_hw_breakpoint): New functions.
2654 (linux_target_ops): Install new target methods.
2656 2015-03-04 Pedro Alves <palves@redhat.com>
2658 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2659 * server.c (swbreak_feature, hwbreak_feature): New globals.
2660 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2661 (captured_main): Clear swbreak_feature and hwbreak_feature.
2662 * server.h (swbreak_feature, hwbreak_feature): Declare.
2663 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2664 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2665 supports_stopped_by_hw_breakpoint>: New fields.
2666 (target_supports_stopped_by_sw_breakpoint)
2667 (target_stopped_by_sw_breakpoint)
2668 (target_supports_stopped_by_hw_breakpoint)
2669 (target_stopped_by_hw_breakpoint): Declare.
2671 2015-03-04 Pedro Alves <palves@redhat.com>
2673 enum lwp_stop_reason -> enum target_stop_reason
2674 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2675 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2676 (linux_wait_1, stuck_in_jump_pad_callback)
2677 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2678 (linux_stopped_by_watchpoint):
2679 * linux-low.h (enum lwp_stop_reason): Delete.
2680 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2681 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2683 2015-03-04 Yao Qi <yao.qi@linaro.org>
2685 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2687 2015-03-03 Gary Benson <gbenson@redhat.com>
2689 * hostio.c (handle_vFile): Fix prefix lengths.
2691 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2693 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2696 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2698 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2699 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2700 (clean): Add "rm -f" for above C files.
2701 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2702 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2703 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2704 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2705 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2706 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2707 (init_registers_s390x_vx_linux64)
2708 (init_registers_s390x_tevx_linux64)
2709 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2710 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2712 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2713 (s390_store_vxrs_high): New functions.
2714 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2716 (s390_arch_setup): Add logic for selecting one of the new target
2717 descriptions. Activate the new vector regsets if applicable.
2718 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2719 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2720 and init_registers_s390x_tevx_linux64.
2722 2015-03-01 Pedro Alves <palves@redhat.com>
2724 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2727 2015-02-27 Pedro Alves <palves@redhat.com>
2729 * linux-x86-low.c (u_debugreg_offset): New function.
2730 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2732 2015-02-27 Pedro Alves <palves@redhat.com>
2734 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2735 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2736 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2737 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2738 (ps_lsetfpregs, ps_getpid)
2739 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2740 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2741 (ps_lsetxregs, ps_plog): Declare.
2743 2015-02-27 Pedro Alves <palves@redhat.com>
2745 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2746 IP_AGENT_EXPORT_FUNC.
2747 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2748 IP_AGENT_EXPORT_FUNC.
2749 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2750 (IP_AGENT_EXPORT): Delete.
2751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2753 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2754 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2755 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2756 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2757 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2758 (traceframe_read_count, traceframe_write_count)
2759 (traceframes_created, trace_state_variables, get_raw_reg)
2760 (get_trace_state_variable_value, set_trace_state_variable_value)
2761 (ust_loaded, helper_thread_id, cmd_buf): Use
2762 IPA_SYM_EXPORTED_NAME.
2763 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2764 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2765 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2766 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2767 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2768 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2769 EXTERN_C_PUSH/EXTERN_C_POP.
2770 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2771 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2772 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2773 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2774 (traceframe_write_count, traceframe_read_count)
2775 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2776 (about_to_request_buffer_space, get_trace_state_variable_value)
2777 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2778 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2779 EXTERN_C_PUSH/EXTERN_C_POP.
2780 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2781 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2782 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2783 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2784 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2785 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2786 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2787 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2789 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2790 (IP_AGENT_EXPORT_VAR_DECL): Define.
2792 (gdb_agent_get_raw_reg): Declare.
2794 2015-02-27 Tom Tromey <tromey@redhat.com>
2795 Pedro Alves <palves@redhat.com>
2797 Rename symbols whose names are reserved C++ keywords throughout.
2799 2015-02-27 Pedro Alves <palves@redhat.com>
2801 * Makefile.in (COMPILER): New, get it from autoconf.
2802 (CXX): Get from autoconf instead.
2803 (COMPILE.pre): Use COMPILER.
2804 (CC-LD): Rename to ...
2805 (CC_LD): ... this. Use COMPILER.
2806 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2807 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2808 * acinclude.m4: Include build-with-cxx.m4.
2809 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2810 Disable -Werror by default if building in C++ mode.
2811 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2812 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2813 the C++ compiler. Save/restore CXXFLAGS too.
2814 * configure: Regenerate.
2816 2015-02-27 Pedro Alves <palves@redhat.com>
2818 * acinclude.m4: Include libiberty.m4.
2819 * configure.ac: Call libiberty_INIT.
2820 * config.in, configure: Regenerate.
2822 2015-02-26 Pedro Alves <palves@redhat.com>
2824 * linux-low.c (linux_wait_1): When incrementing the PC past a
2825 program breakpoint always use the_low_target.breakpoint_len as
2826 increment, rather than the maximum between that and
2827 the_low_target.decr_pc_after_break.
2829 2015-02-23 Pedro Alves <palves@redhat.com>
2831 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2832 thread was doing a step-over; always adjust the PC if
2833 we stepped over a permanent breakpoint.
2834 (linux_wait_1): If we stepped over breakpoint that was on top of a
2835 permanent breakpoint, manually advance the PC past it.
2837 2015-02-23 Pedro Alves <palves@redhat.com>
2839 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2841 (x86_fill_gregset, x86_store_gregset): Use it when handling
2844 2015-02-20 Pedro Alves <palves@redhat.com>
2846 * thread-db.c: Include "nat/linux-procfs.h".
2847 (thread_db_init): Skip listing new threads if the kernel supports
2848 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2850 2015-02-20 Pedro Alves <palves@redhat.com>
2852 * linux-low.c (status_pending_p_callback): Use ptid_match.
2854 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2856 PR breakpoints/16812
2857 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2858 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2859 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2861 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2863 PR breakpoints/15956
2864 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2866 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2868 * linux-low.c (linux_low_btrace_conf): Print size.
2869 * server.c (handle_btrace_conf_general_set): New.
2870 (hanle_general_set): Call handle_btrace_conf_general_set.
2871 (handle_query): Report Qbtrace-conf:bts:size as supported.
2873 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2875 * linux-low.c (linux_low_enable_btrace): Update parameters.
2876 (linux_low_btrace_conf): New.
2877 (linux_target_ops)<to_btrace_conf>: Initialize.
2878 * server.c (current_btrace_conf): New.
2879 (handle_btrace_enable): Rename to ...
2880 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2881 to target_enable_btrace. Update comment. Update users.
2882 (handle_qxfer_btrace_conf): New.
2883 (qxfer_packets): Add btrace-conf entry.
2884 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2885 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2886 (target_ops)<read_btrace_conf>: New.
2887 (target_enable_btrace): Update parameters.
2888 (target_read_btrace_conf): New.
2890 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2892 * server.c (handle_btrace_general_set): Remove call to
2893 target_supports_btrace.
2894 (supported_btrace_packets): New.
2895 (handle_query): Call supported_btrace_packets.
2896 * target.h: include btrace-common.h.
2897 (btrace_target_info): Removed.
2898 (supports_btrace, target_supports_btrace): Update parameters.
2900 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2902 * Makefile.in (SFILES): Add common/btrace-common.c.
2903 (OBS): Add common/btrace-common.o.
2904 (btrace-common.o): Add build rules.
2905 * linux-low: Include btrace-common.h.
2906 (linux_low_read_btrace): Use struct btrace_data. Call
2907 btrace_data_init and btrace_data_fini.
2909 2015-02-06 Pedro Alves <palves@redhat.com>
2911 * thread-db.c (find_new_threads_callback): Add debug output.
2913 2015-02-04 Pedro Alves <palves@redhat.com>
2915 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2916 (resume_stopped_resumed_lwps): New function.
2917 (linux_wait_for_event_filtered): Use it.
2919 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2921 * Makefile.in (SFILES): Add linux-personality.c.
2922 (linux-personality.o): New rule.
2923 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2924 list of objects to be built.
2925 * linux-low.c: Include nat/linux-personality.h.
2926 (linux_create_inferior): Remove code to disable address space
2927 randomization (moved to ../nat/linux-personality.c). Create
2928 cleanup to disable address space randomization.
2930 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2932 * Makefile.in (posix-strerror.o): New rule.
2933 (mingw-strerror.o): Likewise.
2934 * configure: Regenerated.
2935 * configure.ac: Source file ../common/common.host. Initialize new
2936 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2938 2015-01-14 Yao Qi <yao@codesourcery.com>
2940 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2941 (ppc-linux.o): New rule.
2942 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2943 * configure.ac: AC_CHECK_FUNCS(getauxval).
2944 * config.in: Re-generated.
2945 * configure: Re-generated.
2946 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2947 ppc64_64bit_inferior_p
2949 2015-01-14 Yao Qi <yao@codesourcery.com>
2951 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2952 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2953 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2954 (PT_ORIG_R3, PT_TRAP): Likewise.
2955 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2956 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2957 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2959 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2961 * i387-fp.c (i387_cache_to_xsave): In look over
2962 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2963 zmmh_low_space field by use of zmmh_high_space.
2965 2015-01-09 Pedro Alves <palves@redhat.com>
2967 * linux-low.c (step_over_bkpt): Move higher up in the file.
2968 (handle_extended_wait): Don't store the stop_pc here.
2969 (get_stop_pc): Adjust comments and rename to ...
2970 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2971 stopped for a software breakpoint or hardware breakpoint.
2972 (thread_still_has_status_pending_p): New function.
2973 (status_pending_p_callback): Use
2974 thread_still_has_status_pending_p. If the event is no longer
2975 interesting, resume the LWP.
2976 (handle_tracepoints): Add assert.
2977 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2978 (wstatus_maybe_breakpoint): New function.
2979 (cancel_breakpoint): Delete function.
2980 (check_stopped_by_watchpoint): New function, factored out from
2981 linux_low_filter_event.
2982 (lp_status_maybe_breakpoint): Delete function.
2983 (linux_low_filter_event): Remove filter_ptid argument.
2984 Leave thread group exits pending here. Store the LWP's stop PC.
2985 Always leave events pending.
2986 (linux_wait_for_event_filtered): Pull all events out of the
2987 kernel, and leave them all pending.
2988 (count_events_callback, select_event_lwp_callback): Consider all
2990 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2991 (select_event_lwp): Only give preference to the stepping LWP in
2992 all-stop mode. Adjust comments.
2993 (ignore_event): New function.
2994 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2995 references to cancel_breakpoints. Adjust to renames. Also give
2996 equal priority to all LWPs that have had events in non-stop mode.
2997 If reporting a software breakpoint event, unadjust the LWP's PC.
2998 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2999 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3001 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3002 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3003 (linux_stopped_by_watchpoint): Adjust.
3004 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3005 * linux-low.h (enum lwp_stop_reason): New.
3006 (struct lwp_info) <stop_pc>: Adjust comment.
3007 <stopped_by_watchpoint>: Delete field.
3008 <stop_reason>: New field.
3009 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3010 * mem-break.c (software_breakpoint_inserted_here)
3011 (hardware_breakpoint_inserted_here): New function.
3012 * mem-break.h (software_breakpoint_inserted_here)
3013 (hardware_breakpoint_inserted_here): Declare.
3014 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3015 (cancel_breakpoints): Delete.
3016 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3017 (upload_fast_traceframes): Remove references to
3020 2015-01-09 Pedro Alves <palves@redhat.com>
3022 * thread-db.c (find_new_threads_callback): Ignore thread if the
3023 kernel thread ID is -1.
3025 2015-01-09 Pedro Alves <palves@redhat.com>
3027 * linux-low.c (linux_attach_fail_reason_string): Move to
3028 nat/linux-ptrace.c, and rename.
3029 (linux_attach_lwp): Update comment.
3030 (attach_proc_task_lwp_callback): New function.
3031 (linux_attach): Adjust to rename and use
3032 linux_proc_attach_tgid_threads.
3033 (linux_attach_fail_reason_string): Delete declaration.
3035 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3037 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3038 * server.c (gdbserver_version): Likewise.
3040 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3042 * remote-utils.c: Include ctype.h.
3043 (input_interrupt): Explicitly handle the case when the char
3044 received is the NUL byte. Improve the printing of non-ASCII
3047 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3049 * linux-low.c (linux_low_filter_event): Update call to
3050 linux_enable_event_reporting following the addition of
3051 a new parameter to that function.
3053 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3056 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3057 (AARCH64_FPCR_REGNO): Likewise.
3058 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3059 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3060 (aarch64_store_fpregset): Likewise.
3062 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3064 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3065 Remove FIXME comment about assumption about N.
3067 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3069 * configure.ac: If large-file support is disabled in GDBserver,
3070 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3071 * configure: Regenerate.
3073 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3075 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3076 warning upon ENODATA from ptrace.
3077 * linux-s390-low.c (s390_store_tdb): New.
3078 (s390_regsets): Add regset for NT_S390_TDB.
3080 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3082 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3083 without a fill_function.
3084 * linux-s390-low.c (s390_fill_last_break): Remove.
3085 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3086 (s390_arch_setup): Use regset's size instead of fill_function for
3089 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3091 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3092 the regset's store function when ptrace returned an error.
3093 * regcache.c (get_thread_regcache): Invalidate register cache
3094 before fetching inferior's registers.
3096 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3098 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3099 while-loop as for-loop.
3100 (regsets_store_inferior_registers): Likewise.
3102 2014-11-28 Yao Qi <yao@codesourcery.com>
3104 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3105 * config.in, configure: Re-generate.
3106 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3109 2014-11-21 Yao Qi <yao@codesourcery.com>
3111 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3112 (AC_CHECK_HEADERS): Remove malloc.h.
3113 * configure: Re-generated.
3114 * config.in: Re-generated.
3115 * server.h: Don't include alloca.h and malloc.h.
3116 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3117 Don't include malloc.h.
3119 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3121 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3122 corresponding ERRNO check in same block.
3124 2014-11-12 Pedro Alves <palves@redhat.com>
3126 * server.c (cont_thread): Update comment.
3127 (start_inferior, attach_inferior): No longer clear cont_thread.
3128 (handle_v_cont): No longer set cont_thread.
3129 (captured_main): Clear cont_thread each time a GDB connects.
3131 2014-11-12 Pedro Alves <palves@redhat.com>
3133 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3134 thread, and don't resume all threads if the Hc thread has exited.
3136 2014-11-12 Pedro Alves <palves@redhat.com>
3138 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3139 the process group instead of to a specific LWP.
3141 2014-10-15 Pedro Alves <palves@redhat.com>
3144 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3146 (arm_set_thread_context): Delete.
3147 (the_low_target): Adjust.
3148 * win32-i386-low.c (debug_registers_changed)
3149 (debug_registers_used): Delete.
3150 (update_debug_registers_callback): New function.
3151 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3152 needing to update their debug registers.
3153 (win32_get_current_dr): New function.
3154 (x86_dr_low_get_addr, x86_dr_low_get_control)
3155 (x86_dr_low_get_status): Fetch the debug register from the thread
3157 (i386_initial_stuff): Adjust.
3158 (i386_get_thread_context): Remove current_event parameter. Don't
3159 clear debug_registers_changed nor copy DR values to
3161 (i386_set_thread_context): Delete.
3162 (i386_prepare_to_resume): New function.
3163 (i386_thread_added): Mark the thread as needing to update irs
3165 (the_low_target): Remove i386_set_thread_context and install
3166 i386_prepare_to_resume.
3167 * win32-low.c (win32_get_thread_context): Adjust.
3168 (win32_set_thread_context): Use SetThreadContext
3170 (win32_prepare_to_resume): New function.
3171 (win32_require_context): New function, factored out from ...
3172 (thread_rec): ... this.
3173 (continue_one_thread): Call win32_prepare_to_resume on each thread
3174 we're about to continue.
3175 (win32_resume): Call win32_prepare_to_resume on the event thread.
3176 * win32-low.h (struct win32_thread_info)
3177 <debug_registers_changed>: New field.
3178 (struct win32_target_ops): Change prototype of set_thread_context,
3179 delete set_thread_context and add prepare_to_resume.
3180 (win32_require_context): New declaration.
3182 2014-10-08 Gary Benson <gbenson@redhat.com>
3184 * server.h: Do not include common-exceptions.h.
3186 2014-10-08 Gary Benson <gbenson@redhat.com>
3188 * server.h: Do not include cleanups.h.
3190 2014-09-30 James Hogan <james.hogan@imgtec.com>
3192 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3195 2014-09-23 Yao Qi <yao@codesourcery.com>
3197 * linux-low.c (lp_status_maybe_breakpoint): New function.
3198 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3199 (count_events_callback): Likewise.
3200 (select_event_lwp_callback): Likewise.
3201 (cancel_breakpoints_callback): Likewise.
3203 2014-09-19 Don Breazeal <donb@codesourcery.com>
3205 * linux-low.c (handle_extended_wait): Call
3206 linux_ptrace_get_extended_event.
3207 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3208 linux_is_extended_waitstatus.
3210 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3212 * Makefile.in (CPPFLAGS): Define.
3213 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3214 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3216 2014-09-16 Gary Benson <gbenson@redhat.com>
3218 * inferiors.h (current_inferior): Renamed as...
3219 (current_thread): New variable. All uses updated.
3220 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3221 (maybe_move_out_of_jump_pad): Likewise.
3222 (cancel_breakpoint): Likewise.
3223 (linux_low_filter_event): Likewise.
3224 (wait_for_sigstop): Likewise.
3225 (linux_resume_one_lwp): Likewise.
3226 (need_step_over_p): Likewise.
3227 (start_step_over): Likewise.
3228 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3229 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3230 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3231 and save_inferior as saved_thread.
3232 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3234 (regcache_invalidate_thread): Likewise.
3235 * remote-utils.c (prepare_resume_reply): Likewise.
3236 * thread-db.c (thread_db_get_tls_address): Likewise.
3237 (disable_thread_event_reporting): Likewise.
3238 (remove_thread_event_breakpoints): Likewise.
3239 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3241 * target.h (set_desired_inferior): Renamed as...
3242 (set_desired_thread): New declaration. All uses updated.
3243 * server.c (myresume): Updated comment to reference thread instead
3245 (handle_serial_event): Likewise.
3246 (handle_target_event): Likewise.
3248 2014-09-12 Tom Tromey <tromey@redhat.com>
3249 Gary Benson <gbenson@redhat.com>
3251 * regcache.h: Include common-regcache.h.
3252 (regcache_read_pc): Don't declare.
3253 * regcache.c (get_thread_regcache_for_ptid): New function.
3255 2014-09-11 Tom Tromey <tromey@redhat.com>
3256 Gary Benson <gbenson@redhat.com>
3258 * symbol.c: New file.
3259 * Makefile.in (SFILES): Add symbol.c.
3260 (OBS): Add symbol.o.
3262 2014-09-11 Gary Benson <gbenson@redhat.com>
3264 * target.c (target_stop_ptid, target_continue_ptid): New
3267 2014-09-11 Tom Tromey <tromey@redhat.com>
3268 Gary Benson <gbenson@redhat.com>
3270 * target.h: Include target/target.h.
3271 * target.c (target_read_memory, target_read_uint32)
3272 (target_write_memory): New functions.
3274 2014-09-11 Gary Benson <gbenson@redhat.com>
3276 * server.h (debug_hw_points): Don't declare.
3277 * server.c (debug_hw_points): Don't define. Replace all uses
3278 with show_debug_regs.
3279 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3280 all uses with show_debug_regs.
3282 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3284 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3285 endianness into account.
3286 (ppc_supply_ptrace_register): Likewise.
3288 2014-09-03 James Hogan <james.hogan@imgtec.com>
3290 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3291 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3293 2014-09-03 Gary Benson <gbenson@redhat.com>
3295 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3296 ALL_DEBUG_ADDRESS_REGISTERS.
3298 2014-09-02 Gary Benson <gbenson@redhat.com>
3300 * i386-low.h: Renamed as...
3301 * x86-low.h: New file. All type, function and variable name
3302 prefixes changed from "i386_" to "x86_". All references updated.
3303 * i386-low.c: Renamed as...
3304 * x86-low.c: New file. All type, function and variable name
3305 prefixes changed from "i386_" to "x86_". All references updated.
3307 2014-09-02 Gary Benson <gbenson@redhat.com>
3309 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3310 (x86_linux_new_thread): Likewise.
3312 2014-08-29 Gary Benson <gbenson@redhat.com>
3314 * server.h (setjmp.h): Do not include.
3315 (toplevel): Do not declare.
3316 (common-exceptions.h): Include.
3317 (cleanups.h): Likewise.
3318 * server.c (toplevel): Do not define.
3319 (exit_code): New static global.
3320 (detach_or_kill_for_exit_cleanup): New function.
3321 (main): New function. Original main renamed to...
3322 (captured_main): New function.
3323 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3325 2014-08-29 Gary Benson <gbenson@redhat.com>
3327 * Makefile.in (SFILES): Add common/common-exceptions.c.
3328 (OBS): Add common-exceptions.o.
3329 (common-exceptions.o): New rule.
3330 * utils.c (prepare_to_throw_exception): New function.
3332 2014-08-29 Gary Benson <gbenson@redhat.com>
3334 * config.in: Regenerate.
3335 * configure: Likewise.
3337 2014-08-29 Gary Benson <gbenson@redhat.com>
3339 * Makefile.in (SFILES): Add common/cleanups.c.
3341 (cleanups.o): New rule.
3343 2014-08-29 Gary Benson <gbenson@redhat.com>
3345 * utils.c (internal_vwarning): New function.
3347 2014-08-28 Gary Benson <gbenson@redhat.com>
3349 * utils.h (fatal): Remove declaration.
3350 * utils.c (fatal): Remove function.
3352 2014-08-28 Gary Benson <gbenson@redhat.com>
3354 * tracepoint.c (gdb_agent_init): Replace fatal with
3356 (initialize_tracepoint): Likewise.
3358 2014-08-28 Gary Benson <gbenson@redhat.com>
3360 * remote-utils.c (remote_prepare): Replace fatal with error.
3362 2014-08-28 Gary Benson <gbenson@redhat.com>
3364 * linux-low.c (linux_async): Replace fatal with warning.
3366 (linux_start_non_stop): Return -1 if linux_async failed.
3368 2014-08-28 Gary Benson <gbenson@redhat.com>
3370 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3372 (i386_dr_low_get_addr): Remove vague comment.
3373 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3376 2014-08-28 Gary Benson <gbenson@redhat.com>
3378 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3379 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3381 (linux_resume_one_lwp): Likewise.
3382 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3384 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3385 with internal_error.
3386 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3387 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3388 (find_register_by_name): Replace fatal with internal_error.
3389 (find_regno): Likewise.
3390 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3391 * thread-db.c (thread_db_create_event): Likewise.
3392 (thread_db_load_search): Likewise.
3393 (try_thread_db_load_1): Likewise.
3394 * tracepoint.c (get_jump_space_head): Replace fatal with
3396 (claim_trampoline_space): Likewise.
3397 (have_fast_tracepoint_trampoline_buffer): Likewise.
3398 (cmd_qtstart): Likewise.
3399 (stop_tracing): Likewise.
3400 (fast_tracepoint_collecting): Likewise.
3401 (target_malloc): Likewise.
3402 (download_tracepoint): Likewise.
3403 (download_trace_state_variables): Replace check with gdb_assert.
3404 (upload_fast_traceframes): Replace fatal with internal_error.
3406 2014-08-19 Tom Tromey <tromey@redhat.com>
3407 Gary Benson <gbenson@redhat.com>
3409 * Makefile.in (SFILES): Add common/common-debug.c.
3410 (OBS): Add common-debug.o.
3411 (common-debug.o): New rule.
3412 * debug.h (debug_printf): Don't declare.
3413 * debug.c (debug_printf): Renamed and rewritten as...
3414 (debug_vprintf): New function.
3416 2014-08-19 Gary Benson <gbenson@redhat.com>
3418 * utils.h: Do not include print-utils.h.
3420 2014-08-19 Tom Tromey <tromey@redhat.com>
3421 Gary Benson <gbenson@redhat.com>
3423 * server.h: Add static assertion.
3424 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3426 2014-08-19 Tom Tromey <tromey@redhat.com>
3427 Gary Benson <gbenson@redhat.com>
3429 * Makefile.in (SFILES): Add common/errors.c.
3430 (OBS): Add errors.o.
3431 (IPA_OBS): Add errors-ipa.o.
3432 (errors.o): New rule.
3433 (errors-ipa.o): Likewise.
3434 * utils.h (perror_with_name, error, warning): Don't declare.
3435 * utils.c (warning): Renamed and rewritten as...
3436 (vwarning): New function.
3437 (error): Renamed and rewritten as...
3438 (verror): New function.
3439 (internal_error): Renamed and rewritten as...
3440 (internal_verror): New function.
3442 2014-08-07 Gary Benson <gbenson@redhat.com>
3444 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3445 * configure: Regenerate.
3446 * config.in: Likewise.
3447 * server.h: Do not include errno.h.
3448 * event-loop.c: Likewise.
3449 * hostio-errno.c: Likewise.
3450 * linux-low.c: Likewise.
3451 * remote-utils.c: Likewise.
3452 * spu-low.c: Likewise.
3453 * utils.c: Likewise.
3454 * gdbreplay.c: Unconditionally include errno.h.
3456 2014-08-07 Gary Benson <gbenson@redhat.com>
3458 * server.h: Do not include string.h.
3459 * event-loop.c: Likewise.
3460 * linux-low.c: Likewise.
3461 * regcache.c: Likewise.
3462 * remote-utils.c: Likewise.
3463 * spu-low.c: Likewise.
3464 * utils.c: Likewise.
3466 2014-08-07 Gary Benson <gbenson@redhat.com>
3468 * server.h: Do not include gdb_assert.h.
3470 2014-08-07 Gary Benson <gbenson@redhat.com>
3472 * server.h: Do not include common-utils.h.
3474 2014-08-07 Gary Benson <gbenson@redhat.com>
3476 * server.h: Do not include ptid.h.
3477 * notif.h: Likewise.
3479 2014-08-07 Gary Benson <gbenson@redhat.com>
3481 * server.h: Do not include gdb_locale.h.
3483 2014-08-07 Gary Benson <gbenson@redhat.com>
3485 * server.h: Do not include gdb/signals.h.
3486 * win32-low.c: Likewise.
3488 2014-08-07 Gary Benson <gbenson@redhat.com>
3490 * server.h: Do not include pathmax.h.
3492 2014-08-07 Gary Benson <gbenson@redhat.com>
3494 * server.h: Do not include libiberty.h.
3495 * linux-bfin-low.c: Likewise.
3497 2014-08-07 Gary Benson <gbenson@redhat.com>
3499 * server.h: Do not include ansidecl.h.
3501 2014-08-07 Gary Benson <gbenson@redhat.com>
3503 * linux-x86-low.c: Do not include stddef.h.
3504 * lynx-ppc-low.c: Likewise.
3505 * tracepoint.c: Likewise.
3507 2014-08-07 Gary Benson <gbenson@redhat.com>
3509 * server.h: Do not include stdarg.h.
3510 * nto-low.c: Likewise.
3512 2014-08-07 Gary Benson <gbenson@redhat.com>
3514 * server.h: Do not include stdlib.h.
3515 * inferiors.c: Likewise.
3516 * linux-low.c: Likewise.
3517 * regcache.c: Likewise.
3518 * spu-low.c: Likewise.
3519 * tracepoint.c: Likewise.
3520 * utils.c: Likewise.
3522 2014-08-07 Gary Benson <gbenson@redhat.com>
3524 * server.h: Do not include stdio.h.
3525 * linux-low.c: Likewise.
3526 * remote-utils.c: Likewise.
3527 * spu-low.c: Likewise.
3528 * utils.c: Likewise.
3529 * wincecompat.c: Likewise.
3531 2014-08-06 Gary Benson <gbenson@redhat.com>
3533 * regcache.c (init_register_cache): Move conditionals inside if.
3535 2014-08-06 Gary Benson <gbenson@redhat.com>
3537 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3539 2014-07-31 Gary Benson <gbenson@redhat.com>
3541 * ax.h: Do not include server.h.
3542 * gdbthread.h: Likewise.
3543 * lynx-low.h: Likewise.
3544 * notif.h: Likewise.
3546 2014-07-30 Gary Benson <gbenson@redhat.com>
3548 * server.h: Include common-defs.h.
3549 Do not include config.h or build-gnulib-gdbserver/config.h.
3551 2014-07-30 Gary Benson <gbenson@redhat.com>
3553 * hostio-errno.c: Move server.h to top of includes list.
3554 * inferiors.c: Likewise.
3555 * linux-x86-low.c: Likewise.
3556 * notif.c: Include server.h.
3558 2014-07-24 Tom Tromey <tromey@redhat.com>
3559 Gary Benson <gbenson@redhat.com>
3561 * server.h (CORE_ADDR): Now unsigned.
3563 2014-07-16 Pedro Alves <palves@redhat.com>
3565 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3567 2014-07-15 Pedro Alves <palves@redhat.com>
3569 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3572 2014-07-11 Pedro Alves <palves@redhat.com>
3574 * linux-low.c (kill_wait_lwp): New function, based on
3575 kill_one_lwp_callback, but use my_waitpid directly.
3576 (kill_one_lwp_callback, linux_kill): Use it.
3578 2014-06-23 Pedro Alves <palves@redhat.com>
3580 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3581 before setting DR0..DR3.
3583 2014-06-20 Gary Benson <gbenson@redhat.com>
3585 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3586 * configure: Regenerated.
3587 * config.in: Likewise.
3589 2014-06-20 Gary Benson <gbenson@redhat.com>
3591 * Makefile.in (SFILES): Update locations for files moved
3593 (object file files): Reordered.
3595 2014-06-20 Gary Benson <gbenson@redhat.com>
3597 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3598 (i386_dr_low_set_addr): Likewise.
3599 (i386_dr_low_get_addr): Likewise.
3600 (i386_dr_low_can_set_control): Likewise.
3601 (i386_dr_low_set_control): Likewise.
3602 (i386_dr_low_get_control): Likewise.
3603 (i386_dr_low_get_status): Likewise.
3604 (i386_get_debug_register_length): Likewise.
3605 * linux-x86-low.c (i386_dr_low_set_addr):
3606 Changed signature. Made static.
3607 (i386_dr_low_get_addr): Likewise.
3608 (i386_dr_low_set_control): Likewise.
3609 (i386_dr_low_get_control): Likewise.
3610 (i386_dr_low_get_status): Likewise.
3611 (i386_dr_low): New global variable.
3612 * win32-i386-low.c (i386_dr_low_set_addr):
3613 Changed signature. Made static.
3614 (i386_dr_low_get_addr): Likewise.
3615 (i386_dr_low_set_control): Likewise.
3616 (i386_dr_low_get_control): Likewise.
3617 (i386_dr_low_get_status): Likewise.
3618 (i386_dr_low): New global variable.
3620 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3622 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3623 * Makefile.in (AR, AR_FLAGS): Define.
3624 * configure: Regenerate.
3626 2014-06-19 Gary Benson <gbenson@redhat.com>
3628 * Makefile.in (i386-dregs.o): New rule.
3629 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3630 * i386-low.c (target.h): Remove include.
3631 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3632 (DR_CONTROL_SHIFT): Likewise.
3633 (DR_CONTROL_SIZE): Likewise.
3634 (DR_RW_EXECUTE): Likewise.
3635 (DR_RW_WRITE): Likewise.
3636 (DR_RW_READ): Likewise.
3637 (DR_RW_IORW): Likewise.
3638 (DR_LEN_1): Likewise.
3639 (DR_LEN_2): Likewise.
3640 (DR_LEN_4): Likewise.
3641 (DR_LEN_8): Likewise.
3642 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3643 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3644 (DR_ENABLE_SIZE): Likewise.
3645 (DR_LOCAL_SLOWDOWN): Likewise.
3646 (DR_GLOBAL_SLOWDOWN): Likewise.
3647 (DR_CONTROL_RESERVED): Likewise.
3648 (I386_DR_CONTROL_MASK): Likewise.
3649 (I386_DR_VACANT): Likewise.
3650 (I386_DR_LOCAL_ENABLE): Likewise.
3651 (I386_DR_GLOBAL_ENABLE): Likewise.
3652 (I386_DR_DISABLE): Likewise.
3653 (I386_DR_SET_RW_LEN): Likewise.
3654 (I386_DR_GET_RW_LEN): Likewise.
3655 (I386_DR_WATCH_HIT): Likewise.
3656 (i386_wp_op_t): Likewise.
3657 (i386_show_dr): Likewise.
3658 (i386_length_and_rw_bits): Likewise.
3659 (i386_insert_aligned_watchpoint): Likewise.
3660 (i386_remove_aligned_watchpoint): Likewise.
3661 (i386_handle_nonaligned_watchpoint): Likewise.
3662 i386_update_inferior_debug_regs(): Likewise.
3663 (i386_dr_insert_watchpoint): Likewise.
3664 (i386_dr_remove_watchpoint): Likewise.
3665 (i386_dr_region_ok_for_watchpoint): Likewise.
3666 (i386_dr_stopped_data_address): Likewise.
3667 (i386_dr_stopped_by_watchpoint): Likewise.
3669 2014-06-19 Gary Benson <gbenson@redhat.com>
3671 * i386-low.c (i386_dr_show): Renamed to
3672 i386_show_dr and made static. All uses updated.
3673 (i386_dr_length_and_rw_bits): Renamed to
3674 i386_length_and_rw_bits and made static.
3676 (i386_dr_insert_aligned_watchpoint): Renamed to
3677 i386_insert_aligned_watchpoint and made static.
3679 (i386_dr_remove_aligned_watchpoint): Renamed to
3680 i386_remove_aligned_watchpoint and made static.
3682 (i386_dr_update_inferior_debug_regs): Renamed to
3683 i386_update_inferior_debug_regs and made static.
3686 2014-06-18 Gary Benson <gbenson@redhat.com>
3688 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3689 (i386_dr_low_can_set_control): Likewise.
3690 (i386_get_debug_register_length): Likewise.
3691 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3692 (i386_dr_low_can_set_control): Likewise.
3693 (i386_get_debug_register_length): Likewise.
3695 2014-06-17 Gary Benson <gbenson@redhat.com>
3697 * i386-low.h (i386-dregs.h): New include.
3698 (DR_FIRSTADDR): Now in i386-dregs.h.
3699 (DR_LASTADDR): Likewise.
3700 (DR_NADDR): Likewise.
3701 (DR_STATUS): Likewise.
3702 (DR_CONTROL): Likewise.
3703 (i386_debug_reg_state): Likewise.
3704 (i386_dr_insert_watchpoint): Likewise.
3705 (i386_dr_remove_watchpoint): Likewise.
3706 (i386_dr_region_ok_for_watchpoint): Likewise.
3707 (i386_dr_stopped_data_address): Likewise.
3708 (i386_dr_stopped_by_watchpoint): Likewise.
3709 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3711 2014-06-18 Gary Benson <gbenson@redhat.com>
3713 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3714 i386_dr_insert_watchpoint.
3715 (i386_low_remove_watchpoint): Renamed to
3716 i386_dr_remove_watchpoint.
3717 (i386_low_region_ok_for_watchpoint): Renamed to
3718 i386_dr_region_ok_for_watchpoint.
3719 (i386_low_stopped_data_address): Renamed to
3720 i386_dr_stopped_data_address.
3721 (i386_low_stopped_by_watchpoint): Renamed to
3722 i386_dr_stopped_by_watchpoint.
3723 * i386-low.c (i386_show_dr): Renamed to
3724 i386_dr_show and made nonstatic. All uses updated.
3725 (i386_length_and_rw_bits): Renamed to
3726 i386_dr_length_and_rw_bits and made nonstatic.
3728 (i386_insert_aligned_watchpoint): Renamed to
3729 i386_dr_insert_aligned_watchpoint and made nonstatic.
3731 (i386_remove_aligned_watchpoint): Renamed to
3732 i386_dr_remove_aligned_watchpoint and made nonstatic.
3734 (i386_update_inferior_debug_regs): Renamed to
3735 i386_dr_update_inferior_debug_regs and made nonstatic.
3737 (i386_low_insert_watchpoint): Renamed to
3738 i386_dr_insert_watchpoint. All uses updated.
3739 (i386_low_remove_watchpoint): Renamed to
3740 i386_dr_remove_watchpoint. All uses updated.
3741 (i386_low_region_ok_for_watchpoint): Renamed to
3742 i386_dr_region_ok_for_watchpoint. All uses updated.
3743 (i386_low_stopped_data_address): Renamed to
3744 i386_dr_stopped_data_address. All uses updated.
3745 (i386_low_stopped_by_watchpoint): Renamed to
3746 i386_dr_stopped_by_watchpoint. All uses updated.
3748 2014-06-18 Gary Benson <gbenson@redhat.com>
3750 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3751 (i386_dr_low_can_set_control): Likewise.
3752 (i386_insert_aligned_watchpoint): New check.
3754 2014-06-18 Gary Benson <gbenson@redhat.com>
3756 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3759 2014-06-18 Gary Benson <gbenson@redhat.com>
3761 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3762 instead of fatal and error.
3763 (i386_handle_nonaligned_watchpoint): Likewise.
3765 2014-06-18 Gary Benson <gbenson@redhat.com>
3767 * i386-low.c (i386_get_debug_register_length): New macro.
3768 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3769 (i386_show_dr): Use debug_printf instead of fprintf. Use
3770 phex to format values.
3772 2014-06-18 Gary Benson <gbenson@redhat.com>
3774 * i386-low.h: Comment changes.
3775 * i386-low.c: Likewise.
3777 2014-06-18 Gary Benson <gbenson@redhat.com>
3779 * i386-low.c: Whitespace changes.
3781 2014-06-12 Tom Tromey <tromey@redhat.com>
3783 * utils.c (freeargv): Remove.
3785 2014-06-12 Tom Tromey <tromey@redhat.com>
3787 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3788 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3789 (parse_debug_format_options): Likewise.
3790 (gdbserver_usage): Likewise.
3791 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3792 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3793 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3795 ($(LIBGNU)): Depend on libiberty.
3796 (all-lib): Recurse into all subdirs.
3797 (install-only): Invoke "install" target in subdirs.
3798 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3800 * configure: Rebuild.
3801 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3802 for vasprintf, vsnprintf, or gettimeofday.
3803 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3806 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3808 * development.sh: Delete.
3809 * Makefile.in (config.status): Adjust dependency on development.sh.
3810 * configure.ac: Adjust development.sh source call.
3811 * configure: Regenerate.
3813 2014-06-02 Pedro Alves <palves@redhat.com>
3815 * ax.c (gdb_free_agent_expr): New function.
3816 * ax.h (gdb_free_agent_expr): New declaration.
3817 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3819 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3821 (clear_breakpoint_conditions_and_commands): New function.
3822 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3823 (clear_breakpoint_conditions_and_commands): New declaration.
3825 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3827 * linux-aarch64-low.c (asm/ptrace.h): Include.
3829 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3831 Fix TLS access for -static -pthread.
3832 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3833 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3834 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3836 2014-05-20 Pedro Alves <palves@redhat.com>
3838 * linux-aarch64-low.c (aarch64_insert_point)
3839 (aarch64_remove_point): No longer check whether the type is
3840 supported here. Adjust to new interface.
3841 (the_low_target): Install aarch64_supports_z_point_type as
3842 supports_z_point_type method.
3843 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3844 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3845 instead of a Z packet char. Adjust.
3846 (arm_supports_z_point_type): New function.
3847 (arm_insert_point, arm_remove_point): Adjust to new interface.
3848 (the_low_target): Install arm_supports_z_point_type.
3849 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3850 (cris_insert_point, cris_remove_point): Adjust to new interface.
3851 Don't check whether the type is supported here.
3852 (the_low_target): Install cris_supports_z_point_type.
3853 * linux-low.c (linux_supports_z_point_type): New function.
3854 (linux_insert_point, linux_remove_point): Adjust to new interface.
3855 * linux-low.h (struct linux_target_ops) <insert_point,
3856 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3857 raw_breakpoint pointer parameter.
3858 <supports_z_point_type>: New method.
3859 * linux-mips-low.c (mips_supports_z_point_type): New function.
3860 (mips_insert_point, mips_remove_point): Adjust to new interface.
3861 Use mips_supports_z_point_type.
3862 (the_low_target): Install mips_supports_z_point_type.
3863 * linux-ppc-low.c (the_low_target): Install NULL as
3864 supports_z_point_type method.
3865 * linux-s390-low.c (the_low_target): Install NULL as
3866 supports_z_point_type method.
3867 * linux-sparc-low.c (the_low_target): Install NULL as
3868 supports_z_point_type method.
3869 * linux-x86-low.c (x86_supports_z_point_type): New function.
3870 (x86_insert_point): Adjust to new insert_point interface. Use
3871 insert_memory_breakpoint. Adjust to new
3872 i386_low_insert_watchpoint interface.
3873 (x86_remove_point): Adjust to remove_point interface. Use
3874 remove_memory_breakpoint. Adjust to new
3875 i386_low_remove_watchpoint interface.
3876 (the_low_target): Install x86_supports_z_point_type.
3877 * lynx-low.c (lynx_target_ops): Install NULL as
3878 supports_z_point_type callback.
3879 * nto-low.c (nto_supports_z_point_type): New.
3880 (nto_insert_point, nto_remove_point): Adjust to new interface.
3881 (nto_target_ops): Install nto_supports_z_point_type.
3882 * mem-break.c: Adjust intro comment.
3883 (struct raw_breakpoint) <raw_type, size>: New fields.
3884 <inserted>: Update comment.
3885 <shlib_disabled>: Delete field.
3886 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3887 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3888 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3889 (raw_bkpt_type_to_target_hw_bp_type): New function.
3890 (find_enabled_raw_code_breakpoint_at): New function.
3891 (find_raw_breakpoint_at): New type and size parameters. Use them.
3892 (insert_memory_breakpoint): New function, based off
3893 set_raw_breakpoint_at.
3894 (remove_memory_breakpoint): New function.
3895 (set_raw_breakpoint_at): Reimplement.
3896 (set_breakpoint): New, based on set_breakpoint_at.
3897 (set_breakpoint_at): Reimplement.
3898 (delete_raw_breakpoint): Go through the_target->remove_point
3899 instead of assuming memory breakpoints.
3900 (find_gdb_breakpoint_at): Delete.
3901 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3902 (find_gdb_breakpoint): New function.
3903 (set_gdb_breakpoint_at): Delete.
3904 (z_type_supported): New function.
3905 (set_gdb_breakpoint_1): New function, loosely based off
3906 set_gdb_breakpoint_at.
3907 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3908 (delete_gdb_breakpoint_at): Delete.
3909 (delete_gdb_breakpoint_1): New function, loosely based off
3910 delete_gdb_breakpoint_at.
3911 (delete_gdb_breakpoint): New function.
3912 (clear_gdb_breakpoint_conditions): Rename to ...
3913 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3915 (add_condition_to_breakpoint): Make static.
3916 (add_breakpoint_condition): Take a struct breakpoint pointer
3917 instead of an address. Adjust.
3918 (gdb_condition_true_at_breakpoint): Rename to ...
3919 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3921 (gdb_condition_true_at_breakpoint): Reimplement.
3922 (add_breakpoint_commands): Take a struct breakpoint pointer
3923 instead of an address. Adjust.
3924 (gdb_no_commands_at_breakpoint): Rename to ...
3925 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3926 parameter. Return true if no breakpoint was found. Change debug
3928 (gdb_no_commands_at_breakpoint): Reimplement.
3929 (run_breakpoint_commands): Rename to ...
3930 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3931 and change return type to boolean.
3932 (run_breakpoint_commands): New function.
3933 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3934 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3935 breakpoint. Go through the_target->remove_point instead of
3936 assuming memory breakpoint.
3937 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3938 software and hardware breakpoints.
3939 (reinsert_raw_breakpoint): Go through the_target->insert_point
3940 instead of assuming memory breakpoint.
3941 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3942 software and hardware breakpoints.
3943 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3944 Check both software and hardware breakpoints.
3945 (validate_inserted_breakpoint): Assert the breakpoint is a
3946 software breakpoint. Set the inserted flag to -1 instead of
3947 setting shlib_disabled.
3948 (delete_disabled_breakpoints): Adjust.
3949 (validate_breakpoints): Only validate software breakpoints.
3950 Adjust to inserted flag change.
3951 (check_mem_read, check_mem_write): Skip breakpoint types other
3952 than software breakpoints. Adjust to inserted flag change.
3953 * mem-break.h (enum raw_bkpt_type): New enum.
3954 (raw_breakpoint, struct process_info): Forward declare.
3955 (Z_packet_to_target_hw_bp_type): Delete declaration.
3956 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3957 (set_gdb_breakpoint, delete_gdb_breakpoint)
3958 (clear_breakpoint_conditions): New declarations.
3959 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3960 (breakpoint_inserted_here): Update comment.
3961 (add_breakpoint_condition, add_breakpoint_commands): Replace
3962 address parameter with a breakpoint pointer parameter.
3963 (gdb_breakpoint_here): Update comment.
3964 (delete_gdb_breakpoint_at): Delete.
3965 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3966 * server.c (process_point_options): Take a struct breakpoint
3967 pointer instead of an address. Adjust.
3968 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3969 delete_gdb_breakpoint.
3970 * spu-low.c (spu_target_ops): Install NULL as
3971 supports_z_point_type method.
3972 * target.h: Include mem-break.h.
3973 (struct target_ops) <prepare_to_access_memory>: Update comment.
3974 <supports_z_point_type>: New field.
3975 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3976 instead of a char. Also take a raw breakpoint pointer.
3977 * win32-arm-low.c (the_low_target): Install NULL as
3978 supports_z_point_type.
3979 * win32-i386-low.c (i386_supports_z_point_type): New function.
3980 (i386_insert_point, i386_remove_point): Adjust to new interface.
3981 (the_low_target): Install i386_supports_z_point_type.
3982 * win32-low.c (win32_supports_z_point_type): New function.
3983 (win32_insert_point, win32_remove_point): Adjust to new interface.
3984 (win32_target_ops): Install win32_supports_z_point_type.
3985 * win32-low.h (struct win32_target_ops):
3986 <supports_z_point_type>: New method.
3987 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3988 instead of a char. Also take a raw breakpoint pointer.
3990 2014-05-20 Pedro Alves <palves@redhat.com>
3992 * mem-break.h: Include break-common.h.
3993 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3994 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3995 (Z_packet_to_target_hw_bp_type): New declaration.
3996 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3997 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3998 (Z_PACKET_ACCESS_WP): Delete macros.
3999 (Z_packet_to_hw_type): Delete function.
4000 * i386-low.h: Don't include break-common.h here.
4001 (Z_packet_to_hw_type): Delete declaration.
4002 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4003 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4004 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4005 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4006 * linux-aarch64-low.c: Don't include break-common.h here.
4007 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4008 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4009 (Z_packet_to_target_hw_bp_type): Delete function.
4010 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4012 (mips_insert_point, mips_remove_point): Use
4013 Z_packet_to_target_hw_bp_type.
4015 2014-05-20 Pedro Alves <palves@redhat.com>
4017 * linux-aarch64-low.c: Include break-common.h.
4018 (enum target_point_type): Delete.
4019 (Z_packet_to_point_type): Rename to ...
4020 (Z_packet_to_target_hw_bp_type): ... this, and return a
4021 target_hw_bp_type instead.
4022 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4023 instead of an enum target_point_type.
4024 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4026 (aarch64_dr_state_insert_one_point)
4027 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4028 (aarch64_handle_aligned_watchpoint)
4029 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4030 Take an enum target_hw_bp_type instead of an enum
4032 (aarch64_supports_z_point_type): New function.
4033 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4034 use Z_packet_to_target_hw_bp_type.
4036 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4038 * configure.ac: Only use -Werror by default when DEVELOPMENT
4040 * configure: Regenerate.
4042 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4044 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4045 * linux-x86-low.c (X86_64_USER_REGS): New.
4046 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4048 2014-04-28 Yao Qi <yao@codesourcery.com>
4050 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4053 2014-04-25 Pedro Alves <palves@redhat.com>
4056 * linux-low.c (linux_attach_fail_reason_string): New function.
4057 (linux_attach_lwp): Delete.
4058 (linux_attach_lwp_1): Rename to ...
4059 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4060 argument. Remove "initial" parameter. Return int instead of
4061 void. Don't error or warn here.
4062 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4063 failure to attach to the tgid. Call warning when failing to
4065 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4066 argument. Remove "initial" parameter. Return int instead of
4067 void. Don't error or warn here.
4068 (linux_attach_fail_reason_string): New declaration.
4069 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4070 interface change. Use linux_attach_fail_reason_string.
4072 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4073 Walfred Tedeschi <walfred.tedeschi@intel.com>
4075 * Makefile.in: Added rules to handle new files
4076 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4077 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4078 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4079 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4080 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4081 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4083 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4084 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4085 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4086 i386/x32-avx512.xml.
4087 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4088 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4089 i386/x32-avx512-linux.xml.
4090 * i387-fp.c (num_avx512_k_registers): New constant for number
4092 (num_avx512_zmmh_low_registers): New constant for number of
4093 lower ZMM registers (0-15).
4094 (num_avx512_zmmh_high_registers): New constant for number of
4095 higher ZMM registers (16-31).
4096 (num_avx512_ymmh_registers): New contant for number of higher
4097 YMM registers (ymm16-31 added by avx521 on x86_64).
4098 (num_avx512_xmm_registers): New constant for number of higher
4099 XMM registers (xmm16-31 added by AVX512 on x86_64).
4100 (struct i387_xsave): Add space for AVX512 registers.
4101 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4102 Add code to handle AVX512 registers.
4103 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4104 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4105 prototypei from generated file.
4106 (tdesc_amd64_avx512_linux): Likewise.
4107 (init_registers_x32_avx512_linux): Likewise.
4108 (tdesc_x32_avx512_linux): Likewise.
4109 (init_registers_i386_avx512_linux): Likewise.
4110 (tdesc_i386_avx512_linux): Likewise.
4111 (x86_64_regmap): Add AVX512 registers.
4112 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4114 (initialize_low_arch): Add code to initialize AVX512 registers.
4116 2014-04-23 Pedro Alves <palves@redhat.com>
4118 * mem-break.c (find_gdb_breakpoint_at): Make static.
4119 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4121 2014-04-23 Pedro Alves <palves@redhat.com>
4123 * i386-low.c: Don't include break-common.h here.
4124 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4125 prototype to take target_hw_bp_type as argument instead of a Z
4127 * i386-low.h: Include break-common.h here.
4128 (Z_packet_to_hw_type): Declare.
4129 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4131 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4132 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4133 (x86_remove_point): Convert the packet number to a
4134 target_hw_bp_type before calling i386_low_remove_watchpoint.
4135 * win32-i386-low.c (i386_insert_point): Convert the packet number
4136 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4137 (i386_remove_point): Convert the packet number to a
4138 target_hw_bp_type before calling i386_low_remove_watchpoint.
4140 2014-04-23 Pedro Alves <palves@redhat.com>
4142 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4144 2014-04-10 Pedro Alves <palves@redhat.com>
4146 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4147 Check if the condition or command is NULL before checking if the
4148 breakpoint is known. On success, return true.
4149 * mem-break.h (add_breakpoint_condition): Document return.
4150 (add_breakpoint_commands): Add describing comment.
4151 * server.c (skip_to_semicolon): New function.
4152 (process_point_options): Use it.
4154 2014-04-09 Pedro Alves <palves@redhat.com>
4156 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4159 2014-02-27 Pedro Alves <palves@redhat.com>
4162 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4164 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4166 (last_thread_of_process_p): Take a PID argument instead of a
4168 (linux_wait_for_lwp): Delete.
4169 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4171 (linux_low_filter_event): New function, party factored out from
4172 linux_wait_for_event.
4173 (linux_wait_for_event): Rename to ...
4174 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4175 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4176 sigsuspend. Check for zombie leaders.
4177 (linux_wait_for_event): Reimplement as wrapper around
4178 linux_wait_for_event_filtered.
4179 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4180 a normal or signal exit is seen, it's the whole process exiting.
4181 (wait_for_sigstop): No longer a for_each_inferior callback.
4182 Rewrite on top of linux_wait_for_event_filtered.
4183 (stop_all_lwps): Call wait_for_sigstop directly.
4184 * server.c (resume, handle_target_event): Handle
4185 TARGET_WAITKIND_NO_RESUMED.
4187 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4189 * win32-low.c (psapi_get_dll_name,
4190 * win32_CreateToolhelp32Snapshot): Delete.
4191 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4192 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4194 (handle_load_dll): Add function description.
4195 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4197 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4199 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4201 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4202 base address when calling win32_add_one_solib.
4203 (handle_load_dll): Delete local variable load_addr.
4204 Remove 0x1000 offset applied to DLL base address when calling
4205 win32_add_one_solib.
4206 (handle_unload_dll): Add comment.
4208 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4210 * win32-low.c (win32_add_all_dlls): Renames
4211 win32_ensure_ntdll_loaded. Rewrite function documentation.
4212 Adjust implementation to always load all DLLs.
4213 Add 0x1000 offset to DLL base address when calling
4214 win32_add_one_solib.
4215 (child_initialization_done): New static global.
4216 (do_initial_child_stuff): Set child_initialization_done to
4217 zero during child initialization, and 1 after. Replace call
4218 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4220 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4221 (handle_unload_dll): Add function documentation.
4222 (get_child_debug_event): Ignore load and unload DLL events
4223 during child initialization.
4225 2014-02-20 Doug Evans <dje@google.com>
4227 Remove global all_lwps.
4228 * inferiors.h (ptid_of): Move here from linux-low.h.
4229 (pid_of, lwpid_of): Ditto.
4230 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4231 parameter is a struct thread_info * now.
4232 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4233 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4234 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4236 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4237 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4238 * linux-arm-low.c (update_registers_callback): Update, "entry"
4239 parameter is a struct thread_info * now.
4240 Fetch lwpid from current_inferior directly.
4241 (arm_insert_point): Pass &all_threads to find_inferior instead of
4243 (arm_remove_point): Ditto.
4244 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4245 (arm_prepare_to_resume): Fetch pid from thread.
4246 (arm_read_description): Fetch lwpid from current_inferior directly.
4247 * linux-low.c (all_lwps): Delete.
4248 (delete_lwp): Delete call to remove_inferior.
4249 (handle_extended_wait): Fetch lwpid from thread.
4250 (add_lwp): Don't set lwp->entry.id. Remove call to
4251 add_inferior_to_list.
4252 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4253 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4254 (kill_one_lwp_callback): Ditto.
4255 (linux_kill): Don't dereference NULL pointer.
4256 Fetch ptid,lwpid from thread.
4257 (get_detach_signal): Fetch ptid from thread.
4258 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4259 Simplify call to regcache_invalidate_thread.
4260 (delete_lwp_callback): Update, "entry" parameter is a
4261 struct thread_info * now. Fetch pid from thread.
4262 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4263 (status_pending_p_callback): Update, "entry" parameter is a
4264 struct thread_info * now. Fetch ptid from thread.
4265 (find_lwp_pid): Update, "entry" parameter is a
4266 struct thread_info * now.
4267 (linux_wait_for_lwp): Fetch pid from thread.
4268 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4269 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4270 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4271 (dequeue_one_deferred_signal): Ditto.
4272 (cancel_breakpoint): Fetch ptid from current_inferior.
4273 (linux_wait_for_event): Pass &all_threads to find_inferior,
4274 not &all_lwps. Fetch ptid, lwpid from thread.
4275 (count_events_callback): Update, "entry" parameter is a
4276 struct thread_info * now.
4277 (select_singlestep_lwp_callback): Ditto.
4278 (select_event_lwp_callback): Ditto.
4279 (cancel_breakpoints_callback): Ditto.
4280 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4282 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4283 (unsuspend_one_lwp): Update, "entry" parameter is a
4284 struct thread_info * now.
4285 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4287 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4288 Fetch lwpid from thread, not lwp.
4289 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4290 Pass &all_threads to find_inferior, not &all_lwps.
4291 (send_sigstop): Fetch lwpid from thread, not lwp.
4292 (send_sigstop_callback): Update, "entry" parameter is a
4293 struct thread_info * now.
4294 (suspend_and_send_sigstop_callback): Ditto.
4295 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4296 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4297 struct thread_info * now.
4298 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4300 (lwp_running): Update, "entry" parameter is a
4301 struct thread_info * now.
4302 (stop_all_lwps): Fetch ptid from thread.
4303 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4304 (linux_resume_one_lwp): Fetch lwpid from thread.
4305 (linux_set_resume_request): Update, "entry" parameter is a
4306 struct thread_info * now. Fetch pid, lwpid from thread.
4307 (resume_status_pending_p): Update, "entry" parameter is a
4308 struct thread_info * now.
4309 (need_step_over_p): Ditto. Fetch lwpid from thread.
4310 (start_step_over): Fetch lwpid from thread.
4311 (linux_resume_one_thread): Update, "entry" parameter is a
4312 struct thread_info * now. Fetch lwpid from thread.
4313 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4314 (proceed_one_lwp): Update, "entry" parameter is a
4315 struct thread_info * now. Fetch lwpid from thread.
4316 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4317 struct thread_info * now.
4318 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4319 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4320 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4322 (regsets_store_inferior_registers): Ditto.
4323 (fetch_register, store_register): Ditto.
4324 (linux_read_memory, linux_write_memory): Ditto.
4325 (linux_request_interrupt): Ditto.
4326 (linux_read_auxv): Ditto.
4327 (linux_xfer_siginfo): Ditto.
4328 (linux_qxfer_spu): Ditto.
4329 (linux_qxfer_libraries_svr4): Ditto.
4330 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4331 moved to inferiors.h.
4333 (get_thread_lwp): Update.
4334 (struct lwp_info): Delete member "entry". Simplify comment for
4337 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4338 current_inferior directly.
4339 (update_watch_registers_callback): Update, "entry" parameter is a
4340 struct thread_info * now. Fetch pid from thread.
4341 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4342 (mips_insert_point): Fetch lwpid from current_inferior.
4343 Pass &all_threads to find_inferior, not &all_lwps.
4344 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4345 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4347 (mips_stopped_data_address): Ditto.
4348 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4350 * linux-tile-low.c (tile_arch_setup): Ditto.
4351 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4352 (update_debug_registers_callback): Update, "entry" parameter is a
4353 struct thread_info * now. Fetch pid from thread.
4354 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4355 Pass &all_threads to find_inferior, not &all_lwps.
4356 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4357 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4358 Pass &all_threads to find_inferior, not &all_lwps.
4359 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4360 (i386_dr_low_get_status): Ditto.
4361 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4362 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4363 (x86_linux_read_description): Ditto.
4364 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4366 2014-02-20 Doug Evans <dje@google.com>
4368 * inferiors.c (get_first_inferior): Fix buglet.
4370 2014-02-19 Doug Evans <dje@google.com>
4372 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4373 * inferiors.c (add_thread): Change result type to struct thread_info *.
4374 All callers updated.
4375 (add_lwp): Call add_thread here instead of in callers.
4376 All callers updated.
4377 * linux-low.h (get_lwp_thread): Rewrite.
4378 (struct lwp_info): New member "thread".
4380 2014-02-19 Doug Evans <dje@google.com>
4382 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4383 All callers updated.
4385 2014-02-19 Doug Evans <dje@google.com>
4387 * inferiors.c (add_thread): Fix whitespace.
4389 2014-02-19 Doug Evans <dje@google.com>
4391 * dll.c (clear_dlls): Replace accessing list implemention details
4393 * gdbthread.h (get_first_thread): Declare.
4394 * inferiors.c (for_each_inferior_with_data): New function.
4395 (get_first_thread): New function.
4396 (find_thread_ptid): Simplify.
4397 (get_first_inferior): New function.
4398 (clear_list): Delete.
4399 (one_inferior_p): New function.
4400 (clear_inferior_list): New function.
4401 (clear_inferiors): Update.
4402 * inferiors.h (for_each_inferior_with_data): Declare.
4403 (clear_inferior_list): Declare.
4404 (one_inferior_p): Declare.
4405 (get_first_inferior): Declare.
4406 * linux-low.c (linux_wait_for_event): Replace accessing list
4407 implemention details with API function.
4408 * server.c (target_running): Ditto.
4409 (accumulate_file_name_length): New function.
4410 (emit_dll_description): New function.
4411 (handle_qxfer_libraries): Replace accessing list implemention
4412 details with API function.
4413 (handle_qxfer_threads_worker): New function.
4414 (handle_qxfer_threads_proper): Replace accessing list implemention
4415 details with API function.
4416 (handle_query): Ditto.
4417 (visit_actioned_threads_callback_ftype): New typedef.
4418 (visit_actioned_threads_data): New struct.
4419 (visit_actioned_threads): Rewrite to be find_inferior callback.
4420 (resume): Call find_inferior.
4421 (handle_status): Replace accessing list implemention
4422 details with API function.
4423 (process_serial_event): Replace accessing list implemention details
4425 * target.c (set_desired_inferior): Replace accessing list implemention
4426 details with API function.
4427 * tracepoint.c (same_process_p): New function.
4428 (gdb_agent_about_to_close): Replace accessing list implemention
4429 details with API function.
4430 * win32-low.c (child_delete_thread): Replace accessing list
4431 implemention details with API function.
4432 (match_dll_by_basename): New function.
4433 (dll_is_loaded_by_basename): New function.
4434 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4435 details call to dll_is_loaded_by_basename.
4437 2014-02-19 Doug Evans <dje@google.com>
4439 * dll.h (struct dll_info): Add comment.
4440 * gdbthread.h (struct thread_info): Add comment.
4441 (current_ptid): Simplify.
4442 * inferiors.c (add_process): Update.
4443 (remove_process): Update.
4444 * inferiors.h (struct process_info): Rename member "head" to "entry".
4445 * linux-low.c (delete_lwp): Update.
4447 (last_thread_of_process_p): Update.
4448 (kill_one_lwp_callback, linux_kill): Update.
4449 (status_pending_p_callback): Update.
4450 (wait_for_sigstop): Update. Simplify read of ptid.
4451 (start_step_over): Update.
4452 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4453 (get_lwp_thread): Update.
4454 (struct lwp_info): Rename member "head" to "entry".
4455 * regcache.h (inferior_list_entry): Delete.
4456 * server.c (kill_inferior_callback): Update.
4457 (detach_or_kill_inferior_callback): Update.
4458 (print_started_pid): Update.
4459 (print_attached_pid): Update.
4460 (process_serial_event): Simplify read of ptid.
4461 * thread-db.c (thread_db_create_event): Update.
4462 (thread_db_get_tls_address): Update.
4463 * win32-low.c (current_inferior_ptid): Simplify.
4465 2014-02-19 Tom Tromey <tromey@redhat.com>
4467 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4469 (target_supports_btrace): Update.
4471 2014-02-14 Yao Qi <yao@codesourcery.com>
4473 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4474 (rsp-low-ipa.o): New target.
4476 2014-02-12 Tom Tromey <tromey@redhat.com>
4478 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4479 convert_ascii_to_int.
4480 * regcache.c (registers_to_string): Likewise.
4481 * remote-utils.c (decode_M_packet): Likewise.
4482 * server.c (process_serial_event): Likewise.
4484 2014-02-12 Tom Tromey <tromey@redhat.com>
4486 * server.c (handle_query, handle_v_run): Use hex2bin, not
4488 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4490 2014-02-12 Tom Tromey <tromey@redhat.com>
4492 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4493 convert_int_to_ascii.
4494 * regcache.c (registers_to_string, collect_register_as_string):
4496 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4498 * server.c (process_serial_event): Likewise.
4499 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4500 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4502 2014-02-12 Tom Tromey <tromey@redhat.com>
4504 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4505 bin2hex, not hexify.
4506 * tracepoint.c (cmd_qtstatus): Likewise.
4508 2014-02-12 Tom Tromey <tromey@redhat.com>
4510 * remote-utils.c (monitor_output): Pass explicit length to
4513 2014-02-12 Tom Tromey <tromey@redhat.com>
4515 * tracepoint.c: Include rsp-low.h.
4516 * server.c: Include rsp-low.h.
4517 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4518 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4520 * remote-utils.c: Include rsp-low.h.
4521 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4522 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4523 (convert_int_to_ascii, convert_ascii_to_int): Move to
4525 * regcache.c: Include rsp-low.h.
4526 * ax.c: Include rsp-low.h.
4527 * Makefile.in (SFILES): Add common/rsp-low.c.
4528 (OBS): Add rsp-low.o.
4529 (rsp-low.o): New target.
4531 2014-02-12 Tom Tromey <tromey@redhat.com>
4533 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4534 Include print-utils.h.
4535 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4536 (plongest, thirty_two, phex_nz): Remove.
4537 * Makefile.in (SFILES): Add common/print-utils.c.
4538 (OBS): Add print-utils.o.
4539 (print-utils-ipa.o): New target.
4540 (print-utils.o): New target.
4541 (IPA_OBJS): Add print-utils-ipa.o.
4543 2014-02-06 Tom Tromey <tromey@redhat.com>
4545 * Makefile.in (SFILES): Fix indentation.
4547 2014-02-05 Doug Evans <dje@google.com>
4549 * linux-low.c (linux_wait_for_event): Improve comment.
4550 (linux_wait_1): Keep current_inferior in sync with event_child.
4552 2014-01-22 Doug Evans <dje@google.com>
4554 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4556 2014-01-22 Doug Evans <dje@google.com>
4558 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4559 * configure: Regenerate.
4560 * config.in: Regenerate.
4561 * Makefile.in (SFILES): Add debug.c.
4563 * debug.c: New file.
4564 * debug.h: New file.
4565 * linux-aarch64-low.c (*): Update all debugging printfs to use
4566 debug_printf instead of fprintf.
4567 * linux-arm-low.c (*): Ditto.
4568 * linux-cris-low.c (*): Ditto.
4569 * linux-crisv32-low.c (*): Ditto.
4570 * linux-m32r-low.c (*): Ditto.
4571 * linux-sparc-low.c (*): Ditto.
4572 * linux-x86.c (*): Ditto.
4573 * linux-low.c (*): Ditto.
4574 (linux_wait_1): Add calls to debug_enter, debug_exit.
4575 (linux_wait): Remove redundant debugging printf.
4576 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4577 (linux_resume, unstop_all_lwps): Ditto.
4578 * mem-break.c (*): Update all debugging printfs to use
4579 debug_printf instead of fprintf.
4580 * remote-utils.c (*): Ditto.
4581 * thread-db.c (*): Ditto.
4582 * server.c #include <ctype.h>, "gdb_vecs.h".
4583 (debug_threads): Moved to debug.c.
4584 (*): Update all debugging printfs to use debug_printf instead of
4586 (start_inferior): Replace call to fflush with call to debug_flush.
4587 (monitor_show_help): Mention set debug-format.
4588 (parse_debug_format_options): New function.
4589 (handle_monitor_command): Handle "monitor set debug-format".
4590 (gdbserver_usage): Mention --debug-format.
4591 (main): Parse --debug-format.
4592 * server.h (debug_threads): Declaration moved to debug.h.
4594 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4595 trace_debug_1 that uses debug_printf.
4596 (tracepoint_look_up_symbols): Update all debugging printfs to use
4597 debug_printf instead of fprintf.
4599 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4601 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4604 2014-01-17 Pedro Alves <palves@redhat.com>
4607 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4608 defined after including gdb_proc_service.h.
4610 2014-01-16 Doug Evans <dje@google.com>
4612 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4613 (match_dll): Use it.
4615 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4617 * target.h (target_ops) <read_btrace>: Change parameters and
4618 return type to allow error reporting.
4619 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4620 trace reading errors on.
4621 * linux-low.c (linux_low_read_btrace): Pass trace reading
4623 (linux_low_disable_btrace): New.
4625 2014-01-15 Doug Evans <dje@google.com>
4627 * inferiors.c (thread_id_to_gdb_id): Delete.
4628 * inferiors.h (thread_id_to_gdb_id): Delete.
4630 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4632 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4633 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4636 2014-01-08 Pedro Alves <palves@redhat.com>
4638 * server.c (handle_status): Don't discard previous queued stop
4639 replies or thread's pending status here.
4640 (main) <disconnection>: Do it here instead.
4642 2014-01-08 Pedro Alves <palves@redhat.com>
4644 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4645 * server.c (visit_actioned_threads, handle_pending_status): New
4647 (handle_v_cont): Factor out parts to ...
4648 (resume): ... this new function. If in all-stop, and a thread
4649 being resumed has a pending status, report it without actually
4651 (myresume): Adjust to use the new 'resume' function.
4652 (clear_pending_status_callback, set_pending_status_callback)
4653 (find_status_pending_thread_callback): New functions.
4654 (handle_status): Handle the case of multiple threads having
4655 interesting statuses to report. Report threads' real last signal
4656 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4657 with an interesting thread to report the status for, instead of
4658 always reporting the status of the first thread.
4660 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4662 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4663 * gdbreplay.c (gdbreplay_version): Likewise.
4665 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4667 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4668 iov.iov_len with the real length in use.
4670 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4672 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4673 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4674 for all targets that use win32-low.c.
4675 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4676 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4678 2013-12-13 Pedro Alves <palves@redhat.com>
4680 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4681 if equal to TARGET_WAITKIND_LOADED.
4682 * win32-low.c (cached_status): New static global.
4683 (win32_wait): Add declaration.
4684 (do_initial_child_stuff): Flush all initial pending debug events
4685 up to the initial breakpoint.
4686 (win32_wait): If CACHED_STATUS was set, return that instead
4687 of doing a real wait. Remove the code resuming the execution
4688 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4689 during the initial phase. Also remove the code changing
4690 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4691 TARGET_WAITKIND_STOPPED.
4693 2013-12-11 Yao Qi <yao@codesourcery.com>
4695 * notif.c (handle_notif_ack): Return 0 if no notification
4698 2013-11-20 Doug Evans <dje@google.com>
4700 * linux-low.c (linux_set_resume_request): Fix comment.
4702 2013-11-20 Doug Evans <dje@google.com>
4704 * linux-low.c (resume_status_pending_p): Tweak comment.
4706 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4708 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4709 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4710 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4711 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4712 (srv_amd64_regobj): Add amd64-mpx.o.
4713 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4714 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4715 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4716 * i387-fp.c (num_pl_bnd_register) Added constant.
4717 (num_pl_bnd_cfg_registers) Added constant.
4718 (struct i387_xsave) Added reserved area and MPX fields.
4719 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4720 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4722 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4723 (init_registers_amd64_mpx_linux): Declare new function.
4724 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4725 (x86_64_regmap): Add MPX registers.
4726 (x86_linux_read_description): Add MPX case.
4727 (initialize_low_arch): Initialize MPX targets.
4729 2013-11-18 Tom Tromey <tromey@redhat.com>
4731 * configure: Rebuild.
4732 * configure.ac: Don't check for stdlib.h.
4733 * gdbreplay.c: Unconditionally include stdlib.h.
4735 2013-11-18 Tom Tromey <tromey@redhat.com>
4737 * config.in: Rebuild.
4738 * configure: Rebuild.
4739 * configure.ac: Don't use AC_HEADER_DIRENT.
4741 2013-11-18 Tom Tromey <tromey@redhat.com>
4743 * server.h: Don't check HAVE_STRING_H.
4744 * gdbreplay.c: Don't check HAVE_STRING_H.
4745 * configure: Rebuild.
4747 2013-11-18 Tom Tromey <tromey@redhat.com>
4749 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4752 2013-11-08 Tom Tromey <tromey@redhat.com>
4754 * configure, config.in: Rebuild.
4755 * configure.ac: Remove unused configury.
4757 2013-11-08 Tom Tromey <tromey@redhat.com>
4759 * acinclude.m4: Include common.m4, codeset.m4.
4760 * configure, config.in: Rebuild.
4761 * configure.ac: Use GDB_AC_COMMON.
4763 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4765 * linux-s390-low.c (HWCAP_S390_TE): New define.
4766 (s390_arch_setup): Consider the TE field in the HWCAP for
4767 determining 'have_regset_tdb'.
4769 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4772 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4775 2013-10-02 Pedro Alves <palves@redhat.com>
4777 * server.c (process_serial_event): Don't output "GDBserver
4778 exiting" if GDB is connected through stdio.
4779 * target.c (mywait): Likewise, be silent if GDB is connected
4782 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4784 * lynx-low.c (lynx_add_threads_after_attach): New function.
4785 (lynx_attach): Remove call to add_thread. Add call to
4786 lynx_add_threads_after_attach instead.
4788 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4790 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4791 * config.in, configure: Regenerated.
4793 2013-09-18 Yao Qi <yao@codesourcery.com>
4796 * server.c (start_inferior): Clear 'resume_info'.
4798 2013-09-16 Jiong Wang <jiwang@tilera.com>
4800 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4803 2013-09-16 Jiong Wang <jiwang@tilera.com>
4805 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4806 linux-tile-low.o to srv_tgtobj.
4808 2013-09-16 Will Newton <will.newton@linaro.org>
4810 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4813 2013-09-06 Pedro Alves <palves@redhat.com>
4815 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4816 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4817 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4818 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4819 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4820 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4822 2013-09-06 Pedro Alves <palves@redhat.com>
4824 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4825 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4827 2013-09-06 Pedro Alves <palves@redhat.com>
4829 * linux-amd64-ipa.c: Include tracepoint.h.
4830 * linux-i386-ipa.c: Include tracepoint.h.
4832 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4834 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4835 (ps_get_thread_area): New function.
4837 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4839 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4840 (initialize_low_arch): Call init_registers_crisv32 rather than
4841 init_register_crisv32.
4843 2013-09-05 Pedro Alves <palves@redhat.com>
4845 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4847 * hostio.h: ... this new file.
4848 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4849 win32-low.c: Include hostio.h.
4851 2013-09-05 Pedro Alves <palves@redhat.com>
4853 * server.h (gdb_client_data, handler_func, callback_handler_func)
4854 (delete_file_handler, add_file_handler, append_callback_event)
4855 (delete_callback_event, start_event_loop, initialize_event_loop):
4856 Move to event-loop.h and include it.
4857 * event-loop.h: New file.
4859 2013-09-05 Pedro Alves <palves@redhat.com>
4861 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4862 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4863 (loaded_dll, unloaded_dll): Move to ...
4864 * dll.h: ... this new file.
4865 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4867 2013-09-05 Pedro Alves <palves@redhat.com>
4869 * server.h (current_process, get_thread_process, all_processes)
4870 (add_inferior_to_list, for_each_inferior, current_inferior)
4871 (remove_inferior, add_process, remove_process, find_process_pid)
4872 (have_started_inferiors_p, have_attached_inferiors_p)
4873 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4874 (clear_inferiors, find_inferior, find_inferior_id)
4875 (inferior_target_data, set_inferior_target_data)
4876 (inferior_regcache_data, set_inferior_regcache_data): Move to
4877 inferiors.h, and include it.
4878 * inferiors.h: New file.
4880 2013-09-05 Pedro Alves <palves@redhat.com>
4882 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4886 2013-09-05 Pedro Alves <palves@redhat.com>
4888 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4890 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4891 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4892 (handle_tracepoint_general_set, handle_tracepoint_query)
4893 (tracepoint_finished_step, tracepoint_was_hit)
4894 (release_while_stepping_state_list, current_traceframe)
4895 (in_readonly_region, traceframe_read_mem)
4896 (fetch_traceframe_registers, traceframe_read_sdata)
4897 (traceframe_read_info, struct fast_tpoint_collect_status)
4898 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4899 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4900 (supply_fast_tracepoint_registers)
4901 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4902 (ipa_tdesc, claim_trampoline_space)
4903 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4904 (agent_mem_read, agent_get_trace_state_variable_value)
4905 (agent_set_trace_state_variable_value, agent_tsv_read)
4906 (agent_mem_read_string, get_raw_reg_func_addr)
4907 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4908 * tracepoint.h: ... this new file.
4910 2013-09-05 Pedro Alves <palves@redhat.com>
4912 * server.h (perror_with_name, error, fatal, warning, paddress)
4913 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4915 * utils.h: New file.
4917 2013-09-05 Pedro Alves <palves@redhat.com>
4919 * server.h (remote_debug, noack_mode, transport_is_reliable)
4920 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4921 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4922 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4923 (write_enn, initialize_async_io, enable_async_io)
4924 (disable_async_io, check_remote_input_interrupt_request)
4925 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4926 (dead_thread_notify, prepare_resume_reply)
4927 (decode_address_to_semicolon, decode_address, decode_m_packet)
4928 (decode_M_packet, decode_X_packet, decode_xfer_write)
4929 (decode_search_memory_packet, unhexify, hexify)
4930 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4931 (look_up_one_symbol, relocate_instruction)
4932 (monitor_output): Move to remote-utils.h, and include it.
4933 * remote-utils.h: New file.
4935 2013-09-05 Pedro Alves <palves@redhat.com>
4937 * server.h (_): Delete.
4939 2013-09-02 Pedro Alves <palves@redhat.com>
4941 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4942 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4944 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4946 2013-09-02 Pierre Muller <muller@sourceware.org>
4948 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4949 or WriteProcessMemory complete successfully and handle
4950 ERROR_PARTIAL_COPY error.
4952 2013-09-02 Pedro Alves <palves@redhat.com>
4954 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4955 error instead of EIO.
4957 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4960 * linux-low.c: Include filestuff.h.
4961 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4962 * lynx-low.c: Include filestuff.h.
4963 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4964 * server.c: Include filestuff.h.
4965 (main): Call notice_open_fds.
4966 * spu-low.c: Include filestuff.h.
4967 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4969 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4971 * Makefile.in: Explain why ../target and ../nat are not
4972 listed as include file search paths.
4973 (linux-waitpid.o): New object file rule.
4974 * configure.srv (srv_native_linux_obj): New variable.
4975 Replace all occurrences of linux native object files with
4976 $srv_native_linux_obj.
4977 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4978 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4979 (linux_enable_event_reporting): Remove declaration.
4980 (my_waitpid): Moved to common/linux-waitpid.c.
4981 (linux_wait_for_event): Pass ptid when calling
4982 linux_enable_event_reporting.
4983 (linux_supports_tracefork_flag): Remove.
4984 (linux_enable_event_reporting): Likewise.
4985 (linux_tracefork_grandchild): Remove.
4986 (STACK_SIZE): Moved to common/linux-ptrace.c.
4987 (linux_tracefork_child): Remove.
4988 (linux_test_for_tracefork): Remove.
4989 (linux_look_up_symbols): Call linux_supports_traceclone.
4990 (initialize_low): Remove call to linux_test_for_tracefork.
4991 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4992 common/linux-ptrace.h.
4993 (PTRACE_TYPE_ARG4): Likewise.
4994 Include linux-ptrace.h.
4996 2013-08-21 Pedro Alves <palves@redhat.com>
4998 * config.in: Renegerate.
5000 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5002 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5003 (SFILES): Remove $(srcdir)/common/target-common.c and
5004 add $(srcdir)/target/waitstatus.c.
5005 (OBS): Remove target-common.o and add waitstatus.o.
5006 (server_h): Remove $(srcdir)/../common/target-common.h and
5007 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5008 and $(srcdir)/../target/waitstatus.h.
5009 (target-common.o): Remove.
5010 (waitstatus.o): New target object file.
5011 * target.h: Do not include target-common.h and
5012 include target/resume.h, target/wait.h and
5013 target/waitstatus.h.
5015 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5017 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5018 to PTRACE_TYPE_ARG3.
5019 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5020 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5022 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5023 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5025 2013-07-27 Jie Zhang <jie@codesourcery.com>
5026 Daniel Jacobowitz <dan@codesourcery.com>
5027 Yao Qi <yao@codesourcery.com>
5029 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5030 (mips-linux-watch.o): New rule.
5031 (mips_linux_watch_h): New variable.
5032 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5034 * linux-mips-low.c: Include mips-linux-watch.h.
5035 (struct arch_process_info, struct arch_lwp_info): New.
5036 (update_watch_registers_callback): New function.
5037 (mips_linux_new_process, mips_linux_new_thread) New functions.
5038 (mips_linux_prepare_to_resume, mips_insert_point): New
5040 (mips_remove_point, mips_stopped_by_watchpoint): New
5042 (rsp_bp_type_to_target_hw_bp_type): New function.
5043 (mips_stopped_data_address): New function.
5044 (the_low_target): Add watchpoint support functions.
5046 2013-07-27 Yao Qi <yao@codesourcery.com>
5048 * i386-low.c: Include break-common.h.
5049 (enum target_hw_bp_type): Remove.
5051 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5053 * Makefile.in (SFILES): /common/target-common.c.
5054 (OBS): Add target-common.o.
5055 (server_h): Add $(srcdir)/../common/target-common.h.
5056 (target-common.o): New target.
5057 * server.c (queue_stop_reply_callback): Free
5058 status string after use.
5059 * target.c (target_waitstatus_to_string): Remove.
5060 * target.h: Include target-common.h.
5061 (resume_kind): Likewise.
5062 (target_waitkind): Likewise.
5063 (target_waitstatus): Likewise.
5064 (TARGET_WNOHANG): Likewise.
5066 2013-07-04 Yao Qi <yao@codesourcery.com>
5068 * Makefile.in (host_alias): Use @host_noncanonical@.
5069 (target_alias): Use @target_noncanonical@.
5070 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5071 ACX_NONCANONICAL_HOST.
5072 * configure: Regenerated.
5075 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5077 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5078 * configure: Rebuild.
5079 * Makefile.in (version_host, version_target): Get from configure.
5080 (version.c): Use $(version_host) and $(version_target).
5082 2013-07-03 Pedro Alves <palves@redhat.com>
5084 * Makefile.in (config.status): Depend on development.sh.
5085 * acinclude.m4: Include libmcheck.m4.
5086 * configure: Regenerate.
5088 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5090 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5091 attribute inside the parentheses.
5092 (winapi_DebugSetProcessKillOnExit): Ditto.
5093 (winapi_DebugBreakProcess): Ditto.
5094 (winapi_GenerateConsoleCtrlEvent): Ditto.
5096 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5098 * notif.h (notif_event): Add a dummy member to avoid compiler
5101 2013-07-01 Pedro Alves <palves@redhat.com>
5103 * hostio.c (HOSTIO_PATH_MAX): Define.
5104 (require_filename, handle_open, handle_unlink, handle_readlink):
5107 2013-07-01 Pedro Alves <palves@redhat.com>
5109 * server.h: Include "pathmax.h".
5110 * linux-low.c: Don't include sys/param.h.
5111 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5113 * win32-low.c: Don't include sys/param.h.
5114 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5116 2013-07-01 Pedro Alves <palves@redhat.com>
5118 * event-loop.c: Don't check HAVE_UNISTD_H before including
5120 * gdbreplay.c: Likewise.
5121 * remote-utils.c: Likewise.
5122 * server.c: Likewise.
5123 * configure.ac: Don't check for unistd.h.
5124 * configure: Regenerate.
5126 2013-06-28 Tom Tromey <tromey@redhat.com>
5128 * Makefile.in (version.c): Use version.in, not
5131 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5133 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5134 * configure: Rebuild.
5135 * Makefile.in (version_host, version_target): Get from configure.
5136 (version.c): Use $(version_host) and $(version_target).
5138 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5140 Fix trace-status to output user name without trailing colon.
5141 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5143 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5145 Fix trace-status to output proper start-time and stop-time.
5146 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5147 output start time and stop time in hex as gdb expects.
5149 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5151 * tracepoint.c (build_traceframe_info_xml): Output trace state
5152 variables present in the trace buffer.
5154 2013-06-24 Tom Tromey <tromey@redhat.com>
5156 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5158 (version.o): Remove.
5159 * gdbreplay.c: Include version.h.
5160 (version, host_name): Don't declare.
5161 * server.h: Include version.h.
5162 (version, host_name): Don't declare.
5164 2013-06-12 Pedro Alves <palves@redhat.com>
5166 * linux-x86-low.c (linux_is_elf64): Delete global.
5167 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5168 with local linux_pid_exe_is_elf_64_file use.
5170 2013-06-11 Pedro Alves <palves@redhat.com>
5172 * linux-low.c (regset_disabled, disable_regset): New functions.
5173 (regsets_fetch_inferior_registers)
5174 (regsets_store_inferior_registers): Use them.
5175 (initialize_regsets_info); Don't allocate the disabled_regsets
5177 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5180 2013-06-11 Pedro Alves <palves@redhat.com>
5182 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5185 2013-06-11 Pedro Alves <palves@redhat.com>
5187 * linux-x86-low.c (initialize_low_arch): Call
5188 init_registers_x32_avx_linux.
5190 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5192 Fix compatibility with Android Bionic.
5193 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5196 2013-06-07 Pedro Alves <palves@redhat.com>
5199 * Makefile.in (OBS): Add tdesc.o.
5200 (IPA_OBJS): Add tdesc-ipa.o.
5201 (tdesc-ipa.o): New rule.
5202 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5204 * linux-low.c (new_inferior): Delete.
5205 (disabled_regsets, num_regsets): Delete.
5206 (linux_add_process): Adjust to set the new per-process
5208 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5209 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5210 was a stop. When calling arch_setup, switch the current inferior
5211 to the thread that got an event.
5212 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5213 (regsets_fetch_inferior_registers)
5214 (regsets_store_inferior_registers): New regsets_info parameter.
5216 (linux_register_in_regsets): New regs_info parameter. Adjust to
5218 (register_addr, fetch_register, store_register): New usrregs_info
5219 parameter. Adjust to use it.
5220 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5221 parameter regs_info. Adjust to use it.
5222 (linux_fetch_registers): Get the current inferior's regs_info, and
5224 (linux_store_registers): Ditto.
5225 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5226 (initialize_low): Don't initialize the target_regsets here. Call
5227 initialize_low_arch.
5228 * linux-low.h (target_regsets): Delete declaration.
5229 (struct regsets_info): New.
5230 (struct usrregs_info): New.
5231 (struct regs_info): New.
5232 (struct process_info_private) <new_inferior>: New field.
5233 (struct linux_target_ops): Delete the num_regs, regmap, and
5234 regset_bitmap fields. New field regs_info.
5235 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5236 * i387-fp.c (num_xmm_registers): Delete.
5237 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5238 calls to new interface.
5239 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5240 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5241 Infer the number of xmm registers from the regcache's target
5243 * i387-fp.h (num_xmm_registers): Delete.
5244 * inferiors.c (add_thread): Don't install the thread's regcache
5246 * proc-service.c (gregset_info): Fetch the current inferior's
5247 regs_info. Adjust to use it.
5248 * regcache.c: Include tdesc.h.
5249 (register_bytes, reg_defs, num_registers)
5250 (gdbserver_expedite_regs): Delete.
5251 (get_thread_regcache): If the thread doesn't have a regcache yet,
5252 create one, instead of aborting gdbserver.
5253 (regcache_invalidate_one): Rename to ...
5254 (regcache_invalidate_thread): ... this.
5255 (regcache_invalidate_one): New.
5256 (regcache_invalidate): Only invalidate registers of the current
5258 (init_register_cache): Add target_desc parameter, and use it.
5259 (new_register_cache): Ditto. Assert the target description has a
5260 non zero registers_size.
5261 (regcache_cpy): Add assertions. Adjust.
5262 (realloc_register_cache, set_register_cache): Delete.
5263 (registers_to_string, registers_from_string): Adjust.
5264 (find_register_by_name, find_regno, find_register_by_number)
5265 (register_cache_size): Add target_desc parameter, and use it.
5266 (free_register_cache_thread, free_register_cache_thread_one)
5267 (regcache_release, register_cache_size): New.
5268 (register_size): Add target_desc parameter, and use it.
5269 (register_data, supply_register, supply_register_zeroed)
5270 (supply_regblock, supply_register_by_name, collect_register)
5271 (collect_register_as_string, collect_register_by_name): Adjust.
5272 * regcache.h (struct target_desc): Forward declare.
5273 (struct regcache) <tdesc>: New field.
5274 (init_register_cache, new_register_cache): Add target_desc
5276 (regcache_invalidate_thread): Declare.
5277 (regcache_invalidate_one): Delete declaration.
5278 (regcache_release): Declare.
5279 (find_register_by_number, register_cache_size, register_size)
5280 (find_regno): Add target_desc parameter.
5281 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5283 * remote-utils.c: Include tdesc.h.
5284 (outreg, prepare_resume_reply): Adjust.
5285 * server.c: Include tdesc.h.
5286 (gdbserver_xmltarget): Delete declaration.
5287 (get_features_xml, process_serial_event): Adjust.
5288 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5290 (struct process_info) <tdesc>: New field.
5291 (ipa_tdesc): Declare.
5292 * tdesc.c: New file.
5293 * tdesc.h: New file.
5294 * tracepoint.c: Include tdesc.h.
5295 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5296 (get_context_regcache): Adjust to pass ipa_tdesc down.
5297 (do_action_at_tracepoint): Adjust to get the register cache size
5298 from the context regcache's description.
5299 (traceframe_walk_blocks): Adjust to get the register cache size
5300 from the current trace frame's description.
5301 (traceframe_get_pc): Adjust to get current trace frame's
5302 description and pass it down.
5303 (gdb_collect): Adjust to get the register cache size from the
5305 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5306 (gdbserver_xmltarget): Delete.
5307 (initialize_low_tracepoint): Set the ipa's target description.
5308 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5309 (initialize_low_tracepoint): Set the ipa's target description.
5310 * linux-x86-low.c: Include tdesc.h.
5311 [__x86_64__] (is_64bit_tdesc): New.
5312 (ps_get_thread_area, x86_get_thread_area): Use it.
5313 (i386_cannot_store_register): Rename to ...
5314 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5315 (i386_cannot_fetch_register): Rename to ...
5316 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5317 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5319 (target_regsets): Rename to ...
5320 (x86_regsets): ... this.
5321 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5323 (x86_siginfo_fixup): Use is_64bit_tdesc.
5324 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5325 (tdesc_x32_avx_linux, tdesc_x32_linux)
5326 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5328 (x86_linux_update_xmltarget): Delete.
5329 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5330 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5331 (AMD64_LINUX_USER64_CS): New.
5332 (x86_linux_read_description): New, based on
5333 x86_linux_update_xmltarget.
5334 (same_process_callback): New.
5335 (x86_arch_setup_process_callback): New.
5336 (x86_linux_update_xmltarget): New.
5337 (x86_regsets_info): New.
5338 (amd64_linux_regs_info): New.
5339 (i386_linux_usrregs_info): New.
5340 (i386_linux_regs_info): New.
5341 (x86_linux_regs_info): New.
5342 (x86_arch_setup): Reimplement.
5343 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5344 (x86_emit_ops): Ditto.
5345 (the_low_target): Adjust. Install x86_linux_regs_info,
5346 x86_cannot_fetch_register, and x86_cannot_store_register.
5347 (initialize_low_arch): New.
5348 * linux-ia64-low.c (tdesc_ia64): Declare.
5349 (ia64_fetch_register): Adjust.
5350 (ia64_usrregs_info, regs_info): New globals.
5351 (ia64_regs_info): New function.
5352 (the_low_target): Adjust.
5353 (initialize_low_arch): New function.
5354 * linux-sparc-low.c (tdesc_sparc64): Declare.
5355 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5357 (sparc_arch_setup): New function.
5358 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5359 (the_low_target): Adjust.
5360 (initialize_low_arch): New function.
5361 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5362 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5363 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5364 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5365 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5366 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5367 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5368 (tdesc_powerpc_isa205_vsx64l): Declare.
5369 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5370 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5371 (ppc_set_pc, ppc_get_hwcap): Adjust.
5372 (ppc_usrregs_info): Forward declare.
5373 (!__powerpc64__) ppc_regmap_adjusted: New global.
5374 (ppc_arch_setup): Adjust to the current process'es target
5376 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5377 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5378 (ppc_store_evrregset): Adjust.
5379 (target_regsets): Rename to ...
5380 (ppc_regsets): ... this, and make static.
5381 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5382 (ppc_regs_info): New function.
5383 (the_low_target): Adjust.
5384 (initialize_low_arch): New function.
5385 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5386 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5387 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5388 (tdesc_s390x_linux64v2): Declare.
5389 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5390 (s390_fill_gregset, s390_store_last_break): Adjust.
5391 (target_regsets): Rename to ...
5392 (s390_regsets): ... this, and make static.
5393 (s390_get_pc, s390_set_pc): Adjust.
5394 (s390_get_hwcap): New target_desc parameter, and use it.
5395 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5396 (s390_arch_setup): Adjust to set the current process'es target
5397 description. Don't adjust the regmap.
5398 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5399 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5400 (regs_info_3264): New globals.
5401 (s390_regs_info): New function.
5402 (the_low_target): Adjust.
5403 (initialize_low_arch): New function.
5404 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5405 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5406 [__mips64] (init_registers_mips_linux)
5407 (init_registers_mips_dsp_linux): Delete defines.
5408 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5409 (have_dsp): New global.
5410 (mips_read_description): New, based on mips_arch_setup.
5411 (mips_arch_setup): Reimplement.
5412 (get_usrregs_info): New function.
5413 (mips_cannot_fetch_register, mips_cannot_store_register)
5414 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5415 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5416 (target_regsets): Rename to ...
5417 (mips_regsets): ... this, and make static.
5418 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5419 (dsp_regs_info, regs_info): New globals.
5420 (mips_regs_info): New function.
5421 (the_low_target): Adjust.
5422 (initialize_low_arch): New function.
5423 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5424 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5426 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5427 (arm_read_description): New, with bits factored from
5429 (arm_arch_setup): Reimplement.
5430 (target_regsets): Rename to ...
5431 (arm_regsets): ... this, and make static.
5432 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5433 (arm_regs_info): New function.
5434 (the_low_target): Adjust.
5435 (initialize_low_arch): New function.
5436 * linux-m68k-low.c (tdesc_m68k): Declare.
5437 (target_regsets): Rename to ...
5438 (m68k_regsets): ... this, and make static.
5439 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5440 (m68k_regs_info): New function.
5441 (m68k_arch_setup): New function.
5442 (the_low_target): Adjust.
5443 (initialize_low_arch): New function.
5444 * linux-sh-low.c (tdesc_sharch): Declare.
5445 (target_regsets): Rename to ...
5446 (sh_regsets): ... this, and make static.
5447 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5448 (sh_regs_info, sh_arch_setup): New functions.
5449 (the_low_target): Adjust.
5450 (initialize_low_arch): New function.
5451 * linux-bfin-low.c (tdesc_bfin): Declare.
5452 (bfin_arch_setup): New function.
5453 (bfin_usrregs_info, regs_info): New globals.
5454 (bfin_regs_info): New function.
5455 (the_low_target): Adjust.
5456 (initialize_low_arch): New function.
5457 * linux-cris-low.c (tdesc_cris): Declare.
5458 (cris_arch_setup): New function.
5459 (cris_usrregs_info, regs_info): New globals.
5460 (cris_regs_info): New function.
5461 (the_low_target): Adjust.
5462 (initialize_low_arch): New function.
5463 * linux-cris-low.c (tdesc_crisv32): Declare.
5464 (cris_arch_setup): New function.
5465 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5466 (cris_regs_info): New function.
5467 (the_low_target): Adjust.
5468 (initialize_low_arch): New function.
5469 * linux-m32r-low.c (tdesc_m32r): Declare.
5470 (m32r_arch_setup): New function.
5471 (m32r_usrregs_info, regs_info): New globals.
5472 (m32r_regs_info): Adjust.
5473 (initialize_low_arch): New function.
5474 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5475 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5476 (tic6x_usrregs_info): Forward declare.
5477 (tic6x_read_description): New function, based on ...
5478 (tic6x_arch_setup): ... this. Reimplement.
5479 (target_regsets): Rename to ...
5480 (tic6x_regsets): ... this, and make static.
5481 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5482 (tic6x_regs_info): New function.
5483 (the_low_target): Adjust.
5484 (initialize_low_arch): New function.
5485 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5486 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5487 (target_regsets): Rename to ...
5488 (xtensa_regsets): ... this, and make static.
5489 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5491 (xtensa_arch_setup, xtensa_regs_info): New functions.
5492 (the_low_target): Adjust.
5493 (initialize_low_arch): New function.
5494 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5495 (nios2_arch_setup): Set the current process'es tdesc.
5496 (target_regsets): Rename to ...
5497 (nios2_regsets): ... this.
5498 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5499 (nios2_regs_info): New function.
5500 (the_low_target): Adjust.
5501 (initialize_low_arch): New function.
5502 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5503 (aarch64_arch_setup): Set the current process'es tdesc.
5504 (target_regsets): Rename to ...
5505 (aarch64_regsets): ... this.
5506 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5507 (aarch64_regs_info): New function.
5508 (the_low_target): Adjust.
5509 (initialize_low_arch): New function.
5510 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5512 (target_regsets): Rename to ...
5513 (tile_regsets): ... this.
5514 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5515 (tile_regs_info): New function.
5516 (tile_arch_setup): Set the current process'es tdesc.
5517 (the_low_target): Adjust.
5518 (initialize_low_arch): New function.
5519 * spu-low.c (tdesc_spu): Declare.
5520 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5521 * win32-arm-low.c (tdesc_arm): Declare.
5522 (arm_arch_setup): New function.
5523 (the_low_target): Install arm_arch_setup instead of
5525 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5526 (init_windows_x86): Rename to ...
5527 (i386_arch_setup): ... this. Set `win32_tdesc'.
5528 (the_low_target): Adjust.
5529 * win32-low.c (win32_tdesc): New global.
5530 (child_add_thread): Don't create the thread cache here.
5531 (do_initial_child_stuff): Set the new process'es tdesc.
5532 * win32-low.h (struct target_desc): Forward declare.
5533 (win32_tdesc): Declare.
5534 * lynx-i386-low.c (tdesc_i386): Declare global.
5535 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5536 * lynx-low.c (lynx_tdesc): New global.
5537 (lynx_add_process): Set the new process'es tdesc.
5538 * lynx-low.h (struct target_desc): Forward declare.
5539 (lynx_tdesc): Declare global.
5540 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5541 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5542 * nto-low.c (nto_tdesc): New global.
5543 (do_attach): Set the new process'es tdesc.
5544 * nto-low.h (struct target_desc): Forward declare.
5545 (nto_tdesc): Declare.
5546 * nto-x86-low.c (tdesc_i386): Declare.
5547 (nto_x86_arch_setup): Set `nto_tdesc'.
5549 2013-06-04 Gary Benson <gbenson@redhat.com>
5551 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5552 to qSupported response when appropriate.
5553 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5554 with nonzero-length annex.
5555 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5556 arguments supplied in annex.
5558 2013-05-31 Doug Evans <dje@google.com>
5561 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5562 64 bits in 64-cross-32 environment.
5564 2013-05-28 Pedro Alves <palves@redhat.com>
5566 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5567 (aarch64-without-fpu.c): Delete rule.
5568 * configure.srv (aarch64*-*-linux*): Remove references to
5569 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5570 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5573 2013-05-24 Pedro Alves <palves@redhat.com>
5575 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5576 instead of strchr/decode_address. Error if the range isn't split
5577 with a ','. Don't assume there's be a ':' in the action.
5579 2013-05-23 Yao Qi <yao@codesourcery.com>
5580 Pedro Alves <palves@redhat.com>
5582 * linux-low.c (lwp_in_step_range): New function.
5583 (linux_wait_1): If the thread was range stepping and stopped
5584 outside the stepping range, report the stop to GDB. Otherwise,
5585 continue stepping. Add range stepping debug output.
5586 (linux_set_resume_request): Copy the step range from the resume
5588 (linux_supports_range_stepping): New.
5589 (linux_target_ops) <supports_range_stepping>: Set to
5590 linux_supports_range_stepping.
5591 * linux-low.h (struct linux_target_ops)
5592 <supports_range_stepping>: New field.
5593 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5594 * linux-x86-low.c (x86_supports_range_stepping): New.
5595 (the_low_target) <supports_range_stepping>: Set to
5596 x86_supports_range_stepping.
5597 * server.c (handle_v_cont): Handle 'r' action.
5598 (handle_v_requests): Append ";r" if the target supports range
5600 * target.h (struct thread_resume) <step_range_start,
5601 step_range_end>: New fields.
5602 (struct target_ops) <supports_range_stepping>:
5604 (target_supports_range_stepping): New macro.
5606 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5608 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5609 confusion in comment.
5611 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5613 * lynx-low.c (struct process_info_private): New type.
5614 (lynx_add_process): New function.
5615 (lynx_create_inferior, lynx_attach): Replace calls to
5616 add_process by calls to lynx_add_process.
5617 (lynx_resume): If PTID is null, then try using
5618 current_process()->private->last_wait_event_ptid.
5620 (lynx_clear_inferiors): Delete. The contents of that function
5621 has been inlined in lynx_mourn;
5622 (lynx_wait_1): Save the ptid in the process's private data.
5623 (lynx_mourn): Free the process' private data. Replace call
5624 to lynx_clear_inferiors by call to clear_inferiors.
5626 2013-05-17 Yao Qi <yao@codesourcery.com>
5628 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5631 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5633 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5634 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5635 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5636 PT_TEXT_END_ADDR guards. Update comments.
5637 (linux_target_op) <read_offsets>: Conditionally define to
5638 linux_read_offsets if the target is UCLIBC and if it defines
5639 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5641 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5642 Andrew Jenner <andrew@codesourcery.com>
5644 * Makefile.in (SFILES): Add linux-nios2-low.c.
5645 (clean): Add action to delete nios2-linux.c.
5646 (nios2-linux.c): New rule.
5647 * configure.srv: Add nios2*-*-linux*.
5648 * linux-nios2-low.c: New.
5650 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5652 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5654 2013-04-25 Hui Zhu <hui@codesourcery.com>
5657 * ax.c (ax_printf): Add fflush.
5659 2013-04-22 Tom Tromey <tromey@redhat.com>
5661 * Makefile.in (SFILES): Add filestuff.c.
5662 (OBS): Add filestuff.o.
5663 (filestuff.o): New target.
5664 * config.in, configure: Rebuild.
5665 * configure.ac: Check for fdwalk, pipe2.
5667 2013-04-17 Pedro Alves <palves@redhat.com>
5669 * configure.ac (USE_THREAD_DB): Delete variable.
5670 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5671 Don't AC_SUBST USE_THREAD_DB.
5672 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5673 * config.in, configure: Regenerate.
5675 2013-04-16 Pedro Alves <palves@redhat.com>
5677 * linux-low.h (struct lwp_info) <thread_known>: Move under
5678 the USE_THREAD_DB #ifdef.
5680 2013-04-16 Pedro Alves <palves@redhat.com>
5682 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5683 (linux-low.o): Delete rule.
5684 * linux-low.h: Always include "gdb_thread_db.h" instead of
5685 conditionally including thread_db.h.
5686 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5689 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5691 * Makefile.in (install-only): Fix make install regression.
5693 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5695 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5696 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5698 * gdbserver.1: Remove.
5700 2013-03-22 Pedro Alves <palves@redhat.com>
5702 * linux-low.c (handle_extended_wait): Don't call
5703 linux_enable_event_reporting.
5705 2013-03-15 Tony Theodore <tonyt@logyst.com>
5708 * Makefile.in (SHELL): Use @SHELL@.
5710 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5712 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5715 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5717 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5718 Remove extraneous NULL element.
5720 2013-03-13 Yao Qi <yao@codesourcery.com>
5722 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5723 'V' block in trace frame.
5725 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5727 * target.h (struct target_ops): Add btrace ops.
5728 (target_supports_btrace): New macro.
5729 (target_enable_btrace): New macro.
5730 (target_disable_btrace): New macro.
5731 (target_read_btrace): New macro.
5732 * gdbthread.h (struct thread_info): Add btrace field.
5733 * server.c: Include btrace-common.h.
5734 (handle_btrace_general_set): New function.
5735 (handle_btrace_enable): New function.
5736 (handle_btrace_disable): New function.
5737 (handle_general_set): Call handle_btrace_general_set.
5738 (handle_qxfer_btrace): New function.
5739 (struct qxfer qxfer_packets[]): Add btrace entry.
5740 * inferiors.c (remove_thread): Disable btrace.
5741 * linux-low: Include linux-btrace.h.
5742 (linux_low_enable_btrace): New function.
5743 (linux_low_read_btrace): New function.
5744 (linux_target_ops): Add btrace ops.
5745 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5746 Add srv_linux_btrace=yes.
5747 (x86_64-*-linux*): Add linux-btrace.o.
5748 Add srv_linux_btrace=yes.
5749 * configure.ac: Define HAVE_LINUX_BTRACE.
5750 * config.in: Regenerated.
5751 * configure: Regenerated.
5753 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5755 * server.c (handle_qxfer): Preserve error message if -3 is
5757 (qxfer): Document the -3 return value.
5759 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5761 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5762 (linux_btrace_h): New variable.
5763 (linux-btrace.o): New rule.
5765 2013-03-08 Stan Shebs <stan@codesourcery.com>
5766 Hafiz Abid Qadeer <abidh@codesourcery.com>
5768 * tracepoint.c (trace_buffer_size): New global.
5769 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5770 (init_trace_buffer): Change to one-argument function. Allocate
5771 trace buffer memory.
5772 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5773 handle QTBuffer:size packet.
5774 (cmd_bigqtbuffer_size): New function.
5775 (initialize_tracepoint): Call init_trace_buffer with
5776 DEFAULT_TRACE_BUFFER_SIZE.
5777 * server.c (handle_query): Add QTBuffer:size in the
5780 2013-03-07 Yao Qi <yao@codesourcery.com>
5782 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5783 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5785 (cmd_qtsp): Adjust condition. Do post increment.
5786 Set cur_action and cur_step_action back to 0.
5788 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5791 * linux-low.c (linux_write_memory): Return early success if LEN is
5794 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5796 * configure.srv: Add x86_64-*-cygwin* as target.
5798 2013-02-28 Tom Tromey <tromey@redhat.com>
5800 * configure.ac: Invoke AC_SYS_LARGEFILE.
5801 * configure, config.in: Rebuild.
5803 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5805 * win32-low.c: Throughout, fix format strings and casts of
5806 printf-like functions to avoid type related warnings on all
5808 (get_child_debug_event): Print dwDebugEventCode as hex since
5809 that's how it's usually documented.
5811 2013-02-28 Yao Qi <yao@codesourcery.com>
5813 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5816 2013-02-27 Jiong Wang <jiwang@tilera.com>
5818 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5819 (reg-tilegx32.c): New rule.
5820 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5821 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5822 different register info initializer according to elf class.
5823 (init_registers_tilgx32): New function. The tilegx32 register info
5825 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5826 (tile_store_gregset): Likewise.
5828 2013-02-27 Yao Qi <yao@codesourcery.com>
5830 * server.c (process_point_options): Print debug message when
5831 debug_threads is true.
5833 2013-02-26 Yao Qi <yao@codesourcery.com>
5835 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5837 2013-02-19 Pedro Alves <palves@redhat.com>
5838 Kai Tietz <ktietz@redhat.com>
5842 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5843 instead of strtoul to extract address from packet.
5844 (process_serial_event) <'z'>: Likewise.
5846 2013-02-18 Yao Qi <yao@codesourcery.com>
5848 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5850 2013-02-14 Pedro Alves <palves@redhat.com>
5854 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5855 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5857 2013-02-14 Pedro Alves <palves@redhat.com>
5859 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5861 2013-02-14 Pedro Alves <palves@redhat.com>
5863 * tracepoint.c (save_string): Delete.
5864 (add_tracepoint_action): Use savestring instead of save_string.
5866 2013-02-12 Pedro Alves <palves@redhat.com>
5868 * linux-xtensa-low.c: Ditto.
5869 * xtensa-xtregs.c: Ditto.
5871 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5873 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5876 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5878 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5879 aarch64_num_wp_regs and aarch64_num_bp_regs to
5880 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5882 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5884 * linux-aarch64-low.c (ps_get_thread_area): Replace
5885 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5887 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5888 Marcus Shawcroft <marcus.shawcroft@arm.com>
5889 Nigel Stephens <nigel.stephens@arm.com>
5890 Yufeng Zhang <yufeng.zhang@arm.com>
5892 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5893 (aarch64.c, aarch64-without-fpu.c): New targets.
5894 * configure.srv (aarch64*-*-linux*): New.
5895 * linux-aarch64-low.c: New file.
5897 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5899 * linux-low.c (handle_extended_wait, linux_create_inferior)
5900 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5901 (dequeue_one_deferred_signal, linux_resume_one_thread)
5902 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5903 (linux_tracefork_grandchild, linux_test_for_tracefork)
5904 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5905 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5906 where the argument is 0.
5908 2013-01-25 Yao Qi <yao@codesourcery.com>
5910 * event-loop.c: Include "queue.h".
5911 (gdb_event_p): New typedef.
5912 (struct gdb_event) <next_event>: Remove.
5913 (event_queue): Change to QUEUE(gdb_event_p).
5914 (async_queue_event): Remove.
5915 (gdb_event_xfree): New.
5916 (initialize_event_loop): New.
5917 (process_event): Use API from QUEUE.
5918 (wait_for_event): Likewise.
5919 * server.c (main): Call initialize_event_loop.
5920 * server.h (initialize_event_loop): Declare.
5922 2013-01-18 Yao Qi <yao@codesourcery.com>
5924 * ax.h (struct eval_agent_expr_context): New.
5925 (gdb_eval_agent_expr): Update declaration.
5926 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5927 TFRAME. Add new argument CTX.
5928 * server.h (struct eval_agent_expr_context): Declare.
5929 (agent_mem_read, agent_tsv_read): Update declaration.
5930 (agent_mem_read_string): Likewise.
5931 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5932 (add_traceframe_block): Add new argument TPOINT.
5933 Increase TPOINT->traceframe_usage.
5934 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5935 eval_tracepoint_agent_expr.
5936 (condition_true_at_tracepoint): Likewise.
5937 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5938 (agent_mem_read_string, agent_tsv_read): Likewise.
5940 2013-01-16 Yao Qi <yao@codesourcery.com>
5942 * linux-low.c (linux_resume_one_lwp): Don't check
5943 'lwp->bp_reinsert != 0'.
5945 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5946 Pedro Alves <palves@redhat.com>
5948 * lynx-low.c (ptrace_request_to_str): Define a temporary
5949 macro and use it to simplify this function's implementation.
5951 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5953 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5956 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5958 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5960 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5962 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5964 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5966 * lynx-low.c (lynx_resume): Use the resume_info parameter
5967 to determine the ptid for the lynx_ptrace call, unless
5968 it is equal to minus_one_ptid, in which case we use the
5969 ptid of the current_inferior.
5970 (lynx_wait_1): After having received a thread create/exit
5971 event, resume the inferior's execution using the signaling
5972 thread's ptid, rather than the old ptid.
5974 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5976 * lynx-low.c (lynx_resume): Delete variable ret.
5978 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5980 * gdbreplay.c (gdbreplay_version): Update copyright year.
5981 * server.c (gdbserver_version): Likewise.
5983 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5985 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5988 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5990 * lynx-low.c (ptrace_request_to_str): Add handling for
5993 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5995 * lynx-low.c (lynx_attach): Delete variable new_process.
5997 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5999 * lynx-low.c (lynx_create_inferior): Delete variable
6002 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6004 * lynx-low.c (ptrace_request_to_str): Do not handle
6005 PTRACE_GETTHREADLIST if this macro does not exist.
6007 2012-12-15 Yao Qi <yao@codesourcery.com>
6009 * Makefile.in (OBS): Add notif.o.
6010 * notif.c, notif.h: New.
6011 * server.c: Include "notif.h".
6012 (struct vstop_notif) <next>: Remove.
6014 (queue_stop_reply): Update.
6015 (push_event, send_next_stop_reply): Remove.
6016 (discard_queued_stop_replies): Update.
6017 (notif_stop): New variable.
6018 (handle_v_stopped): Remove.
6019 (handle_v_requests): Don't call handle_v_stopped. Call
6020 handle_ack_notif instead.
6021 (queue_stop_reply_callback): Call notif_event_enque instead
6022 of queue_stop_reply.
6023 (handle_status): Don't call send_next_stop_reply, call
6024 notif_write_event instead.
6025 (kill_inferior_callback): Likewise.
6026 (detach_or_kill_inferior_callback): Likewise.
6027 (main): Call initialize_notif.
6028 (process_serial_event): Call QUEUE_is_empty.
6029 (handle_target_event): Call notif_push instead of push event.
6030 * server.h (push_event): Remove declaration.
6032 2012-12-10 Tom Tromey <tromey@redhat.com>
6034 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6035 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6038 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6039 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6040 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6041 (amd64-linux-ipa.o, ax.o): Rewrite.
6042 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6043 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6044 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6045 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6046 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6047 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6048 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6049 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6050 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6051 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6052 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6053 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6054 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6055 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6056 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6057 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6058 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6059 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6060 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6061 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6062 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6063 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6064 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6065 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6066 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6067 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6068 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6069 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6070 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6071 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6072 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6073 (reg-tilegx.o): Remove.
6074 (all_object_files): New macro.
6075 Include .deps files.
6076 * aclocal.m4, configure: Rebuild.
6077 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6078 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6079 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6081 2012-12-05 Tom Tromey <tromey@redhat.com>
6084 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6086 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6088 * configure.ac: Check for linux/perf_event.h.
6089 * config.in: Regenerated.
6090 * configure: Regenerated.
6092 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6094 * hostio.c (handle_readlink): Decrease buffer size
6095 parameter passed to readlink by one byte.
6097 2012-11-26 Yao Qi <yao@codesourcery.com>
6099 * configure.ac (build_warnings): Append '-Wempty-body'.
6100 * configure: Regenerated.
6101 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6104 2012-11-15 Pierre Muller <muller@sourceware.org>
6106 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6107 * config.in: Regenerate.
6108 * configure: Regenerate.
6109 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6110 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6111 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6112 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6114 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6115 instead of <sys/wait.h> header.
6116 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6118 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6120 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6121 (various make rules): Remove -DGDBSERVER
6123 2012-11-09 Yao Qi <yao@codesourcery.com>
6125 * spu-low.c (current_ptid): Move it to ..
6126 * gdbthread.h: ... here. New.
6127 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6128 * server.c (myresume, process_serial_event): Likewise.
6129 * thread-db.c (thread_db_find_new_threads): Likewise.
6130 * tracepoint.c (run_inferior_command): Likewise.
6132 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6134 * server.c (handle_search_memory_1): Include access length in
6137 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6139 * linux-crisv32-low.c: Fix compile errors.
6141 2012-09-04 Yao Qi <yao@codesourcery.com>
6143 * tracepoint.c (cmd_qtsv): Adjust debug message.
6144 Don't check CUR_TPOINT.
6146 2012-08-28 Yao Qi <yao@codesourcery.com>
6148 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6149 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6150 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6151 Remove declarations of xmalloc, xreallloc, xstrdup and
6153 * Makefile.in (libiberty_h): New.
6154 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6155 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6157 2012-08-23 Yao Qi <yao@codesourcery.com>
6159 * server.h: Remove declaration of 'xsnprintf'.
6161 2012-08-22 Keith Seitz <keiths@redhat.com>
6163 * server.h: Include build-gnulib-gbserver/config.h.
6164 * gdbreplay.c: Likewise.
6166 2012-08-08 Doug Evans <dje@google.com>
6168 * Makefile.in (SFILES): Add gdb_vecs.c.
6169 (OBS): Add gdb_vecs.o.
6170 (gdb_vecs_h, host_defs_h): New variables.
6171 (thread-db.o): Add $(gdb_vecs_h) dependency.
6172 (gdb_vecs.o): New rule.
6173 * thread-db.c: #include "gdb_vecs.h".
6174 (thread_db_load_search): Use a vector to iterate over path elements.
6175 Handle text appearing after "$pdir".
6177 * configure.ac: Add check for strstr.
6178 * config.in: Regenerate.
6179 * configure: Regenerate.
6181 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6183 * hostio.c (handle_pread): If pread fails, fall back to attempting
6185 (handle_pwrite): Likewise for pwrite.
6187 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6189 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6190 between unsupported TYPE and unimplementable ADDR/LEN combination.
6191 (arm_insert_point): Act on new return value.
6193 2012-07-31 Pedro Alves <palves@redhat.com>
6195 * server.c (process_point_options): Only skip tokens if we find
6196 one that is unrecognized. Don't treat 'X' specially while
6197 skipping unrecognized tokens.
6199 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6201 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6202 to 4-byte-align HW breakpoint addresses for Thumb.
6204 2012-07-27 Yao Qi <yao@codesourcery.com>
6208 * server.h: Declare gdb_agent_about_to_close.
6209 * target.c (kill_inferior): Include "agent.h".
6210 New. Send command 'kill'.
6211 * target.h (kill_inferior): Removed macro.
6212 * tracepoint.c (gdb_agent_about_to_close): New.
6213 (gdb_agent_helper_thread): Handle command 'close'.
6214 Wait endlessly until the inferior stops.
6215 Install gdb_agent_remove_socket to atexit hook.
6216 (agent_socket_name): New static variable.
6217 (gdb_agent_socket_init): Replace local variable 'name' with
6218 'agent_socket_name'.
6219 (gdb_agent_remove_socket): New.
6221 2012-07-27 Yao Qi <yao@codesourcery.com>
6223 * server.c (process_point_options): Stop at 'X' when parsing.
6225 2012-07-19 Michael Eager <eager@eagercon.com>
6227 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6229 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6230 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6231 hardware breakpoint.
6233 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6235 * gdbserver/linux-low.c (initialize_low): Call
6236 linux_ptrace_init_warnings.
6238 2012-07-02 Doug Evans <dje@google.com>
6240 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6243 2012-07-02 Stan Shebs <stan@codesourcery.com>
6245 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6246 (ax.o): Add it to build rule.
6248 (OBS): Add format.o.
6249 (IPA_OBS): Add format.o.
6250 * server.c (handle_query): Claim support for breakpoint commands.
6251 (process_point_options): Add command case.
6252 (process_serial_event): Leave running if there are printfs in
6254 * mem-break.h (any_persistent_commands): Declare.
6255 (add_breakpoint_commands): Declare.
6256 (gdb_no_commands_at_breakpoint): Declare.
6257 (run_breakpoint_commands): Declare.
6258 * mem-break.c (struct point_command_list): New struct.
6259 (struct breakpoint): New field command_list.
6260 (any_persistent_commands): New function.
6261 (add_commands_to_breakpoint): New function.
6262 (add_breakpoint_commands): New function.
6263 (gdb_no_commands_at_breakpoint): New function.
6264 (run_breakpoint_commands): New function.
6265 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6267 * ax.c: Include format.h.
6268 (ax_printf): New function.
6269 (gdb_eval_agent_expr): Add printf opcode.
6271 2012-06-13 Yao Qi <yao@codesourcery.com>
6273 * server.c (start_inferior): Remove duplicated writes to fields
6274 'last_resume_kind' and 'last_status' of 'current_inferior'.
6276 2012-06-12 Yao Qi <yao@codesourcery.com>
6277 Pedro Alves <palves@redhat.com>
6279 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6281 * server.c (handle_v_cont): Extend comment.
6283 2012-06-11 Yao Qi <yao@codesourcery.com>
6285 * linux-low.c (linux_attach): Add 'static'.
6287 2012-06-06 Yao Qi <yao@codesourcery.com>
6289 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6291 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6293 Fix gcc -flto compilation warning.
6294 * server.c (main): Make variable multi_mode and attach volatile.
6296 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6298 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6299 if the platform doesn't know about it.
6301 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6303 * Makefile.in (SFILES): Add linux-tile-low.c.
6304 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6305 * configure.srv: Handle tilegx-*-linux*.
6306 * linux-tile-low.c: New file.
6308 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6310 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6312 2012-05-24 Pedro Alves <palves@redhat.com>
6316 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6318 2012-05-24 Pedro Alves <palves@redhat.com>
6322 Replace target_signal with gdb_signal throughout.
6324 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6326 * linux-low.c (linux_store_registers): Avoid the copying sequence
6327 when no data has been retrieved by ptrace.
6329 2012-05-22 Will Deacon <will.deacon@arm.com>
6331 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6332 Include asm/ptrace.h.
6333 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6336 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6338 * linux-low.c (linux_store_registers): Don't re-retrieve data
6339 with ptrace that has already been obtained from /proc. Always
6340 copy any data retrieved with ptrace to the buffer supplied.
6342 2012-05-11 Yao Qi <yao@codesourcery.com>
6343 Pedro Alves <palves@redhat.com>
6345 * linux-low.c (enum stopping_threads_kind): New.
6346 (stopping_threads): Change type to `enum stopping_threads_kind'.
6347 (handle_extended_wait): If stopping and suspending threads, leave
6348 the new_lwp suspended too.
6349 (linux_wait_for_event): Adjust.
6350 (stop_all_lwps): Set `stopping_threads' to
6351 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6352 whether we're suspending threads or just stopping them. Assert no
6355 2012-04-29 Yao Qi <yao@codesourcery.com>
6357 * server.h: Move some code to ...
6358 * gdbthread.h: ... here. New.
6359 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6360 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6361 (nto-low.o, win32-low.o): Likewise.
6362 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6363 * regcache.c, remote-utils.c, server.c: Likewise.
6364 * target.c, tracepoint.c, win32-low.c: Likewise.
6366 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6368 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6369 (PTRACE_ARG4_TYPE): Likewise.
6370 (PTRACE_XFER_TYPE): Likewise.
6371 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6372 ptrace to PTRACE_ARG3_TYPE.
6373 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6374 (PTRACE_ARG4_TYPE): Likewise.
6375 (PTRACE_XFER_TYPE): Likewise.
6376 (linux_detach_one_lwp): Cast fourth argument of
6377 ptrace to long then PTRACE_ARG4_TYPE.
6378 (regsets_fetch_inferior_registers): Cast third argument of
6379 ptrace to long then PTRACE_ARG3_TYPE.
6380 (regsets_store_inferior_registers): Likewise.
6382 2012-04-20 Pedro Alves <palves@redhat.com>
6384 * configure: Regenerate.
6386 2012-04-19 Pedro Alves <palves@redhat.com>
6388 * Makefile.in (GNULIB_BUILDDIR): New.
6389 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6390 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6391 (all, install-only, uninstall, clean-info, all-lib, clean): No
6392 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6393 (maintainer-clean realclean distclean): Use subdir_do.
6395 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6396 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6397 * acinclude.m4: Include acx_configure_dir.m4.
6398 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6399 calls. Call AC_PROG_RANLIB. Configure gnulib using
6402 (GNULIB_STDINT_H): Adjust.
6403 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6404 * gdbreplay.c: Include build-gnulib/config.h.
6405 * server.h: Likewise.
6406 * aclocal.m4: Regenerate.
6407 * config.in: Regenerate.
6408 * configure: Regenerate.
6410 2012-04-19 Pedro Alves <palves@redhat.com>
6412 * Makefile.in (LIBGNU, INCGNU): Adjust.
6413 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6414 (all, install-only, uninstall, clean-info, all-lib, clean)
6415 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6416 * configure.ac: Adjust AC_OUTPUT output.
6417 * aclocal.m4: Regenerate.
6418 * configure: Regenerate.
6420 2012-04-19 Pedro Alves <palves@redhat.com>
6422 * Makefile.in (generated_files): New.
6423 (server_h): Remove the explicit dependency on config.h, and depend
6424 on $generated_files.
6426 2012-04-19 Pedro Alves <palves@redhat.com>
6428 * Makefile.in (INCGNU): Add -Ignulib.
6430 2012-04-19 Pedro Alves <palves@redhat.com>
6432 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6433 (INCGNU): ... this, and spell out -I here.
6434 (GNULIB_LIB): Rename to ...
6436 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6438 2012-04-19 Pedro Alves <palves@redhat.com>
6440 * config.in: Regenerate.
6442 2012-04-19 Pedro Alves <palves@redhat.com>
6444 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6445 * server.h (memmem): Remove declaration.
6446 * config.in: Regenerate.
6447 * configure: Regenerate.
6449 2012-04-19 Yao Qi <yao@codesourcery.com>
6451 * Makefile.in (SFILES): Add common/vec.c.
6455 2012-04-19 Yao Qi <yao@codesourcery.com>
6457 * remote-utils.c (prepare_resume_reply): Replace with macro
6458 target_core_of_thread.
6459 * server.c (handle_qxfer_threads_proper): Likewise.
6460 * target.h (traget_core_of_thread): New macro.
6462 2012-04-18 Pedro Alves <palves@redhat.com>
6464 * aclocal.m4: Regenerate.
6465 * configure: Regenerate.
6467 2012-04-16 Yao Qi <yao@codesourcery.com>
6469 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6470 duplicated on address.
6472 2012-04-16 Yao Qi <yao@codesourcery.com>
6474 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6475 (struct tracepoint_action_ops) <send>: New field.
6476 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6477 (agent_expr_send, x_tracepoint_action_send): New.
6478 (l_tracepoint_action_send): New.
6479 (cmd_qtdp): Download and install tracepoint
6480 according to `use_agent'.
6481 (run_inferior_command): Add one more parameter `len'.
6483 (tracepoint_send_agent): New.
6484 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6486 2012-04-16 Yao Qi <yao@codesourcery.com>
6488 * tracepoint.c (download_tracepoints): Moved to ...
6489 (cmd_qtstart): ... here.
6491 2012-04-14 Yao Qi <yao@codesourcery.com>
6493 * tracepoint.c: Include inttypes.h.
6494 (struct collect_memory_action): Use sized types.
6495 (struct tracepoint): Likewise.
6496 (cmd_qtdp, stop_tracing): Update print specifiers.
6497 (cmd_qtp, response_tracepoint): Likewise.
6498 (collect_data_at_tracepoint): Likewise.
6499 (collect_data_at_step): Likewise.
6501 2012-04-14 Yao Qi <yao@codesourcery.com>
6503 Import gnulib module inttypes.
6504 * aclocal.m4, config.in, configure: Regenerated.
6506 2012-04-14 Yao Qi <yao@codesourcery.com>
6508 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6509 Makefile and config.status at last.
6511 2012-04-13 Yao Qi <yao@codesourcery.com>
6513 * tracepoint.c: Include stdint.h unconditionally.
6515 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6517 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6518 on BFD_HAVE_SYS_PROCFS_TYPE.
6519 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6520 * configure: Regenerate.
6521 * config.in: Likewise.
6523 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6525 * Makefile.in (clean): Also remove x32.c x32-linux.c
6526 x32-avx.c x32-avx-linux.c.
6527 (x32.o): New target.
6529 (x32-linux.o): Likewise.
6530 (x32-linux.c): Likewise.
6531 (x32-avx.o): Likewise.
6532 (x32-avx.c): Likewise.
6533 (x32-avx-linux.o): Likewise.
6534 (x32-avx-linux.c): Likewise.
6536 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6537 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6538 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6539 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6540 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6541 i386/x32-avx-linux.xml.
6543 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6544 (init_registers_x32_avx_linux): Likwise.
6545 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6546 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6548 2012-04-13 Pedro Alves <palves@redhat.com>
6550 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6551 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6552 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6553 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6556 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6558 * linux-x86-low.c (compat_x32_clock_t): New.
6559 (compat_x32_siginfo_t): Likewise.
6560 (compat_x32_siginfo_from_siginfo): Likewise.
6561 (siginfo_from_compat_x32_siginfo): Likewise.
6562 (linux_is_elf64): Likewise.
6563 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6564 and siginfo_from_compat_x32_siginfo for x32.
6565 (x86_arch_setup): Set linux_is_elf64.
6567 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6570 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6572 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6573 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6574 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6575 compatible with process.
6577 2012-04-12 Yao Qi <yao@codesourcery.com>
6579 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6580 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6581 (install-only, install-info, clean): Handle sub dir gnulib.
6582 (all-lib, am--refresh): New targets.
6583 (memmem.o): Remove target.
6584 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6585 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6586 (AC_REPLACE_FUNCS): Remove memmem.
6587 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6588 (AC_OUTPUT): Generate Makefile in gnulib/.
6589 * aclocal.m4, config.in, configure: Regenerated.
6591 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6593 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6595 2012-04-05 Pedro Alves <palves@redhat.com>
6597 -Werror=strict-aliasing
6599 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6602 2012-04-04 Pedro Alves <palves@redhat.com>
6604 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6605 (sparc_store_gregset_from_stack, sparc_store_gregset)
6606 (sparc_breakpoint_at): Fix formatting.
6608 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6610 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6612 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6613 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6614 * config.in: Regenerate.
6615 * configure: Likewise.
6617 2012-03-29 Pedro Alves <palves@redhat.com>
6619 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6620 Correct ptrace arguments.
6622 2012-03-28 Pedro Alves <palves@redhat.com>
6624 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6625 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6626 (IA64_FR1_REGNUM): New defines.
6627 (ia64_fetch_register): New.
6628 (the_low_target): Install it.
6629 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6631 * linux-low.c (linux_fetch_registers): Try the
6632 the_low_target.fetch_register hook first.
6634 * linux-arm-low.c (the_low_target): Adjust.
6635 * linux-bfin-low.c (the_low_target): Adjust.
6636 * linux-cris-low.c (the_low_target): Adjust.
6637 * linux-crisv32-low.c (the_low_target): Adjust.
6638 * linux-m32r-low.c (the_low_target): Adjust.
6639 * linux-m68k-low.c (the_low_target): Adjust.
6640 * linux-mips-low.c (the_low_target): Adjust.
6641 * linux-ppc-low.c (the_low_target): Adjust.
6642 * linux-s390-low.c (the_low_target): Adjust.
6643 * linux-sh-low.c (the_low_target): Adjust.
6644 * linux-sparc-low.c (the_low_target): Adjust.
6645 * linux-tic6x-low.c (the_low_target): Adjust.
6646 * linux-x86-low.c (the_low_target): Adjust.
6647 * linux-xtensa-low.c (the_low_target): Adjust.
6649 2012-03-26 Pedro Alves <palves@redhat.com>
6651 * server.c (handle_qxfer_libraries): Don't bail early if
6652 the_target->qxfer_libraries_svr4 is not NULL.
6654 2012-03-26 Pedro Alves <palves@redhat.com>
6656 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6658 2012-03-23 Pedro Alves <palves@redhat.com>
6660 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6661 "library-list-svr4" element's start tag when the the DSO list is
6664 2012-03-23 Pedro Alves <palves@redhat.com>
6666 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6667 a variable whose type size is the same as the inferior's pointer
6670 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6672 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6674 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6675 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6676 * linux-low.h: Include <signal.h>.
6677 (struct siginfo): Remove forward declaration.
6678 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6681 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6683 * .gitignore: Ignore more files.
6685 2012-03-19 Pedro Alves <palves@redhat.com>
6686 Jan Kratochvil <jan.kratochvil@redhat.com>
6688 * server.c (cont_thread, general_thread): Add describing comments.
6689 (start_inferior): Clear `cont_thread'.
6690 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6693 2012-03-15 Yao Qi <yao@codesourcery.com>
6695 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6697 (cmd_qtdp): ... here.
6699 2012-03-15 Yao Qi <yao@codesourcery.com>
6701 * tracepoint.c (struct tracepoint_action_ops): New.
6702 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6703 (m_tracepoint_action_download): New.
6704 (r_tracepoint_action_download): New.
6705 (x_tracepoint_action_download): New.
6706 (l_tracepoint_action_download): New.
6707 (add_tracepoint_action): Install `action->ops' according type.
6708 (download_tracepoint_1): Move code `download' function pointer
6709 of various tracepoint_action_ops.
6711 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6713 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6714 linux_ptrace_attach_warnings.
6716 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6718 * Makefile.in (linux-ptrace.o): New.
6719 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6720 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6721 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6722 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6723 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6725 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6727 2012-03-08 Yao Qi <yao@codesourcery.com>
6728 Pedro Alves <palves@redhat.com>
6730 Fix PR server/13392.
6731 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6733 * tracepoint.c (remove_tracepoint): New.
6734 (cmd_qtdp): Call remove_tracepoint when failed to install.
6736 2012-03-07 Pedro Alves <palves@redhat.com>
6738 * linux-low.c (get_detach_signal): New.
6739 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6740 Pass on pending signals to PTRACE_DETACH. Check the result of the
6742 * server.c (program_signals, program_signals_p): New.
6743 (handle_general_set): Handle QProgramSignals.
6744 * server.h (program_signals, program_signals_p): Declare.
6746 2012-03-05 Pedro Alves <palves@redhat.com>
6747 Jan Kratochvil <jan.kratochvil@redhat.com>
6749 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6752 2012-03-03 Yao Qi <yao@codesourcery.com>
6754 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6755 agent_look_up_symbols.
6757 2012-03-03 Yao Qi <yao@codesourcery.com>
6759 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6760 (linux-x86-low.o): Likewise.
6761 * server.h: Remove in_process_agent_loaded.
6762 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6766 2012-03-03 Yao Qi <yao@codesourcery.com>
6768 * tracepoint.c (gdb_agent_capability): New global.
6769 (in_process_agent_loaded_ust): Renamed to
6770 `in_process_agent_supports_ust'.
6772 (in_process_agent_supports_ust): Call agent_capability_check.
6773 (clear_installed_tracepoints): Assert that agent supports
6776 2012-03-03 Yao Qi <yao@codesourcery.com>
6778 * linux-low.c (linux_supports_agent): New.
6779 (linux_target_ops): Initialize field `supports_agent' with
6780 linux_supports_agent.
6781 * target.h (struct target_ops) <supports_agent>: New.
6782 (target_supports_agent): New macro.
6783 * server.c (handle_general_set): Handle packet 'QAgent'.
6784 (handle_query): Send `QAgent+'.
6785 * Makefile.in (server.o): Depends on agent.h.
6787 2012-03-03 Yao Qi <yao@codesourcery.com>
6789 * Makefile.in (OBS): Add agent.o.
6790 Add new rule for agent.o.
6791 Track dependence of tracepoint.c on agent.h.
6792 * tracepoint.c (run_inferior_command_1):
6793 (run_inferior_command): Call agent_run_command.
6794 (gdb_ust_connect_sync_socket): Deleted. Move it to
6796 (resume_thread, stop_thread): Likewise.
6797 (gdb_ust_socket_init): Renamed to ...
6798 (gdb_agent_socket_init): ... New.
6799 (gdb_ust_thread): Renamed to ...
6800 (gdb_agent_helper_thread): ... New.
6801 (gdb_ust_init): Move some code to ...
6802 (gdb_agent_init): ... here. New.
6803 [HAVE_UST]: Call gdb_ust_init.
6804 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6805 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6806 * config.in, configure: Regenerated.
6808 2012-03-02 Pedro Alves <palves@redhat.com>
6810 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6811 * linux-low.c (struct simple_pid_list): New.
6812 (stopped_pids): New a struct simple_pid_list pointer.
6813 (add_to_pid_list, pull_pid_from_list): New.
6814 (handle_extended_wait): Don't assume the first signal new children
6815 report is SIGSTOP. Adjust call to pull_pid_from_list.
6816 (linux_wait_for_lwp): Adjust.
6818 2012-03-02 Yao Qi <yao@codesourcery.com>
6820 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6823 2012-03-02 Yao Qi <yao@codesourcery.com>
6825 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6826 `stop_pc' and `tpoint'. Update caller.
6828 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6830 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6831 * linux-low.c (use_linux_regsets): New macro.
6832 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6833 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6834 (linux_register_in_regsets): New function.
6835 (usr_fetch_inferior_registers): Skip registers covered by
6837 (usr_store_inferior_registers): Likewise.
6838 (usr_fetch_inferior_registers): New macro.
6839 (usr_store_inferior_registers): Likewise.
6840 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6841 (linux_store_registers): Likewise.
6842 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6844 (init_registers_mips64_dsp_linux): Likewise.
6845 (init_registers_mips_linux): New macro.
6846 (init_registers_mips_dsp_linux): Likewise.
6847 (mips_dsp_num_regs): Likewise.
6848 (DSP_BASE, DSP_CONTROL): New fallback macros.
6849 (mips_base_regs): New macro.
6850 (mips_regmap): Use it. Fix the size.
6851 (mips_dsp_regmap): New variable.
6852 (mips_dsp_regset_bitmap): Likewise.
6853 (mips_arch_setup): New function.
6854 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6856 (mips_cannot_store_register): Likewise.
6857 (the_low_target): Update .arch_setup, .num_regs and .regmap
6858 initializers. Add .regset_bitmap initializer.
6859 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6861 * linux-bfin-low.c (the_low_target): Likewise.
6862 * linux-cris-low.c (the_low_target): Likewise.
6863 * linux-crisv32-low.c (the_low_target): Likewise.
6864 * linux-ia64-low.c (the_low_target): Likewise.
6865 * linux-m32r-low.c (the_low_target): Likewise.
6866 * linux-m68k-low.c (the_low_target): Likewise.
6867 * linux-ppc-low.c (the_low_target): Likewise.
6868 * linux-s390-low.c (the_low_target): Likewise.
6869 * linux-sh-low.c (the_low_target): Likewise.
6870 * linux-sparc-low.c (the_low_target): Likewise.
6871 * linux-tic6x-low.c (the_low_target): Likewise.
6872 * linux-x86-low.c (the_low_target): Likewise.
6873 * linux-xtensa-low.c (the_low_target): Likewise.
6874 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6875 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6876 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6878 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6879 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6881 2012-02-29 Yao Qi <yao@codesourcery.com>
6882 Pedro Alves <palves@redhat.com>
6884 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6885 `step_over_finished' is true.
6887 2012-02-27 Pedro Alves <palves@redhat.com>
6889 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6890 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6892 2012-02-27 Pedro Alves <palves@redhat.com>
6895 * linux-low.c (pid_is_stopped): New.
6896 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6898 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6900 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6903 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6905 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6907 2012-02-24 Luis Machado <lgustavo@codesourcery>
6909 * server.c (handle_query): Advertise support for target-side
6910 breakpoint condition evaluation.
6911 (process_point_options): New function.
6912 (process_serial_event): When inserting a breakpoint, check for
6913 a target-side condition that should be evaluated.
6915 * mem-break.c: Include regcache.h and ax.h.
6916 (point_cond_list_t): New data structure.
6917 (breakpoint) <cond_list>: New field.
6918 (find_gdb_breakpoint_at): Make non-static.
6919 (delete_gdb_breakpoint_at): Clear any target-side
6921 (clear_gdb_breakpoint_conditions): New function.
6922 (add_condition_to_breakpoint): Likewise.
6923 (add_breakpoint_condition): Likewise.
6924 (gdb_condition_true_at_breakpoint): Likewise.
6925 (gdb_breakpoint_here): Return result directly instead
6926 of going through a local variable.
6928 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6929 (clear_gdb_breakpoint_conditions): Likewise.
6930 (add_breakpoint_condition): Likewise.
6931 (gdb_condition_true_at_breakpoint): Likewise.
6933 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6934 (need_step_over_p): Take target-side breakpoint condition into
6937 2012-02-24 Luis Machado <lgustavo@codesourcery>
6939 * server.h: Include tracepoint.h.
6940 (agent_mem_read, agent_get_trace_state_variable_value,
6941 agent_set_trace_state_variable_value,
6942 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6943 get_set_tsv_func_addr): New prototypes.
6945 * ax.h: New include file.
6946 * ax.c: New source file.
6948 * tracepoint.c: Include ax.h.
6949 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6950 agent_expr, eval_result_type): Move to ax.h.
6951 (parse_agent_expr): Rename to ...
6952 (gdb_parse_agent_expr): ... this, make it non-static and move
6954 (unparse_agent_expr) Rename to ...
6955 (gdb_unparse_agent_expr): ... this, make it non-static and move
6957 (eval_agent_expr): Rename to ...
6958 (eval_tracepoint_agent_expr): ... this.
6959 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6960 forward declarations.
6961 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6962 (agent_get_trace_state_variable_value): New function.
6963 (agent_set_trace_state_variable_value): New function.
6964 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6965 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6966 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6967 (condition_true_at_tracepoint): Likewise.
6968 (parse_agent_expr): Rename to ...
6969 (gdb_parse_agent_expr): ... this and move to ax.c.
6970 (unparse_agent_expr): Rename to ...
6971 (gdb_unparse_agent_expr): ... this and move to ax.c.
6972 (gdb_agent_op_name): Move to ax.c.
6973 (eval_agent_expr): Rename to ...
6974 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6976 (eval_tracepoint_agent_expr): New function.
6977 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6979 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6981 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6982 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6983 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6984 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6985 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6986 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6987 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6988 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6989 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6990 (compile_bytecodes): Remove forward declaration.
6991 (is_goto_target): Move to ax.c.
6992 (compile_bytecodes): Move to ax.c and call
6993 agent_get_trace_state_variable_value (...) and
6994 agent_set_trace_state_variable_value (...).
6996 * Makefile.in: Update ax.c and IPA dependencies.
6998 2012-02-24 Pedro Alves <palves@redhat.com>
7000 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7001 (cmd_bigqtbuffer_circular): ... this. Only handle
7002 'QTBuffer:circular:'.
7003 (handle_tracepoint_general_set): Adjust.
7005 2012-02-16 Yao Qi <yao@codesourcery.com>
7007 * inferiors.c: Move code to ...
7008 * dll.c: .... here. New.
7009 * server.h: Declare clear_dlls.
7010 * Makefile.in (SFILES): Add dll.c.
7014 2012-02-11 Yao Qi <yao@codesourcery.com>
7016 * server.c: (handle_monitor_command): Add a new parameter
7018 (handle_query): Update caller.
7020 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7022 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7023 * configure, config.in: Regenerate.
7024 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7027 2012-02-02 Pedro Alves <palves@redhat.com>
7029 Try SIGKILL first, then PTRACE_KILL.
7030 * linux-low.c (linux_kill_one_lwp): New.
7031 (linux_kill_one_lwp): Rename to ...
7032 (kill_one_lwp_callback): ... this. Use the new
7035 2012-02-02 Pedro Alves <palves@redhat.com>
7037 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7040 2012-01-27 Pedro Alves <palves@redhat.com>
7042 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7043 (elf_64_file_p): Make static.
7044 (linux_pid_exe_is_elf_64_file): New.
7045 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7046 Delete declarations.
7047 (linux_pid_exe_is_elf_64_file): Declare.
7048 * linux-x86-low.c (x86_arch_setup): Use
7049 linux_pid_exe_is_elf_64_file.
7051 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7053 * linux-low.c (linux_wait_for_event_1): Rename to ...
7054 (linux_wait_for_event): ... here and merge it with former
7055 linux_wait_for_event - new variable wait_ptid, use it.
7056 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7058 2012-01-23 Pedro Alves <palves@redhat.com>
7060 * server.c (main): Avoid yet another case of infinite loop while
7061 detaching/killing after a longjmp.
7063 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7066 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7068 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7070 * hostio.c (handle_readlink): New function.
7071 (handle_vFile): Call it to handle "vFile:readlink" packets.
7073 2012-01-20 Pedro Alves <palves@redhat.com>
7074 Ulrich Weigand <ulrich.weigand@linaro.org>
7076 * server.c (handle_v_requests): Only support vAttach and vRun to
7077 start multiple processes when in extended protocol mode.
7079 2012-01-17 Pedro Alves <palves@redhat.com>
7081 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7082 memalign plus mprotect to allocate the scratch buffer.
7084 2012-01-13 Pedro Alves <palves@redhat.com>
7086 * server.c (attach_inferior): Clear `cont_thread'.
7088 2012-01-13 Pedro Alves <palves@redhat.com>
7090 * server.c (main): Avoid infinite loop while detaching/killing
7093 2012-01-09 Doug Evans <dje@google.com>
7095 * server.c (start_inferior): Set last_ptid in --wrapper case.
7097 2012-01-06 Yao Qi <yao@codesourcery.com>
7099 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7101 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7103 2012-01-04 Yao Qi <yao@codesourcery.com>
7105 * tracepoint.c (cmd_qtdp): Print debug message
7106 for static tracepoint.
7108 2012-01-04 Yao Qi <yao@codesourcery.com>
7110 * tracepoint.c (trace_vdebug): Differentiate debug message
7111 between gdbserver and IPA.
7113 2012-01-03 Yao Qi <yao@codesourcery.com>
7115 * tracepoint.c (tracepoint_was_hit): Don't collect for
7118 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7120 * terminal.h: Reformat copyright header.
7122 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7124 * server.c (gdbserver_version): Update copyright year.
7125 * gdbreplay.c (gdbreplay_version): Likewise.
7127 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7129 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7132 2011-12-18 Hui Zhu <teawater@gmail.com>
7133 * linux-low.c (linux_create_inferior): Save return value to ret.
7135 2011-12-18 Hui Zhu <teawater@gmail.com>
7137 * linux-low.c (linux_create_inferior): Save return value to ret.
7139 2011-12-16 Doug Evans <dje@google.com>
7141 * linux-low.c (linux_create_inferior): If stdio connection,
7142 redirect stdin from /dev/null, stdout to stderr.
7143 * remote-utils.c (remote_is_stdio): New static global.
7144 (remote_connection_is_stdio): New function.
7145 (remote_prepare): Handle stdio connection.
7146 (remote_open): Ditto.
7147 (remote_close): Don't close stdin for stdio connections.
7148 (read_prim,write_prim): New functions. Replace all calls to
7149 read/write to these.
7150 * server.c (main): Watch for "-" argument. Move call to
7151 remote_prepare before start_inferior.
7152 * server.h (STDIO_CONNECTION_NAME): New macro.
7153 (remote_connection_is_stdio): Declare.
7155 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7156 in debugging output.
7158 2011-12-15 Yao Qi <yao@codesourcery.com>
7160 * tracepoint.c: Include sys/syscall.h.
7161 (gdb_ust_thread): Remove preprocessor conditional.
7163 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7165 * linux-low.c (linux_detach_one_lwp): Call
7166 the_low_target.prepare_to_resume before detaching.
7168 2011-12-14 Yao Qi <yao@codesourcery.com>
7170 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7173 2011-12-14 Yao Qi <yao@codesourcery.com>
7175 * i386-low.c (i386_low_stopped_data_address): Initialize local
7178 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7182 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7183 DR_CONTROL unless necessary. Extend comments.
7184 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7185 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7187 2011-12-13 Yao Qi <yao@codesourcery.com>
7189 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7191 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7193 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7195 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7196 Print new debug message for such case.
7198 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7200 Fix overlapping memcpy.
7201 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7202 the read_inferior_memory transfer.
7203 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7204 write_inferior_memory transfer.
7205 (set_fast_tracepoint_jump): New variable buf. Use it for the
7206 read_inferior_memory and write_inferior_memory transfers.
7207 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7208 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7209 Use it for the write_inferior_memory transfer.
7210 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7213 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7215 * linux-low.c (fetch_register, store_register): Make code
7216 consistent, fix formatting.
7218 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7220 * linux-low.c (usr_store_inferior_registers): Factor out code
7221 to handle individual registers into...
7222 (store_register): ... this new function.
7224 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7226 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7227 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7228 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7229 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7230 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7231 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7232 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7233 (srv_xmlfiles): Add new XML files.
7235 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7237 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7238 (init_registers_s390_linux32v1): Add prototype.
7239 (init_registers_s390_linux32v2): Likewise.
7240 (init_registers_s390_linux64v1): Likewise.
7241 (init_registers_s390_linux64v2): Likewise.
7242 (init_registers_s390x_linux64v1): Likewise.
7243 (init_registers_s390x_linux64v2): Likewise.
7244 (s390_num_regs): Increment to 52.
7245 (s390_regmap): Add orig_r2 register.
7246 (s390_num_regs_3264): Increment to 68.
7247 (s390_regmap_3264): Add orig_r2 register.
7248 (s390_collect_ptrace_register): Handle orig_r2 register.
7249 (s390_supply_ptrace_register): Likewise.
7250 (s390_fill_last_break): New function.
7251 (s390_store_last_break): Likewise.
7252 (s390_fill_system_call): New function.
7253 (s390_store_system_call): Likewise.
7254 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7256 (s390_check_regset): New function.
7257 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7258 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7259 Update target_regsets for available register sets.
7261 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7262 Jan Kratochvil <jan.kratochvil@redhat.com>
7264 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7265 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7267 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7268 * linux-low.h (struct process_info_private): New member r_debug.
7269 * server.c (handle_qxfer_libraries): Call
7270 the_target->qxfer_libraries_svr4.
7271 (handle_qxfer_libraries_svr4): New function.
7272 (qxfer_packets): New entry "libraries-svr4".
7273 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7274 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7275 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7276 PACKET_qXfer_libraries_svr4.
7278 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7280 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7281 PSW address/mask between 8-byte and 16-byte formats.
7282 (s390_supply_ptrace_register): Likewise.
7283 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7284 basic addressing mode bit.
7286 2011-11-24 Stan Shebs <stan@codesourcery.com>
7288 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7290 2011-11-17 Stan Shebs <stan@codesourcery.com>
7292 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7293 (tracing_start_time): New global.
7294 (tracing_stop_time): New global.
7295 (tracing_user_name): New global.
7296 (tracing_notes): New global.
7297 (tracing_stop_note): New global.
7298 (cmd_qtstart): Set traceframe_usage, start_time.
7299 (stop_tracing): Set stop_time.
7300 (cmd_qtstatus): Report additional status.
7301 (cmd_qtp): New function.
7302 (handle_tracepoint_query): Call it.
7303 (cmd_qtnotes): New function.
7304 (handle_tracepoint_general_set): Call it.
7305 (get_timestamp): Rename from tsv_get_timestamp.
7307 2011-11-14 Stan Shebs <stan@codesourcery.com>
7308 Kwok Cheung Yeung <kcy@codesourcery.com>
7310 * linux-x86-low.c (small_jump_insn): New.
7311 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7312 trampoline and error message, build a trampoline and issue a small
7313 jump instruction to it.
7314 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7315 trampoline and error message.
7316 (x86_get_min_fast_tracepoint_insn_len): New.
7317 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7318 * linux-low.h (struct linux_target_ops): Add arguments to
7319 install_fast_tracepoint_jump_pad operation, add new operation.
7320 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7322 (linux_get_min_fast_tracepoint_insn_len): New function.
7323 (linux_target_op): Add new operation.
7324 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7325 (gdb_trampoline_buffer_end): Ditto.
7326 (gdb_trampoline_buffer_error): Ditto.
7327 (struct ipa_sym_addresses): Add fields for new IPA variables.
7328 (symbol_list): Add entries for new IPA variables.
7329 (struct tracepoint): Add fields to hold the address range of the
7330 trampoline used by the tracepoint.
7331 (trampoline_buffer_head): New static variable.
7332 (trampoline_buffer_tail): Ditto.
7333 (claim_trampoline_space): New function.
7334 (have_fast_tracepoint_trampoline_buffer): New function.
7335 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7337 (install_fast_tracepoint): Ditto, also add error buffer argument.
7338 (cmd_qtminftpilen): New function.
7339 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7340 (fast_tracepoint_from_trampoline_address): New function.
7341 (fast_tracepoint_collecting): Handle trampoline as part of jump
7343 (set_trampoline_buffer_space): New function.
7344 (initialize_tracepoint): Initialize new IPA variables.
7345 * target.h (struct target_ops): Add arguments to
7346 install_fast_tracepoint_jump_pad operation, add new
7347 get_min_fast_tracepoint_insn_len operation.
7348 (target_get_min_fast_tracepoint_insn_len): New.
7349 (install_fast_tracepoint_jump_pad): Add arguments.
7350 * server.h (IPA_BUFSIZ): Define.
7351 * linux-i386-ipa.c: Include extra header files.
7352 (initialize_fast_tracepoint_trampoline_buffer): New function.
7353 (initialize_low_tracepoint): Call it.
7354 * server.h (set_trampoline_buffer_space): Declare.
7355 (claim_trampoline_space): Ditto.
7356 (have_fast_tracepoint_trampoline_buffer): Ditto.
7358 2011-11-14 Yao Qi <yao@codesourcery.com>
7360 * server.c (handle_query): Handle InstallInTrace for qSupported.
7361 * tracepoint.c (add_tracepoint): Sort list.
7362 (install_tracepoint, download_tracepoint): New.
7363 (cmd_qtdp): Call them to install and download tracepoints.
7364 (sort_tracepoints): Removed.
7365 (cmd_qtstart): Update.
7367 2011-11-14 Yao Qi <yao@codesourcery.com>
7369 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7370 * mem-break.h: Declare.
7371 * tracepoint.c (cmd_qtstart): Move some code to ...
7372 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7374 (download_tracepoints): Move some code to ...
7375 (download_tracepoint_1): ... here. New.
7377 2011-11-08 Yao Qi <yao@codesourcery.com>
7379 * remote-utils.c (relocate_instruction): A comment fix.
7381 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7383 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7384 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7385 dr_status_mirror and dr_control_mirror from debug_reg_state.
7386 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7387 (i386_initial_stuff): Remove use of deleted globals.
7388 (i386_get_thread_context, i386_set_thread_context,
7389 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7390 from debug_reg_state.
7392 2011-11-05 Yao Qi <yao@codesourcery.com>
7394 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7395 address as TPOINT's.
7397 2011-11-02 Stan Shebs <stan@codesourcery.com>
7399 * tracepoint.c (agent_mem_read_string): New function.
7400 (eval_agent_expr): Call it for tracenz.
7401 * server.c (handle_query): Report support for tracenz.
7403 2011-11-02 Yao Qi <yao@codesourcery.com>
7405 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7407 2011-11-02 Yao Qi <yao@codesourcery.com>
7409 * target.h: Fix a typo in comment.
7411 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7413 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7414 clobber the breakpoints' shadows with fast tracepoint jumps.
7415 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7416 * target.c (write_inferior_memory): Also pass MYADDR down to
7419 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7421 * configure.ac: Check support for personality routine.
7422 * configure: Regenerate.
7423 * config.in: Likewise.
7424 * linux-low.c: Include <sys/personality.h>.
7425 Define ADDR_NO_RANDOMIZE if necessary.
7426 (linux_create_inferior): Disable address space randomization when
7427 forking inferior, if requested.
7428 (linux_supports_disable_randomization): New function.
7429 (linux_target_ops): Install it.
7430 * server.h (disable_randomization): Declare.
7431 * server.c (disable_randomization): New global variable.
7432 (handle_general_set): Handle QDisableRandomization.
7433 (handle_query): Likewise for qSupported.
7434 (main): Support --disable-randomization and --no-disable-randomization
7435 command line arguments.
7436 * target.h (struct target_ops): Add supports_disable_randomization.
7437 (target_supports_disable_randomization): New macro.
7439 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7441 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7443 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7444 [!PT_GETDSBT] (target_loadmap): New definition.
7445 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7446 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7447 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7448 and PT_GETDSBT to LINUX_LOADMAP.
7449 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7450 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7452 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7454 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7455 (arm_linux_hwbp_cap): New static variable.
7456 (arm_linux_get_hwbp_cap): Replace by ...
7457 (arm_linux_init_hwbp_cap): ... this new function.
7458 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7459 (arm_linux_get_hw_watchpoint_count): Likewise.
7460 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7461 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7462 (arm_prepare_to_resume): Use perror_with_name instead of error.
7464 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7466 * linux-arm-low.c: Include <signal.h>.
7467 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7468 (struct arm_linux_hwbp_cap): New data type.
7469 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7470 (struct arm_linux_hw_breakpoint): New data type.
7471 (MAX_BPTS, MAX_WPTS): Define.
7472 (struct arch_process_info, struct arch_lwp_info): New data types.
7473 (arm_linux_get_hwbp_cap): New function.
7474 (arm_linux_get_hw_breakpoint_count): Likewise.
7475 (arm_linux_get_hw_watchpoint_count): Likewise.
7476 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7477 (arm_hwbp_control_initialize): Likewise.
7478 (arm_hwbp_control_is_enabled): Likewise.
7479 (arm_hwbp_control_is_initialized): Likewise.
7480 (arm_hwbp_control_disable): Likewise.
7481 (arm_linux_hw_breakpoint_equal): Likewise.
7482 (arm_linux_hw_point_initialize): Likewise.
7483 (struct update_registers_data): New data structure.
7484 (update_registers_callback: New function.
7485 (arm_insert_point): Likewise.
7486 (arm_remove_point): Likewise.
7487 (arm_stopped_by_watchpoint): Likewise.
7488 (arm_stopped_data_address): Likewise.
7489 (arm_new_process): Likewise.
7490 (arm_new_thread): Likewise.
7491 (arm_prepare_to_resume): Likewise.
7492 (the_low_target): Register arm_insert_point, arm_remove_point,
7493 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7494 arm_new_thread, and arm_prepare_to_resume.
7496 2011-09-15 Stan Shebs <stan@codesourcery.com>
7498 * server.h (struct emit_ops): Add compare-goto fields.
7499 * tracepoint.c (gdb_agent_op_sizes): New table.
7500 (emit_eq_goto): New function.
7501 (emit_ne_goto): New function.
7502 (emit_lt_goto): New function.
7503 (emit_le_goto): New function.
7504 (emit_gt_goto): New function.
7505 (emit_ge_goto): New function.
7506 (is_goto_target): New function.
7507 (compile_bytecodes): Recognize special cases of compare-goto
7508 combinations and call specialized emitters for them.
7509 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7510 (amd64_emit_ne_goto): New function.
7511 (amd64_emit_lt_goto): New function.
7512 (amd64_emit_le_goto): New function.
7513 (amd64_emit_gt_goto): New function.
7514 (amd64_emit_ge_goto): New function.
7515 (amd64_emit_ops): Add the new functions.
7516 (i386_emit_eq_goto): New function.
7517 (i386_emit_ne_goto): New function.
7518 (i386_emit_lt_goto): New function.
7519 (i386_emit_le_goto): New function.
7520 (i386_emit_gt_goto): New function.
7521 (i386_emit_ge_goto): New function.
7522 (i386_emit_ops): Add the new functions.
7524 2011-09-08 Stan Shebs <stan@codesourcery.com>
7526 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7527 (i386_emit_epilogue): Restore %ebx.
7529 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7531 * server.c (step_thread): Remove definition.
7532 (process_serial_event): Don't handle Hs.
7533 * server.h (step_thread): Remove declaration.
7534 * target.c (set_desired_inferior): Remove use of step_thread.
7536 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7538 * linux-low.c: Include linux-procfs.h.
7539 (linux_attach_lwp_1): Update comments.
7540 (linux_attach): Scan for existing threads when attaching to a
7541 process that is the tgid.
7542 * Makefile.in: Update dependencies.
7544 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7546 * configure.srv: Add linux-procfs.o dependencies.
7548 2011-08-14 Yao Qi <yao@codesourcery.com>
7550 * target.h (struct target_ops): Fix indent.
7551 * win32-low.c (win32_target_ops): Fix comment.
7553 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7554 Yao Qi <yao@codesourcery.com>
7556 * Makefile.in (clean): Remove tic6x-*.c files.
7557 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7558 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7559 (tic6x-c64xp-linux.c): Likewise.
7560 * configure.srv: Add support for tic6x-*-uclinux.
7561 * linux-tic6x-low.c: New.
7562 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7564 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7565 Yao Qi <yao@codesourcery.com>
7567 * target.h (struct target_ops): Add read_loadmap.
7568 * linux-low.c (struct target_loadseg): New type.
7569 (struct target_loadmap): New type.
7570 (linux_read_loadmap): New function.
7571 (linux_target_ops): Add linux_read_loadmap.
7572 * server.c (handle_query): Support qXfer:fdpic:read packet.
7573 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7576 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7578 * win32-low.c: Include <stdint.h>.
7580 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7582 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7583 to the inferior here.
7584 (i386_remove_aligned_watchpoint): Ditto.
7585 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7586 fit part of the watchpoint in the debug registers.
7587 (i386_update_inferior_debug_regs): New.
7588 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7589 registers, and only update the inferior on success.
7590 (i386_low_remove_watchpoint): Ditto.
7592 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7594 * linux-low.c (compare_ints, unique, list_threads, show_process,
7595 linux_core_of_thread): Delete.
7596 (linux_target_ops): Change linux_core_of_thread to
7597 linux_common_core_of_thread.
7598 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7599 * utils.c (malloc_failure): Change type of argument.
7600 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7601 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7602 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7603 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7604 (IPA_OBJS): Add common-utils-ipa.o.
7605 (ptid_h, linux_osdata_h): New macros.
7606 (server_h): Add common/common-utils.h, common/xml-utils.h,
7607 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7609 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7610 ptid.o, buffer.o): New rules.
7611 (linux-low.o): Add common/linux-osdata.h as a dependency.
7612 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7613 * configure.ac: Add AC_HEADER_DIRENT check.
7614 * config.in: Regenerate.
7615 * configure: Regenerate.
7616 * remote-utils.c (xml_escape_text): Delete.
7617 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7618 buffer_xml_printf): Move to common/buffer.c.
7619 * server.c (main): Remove call to initialize_inferiors.
7620 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7621 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7622 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7623 internal_error, gdb_assert, gdb_assert_fail): Delete.
7624 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7625 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7627 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7628 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7629 initialize_inferiors): Delete.
7631 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7633 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7636 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7638 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7640 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7642 2011-05-26 Yao Qi <yao@codesourcery.com>
7644 * Makefile.in (thread-db.o): Track dependence to
7645 common/gdb_thread_db.h.
7646 * thread-db.c: include gdb_thread_db.h from right place.
7648 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7650 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7651 __FILE__ and __LINE__ to internal_error.
7653 2011-05-13 Doug Evans <dje@google.com>
7655 * thread-db.c (try_thread_db_load_from_sdir): New function.
7656 (try_thread_db_load_from_dir): New function.
7657 (thread_db_load_search): Handle $sdir, ignore $pdir.
7658 Remove trying of system directories if search of
7659 libthread-db-search-path fails, that is now done via $sdir.
7661 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7663 * server.c (handle_query): Add EnableDisableTracepoints to the list
7664 of supported features.
7665 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7667 (cmd_qtenable_disable): New.
7668 (cmd_qtstart): Install tracepoints even if disabled.
7669 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7670 receiving a QTEnable or QTDisable packet.
7671 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7672 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7674 (gdb_probe): Skip data collection if static tracepoint is disabled.
7676 2011-05-10 Doug Evans <dje@google.com>
7678 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7680 2011-05-04 Doug Evans <dje@google.com>
7682 * linux-low.c (linux_join): Skip process lookup.
7683 * spu-low.c (spu_join): Ditto.
7684 * server.c (join_inferiors_callback): Delete.
7685 (process_serial_event): For 'D' packet (detach) call join_inferior
7688 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7690 * README: Don't mention xscale*-*-linux*.
7691 * configure.srv (xscale*-*-linux*): Don't handle target.
7693 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7695 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7697 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7698 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7699 (i386_emit_void_call_2): Likewise.
7701 2011-04-26 Yao Qi <yao@codesourcery.com>
7703 * linux-low.c: Move common macros to linux-ptrace.h.
7704 Include linux-ptrace.h.
7705 * Makefile.in (linux_ptrace_h): New.
7706 (linux-low.o): Depends on linux-ptrace.h.
7708 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7710 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7711 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7712 (remote_prepare): New function with most of the TCP code from ...
7713 (remote_open): ... here. Detect PORT here unconditionally. Move also
7714 setting transport_is_reliable.
7715 * server.c (run_once): New variable.
7716 (gdbserver_usage): Document it.
7717 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7718 the first run if RUN_ONCE.
7719 * server.h (run_once, remote_prepare): New declarations.
7721 2011-04-19 Tom Tromey <tromey@redhat.com>
7723 * win32-low.c (handle_load_dll): Remove duplicate "the".
7725 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7727 Remove support for old Cygwin 1.5 versions.
7728 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7729 function to avoid warning.
7730 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7733 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7735 * gdbserver/server.h (Macro _): Define it if not available.
7737 2011-03-14 Michael Snyder <msnyder@vmware.com>
7739 * hostio.c (handle_close): Remove unnecessary null test.
7741 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7743 * Makefile.in (maintainer-clean realclean distclean): Remove
7744 "make ... subdir_do" command.
7746 2011-03-10 Michael Snyder <msnyder@vmware.com>
7748 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7750 * server.c (handle_v_run): Free alloced buffer on early return.
7752 2011-03-09 Yao Qi <yao@codesourcery.com>
7755 2011-03-04 Yao Qi <yao@codesourcery.com>
7757 * Makefile.in: Remove GNU make feature --directory.
7759 2011-03-05 Yao Qi <yao@codesourcery.com>
7761 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7762 (subdir_do): New make target. Copied from gdb/Makefile.
7763 (maintainer-clean, realclean, distclean, clean): Call corresponding
7764 make targets in common/Makefile.
7766 2011-02-11 Yao Qi <yao@codesourcery.com>
7768 * configure.ac: Call AC_PROG_RANLIB.
7769 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7770 * configure: Regenerate.
7772 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7774 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7776 2011-03-06 Yao Qi <yao@codesourcery.com>
7778 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7780 2011-03-05 Yao Qi <yao@codesourcery.com>
7782 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7783 (subdir_do): New make target. Copied from gdb/Makefile.
7784 (maintainer-clean, realclean, distclean, clean): Call corresponding
7785 make targets in common/Makefile.
7787 2011-03-04 Yao Qi <yao@codesourcery.com>
7789 * Makefile.in: Remove GNU make feature --directory.
7791 2011-03-04 Michael Snyder <msnyder@vmware.com>
7793 * server.c (queue_stop_reply): Call xmalloc not malloc.
7795 2011-03-02 Michael Snyder <msnyder@vmware.com>
7797 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7799 2011-02-28 Michael Snyder <msnyder@vmware.com>
7801 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7802 (cmd_qtframe): Ditto.
7803 (cmd_qtbuffer): Ditto.
7804 (cmd_bigqtbuffer): Ditto.
7806 * utils.c (decimal2str): Initialize 'width' to nine, then
7809 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7811 * hostio.c (require_data): Free *data, not data.
7813 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7815 * hostio.c (require_data): Use free, not xfree.
7817 2011-02-27 Michael Snyder <msnyder@vmware.com>
7819 * server.c (handle_query): Discard unused value.
7821 * hostio.c (require_data): Free malloc memory before returning
7824 2011-02-26 Michael Snyder <msnyder@vmware.com>
7826 * linux-low.c (list_threads): Call closedir for dirent.
7828 2011-02-27 Michael Snyder <msnyder@vmware.com>
7830 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7831 a case statement falls through.
7833 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7835 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7838 2011-02-26 Michael Snyder <msnyder@vmware.com>
7840 * utils.c (decimal2str): Eliminate dead code and dead param.
7841 (pulongest): Drop dead param from call to decimal2str.
7844 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7846 Revert the following patch (not approved yet):
7847 2011-02-21 Hui Zhu <teawater@gmail.com>
7848 * tracepoint.c (tp_printf): New function.
7849 (eval_agent_expr): Handle gdb_agent_op_printf.
7851 2011-02-21 Hui Zhu <teawater@gmail.com>
7853 * tracepoint.c (tp_printf): New function.
7854 (eval_agent_expr): Handle gdb_agent_op_printf.
7856 2011-02-18 Tom Tromey <tromey@redhat.com>
7858 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7859 (tracepoint.o): Likewise.
7860 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7861 (gdb_agent_op_names): Likewise.
7863 2011-02-18 Tom Tromey <tromey@redhat.com>
7865 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7866 gdb_agent_op_rot>: New constants.
7867 (gdb_agent_op_names): Add pick and roll.
7868 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7871 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7873 * aclocal.m4: Regenerated with aclocal-1.11.1.
7875 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7877 * server.c (handle_qxfer_traceframe_info): New.
7878 (qxfer_packets): Register "traceframe-info".
7879 (handle_query): Report support for qXfer:traceframe-info:read+.
7880 * tracepoint.c (match_blocktype): New.
7881 (traceframe_find_block_type): Rename to ...
7882 (traceframe_walk_blocks): ... this. Add callback filter argument,
7884 (traceframe_find_block_type): New, reimplemented on top of
7885 traceframe_walk_blocks.
7886 (build_traceframe_info_xml): New.
7887 (traceframe_read_info): New.
7888 * server.h (traceframe_read_info): Declare.
7890 2011-02-11 Yao Qi <yao@codesourcery.com>
7892 * configure.ac: Call AC_PROG_RANLIB.
7893 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7894 * configure: Regenerate.
7896 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7898 * server.c (gdb_read_memory): Change return semantics to allow
7900 (handle_search_memory_1): Adjust.
7901 (process_serial_event) <'m' packet>: Handle partial transfers.
7902 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7904 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7906 * regcache.c (init_register_cache): Initialize
7907 regcache->register_status.
7908 (free_register_cache): Release regcache->register_status.
7909 (regcache_cpy): Copy register_status.
7910 (registers_to_string): Print 'x's for unavailable registers.
7911 (supply_register): Mark the register's status valid or
7912 unavailable, depending on whether a buffer was passed in or not.
7913 (supply_register_zeroed): New.
7914 (supply_regblock): Mark the registers' status valid or
7915 unavailable, depending on whether a buffer was passed in or not.
7916 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7917 (struct regcache): New `register_status' field.
7918 (supply_register_zeroed): Declare.
7919 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7920 supply_register_zeroed, rather than passing a NULL buffer to
7922 * tracepoint.c (fetch_traceframe_registers): Update comment.
7924 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7926 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7929 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7931 * server.h (decode_xfer_write): Change prototype.
7932 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7933 and don't extract the annex here.
7934 * server.c (decode_xfer_read): Remove `annex' parameter,
7935 and don't extract the annex here.
7937 (struct qxfer): New.
7938 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7939 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7940 (handle_qxfer_statictrace): New functions, abstracted out from
7941 handle_query, and made to use the struct qxfer interface.
7942 (handle_threads_qxfer_proper): Rename to ...
7943 (handle_qxfer_threads_proper): ... this.
7944 (handle_threads_qxfer): Rename to ...
7945 (handle_qxfer_threads): ... this. Adjust.
7946 (qxfer_packets): New array.
7947 (handle_qxfer): New function.
7948 (handle_query): Use handle_qxfer.
7950 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7952 * gdbreplay.c: Shorten lines of >= 80 columns.
7953 * linux-low.c: Ditto.
7954 * linux-ppc-low.c: Ditto.
7955 * linux-s390-low.c: Ditto.
7956 * linux-sparc-low.c: Ditto.
7957 * linux-x86-low.c: Ditto.
7958 * linux-xtensa-low.c: Ditto.
7959 * mem-break.c: Ditto.
7961 * regcache.h: Ditto.
7962 * remote-utils.c: Ditto.
7965 * thread-db.c: Ditto.
7966 * tracepoint.c: Ditto.
7968 * win32-low.h: Ditto.
7970 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7972 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7975 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7977 * server.c (gdbserver_version): Update copyright year in version
7979 * gdbreplay.c (gdbreplay_version): Ditto.
7981 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7983 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7984 * linux-bfin-low.c: New file.
7985 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7986 PT_DATA_ADDR for BFIN targets.
7987 * Makefile.in (SFILES): Add linux-bfin-low.c.
7988 (clean): Remove reg-bfin.c.
7989 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7990 * README: Mention supported Blackfin targets.
7992 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7994 * .gitignore: New file.
7996 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7998 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8000 2010-10-22 Jie Zhang <jie@codesourcery.com>
8002 * Makefile.in: Add FLAGS_TO_PASS variable.
8003 (install): Remove dependency of install-only and recursively
8004 invoke make for install-only.
8006 2010-10-04 Doug Evans <dje@google.com>
8008 * Makefile.in (uninstall): Use $(DESTDIR).
8010 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8014 * linux-x86-low.c (compat_siginfo_from_siginfo)
8015 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8016 si_code is < 0. Check for si_code == SI_TIMER before checking for
8019 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8021 * lynx-i386-low.c: New file.
8022 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8024 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8026 * lynx-low.c (ptrace_request_to_str): Remove handling for
8027 request values that have been removed in LynxOS 5.x.
8029 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8031 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8034 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8036 * configure.ac: Add --enable-inprocess-agent option.
8037 * configure: Rebuilt.
8039 2010-09-06 Yao Qi <yao@codesourcery.com>
8041 * linux-low.c (linux_kill): Remove unused variable.
8042 (linux_stabilize_threads): Likewise.
8043 * server.c (start_inferior): Likewise.
8044 (queue_stop_reply_callback): Likewise.
8045 * tracepoint.c (do_action_at_tracepoint): Likewise.
8047 2010-09-06 Yao Qi <yao@codesourcery.com>
8049 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8052 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8054 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8056 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8058 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8061 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8063 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8064 gdbserver/lynx-ppc-low.c: New files.
8065 * Makefile.in (lynx_low_h): New variable.
8066 (lynx-low.o, lynx-ppc-low.o): New rules.
8067 * configure.ac: On LynxOS, link with -lnetinet.
8068 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8069 * configure: regenerate.
8071 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8073 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8074 * configure.ac: Add check for vasprintf and vsnprintf.
8075 * configure, config.in: Regenerate.
8076 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8078 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8080 * gdbreplay.c: Move include of alloca.h up, next to include of
8082 * server.h: Add include of malloc.h.
8083 * mem-break.c: Remove include of malloc.h.
8084 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8086 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8088 * Makefile.in (memmem.o): Build with -Wno-error.
8090 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8092 * utils.c (xsnprintf): Make non-static.
8093 * server.h: Add xsnprintf declaration.
8094 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8095 replace calls to snprintf by calls to xsnprintf throughout.
8097 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8099 * configure.ac: Add configure check for alloca.
8100 * configure, config.in: Regenerate.
8101 * server.h: Include alloca.h if it exists.
8102 * gdbreplay.c: Include alloca.h if it exists.
8104 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8106 * linux-low.c (__SIGRTMIN): Define if not already defined.
8107 (linux_create_inferior): Check for __ANDROID__ rather than
8109 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8110 are already deferred.
8111 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8112 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8113 stopped and already has a pending signal to report.
8114 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8115 a pending signal to report or is moving out of a jump pad.
8116 (linux_init_signals): Check for __ANDROID__ rather than
8119 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8121 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8122 debug_threads check. Avoid a linear search when not doing debug
8125 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8127 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8128 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8129 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8130 (process_event): Change local fd's type to gdb_fildes_t.
8131 (create_file_handler): Adjust prototype.
8132 (delete_file_handler): Adjust prototype.
8133 (handle_file_event): Adjust prototype. Use pfildes.
8134 (create_file_event): Adjsut prototype.
8135 * remote-utils.c (remote_desc, listen_desc): Change type to
8137 * server.h: New gdb_fildes_t typedef.
8138 [USE_WIN32API]: Include winsock2.h.
8139 (delete_file_handler, add_file_handler): Adjust prototypes.
8141 * utils.c (pfildes): New.
8143 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8145 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8146 * configure: Regenerate.
8148 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8150 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8151 (linux_done_accessing_memory): ... this.
8152 (linux_target_ops): Adjust.
8153 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8154 * nto-low.c (nto_target_ops): Adjust comment.
8155 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8156 * spu-low.c (spu_target_ops): Adjust comment.
8157 * target.h (target_ops): Rename unprepare_to_access_memory field
8158 to done_accessing_memory.
8159 (unprepare_to_access_memory): Rename to ...
8160 (done_accessing_memory): ... this.
8162 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8164 * linux-low.c (linux_prepare_to_access_memory): New.
8165 (linux_unprepare_to_access_memory): New.
8166 (linux_target_ops): Install them.
8167 * server.c (read_memory): Rename to ...
8168 (gdb_read_memory): ... this. Use
8169 prepare_to_access_memory/prepare_to_access_memory.
8170 (write_memory): Rename to ...
8171 (gdb_write_memory): ... this. Use
8172 prepare_to_access_memory/prepare_to_access_memory.
8173 (handle_search_memory_1): Adjust.
8174 (process_serial_event): Adjust.
8175 * target.h (struct target_ops): New fields
8176 prepare_to_access_memory and unprepare_to_access_memory.
8177 (prepare_to_access_memory, unprepare_to_access_memory): New.
8178 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8179 prepare_to_access_memory/prepare_to_access_memory.
8180 * nto-low.c (nto_target_ops): Adjust.
8181 * spu-low.c (spu_target_ops): Adjust.
8182 * win32-low.c (win32_target_ops): Adjust.
8184 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8186 * Makefile.in (WARN_CFLAGS): Get it from configure.
8187 (WERROR_CFLAGS): New.
8188 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8189 * configure.ac: Introduce --enable-werror, which adds -Werror to
8190 the compiler command line. Enabled by default. Disable with
8191 --disable-werror. Add -Wdeclaration-after-statement
8192 Wpointer-arith and -Wformat-nonliteral to warning flags.
8193 * configure: Regenerate.
8195 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8197 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8199 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8201 * gdbreplay.c (remote_error): New.
8203 (expect): Use gdbchar. Check for error reading from GDB.
8204 Clarify sync error output.
8205 (play): Check for errors writing to GDB.
8206 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8207 * remote-utils.c (getpkt): Check for errors writing to the remote
8210 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8212 * linux-low.c (linux_wait_1): Move non-debugging code out of
8213 `debug_threads' control.
8215 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8217 * linux-low.c (linux_wait_1): Don't set last_status here.
8218 * server.c (push_event, queue_stop_reply_callback): Assert we're
8219 not pushing a TARGET_WAITKIND_IGNORE event.
8220 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8221 (myresume, handle_target_event): Set the thread's last_resume_kind
8222 and last_status from the target returned status.
8224 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8228 * linux-x86-low.c (update_debug_registers_callback): New.
8229 (i386_dr_low_set_addr): Use it.
8230 (i386_dr_low_get_addr): New.
8231 (i386_dr_low_set_control): Use update_debug_registers_callback.
8232 (i386_dr_low_get_control): New.
8233 (i386_dr_low_get_status): Adjust.
8234 * linux-low.c (linux_stop_lwp): New.
8235 * linux-low.h (linux_stop_lwp): Declare.
8237 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8238 argument instead of a i386_debug_reg_state.
8239 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8240 a i386_debug_reg_state.
8241 (i386_insert_aligned_watchpoint): Adjust.
8242 (i386_remove_aligned_watchpoint): Adjust.
8243 (i386_low_stopped_data_address): Read the debug registers from the
8244 inferior instead of from the mirrors.
8245 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8246 (i386_dr_low_get_addr): Declare.
8247 (i386_dr_low_get_control): Declare.
8248 (i386_dr_low_get_status): Change prototype.
8250 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8251 (i386_dr_low_get_addr): New.
8252 (i386_dr_low_get_control): New.
8253 (i386_dr_low_get_status): Adjust prototype. Return
8255 (i386_initial_stuff): Clear dr_status_mirror and
8257 (i386_get_thread_context): Adjust.
8258 (i386_set_thread_context): Adjust.
8259 (i386_thread_added): Adjust.
8261 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8263 * linux-low.h (linux_thread_area): Delete declaration.
8265 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8267 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8268 after its termination.
8270 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8272 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8273 (gdb_wants_all_stopped): Delete.
8274 (linux_wait_1): Don't call them.
8275 * server.c (handle_v_cont): Tag all threads as want-stopped.
8276 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8277 stopped as "client-wants-stopped".
8279 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8281 * Makefile.in (signals_h): New.
8282 (server_h): Depend on it.
8283 (server.o): Don't depend on $(signals_def).
8284 (signals.o): Depend on $(signals_def).
8286 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8288 * Makefile.in (signals_def): New.
8289 (server_h): Append include/gdb/signals.h and signals_def.
8290 (server.o): Append signals_def.
8292 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8294 * server.c (handle_target_event): Use target_signal_to_host for
8295 resume_info.sig initialization.
8296 * target.h (struct thread_resume) <sig>: New comment.
8298 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8300 * server.c (handle_query): strcpy() the returned string from paddress()
8301 instead of sprintf().
8302 * utils.c (paddress): Return phex_nz().
8304 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8306 * server.c (handle_v_cont): Call mourn_inferior if process
8308 (myresume): Likewise.
8310 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8312 Static tracepoints, and integration with UST.
8314 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8315 * mem-break.c (uninsert_all_breakpoints)
8316 (reinsert_all_breakpoints): New.
8317 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8318 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8319 (gdb_agent_ust_loaded, helper_thread_id)
8320 (gdb_agent_helper_thread_id): New macros.
8321 (struct ipa_sym_addresses): Add addr_ust_loaded,
8322 addr_helper_thread_id, addr_cmd_buf.
8323 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8324 (in_process_agent_loaded_ust): New.
8325 (write_e_ust_not_loaded): New.
8326 (maybe_write_ipa_ust_not_loaded): New.
8327 (struct collect_static_trace_data_action): New.
8328 (enum tracepoint_type) <static_tracepoint>: New.
8329 (struct tracepoint) <handle>: Mention static tracepoints.
8330 (struct static_tracepoint_ctx): New.
8331 (CMD_BUF_SIZE): New.
8332 (add_tracepoint_action): Handle static tracepoint actions.
8333 (unprobe_marker_at): New.
8334 (clear_installed_tracepoints): Handle static tracepoints.
8335 (cmd_qtdp): Handle static tracepoints.
8336 (probe_marker_at): New.
8337 (cmd_qtstart): Handle static tracepoints.
8338 (response_tracepoint): Handle static tracepoints.
8339 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8340 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8341 (get_context_regcache): Handle static tracepoints.
8342 (do_action_at_tracepoint): Handle static tracepoint actions.
8343 (traceframe_find_block_type): Handle static trace data blocks.
8344 (traceframe_read_sdata): New.
8345 (download_tracepoints): Download static tracepoint actions.
8346 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8347 (GDB_PROBE_NAME): New.
8352 (ust_marker_to_static_tracepoint): New.
8354 (collect_ust_data_at_tracepoint): New.
8355 (gdb_ust_probe): New.
8356 (UNIX_PATH_MAX, SOCK_DIR): New.
8357 (gdb_ust_connect_sync_socket): New.
8358 (resume_thread, stop_thread): New.
8359 (run_inferior_command): New.
8360 (init_named_socket): New.
8361 (gdb_ust_socket_init): New.
8362 (cstr_to_hexstr): New.
8364 (first_marker, next_marker): New.
8365 (response_ust_marker): New.
8366 (cmd_qtfstm, cmd_qtsstm): New.
8367 (unprobe_marker_at, probe_marker_at): New.
8368 (cmd_qtstmat, gdb_ust_thread): New.
8369 (gdb_ust_init): New.
8370 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8371 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8373 (x86_64_st_collect_regmap): New.
8374 (X86_64_NUM_ST_COLLECT_GREGS): New.
8375 (AMD64_RIP_REGNUM): New.
8376 (supply_static_tracepoint_registers): New.
8377 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8379 (i386_st_collect_regmap): New.
8380 (i386_NUM_ST_COLLECT_GREGS): New.
8381 (supply_static_tracepoint_registers): New.
8382 * server.c (handle_query): Handle qXfer:statictrace:read.
8383 <qSupported>: Report support for StaticTracepoints, and
8384 qXfer:statictrace:read features.
8385 * server.h (traceframe_read_sdata)
8386 (supply_static_tracepoint_registers): Declare.
8387 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8388 (unpack_varlen_hex): Include in IPA build.
8389 * Makefile.in (ustlibs, ustinc): New.
8390 (IPA_OBJS): Add remote-utils-ipa.o.
8391 ($(IPA_LIB)): Link -ldl and -lpthread.
8393 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8394 * config.in, configure: Regenerate.
8396 2010-06-20 Ian Lance Taylor <iant@google.com>
8397 Pedro Alves <pedro@codesourcery.com>
8399 * linux-x86-low.c (always_true): Delete.
8400 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8401 trying to fool the compiler with always_true.
8403 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8405 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8406 conditions in gdbserver.
8408 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8410 * spu-low.c (spu_read_memory): Wrap around local store limit.
8411 (spu_write_memory): Likewise.
8413 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8415 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8416 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8418 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8420 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8421 uses with LONGEST uses.
8423 2010-06-14 Stan Shebs <stan@codesourcery.com>
8424 Pedro Alves <pedro@codesourcery.com>
8428 * linux-x86-low.c: Include limits.h.
8433 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8434 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8435 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8436 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8437 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8438 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8439 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8440 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8441 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8442 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8443 (amd64_emit_void_call_2): New.
8444 (amd64_emit_ops): New.
8445 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8446 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8447 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8448 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8449 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8450 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8451 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8452 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8453 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8454 (i386_emit_stack_adjust, i386_emit_int_call_1)
8455 (i386_emit_void_call_2): New.
8456 (i386_emit_ops): New.
8457 (x86_emit_ops): New.
8458 (the_low_target): Install x86_emit_ops.
8459 * server.h (struct emit_ops): New.
8460 (get_raw_reg_func_addr): Declare.
8461 (current_insn_ptr, emit_error): Declare.
8462 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8463 (set_trace_state_variable_value): New defines.
8464 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8465 addr_get_trace_state_variable_value and
8466 addr_set_trace_state_variable_value.
8467 (symbol_list): New fields for get_raw_reg,
8468 get_trace_state_variable_value and set_trace_state_variable_value.
8469 (condfn): New typedef.
8470 (struct tracepoint): New field `compiled_cond'.
8471 (do_action_at_tracepoint): Clear compiled_cond.
8472 (get_trace_state_variable_value, set_trace_state_variable_value):
8474 (condition_true_at_tracepoint): If there's a compiled condition,
8476 (current_insn_ptr, emit_error): New globals.
8477 (struct bytecode_address): New.
8478 (get_raw_reg_func_addr): New.
8479 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8480 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8481 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8482 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8483 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8484 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8485 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8486 (compile_tracepoint_condition, compile_bytecodes): New.
8487 * target.h (emit_ops): Forward declare.
8488 (struct target_ops): New field emit_ops.
8489 (target_emit_ops): New.
8490 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8491 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8492 * linux-low.c (linux_emit_ops): New.
8493 (linux_target_ops): Install it.
8494 * linux-low.h (struct linux_target_ops): New field emit_ops.
8496 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8498 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8499 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8501 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8502 Stan Shebs <stan@codesourcery.com>
8504 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8505 (all): Depend on $(extra_libraries).
8506 (install-only): Install the IPA.
8507 (IPA_OBJS, IPA_LIB): New.
8508 (clean): Remove the IPA lib.
8509 (IPAGENT_CFLAGS): New.
8510 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8511 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8512 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8513 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8514 * configure.ac: Check for atomic builtins support in the compiler.
8515 (IPA_DEPFILES, extra_libraries): Define.
8516 * configure.srv (ipa_obj): Add description.
8517 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8518 (i[34567]86-*-linux*): Set ipa_obj.
8519 (x86_64-*-linux*): Set ipa_obj.
8520 * linux-low.c (stabilizing_threads): New.
8521 (supports_fast_tracepoints): New.
8522 (linux_detach): Stabilize threads before detaching.
8523 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8524 the lwp is either not stabilizing, or is moving out of a jump pad.
8525 (linux_fast_tracepoint_collecting): New.
8526 (maybe_move_out_of_jump_pad): New.
8527 (enqueue_one_deferred_signal): New.
8528 (dequeue_one_deferred_signal): New.
8529 (linux_wait_for_event_1): If moving out of a jump pad, defer
8530 pending signals to later.
8531 (linux_stabilize_threads): New.
8532 (linux_wait_1): Check if threads need moving out of jump pads, and
8534 (stuck_in_jump_pad_callback): New.
8535 (move_out_of_jump_pad_callback): New.
8537 (linux_resume_one_lwp): Handle moving out of jump pads.
8538 (linux_set_resume_request): Dequeue deferred signals.
8539 (need_step_over_p): Also step over fast tracepoint jumps.
8540 (start_step_over): Also uninsert fast tracepoint jumps.
8541 (finish_step_over): Also reinsert fast tracepoint jumps.
8542 (linux_install_fast_tracepoint_jump): New.
8543 (linux_target_ops): Install linux_stabilize_threads and
8544 linux_install_fast_tracepoint_jump_pad.
8545 * linux-low.h (linux_target_ops) <get_thread_area,
8546 install_fast_tracepoint_jump_pad>: New fields.
8547 (struct lwp_info) <collecting_fast_tracepoint,
8548 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8549 (linux_get_thread_area): Declare.
8550 * linux-x86-low.c (jump_insn): New.
8551 (x86_get_thread_area): New.
8552 (append_insns): New.
8554 (amd64_install_fast_tracepoint_jump_pad): New.
8555 (i386_install_fast_tracepoint_jump_pad): New.
8556 (x86_install_fast_tracepoint_jump_pad): New.
8557 (the_low_target): Install x86_get_thread_area and
8558 x86_install_fast_tracepoint_jump_pad.
8559 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8560 (struct fast_tracepoint_jump): New.
8561 (fast_tracepoint_jump_insn): New.
8562 (fast_tracepoint_jump_shadow): New.
8563 (find_fast_tracepoint_jump_at): New.
8564 (fast_tracepoint_jump_here): New.
8565 (delete_fast_tracepoint_jump): New.
8566 (set_fast_tracepoint_jump): New.
8567 (uninsert_fast_tracepoint_jumps_at): New.
8568 (reinsert_fast_tracepoint_jumps_at): New.
8569 (set_breakpoint_at): Use write_inferior_memory.
8570 (uninsert_raw_breakpoint): Use write_inferior_memory.
8571 (check_mem_read): Mask out fast tracepoint jumps.
8572 (check_mem_write): Mask out fast tracepoint jumps.
8573 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8574 (set_fast_tracepoint_jump): Declare.
8575 (delete_fast_tracepoint_jump)
8576 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8577 (reinsert_fast_tracepoint_jumps_at): Declare.
8578 * regcache.c: Don't compile many functions when building the
8579 in-process agent library.
8580 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8581 the register buffer in the heap.
8582 (free_register_cache): If the register buffer isn't owned by the
8583 regcache, don't free it.
8584 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8585 pre-existing register caches.
8586 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8588 (convert_ascii_to_int): : Constify `from' parameter type.
8589 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8590 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8591 the needed buffer in-place.
8592 (relocate_instruction): New.
8593 * server.c (handle_query) <qSymbols>: If the target supports
8594 tracepoints, give it a chance of looking up symbols. Report
8595 support for fast tracepoints.
8596 (handle_status): Stabilize threads.
8597 (process_serial_event): Adjust.
8598 * server.h (struct fast_tracepoint_jump): Forward declare.
8599 (struct process_info) <fast_tracepoint_jumps>: New field.
8600 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8601 (decode_X_packet, decode_M_packet): Adjust.
8602 (relocate_instruction): Declare.
8603 (in_process_agent_loaded): Declare.
8604 (tracepoint_look_up_symbols): Declare.
8605 (struct fast_tpoint_collect_status): Declare.
8606 (fast_tracepoint_collecting): Declare.
8607 (force_unlock_trace_buffer): Declare.
8608 (handle_tracepoint_bkpts): Declare.
8609 (initialize_low_tracepoint)
8610 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8611 * target.h (struct target_ops) <stabilize_threads,
8612 install_fast_tracepoint_jump_pad>: New fields.
8613 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8614 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8615 [HAVE_STDINT_H]: Include stdint.h.
8616 (trace_debug_1): Rename to ...
8617 (trace_vdebug): ... this.
8618 (trace_debug): Rename to ...
8619 (trace_debug_1): ... this. Add `level' parameter.
8621 (ATTR_USED, ATTR_NOINLINE): New.
8622 (IP_AGENT_EXPORT): New.
8623 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8624 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8625 (about_to_request_buffer_space, trace_buffer_is_full)
8626 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8627 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8628 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8629 (traceframe_write_count, traceframes_created)
8630 (trace_state_variables)
8631 New renaming defines.
8632 (struct ipa_sym_addresses): New.
8633 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8635 (ipa_sym_addrs): New.
8636 (all_tracepoint_symbols_looked_up): New.
8637 (in_process_agent_loaded): New.
8638 (write_e_ipa_not_loaded): New.
8639 (maybe_write_ipa_not_loaded): New.
8640 (tracepoint_look_up_symbols): New.
8641 (debug_threads) [IN_PROCESS_AGENT]: New.
8642 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8643 (UNKNOWN_SIDE_EFFECTS): New.
8644 (stop_tracing): New.
8645 (flush_trace_buffer): New.
8646 (stop_tracing_bkpt): New.
8647 (flush_trace_buffer_bkpt): New.
8648 (read_inferior_integer): New.
8649 (read_inferior_uinteger): New.
8650 (read_inferior_data_pointer): New.
8651 (write_inferior_data_pointer): New.
8652 (write_inferior_integer): New.
8653 (write_inferior_uinteger): New.
8654 (struct collect_static_trace_data_action): Delete.
8655 (enum tracepoint_type): New.
8656 (struct tracepoint) <type>: New field `type'.
8657 <actions_str, step_actions, step_actions_str>: Only include in
8659 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8660 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8661 (tracepoints): Use IP_AGENT_EXPORT.
8662 (last_tracepoint): Don't include in the IPA.
8663 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8664 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8665 (alloced_trace_state_variables): New.
8666 (trace_state_variables): Use IP_AGENT_EXPORT.
8667 (traceframe_t): Delete unused variable.
8668 (circular_trace_buffer): Don't include in the IPA.
8669 (trace_buffer_start): Delete.
8670 (struct trace_buffer_control): New.
8671 (trace_buffer_free): Delete.
8672 (struct ipa_trace_buffer_control): New.
8673 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8674 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8676 (trace_buffer_ctrl): New.
8677 (TRACE_BUFFER_CTRL_CURR): New.
8678 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8679 Reimplement as macros.
8680 (trace_buffer_wrap): Delete.
8681 (traceframe_write_count, traceframe_read_count)
8682 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8683 (struct tracepoint_hit_ctx) <type>: New field.
8684 (struct fast_tracepoint_ctx): New.
8685 (memory_barrier): New.
8687 (record_tracepoint_error): Update atomically in the IPA.
8688 (clear_inferior_trace_buffer): New.
8689 (about_to_request_buffer_space): New.
8690 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8691 updating the same buffer.
8692 (add_tracepoint): Default the tracepoint's type to trap
8693 tracepoint, and orig_size to -1.
8694 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8696 (create_trace_state_variable): New parameter `gdb'. Handle it.
8697 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8698 (cmd_qtdp): Handle fast tracepoints.
8700 (max_jump_pad_size): New.
8701 (gdb_jump_pad_head): New.
8702 (get_jump_space_head): New.
8703 (claim_jump_space): New.
8704 (sort_tracepoints): New.
8705 (MAX_JUMP_SIZE): New.
8706 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8708 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8709 support. Upload fast traceframes, and delete internal IPA
8711 (stop_tracing_handler): New.
8712 (flush_trace_buffer_handler): New.
8713 (cmd_qtstop): Upload fast tracepoints.
8714 (response_tracepoint): Handle fast tracepoints.
8715 (tracepoint_finished_step): Upload fast traceframes. Set the
8716 tracepoint hit context's tracepoint type.
8717 (handle_tracepoint_bkpts): New.
8718 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8719 type. Add comment about fast tracepoints.
8720 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8721 non-existing action_str field.
8722 (get_context_regcache): Handle fast tracepoints.
8723 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8725 (fast_tracepoint_from_jump_pad_address): New.
8726 (fast_tracepoint_from_ipa_tpoint_address): New.
8727 (collecting_t): New.
8728 (force_unlock_trace_buffer): New.
8729 (fast_tracepoint_collecting): New.
8732 (write_inferior_data_ptr): New.
8733 (target_tp_heap): New.
8734 (target_malloc): New.
8735 (download_agent_expr): New.
8737 (download_tracepoints): New.
8738 (download_trace_state_variables): New.
8739 (upload_fast_traceframes): New.
8740 (IPA_FIRST_TRACEFRAME): New.
8741 (IPA_NEXT_TRACEFRAME_1): New.
8742 (IPA_NEXT_TRACEFRAME): New.
8743 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8744 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8745 (gdb_jump_pad_buffer_end): New.
8746 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8747 (initialize_tracepoint): Adjust.
8748 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8749 buffer. Initialize the low module.
8750 * utils.c (PREFIX, TOOLNAME): New.
8751 (malloc_failure): Use PREFIX.
8752 (error): In the IPA, an error causes an exit.
8753 (fatal, warning): Use PREFIX.
8754 (internal_error): Use TOOLNAME.
8755 (NUMCELLS): Increase to 10.
8756 * configure, config.in: Regenerate.
8758 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8760 * server.c (handle_query) <qSupported>: Do two passes over the
8761 qSupported string to avoid nesting strtok.
8763 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8765 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8767 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8769 * configure: Regenerate.
8770 * proc-service.list: New.
8772 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8774 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8777 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8779 * gdbreplay.c (remote_open): Check error return from socket() call by
8780 its equality to -1 not by it being negative.
8781 * remote-utils.c (remote_open): Likewise.
8783 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8785 * config.h: Regenerate.
8787 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8789 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8790 doesn't provide PTRACE_GET_THREAD_AREA.
8792 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8794 * linux-m68k-low.c: Include <asm/ptrace.h>
8795 (ps_get_thread_area): Implement.
8797 2010-05-03 Doug Evans <dje@google.com>
8799 * event-loop.c (struct callback_event): New struct.
8800 (callback_list): New global.
8801 (append_callback_event, delete_callback_event): New functions.
8802 (process_callback): New function.
8803 (start_event_loop): Call it.
8804 * remote-utils.c (NOT_SCHEDULED): Define.
8805 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8806 moved out of readchar.
8807 (readchar): Rewrite. Call reschedule before returning.
8808 (reset_readchar): New function.
8809 (remote_close): Call it.
8810 (process_remaining, reschedule): New functions.
8811 * server.h (callback_handler_func): New typedef.
8812 (append_callback_event, delete_callback_event): Declare.
8814 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8816 * proc-service.c (ps_pglobal_lookup): Use
8817 thread_db_look_up_one_symbol.
8818 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8819 parameter. Use it instead of all_symbols_looked_up.
8820 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8822 (all_symbols_looked_up): Don't declare.
8823 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8824 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8826 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8827 Set all_symbols_looked_up here.
8828 (thread_db_look_up_one_symbol): New.
8829 (thread_db_get_tls_address): Adjust.
8830 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8831 thread_db object on the heap, and tentatively set it in the
8833 (thread_db_init): Don't set all_symbols_looked_up here.
8834 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8836 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8838 * linux-low.c (linux_kill, linux_detach): Adjust.
8839 (status_pending_p_callback): Remove redundant statement. Check
8840 for !TARGET_WAITIKIND_IGNORE, instead of
8841 TARGET_WAITKIND_STOPPED.
8842 (handle_tracepoints): Make sure LWP is locked. Adjust.
8843 (linux_wait_for_event_1): Adjust.
8844 (linux_cancel_breakpoints): New.
8845 (unsuspend_one_lwp): New.
8846 (unsuspend_all_lwps): New.
8847 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8848 (send_sigstop_callback): Change return type to int, add new
8849 `except' parameter and handle it.
8850 (suspend_and_send_sigstop_callback): New.
8851 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8852 pass them down. If SUSPEND, also increment the lwp's suspend
8854 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8855 (need_step_over_p): Don't consider suspended LWPs.
8856 (start_step_over): Adjust.
8857 (proceed_one_lwp): Change return type to int, add new `except'
8858 parameter and handle it.
8859 (unsuspend_and_proceed_one_lwp): New.
8860 (proceed_all_lwps): Use find_inferior instead of
8862 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8863 also decrement the suspend count of LWPs. Pass `except' down,
8864 instead of hacking its suspend count.
8865 (linux_pause_all): Add `freeze' parameter. Adjust.
8866 (linux_unpause_all): New.
8867 (linux_target_ops): Install linux_unpause_all.
8868 * server.c (handle_status): Adjust.
8869 * target.h (struct target_ops): New fields `unpause_all' and
8870 `cancel_breakpoints'. Add new parameter to `pause_all'.
8871 (pause_all): Add new `freeze' parameter.
8873 (cancel_breakpoints): New.
8874 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8876 (cmd_qtstart): Pause threads.
8877 (stop_tracing): Pause threads, and cancel breakpoints.
8878 * win32-low.c (win32_target_ops): Adjust.
8880 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8882 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8883 the inferior right away from here...
8884 (linux_wait_1): ... to here, and adjust to check the thread's
8885 last_resume_kind instead of the lwp's step or stop_expected flags.
8887 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8889 * README: Use consistent `GDB' and `GDBserver' spellings.
8891 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8893 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8894 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8895 (linux_detach_one_lwp): Assume the lwp is stopped.
8896 (any_thread_of): Delete.
8897 (linux_detach): Stop all lwps here. Don't blindly delete all
8899 (delete_lwp_callback): New.
8900 (linux_mourn): Delete all lwps of the process that is gone.
8901 (linux_wait_1): Don't delete the last lwp of the process here.
8902 * mem-break.h (mark_breakpoints_out): Declare.
8903 * mem-break.c (mark_breakpoints_out): New.
8904 (free_all_breakpoints): Use it.
8905 * server.c (handle_target_event): If the process is gone, mark
8907 * thread-db.c (struct thread_db) <create_bp>: New field.
8908 (thread_db_enable_reporting): Fix prototype. Store a thread event
8909 breakpoint reference in the thread_db struct.
8910 (thread_db_load_search): Clear the thread_db object.
8911 (try_thread_db_load_1): Ditto.
8912 (switch_to_process): New.
8913 (disable_thread_event_reporting): Use it.
8914 (remove_thread_event_breakpoints): New.
8915 (thread_db_detach, thread_db_mourn): Use it.
8917 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8919 * linux-low.c (linux_enable_event_reporting): New.
8920 (linux_wait_for_event_1, handle_extended_wait): Use it.
8922 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8924 * linux-low.c (linux_kill_one_lwp, linux_kill)
8925 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8926 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8927 SIGSTOP even if the LWP is stopped.
8928 (send_sigstop_callback): New.
8929 (stop_all_lwps): Use send_sigstop_callback instead.
8930 (linux_resume_one_thread): Adjust.
8931 (proceed_one_lwp): Still proceed an LWP that the client has
8932 requested to stop, if we haven't reported it as stopped yet. Make
8933 sure that LWPs the client want stopped, have a pending SIGSTOP.
8935 2010-04-26 Doug Evans <dje@google.com>
8937 * server.c (handle_general_set): Make static.
8939 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8940 Print received char after testing for error/eof instead of before.
8941 (input_interrupt): Tweak comment.
8943 2010-04-23 Doug Evans <dje@google.com>
8945 * server.c (start_inferior): Print inferior argv if --debug.
8947 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8949 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8950 * nto-x86-low.c: Include server.h
8952 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8954 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8955 be consistent with other sources of this directory.
8956 (init_registers_amd64): Correct name of source file of this function
8959 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8961 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8964 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8966 * win32-i386-low.c: Add 64-bit support.
8967 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8968 (init_registers_amd64): Declare.
8969 (mappings): Add 64-bit version of array.
8970 (init_windows_x86): New function.
8971 (the_low_target): Change init_arch field to init_windows_x86.
8973 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8975 * win32-low.c: Adapt to support also 64-bit architecture.
8976 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8977 (get_image_name): Use SIZE_T type for local variable `done'.
8978 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8979 (toolhelp_get_dll_name): Idem.
8980 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8981 Use uintptr_t typecast to avoid warning.
8982 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8983 (handle_exception): Use phex_nz to avoid warning.
8984 (win32_wait): Remove unused local variable `process'.
8986 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8988 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8991 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8993 * configure.ac: Use `ws2_32' library for srv_mingw.
8994 * configure: Regenerate.
8995 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8996 * remote-utils.c: Likewise.
8998 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9000 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9001 if __x86_64__ is defined.
9003 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9005 * configure: Regenerate.
9007 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9009 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9010 * target.h (target_ops): New get_tib_address field.
9011 * win32-low.h (win32_thread_info): Add thread_local_base field.
9012 * win32-low.c (child_add_thread): Add tlb argument.
9013 Set thread_local_base field to TLB.
9014 (get_child_debug_event): Adapt to child_add_thread change.
9015 (win32_get_tib_address): New function.
9016 (win32_target_ops): Set get_tib_address field to
9017 win32_get_tib_address.
9018 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9020 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9022 * linux-low.c (linux_mourn): Also remove the process.
9023 * server.c (handle_target_event): Don't remove the process here.
9024 * nto-low.c (nto_mourn): New.
9025 (nto_target_ops): Install it.
9026 * spu-low.c (spu_mourn): New.
9027 (spu_target_ops): Install it.
9028 * win32-low.c (win32_mourn): New.
9029 (win32_target_ops): Install it.
9031 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9033 * server.h (buffer_xml_printf): Remove redundant `;'.
9035 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9037 * regcache.c (set_register_cache): Invalidate regcaches before
9038 changing the register cache layout.
9039 (regcache_invalidate_one): Allow a NULL regcache.
9040 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9041 regcaches before changing the register cache layout or the target
9044 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9046 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9047 variable warning on Linux/x86-64.
9049 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9051 GDBserver disconnected tracing support.
9053 * linux-low.c (linux_remove_process): Delete.
9054 (add_lwp): Don't set last_resume_kind here.
9055 (linux_kill): Use `mourn'.
9056 (linux_detach): Use `thread_db_detach', and `mourn'.
9058 (linux_attach_lwp_1): Adjust comment.
9059 (linux_attach): last_resume_kind moved the thread_info; adjust.
9060 (status_pending_p_callback): Adjust.
9061 (linux_wait_for_event_1): Adjust.
9062 (count_events_callback, select_singlestep_lwp_callback)
9063 (select_event_lwp_callback, cancel_breakpoints_callback)
9064 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9065 (proceed_one_lwp): Adjust.
9066 (linux_async): Add debug output.
9067 (linux_thread_stopped): New.
9068 (linux_pause_all): New.
9069 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9071 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9072 (thread_db_free): Delete declaration.
9073 (thread_db_detach, thread_db_mourn): Declare.
9074 * thread-db.c (thread_db_init): Use thread_db_mourn.
9075 (thread_db_free): Delete, split in two.
9076 (disable_thread_event_reporting): New.
9077 (thread_db_detach): New.
9078 (thread_db_mourn): New.
9080 * server.h (struct thread_info) <last_resume_kind>: New field.
9081 <attached>: Add comment.
9082 <gdb_detached>: New field.
9083 (handler_func): Change return type to int.
9084 (handle_serial_event, handle_target_event): Ditto.
9085 (gdb_connected): Declare.
9087 (disconnected_tracing): Declare.
9088 (stop_tracing): Declare.
9090 * server.c (handle_query) <qSupported>: Report support for
9091 disconnected tracing.
9092 (queue_stop_reply_callback): Account for running threads.
9093 (gdb_wants_thread_stopped): New.
9094 (gdb_wants_all_threads_stopped): New.
9095 (gdb_reattached_process): New.
9096 (handle_status): Clear the `gdb_detached' flag of all processes.
9097 In all-stop, stop all threads.
9098 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9099 (process_serial_event): If the remote connection breaks, or if an
9100 exit was forced with "monitor exit", force an event loop exit.
9101 Handle disconnected tracing on detach.
9102 (handle_serial_event): Adjust.
9103 (handle_target_event): If GDB isn't connected, forward events back
9104 to the inferior, unless the last process exited, in which case,
9105 exit gdbserver. Adjust interface.
9107 * remote-utils.c (remote_open): Don't block in accept. Instead
9108 register an event loop source on the listen socket file
9109 descriptor. Refactor bits into ...
9110 (listen_desc): ... this new global.
9111 (gdb_connected): ... this new function.
9112 (enable_async_notification): ... this new function.
9113 (handle_accept_event): ... this new function.
9114 (remote_close): Clear remote_desc.
9116 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9118 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9120 (mourn_inferior): Define.
9121 (target_process_qsupported): Avoid the dangling else problem.
9122 (thread_stopped): Define.
9123 (pause_all): Define.
9124 (target_waitstatus_to_string): Declare.
9125 * target.c (target_waitstatus_to_string): New.
9127 * tracepoint.c (tracing): Make extern.
9128 (disconnected_tracing): New.
9129 (stop_tracing): Make extern. Handle tracing stops due to GDB
9131 (cmd_qtdisconnected): New.
9132 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9133 (handle_tracepoint_general_set): Handle QTDisconnected.
9135 * event-loop.c (event_handler_func): Change return type to int.
9136 (process_event): Bail out if the event handler wants the event
9138 (handle_file_event): Ditto.
9139 (start_event_loop): Bail out if the event handler wants the event
9142 * nto-low.c (nto_target_ops): Adjust.
9143 * spu-low.c (spu_wait): Don't remove the process here.
9144 (spu_target_ops): Adjust.
9145 * win32-low.c (win32_wait): Don't remove the process here.
9146 (win32_target_ops): Adjust.
9148 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9150 * regcache.c (realloc_register_cache): Invalidate inferior's
9151 regcache before recreating it.
9153 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9155 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9157 2010-04-09 Stan Shebs <stan@codesourcery.com>
9158 Pedro Alves <pedro@codesourcery.com>
9160 * server.h (LONGEST): New.
9161 (struct thread_info) <while_stepping>: New field.
9162 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9164 (initialize_tracepoint, handle_tracepoint_general_set)
9165 (handle_tracepoint_query, tracepoint_finished_step)
9166 (tracepoint_was_hit, release_while_stepping_state_list):
9167 (current_traceframe): Declare.
9168 * server.c (handle_general_set): Handle tracepoint packets.
9170 (write_memory): New.
9171 (handle_search_memory_1): Use read_memory.
9172 (handle_query): Report support for conditional tracepoints, trace
9173 state variables, and tracepoint sources. Handle tracepoint
9175 (main): Initialize the tracepoints module.
9176 (process_serial_event): Handle traceframe reads/writes.
9178 * linux-low.c (handle_tracepoints): New.
9179 (linux_wait_1): Call it.
9180 (linux_resume_one_lwp): Handle while-stepping.
9181 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9182 (linux_target_ops): Install them.
9183 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9185 * linux-x86-low.c (x86_supports_tracepoints): New.
9186 (the_low_target). Install it.
9188 * mem-break.h (delete_breakpoint): Declare.
9189 * mem-break.c (delete_breakpoint): Make external.
9191 * target.h (struct target_ops): Add `supports_tracepoints',
9192 `read_pc', and `write_pc' fields.
9193 (target_supports_tracepoints): Define.
9194 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9197 * regcache.h (struct regcache) <registers_owned>: New field.
9198 (init_register_cache, regcache_cpy): Declare.
9199 (regcache_read_pc, regcache_write_pc): Declare.
9200 (register_cache_size): Declare.
9201 (supply_regblock): Declare.
9202 * regcache.c (init_register_cache): New.
9203 (new_register_cache): Use it.
9204 (regcache_cpy): New.
9205 (register_cache_size): New.
9206 (supply_regblock): New.
9207 (regcache_read_pc, regcache_write_pc): New.
9209 * tracepoint.c: New.
9211 * Makefile.in (OBS): Add tracepoint.o.
9212 (tracepoint.o): New rule.
9214 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9216 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9218 (i386-mmx.c): Likewise.
9219 (i386-mmx-linux.o): Likewise.
9220 (i386-mmx-linux.c): Likewise.
9222 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9223 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9224 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9225 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9227 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9228 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9229 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9231 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9233 * Makefile.in (clean): Updated.
9235 (i386-avx.c): Likewise.
9236 (i386-avx-linux.o): Likewise.
9237 (i386-avx-linux.c): Likewise.
9238 (amd64-avx.o): Likewise.
9239 (amd64-avx.c): Likewise.
9240 (amd64-avx-linux.o): Likewise.
9241 (amd64-avx-linux.c): Likewise.
9243 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9244 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9245 (srv_amd64_regobj): Add amd64-avx.o.
9246 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9247 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9248 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9249 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9250 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9251 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9252 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9254 * i387-fp.c: Include "i386-xstate.h".
9256 (i387_cache_to_xsave): Likewise.
9257 (i387_xsave_to_cache): Likewise.
9258 (x86_xcr0): Likewise.
9260 * i387-fp.h (i387_cache_to_xsave): Likewise.
9261 (i387_xsave_to_cache): Likewise.
9262 (x86_xcr0): Likewise.
9264 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9265 * linux-crisv32-low.c (target_regsets): Likewise.
9266 * linux-m68k-low.c (target_regsets): Likewise.
9267 * linux-mips-low.c (target_regsets): Likewise.
9268 * linux-ppc-low.c (target_regsets): Likewise.
9269 * linux-s390-low.c (target_regsets): Likewise.
9270 * linux-sh-low.c (target_regsets): Likewise.
9271 * linux-sparc-low.c (target_regsets): Likewise.
9272 * linux-xtensa-low.c (target_regsets): Likewise.
9274 * linux-low.c: Include <sys/uio.h>.
9275 (regsets_fetch_inferior_registers): Support nt_type.
9276 (regsets_store_inferior_registers): Likewise.
9277 (linux_process_qsupported): New.
9278 (linux_target_ops): Add linux_process_qsupported.
9280 * linux-low.h (regset_info): Add nt_type.
9281 (linux_target_ops): Add process_qsupported.
9283 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9285 (init_registers_i386_avx_linux): New.
9286 (init_registers_amd64_avx_linux): Likewise.
9287 (xmltarget_i386_linux_no_xml): Likewise.
9288 (xmltarget_amd64_linux_no_xml): Likewise.
9289 (PTRACE_GETREGSET): Likewise.
9290 (PTRACE_SETREGSET): Likewise.
9291 (x86_fill_xstateregset): Likewise.
9292 (x86_store_xstateregset): Likewise.
9293 (use_xml): Likewise.
9294 (x86_linux_update_xmltarget): Likewise.
9295 (x86_linux_process_qsupported): Likewise.
9296 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9297 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9298 init_registers_i386_linux here. Call
9299 x86_linux_update_xmltarget.
9300 (the_low_target): Add x86_linux_process_qsupported.
9302 * server.c (handle_query): Call target_process_qsupported.
9304 * target.h (target_ops): Add process_qsupported.
9305 (target_process_qsupported): New.
9307 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9309 * inferiors.c (add_thread): Set last_status kind to
9310 TARGET_WAITKIND_IGNORE.
9311 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9312 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9313 (linux_wait_1): Move `thread' local definition to block that uses
9314 it. Don't NULL initialize `event_child'.
9315 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9316 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9317 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9319 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9321 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9322 an extended waitstatus, or by a watchpoint.
9323 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9324 thread was stepping or has been stopped by a watchpoint.
9326 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9328 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9329 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9330 of another, then delete the previous, and validate all
9332 (validate_inserted_breakpoint): New.
9333 (delete_disabled_breakpoints): New.
9334 (validate_breakpoints): New.
9335 (check_mem_read): Validate breakpoints before trusting their
9336 shadow. Delete disabled breakpoints.
9337 (check_mem_write): Validate breakpoints before trusting they
9338 should be inserted. Delete disabled breakpoints.
9339 * mem-break.h (validate_breakpoints):
9340 * server.c (handle_query): Validate breakpoints when we see a
9343 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9345 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9346 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9347 if we could tell there's a GDB breakpoint at stop_pc.
9348 (need_step_over_p): Don't do a step over if we find a GDB
9349 breakpoint at the resume PC.
9351 * mem-break.c (struct raw_breakpoint): New.
9352 (enum bkpt_type): New type `gdb_breakpoint'.
9353 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9354 fields. New field `raw'.
9355 (find_raw_breakpoint_at): New.
9356 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9358 (set_breakpoint_at): Adjust.
9359 (delete_raw_breakpoint): New.
9360 (release_breakpoint): New.
9361 (delete_breakpoint): Rename to...
9362 (delete_breakpoint_1): ... this. Add proc parameter. Use
9363 release_breakpoint. Return ENOENT.
9364 (delete_breakpoint): Reimplement.
9365 (find_breakpoint_at): Delete.
9366 (find_gdb_breakpoint_at): New.
9367 (delete_breakpoint_at): Delete.
9368 (set_gdb_breakpoint_at): New.
9369 (delete_gdb_breakpoint_at): New.
9370 (gdb_breakpoint_here): New.
9371 (set_reinsert_breakpoint): Use release_breakpoint.
9372 (uninsert_breakpoint): Rename to ...
9373 (uninsert_raw_breakpoint): ... this.
9374 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9375 (reinsert_raw_breakpoint): Change parameter type to
9377 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9379 (check_breakpoints): Adjust. Use release_breakpoint.
9380 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9381 (breakpoint_inserted_here): Ditto.
9382 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9383 Don't trust the breakpoint's shadow if it is not inserted.
9384 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9385 (delete_all_breakpoints): Adjust.
9386 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9387 use delete_breakpoint_1.
9389 * mem-break.h (breakpoints_supported): Delete declaration.
9390 (set_gdb_breakpoint_at): Declare.
9391 (gdb_breakpoint_here): Declare.
9392 (delete_breakpoint_at): Delete.
9393 (delete_gdb_breakpoint_at): Declare.
9395 * server.h (struct raw_breakpoint): Forward declare.
9396 (struct process_info): New field `raw_breakpoints'.
9398 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9401 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9403 * linux-low.c (status_pending_p_callback): Fix comment.
9404 (linux_wait_for_event_1): Move most of the internal breakpoint
9405 handling from here...
9406 (linux_wait_1): ... to here.
9407 (count_events_callback): New.
9408 (select_singlestep_lwp_callback): New.
9409 (select_event_lwp_callback): New.
9410 (cancel_breakpoints_callback): New.
9411 (select_event_lwp): New.
9412 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9413 priority to all LWPs that have had events that should be reported
9414 to the client. Cancel breakpoints when about to reporting the
9415 event to the client, not while stopping lwps. No longer cancel
9416 finished single-steps here.
9417 (cancel_finished_single_step): Delete.
9418 (cancel_finished_single_steps): Delete.
9420 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9422 * mem-break.c (enum bkpt_type): New.
9423 (struct breakpoint): New field `type'.
9424 (set_breakpoint_at): Change return type to struct breakpoint
9425 pointer. Set type to `other_breakpoint' by default.
9426 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9427 in the breakpoint list.
9428 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9429 (reinsert_breakpoint): Rename to ...
9430 (reinsert_raw_breakpoint): ... this.
9431 (reinsert_breakpoints_at): Adjust.
9432 * mem-break.h (struct breakpoint): Declare.
9433 (set_breakpoint_at): Change return type to struct breakpoint
9436 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9438 * server.c (handle_query): Assign, not compare.
9440 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9442 Teach linux gdbserver to step-over-breakpoints.
9444 * linux-low.c (can_hardware_single_step): New.
9445 (supports_breakpoints): New.
9446 (handle_extended_wait): If stopping threads, read the stop pc of
9449 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9450 low target doesn't support retrieving the PC.
9451 (add_lwp): Set last_resume_kind to resume_continue.
9452 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9453 (linux_attach): Don't clear stop_expected. Set the lwp's
9454 last_resume_kind to resume_stop.
9455 (linux_detach_one_lwp): Don't check for removed breakpoints.
9456 (check_removed_breakpoint): Delete.
9457 (status_pending_p): Rename to ...
9458 (status_pending_p_callback): ... this. Don't check for removed
9459 breakpoints. Don't consider threads that are stopped from GDB's
9461 (linux_wait_for_lwp): Always read the stop_pc here.
9462 (cancel_breakpoint): New.
9463 (step_over_bkpt): New global.
9464 (linux_wait_for_event_1): Implement stepping over breakpoints.
9465 (gdb_wants_lwp_stopped): New.
9466 (gdb_wants_all_stopped): New.
9467 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9468 single-step traps here. Store the thread's last reported target
9470 (send_sigstop): Don't clear stop_expected. Always set it,
9472 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9473 (cancel_finished_single_step): New.
9474 (cancel_finished_single_steps): New.
9475 (wait_for_sigstop): Don't cancel finished single-step traps here.
9476 (linux_resume_one_lwp): Don't check for removed breakpoints.
9477 Don't set `step' on non-hardware step archs.
9478 (linux_set_resume_request): Ignore resume_stop requests if already
9479 stopping or stopped. Set the lwp's last_resume_kind.
9480 (resume_status_pending_p): Don't check for removed breakpoints.
9481 (need_step_over_p): New.
9482 (start_step_over): New.
9483 (finish_step_over): New.
9484 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9485 requests. Clear the thread's last reported target waitstatus.
9486 Don't use the `suspended' flag. Don't consider pending breakpoints.
9487 (linux_resume): Start a step-over if necessary.
9488 (proceed_one_lwp): New.
9489 (proceed_all_lwps): New.
9490 (unstop_all_lwps): New.
9491 * linux-low.h (struct lwp_info): Rewrite comment for the
9492 `suspended' flag. Add the `stop_pc' field. Delete the
9493 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9494 Add `'last_resume_kind' and `need_step_over' fields.
9495 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9496 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9497 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9498 (set_raw_breakpoint_at): New.
9499 (set_breakpoint_at): Rewrite to use it.
9500 (reinsert_breakpoint_handler): Delete.
9501 (set_reinsert_breakpoint): New.
9502 (reinsert_breakpoint_by_bp): Delete.
9503 (delete_reinsert_breakpoints): New.
9504 (uninsert_breakpoint): Rewrite.
9505 (uninsert_breakpoints_at): New.
9506 (reinsert_breakpoint): Rewrite.
9507 (reinsert_breakpoints_at): New.
9508 (check_breakpoints): Rewrite.
9509 (breakpoint_here): New.
9510 (breakpoint_inserted_here): New.
9511 (check_mem_read): Adjust.
9512 * mem-break.h (breakpoints_supported, breakpoint_here)
9513 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9514 (reinsert_breakpoint_by_bp): Delete declaration.
9515 (delete_reinsert_breakpoints): Declare.
9516 (reinsert_breakpoint): Delete declaration.
9517 (reinsert_breakpoints_at): Declare.
9518 (uninsert_breakpoint): Delete declaration.
9519 (uninsert_breakpoints_at): Declare.
9520 (check_breakpoints): Adjust prototype.
9521 * server.h: Adjust include order.
9522 (struct thread_info): Declare here. Add a `last_status' field.
9524 2010-03-23 Michael Snyder <msnyder@vmware.com>
9526 * server.c (crc32): New function.
9527 (handle_query): Add handling for 'qCRC:' request.
9529 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9531 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9532 lwp had been stopped by a watchpoint.
9534 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9536 * server.h (internal_error): Declare.
9537 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9538 * utils.c (internal_error): New function.
9540 2010-03-15 Andreas Schwab <schwab@redhat.com>
9542 * configure.srv: Fix typo setting srv_regobj.
9544 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9546 * linux-low.c (fetch_register): Avoid passing a non string literal
9548 (usr_store_inferior_registers): Ditto.
9550 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9552 * linux-low.c (linux_write_memory): Bail out early if peeking
9555 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9557 * linux-low.h (struct lwp_info): New fields
9558 `stopped_by_watchpoint' and `stopped_data_address'.
9559 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9560 here, and cache them in the lwp object.
9561 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9563 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9565 (linux_stopped_by_watchpoint): Rewrite.
9566 (linux_stopped_data_address): Rewrite.
9568 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9570 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9571 switching the current inferior, not before.
9573 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9575 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9576 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9577 i386-linux.c and amd64-linux.c.
9578 (reg-i386.o): Removed.
9579 (reg-i386.c): Likewise.
9580 (reg-i386-linux.o): Likewise.
9581 (reg-i386-linux.c): Likewise.
9582 (reg-x86-64.o): Likewise.
9583 (reg-x86-64.c): Likewise.
9584 (reg-x86-64-linux.o): Likewise.
9585 (reg-x86-64-linux.c): Likewise.
9588 (i386-linux.o): Likewise.
9589 (i386-linux.c): Likewise.
9590 (amd64.o): Likewise.
9591 (amd64.c): Likewise.
9592 (amd64-linux.o): Likewise.
9593 (amd64-linux.c): Likewise.
9595 * configure.srv (srv_i386_regobj): New.
9596 (srv_i386_linux_regobj): Likewise.
9597 (srv_amd64_regobj): Likewise.
9598 (srv_amd64_linux_regobj): Likewise.
9599 (srv_i386_32bit_xmlfiles): Likewise.
9600 (srv_i386_64bit_xmlfiles): Likewise.
9601 (srv_i386_xmlfiles): Likewise.
9602 (srv_amd64_xmlfiles): Likewise.
9603 (srv_i386_linux_xmlfiles): Likewise.
9604 (srv_amd64_linux_xmlfiles): Likewise.
9605 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9606 srv_xmlfiles to $srv_i386_xmlfiles.
9607 (i[34567]86-*-mingw32ce*): Likewise.
9608 (i[34567]86-*-mingw*): Likewise.
9609 (i[34567]86-*-nto*): Likewise.
9610 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9611 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9612 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9613 (x86_64-*-linux*): Likewise.
9615 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9616 (init_registers_amd64_linux): New.
9617 (x86_arch_setup): Replace init_registers_x86_64_linux with
9618 init_registers_amd64_linux.
9620 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9622 * configure.ac: Check for libdl. If it is not available link against
9623 static libthread_db.
9624 * configure: Regenerate.
9626 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9630 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9631 handing a read watchpoint.
9632 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9634 2010-02-12 Doug Evans <dje@google.com>
9636 * linux-low.c (linux_supports_tracefork_flag): Document.
9637 (linux_look_up_symbols): Add comment.
9639 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9641 * regcache.c (supply_register): Clear regcache if buf is NULL.
9643 2010-02-02 Nicolas Roche <roche@sourceware.org>
9644 Joel Brobecker <brobecker@adacore.com>
9646 * inferiors.c (find_inferior): Add function documentation.
9647 (unloaded_dll): Handle the case where the unloaded dll has not
9648 been previously registered in the dll list.
9650 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9652 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9653 (thumb2_breakpoint): New.
9654 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9656 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9658 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9659 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9662 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9664 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9666 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9668 * linux-s390-low.c (s390_collect_ptrace_register)
9669 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9671 2010-01-21 Doug Evans <dje@google.com>
9673 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9674 (PTRACE_ARG4_TYPE): New macro.
9675 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9676 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9677 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9678 (usr_store_inferior_registers): Ditto.
9679 (linux_read_memory, linux_write_memory): Ditto.
9680 (linux_test_for_tracefork): Ditto.
9682 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9683 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9685 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9687 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9690 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9692 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9693 prototype to take a regcache. Adjust.
9695 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9697 * regcache.h (struct thread_info): Forward declare.
9698 (struct regcache): New.
9699 (new_register_cache): Adjust prototype.
9700 (get_thread_regcache): Declare.
9701 (free_register_cache): Adjust prototype.
9702 (registers_to_string, registers_from_string): Ditto.
9703 (supply_register, supply_register_by_name, collect_register)
9704 (collect_register_as_string, collect_register_by_name): Ditto.
9705 * regcache.c (struct inferior_regcache_data): Delete.
9706 (get_regcache): Rename to ...
9707 (get_thread_regcache): ... this. Adjust. Switch inferior before
9709 (regcache_invalidate_one): Adjust.
9710 (regcache_invalidate): Fix prototype.
9711 (new_register_cache): Return the new register cache.
9712 (free_register_cache): Change prototype.
9713 (realloc_register_cache): Adjust.
9714 (registers_to_string): Change prototype to take a regcache. Adjust.
9715 (registers_from_string): Ditto.
9716 (register_data): Ditto.
9717 (supply_register): Ditto.
9718 (supply_register_by_name): Ditto.
9719 (collect_register): Ditto.
9720 (collect_register_as_string): Ditto.
9721 (collect_register_by_name): Ditto.
9722 * server.c (process_serial_event): Adjust.
9723 * linux-low.h (regset_fill_func, regset_store_func): Change
9725 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9727 * linux-low.c (get_stop_pc): Adjust.
9728 (check_removed_breakpoint): Adjust.
9729 (linux_wait_for_event): Adjust.
9730 (linux_resume_one_lwp): Adjust.
9731 (fetch_register): Add regcache parameter. Adjust.
9732 (usr_store_inferior_registers): Ditto.
9733 (regsets_fetch_inferior_registers): Ditto.
9734 (regsets_store_inferior_registers): Ditto.
9735 (linux_fetch_registers, linux_store_registers): Ditto.
9736 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9738 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9740 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9741 prototype to take a regcache.
9742 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9743 * remote-utils.c (convert_ascii_to_int, outreg)
9744 (prepare_resume_reply): Change prototype to take a regcache.
9746 * target.h (struct target_ops) <fetch_registers, store_registers>:
9747 Change prototype to take a regcache.
9748 (fetch_inferior_registers, store_inferior_registers): Change
9749 prototype to take a regcache. Adjust.
9750 * proc-service.c (ps_lgetregs): Adjust.
9751 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9752 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9753 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9754 take a regcache. Adjust.
9755 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9756 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9757 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9758 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9759 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9760 (cris_cannot_fetch_register):
9761 (cris_breakpoint_at): Change prototype to take a regcache.
9763 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9764 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9765 to take a regcache. Adjust.
9766 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9768 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9769 take a regcache. Adjust.
9770 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9771 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9772 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9773 * linux-mips-low.c (mips_get_pc):
9774 (mips_set_pc): Change prototype to take a regcache. Adjust.
9775 (mips_reinsert_addr): Adjust.
9776 (mips_collect_register): Change prototype to take a regcache.
9778 (mips_supply_register):
9779 (mips_collect_register_32bit, mips_supply_register_32bit)
9780 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9781 (mips_store_fpregset): Ditto.
9782 * linux-ppc-low.c (ppc_supply_ptrace_register)
9783 (ppc_supply_ptrace_register): Ditto.
9784 (parse_spufs_run): Adjust.
9785 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9786 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9787 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9788 take a regcache. Adjust.
9789 * linux-s390-low.c (s390_collect_ptrace_register)
9790 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9791 (s390_set_pc): Change prototype to take a regcache. Adjust.
9792 (s390_arch_setup): Adjust.
9793 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9794 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9795 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9796 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9797 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9799 (sparc_breakpoint_at): Adjust.
9800 * linux-xtensa-low.c (xtensa_fill_gregset):
9801 (xtensa_store_gregset):
9802 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9803 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9804 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9805 prototype to take a regcache. Adjust.
9806 * win32-arm-low.c (arm_fetch_inferior_register)
9807 (arm_store_inferior_register): Change prototype to take a
9809 * win32-i386-low.c (i386_fetch_inferior_register)
9810 (i386_store_inferior_register): Change prototype to take a
9812 * win32-low.c (child_fetch_inferior_registers)
9813 (child_store_inferior_registers): Change prototype to take a
9815 (win32_wait): Adjust.
9816 (win32_fetch_inferior_registers): Change prototype to take a
9818 (win32_store_inferior_registers): Adjust.
9819 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9820 store_inferior_register>: Change prototype to take a regcache.
9822 2010-01-20 Doug Evans <dje@google.com>
9824 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9826 (linux_wait_for_event1, linux_init_signals): Ditto.
9827 (W_STOPCODE): Provide definition if missing.
9829 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9831 * linux-low.c (linux_core_of_thread): New.
9832 (compare_ints, show_process, list_threads): New.
9833 (linux_qxfer_osdata): Report threads and cores.
9834 (linux_target_op): Register linux_core_of_thread.
9835 * remote-utils.c (prepare_resume_reply): Report the core.
9836 (buffer_xml_printf): Support %d specifier.
9837 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9839 (handle_query): Handle qXfer:threads. Announce availability
9841 * target.h (struct target_ops): New field core_of_thread.
9843 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9845 * Makefile.in (clean): Remove new generated files.
9846 (reg-s390.o, reg-s390.c): Remove rules.
9847 (reg-s390x.o, reg-s390x.c): Likewise.
9848 (s390-linux32.o, s390-linux32.c): Add rules.
9849 (s390-linux64.o, s390-linux64.c): Likewise.
9850 (s390x-linux64.o, s390x-linux64.c): Likewise.
9851 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9852 * linux-s390-low.c: Include <elf.h>.
9853 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9854 (init_registers_s390): Remove prototype.
9855 (init_registers_s390x): Likewise.
9856 (init_registers_s390_linux32): Add prototype.
9857 (init_registers_s390_linux64): Likewise.
9858 (init_registers_s390x_linux64): Likewise.
9859 (s390_num_regs_3264): New define.
9860 (s390_regmap_3264): New global variable.
9861 (s390_cannot_fetch_register): Remove obsolete check.
9862 (s390_cannot_store_register): Likewise.
9863 (s390_collect_ptrace_register): Handle upper/lower register halves.
9864 (s390_supply_ptrace_register): Likewise.
9865 (s390_fill_gregset): Update to register number changes.
9866 (s390_get_hwcap): New routine.
9867 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9868 Install appropriate regmap and register set.
9870 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9872 * server.c (gdbserver_version): Update copyright year to 2010.
9873 * gdbreplay.c (gdbreplay_version): Likewise.
9875 2009-12-28 Doug Evans <dje@google.com>
9877 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9878 elf/external.h. Include <elf.h> instead but only if necessary.
9880 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9882 * linux-low.c (linux_remove_process): Remove `detaching'
9883 parameter. Don't release/detach from thread_db here.
9884 (linux_kill): Release/detach from thread_db here, ...
9885 (linux_detach): ... and here, before actually detaching.
9886 (linux_wait_1): ... and here, when a process exits.
9887 * thread-db.c (any_thread_of): New.
9888 (thread_db_free): Switch the current inferior to a thread of the
9891 2009-12-21 Doug Evans <dje@google.com>
9893 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9895 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9896 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9897 warning ifndef __NR_tkill. Move setting of errno there too.
9898 Delete unnecessary resetting of errno after syscall.
9899 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9901 * configure.ac: Check for dladdr.
9902 * config.in: Regenerate.
9903 * configure: Regenerate.
9904 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9905 (try_thread_db_load): Update.
9907 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9909 2009-12-18 Doug Evans <dje@google.com>
9911 * event-loop.c: Include unistd.h if it exists.
9913 * linux-low.c (my_waitpid): Move definition away from being in
9914 between linux_tracefork_child/linux_test_for_tracefork.
9916 * gdb_proc_service.h (psaddr_t): Fix type.
9917 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9918 signature to match glibc.
9920 2009-12-16 Doug Evans <dje@google.com>
9922 * linux-low.c (linux_read_memory): Fix argument to read.
9924 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9926 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9927 events, don't leave current_inferior pointing at null.
9929 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9931 * win32-low.c (LOG): Delete.
9932 (OUTMSG): Output to stderr.
9933 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9934 on compile time LOG macro.
9935 (win32_wait): Fix debug output.
9937 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9939 * win32-low.c (win32_add_one_solib): If the dll name is
9940 "ntdll.dll", prepend the system directory to the dll path.
9942 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9944 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9946 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9947 Vladimir Prus <vladimir@codesourcery.com>
9949 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9950 * configure.ac: Check for __mcoldfire__ and set
9951 gdb_cv_m68k_is_coldfire.
9952 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9953 reg-cf.o and reg-m68k.o.
9954 * configure: Regenerated.
9956 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9958 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9959 Pass it to thread_db_free.
9960 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9961 proper `detaching' argument to linux_remove_process.
9962 * linux-low.h (thread_db_free): Add `detaching' parameter.
9963 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9965 (thread_db_free): Add `detaching' parameter. Only
9966 call td_ta_clear_event if detaching from process.
9968 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9970 * thread-db.c (thread_db_free): Fix typo.
9972 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9975 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9977 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9979 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9980 with an i686 compiler.
9981 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9983 * configure: Rebuilt.
9985 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9989 * server.c (handle_search_memory_1): Correct read_addr initialization
9990 in loop for searching subsequent chunks.
9992 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9994 * configure.ac: New --with-libthread-db option.
9995 * thread-db.c: Allow direct dependence on libthread_db.
9996 (thread_db_free): Adjust.
9997 * config.in: Regenerate.
9998 * configure: Likewise.
10000 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10003 * thread-db.c (attach_thread): New function.
10004 (maybe_attach_thread): Return success/failure.
10005 (find_new_threads_callback): Adjust.
10006 (thread_db_find_new_threads): Loop until no new threads.
10008 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10010 * proc-service.c (ps_lgetregs): Formatting.
10012 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10014 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10015 * configure.ac: Adjust.
10016 * linux-low.h (struct process_info_private): Move members to struct
10018 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10019 * linux-low.c (linux_remove_process): Adjust.
10020 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10021 * server.c (handle_query): Move code ...
10022 (handle_monitor_command): ... here. New function.
10023 * target.h (struct target_ops): New member.
10024 * thread-db.c (struct thread_db): New.
10025 (libthread_db_search_path): New variable.
10026 (thread_db_create_event, thread_db_enable_reporting)
10027 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10028 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10029 (try_thread_db_load_1, dladdr_to_soname): New functions.
10030 (try_thread_db_load, thread_db_load_search): New functions.
10031 (thread_db_init): Search for libthread_db.
10032 (thread_db_free): New function.
10033 (thread_db_handle_monitor_command): Likewise.
10034 * config.in: Regenerate.
10035 * configure: Regenerate.
10037 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10039 * spu-low.c (spu_kill): Wait for inferior to terminate.
10040 Call clear_inferiors.
10041 (spu_detach): Call clear_inferiors.
10043 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10045 * aclocal.m4: Regenerate.
10046 * config.in: Likewise.
10047 * configure: Likewise.
10049 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10051 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10052 (parse_spufs_run): New function.
10053 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10054 (ppc_breakpoint_at): Handle SPU breakpoints.
10056 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10058 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10059 (SPUFS_MAGIC): Define.
10060 (spu_enumerate_spu_ids): New function.
10061 (linux_qxfer_spu): New function.
10062 (linux_target_ops): Install linux_qxfer_spu.
10064 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10066 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10067 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10068 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10069 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10070 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10071 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10072 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10073 (init_registers_powerpc_cell32l): Add prototype.
10074 (init_registers_powerpc_cell64l): Likewise.
10075 (ppc_arch_setup): Detect Cell/B.E. architecture.
10077 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10079 * Makefile.in (datarootdir): New variable.
10081 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10083 * linux-low.c (linux_write_memory): Update debugging output.
10084 * Makefile.in (clean): Add new descriptions.
10085 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10086 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10087 * configure.srv: Add new files for arm*-*-linux*.
10088 * linux-arm-low.c: Add new declarations.
10089 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10090 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10091 (HWCAP_VFPv3D16): New.
10092 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10093 instead of __IWMMXT__.
10094 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10095 (arm_arch_setup): New.
10096 (target_regsets): Remove #ifdef. Add VFP regset.
10097 (the_low_target): Use arm_arch_setup.
10099 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10101 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10102 the main thread again.
10104 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10106 Adding Neutrino gdbserver.
10107 * configure: Regenerated.
10108 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10109 * configure.srv (i[34567]86-*-nto*): New target.
10110 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10111 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10112 (nto_comctrl) [__QNX__]: New function.
10113 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10115 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10117 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10120 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10121 Pedro Alves <pedro@codesourcery.com>
10123 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10124 don't support CONTEXT_EXTENDED_REGISTERS.
10125 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10126 (the_low_target): Install them.
10127 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10128 failing with ERROR_PIPE_NOT_CONNECTED.
10130 2009-06-30 Doug Evans <dje@google.com>
10131 Pierre Muller <muller@ics.u-strasbg.fr>
10133 Add h/w watchpoint support to x86-linux, win32-i386.
10134 * Makefile.in (SFILES): Add i386-low.c
10135 (i386_low_h): Define.
10136 (i386-low.o): Add dependencies.
10137 (linux-x86-low.o): Add i386-low.h dependency.
10138 (win32-i386-low.o): Ditto.
10139 * i386-low.c: New file.
10140 * i386-low.h: New file.
10141 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10142 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10143 * linux-low.c (linux_add_process): Initialize arch_private.
10144 (linux_remove_process): Free arch_private.
10145 (add_lwp): Initialize arch_private.
10146 (delete_lwp): Free arch_private.
10147 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10149 * linux-low.h (process_info_private): New member arch_private.
10150 (lwp_info): New member arch_private.
10151 (linux_target_ops): New members new_process, new_thread,
10153 (ptid_of): New macro.
10154 * linux-x86-low.c: Include stddef.h, i386-low.h.
10155 (arch_process_info): New struct.
10156 (arch_lwp_info): New struct.
10157 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10158 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10159 (i386_dr_low_get_status): New function.
10160 (x86_insert_point, x86_remove_point): New functions.
10161 (x86_stopped_by_watchpoint): New function.
10162 (x86_stopped_data_address): New function.
10163 (x86_linux_new_process, x86_linux_new_thread): New functions.
10164 (x86_linux_prepare_to_resume): New function.
10165 (the_low_target): Add entries for insert_point, remove_point,
10166 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10168 * server.c (debug_hw_points): New global.
10169 (monitor_show_help): Document set debug-hw-points.
10170 (handle_query): Process "set debug-hw-points".
10171 * server.h (debug_hw_points): Declare.
10172 (paddress): Declare.
10173 * utils.c (NUMCELLS, CELLSIZE): New macros.
10174 (get_sell, xsnprintf, paddress): New functions.
10175 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10176 remove_point, stopped_by_watchpoint, stopped_data_address.
10177 * win32-i386-low.c: Include i386-low.h.
10178 (debug_reg_state): Replaces dr.
10179 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10180 (i386_dr_low_get_status): New function.
10181 (i386_insert_point, i386_remove_point): New functions.
10182 (i386_stopped_by_watchpoint): New function.
10183 (i386_stopped_data_address): New function.
10184 (i386_initial_stuff): Update.
10185 (get_thread_context,set_thread_context,i386_thread_added): Update.
10186 (the_low_target): Add entries for insert_point,
10187 remove_point, stopped_by_watchpoint, stopped_data_address.
10188 * win32-low.c (win32_insert_watchpoint): New function.
10189 (win32_remove_watchpoint): New function.
10190 (win32_stopped_by_watchpoint): New function.
10191 (win32_stopped_data_address): New function.
10192 (win32_target_ops): Add entries for insert_watchpoint,
10193 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10194 * win32-low.h (win32_target_ops): New members insert_point,
10195 remove_point, stopped_by_watchpoint, stopped_data_address.
10197 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10199 * server.c (process_serial_event): Re-return unsupported, not
10200 error, if the type isn't recognized. Re-allow supporting only
10201 insert or remove packets. Also call require_running for
10202 breakpoints. Add missing break statement to default case. Tidy.
10203 * target.h (struct target_ops): Rename insert_watchpoint to
10204 insert_point, and remove_watchpoint to remove_point.
10206 * linux-low.h (struct linux_target_ops): Likewise.
10207 * linux-low.c (linux_insert_watchpoint): Rename to ...
10208 (linux_insert_point): ... this. Adjust.
10209 (linux_remove_watchpoint): Rename to ...
10210 (linux_remove_point): ... this. Adjust.
10211 (linux_target_ops): Adjust.
10212 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10213 (cris_insert_point): ... this.
10214 (cris_remove_watchpoint): Rename to ...
10215 (cris_remove_point): ... this.
10216 (the_low_target): Adjust.
10218 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10220 * server.c (handle_v_kill): Pass signal_pid to
10221 kill_inferior if multi_process is zero.
10223 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10225 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10226 * target.h (target_ops): Comment for *_watchpoint to make it clear
10227 the functions can get types '0' and '1'.
10229 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10231 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10232 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10233 * regcache.c (get_regcache): Likewise.
10234 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10235 * win32-low.c (child_fetch_inferior_registers): Remove check for
10238 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10239 Pedro Alves <pedro@codesourcery.com>
10241 * target.h (struct target_ops) <supports_multi_process>: New
10243 (target_supports_multi_process): New.
10244 * server.c (handle_query): Even if GDB reports support, only
10245 enable multi-process if the target also supports it. Report
10246 multi-process support only if the target backend supports it.
10247 * linux-low.c (linux_supports_multi_process): New function.
10248 (linux_target_ops): Install it as target_supports_multi_process
10251 2009-05-24 Doug Evans <dje@google.com>
10253 Global renaming of find_thread_pid to find_thread_ptid.
10254 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10255 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10256 All callers updated.
10258 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10259 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10262 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10263 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10264 (linux_resume_one_lwp): Ditto.
10266 2009-05-23 Doug Evans <dje@google.com>
10268 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10269 from struct inferior_list_entry * to struct lwp_info *.
10270 All callers updated.
10272 2009-05-13 Doug Evans <dje@google.com>
10274 * linux-x86-low.c: Don't include assert.h.
10275 (x86_siginfo_fixup): Use fatal, not assert.
10276 (x86_arch_setup): Fix comment.
10278 2009-05-12 Doug Evans <dje@google.com>
10280 Biarch support for i386/amd64 gdbserver.
10281 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10282 Add linux-x86-low.c.
10283 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10284 (linux-x86-low.o): Add.
10285 * linux-x86-64-low.c: Delete.
10286 * linux-i386-low.c: Delete.
10287 * linux-x86-low.c: New file.
10288 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10290 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10292 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10293 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10294 (linux_child_pid_to_exec_file): New function.
10295 (elf_64_header_p, elf_64_file_p): New functions.
10296 (siginfo_fixup): New function.
10297 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10298 give target a chance to convert layout.
10299 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10300 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10302 2009-05-07 Doug Evans <dje@google.com>
10304 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10305 (regsets_store_inferior_registers): Ditto.
10307 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10311 * linux-low.c (must_set_ptrace_flags): Delete.
10312 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10314 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10315 `lwp->must_set_ptrace_flags' instead.
10316 (linux_wait_for_event_1): Set ptrace options here.
10317 (linux_wait_1): ... not here.
10319 2009-04-30 Doug Evans <dje@google.com>
10321 * inferiors.c (started_inferior_callback): New function.
10322 (attached_inferior_callback): New function.
10323 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10324 * server.c (print_started_pid, print_attached_pid): New functions.
10325 (detach_or_kill_for_exit): New function.
10326 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10327 * server.h (have_started_inferiors_p): Declare.
10328 (have_attached_inferiors_p): Declare.
10330 * inferiors.c (remove_process): Fix memory leak, free process.
10331 * linux-low.c (linux_remove_process): New function.
10332 (linux_kill): Call it instead of remove_process.
10333 (linux_detach, linux_wait_1): Ditto.
10335 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10337 * configure.srv: Add x86 Windows CE target.
10339 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10341 * inferiors.c (get_thread_process): Make global.
10342 * server.h (get_thread_process): Add prototype.
10343 * thread-db.c (find_one_thread): Use get_thread_process
10344 instead of current_process.
10345 (thread_db_get_tls_address): Do not crash if called when
10346 thread layer is not yet initialized.
10348 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10350 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10351 * spu-low.c (current_tid): Rename to ...
10352 (current_ptid): ... this.
10353 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10354 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10355 ptid_get_lwp (current_ptid) instead of current_tid.
10356 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10357 instead of current_tid. Use find_process_pid to verify pid
10358 argument is valid. Pass proper argument to remove_process.
10359 (spu_thread_alive): Compare current_ptid instead of current_tid.
10360 (spu_resume): Likewise.
10362 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10364 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10367 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10369 Implement the multiprocess extensions, and add linux multiprocess
10372 * server.h (ULONGEST): Declare.
10373 (struct ptid, ptid_t): New.
10374 (minus_one_ptid, null_ptid): Declare.
10375 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10376 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10377 (struct inferior_list_entry): Change `id' type from unsigned from
10379 (struct sym_cache, struct breakpoint, struct
10380 process_info_private): Forward declare.
10381 (struct process_info): Declare.
10382 (current_process): Declare.
10383 (all_processes): Declare.
10384 (initialize_inferiors): Declare.
10385 (add_thread): Adjust to use ptid_t.
10386 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10387 (add_process, remove_process, find_thread_pid): Declare.
10388 (find_inferior_id): Adjust to use ptid_t.
10389 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10390 (multi_process): Declare.
10391 (push_event): Adjust to use ptid_t.
10392 (read_ptid, write_ptid): Declare.
10393 (prepare_resume_reply): Adjust to use ptid_t.
10394 (clear_symbol_cache): Declare.
10395 * inferiors.c (all_processes): New.
10396 (null_ptid, minus_one_ptid): New.
10397 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10398 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10399 (add_thread): Change unsigned long to ptid. Remove gdb_id
10401 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10402 (gdb_id_to_thread): Rename to ...
10403 (find_thread_pid): ... this. Change unsigned long to ptid.
10404 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10405 (loaded_dll, pull_pid_from_list): Adjust.
10406 (add_process, remove_process, find_process_pid)
10407 (get_thread_process, current_process, initialize_inferiors): New.
10408 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10409 (struct target_waitstatus) <related_pid>: Ditto.
10410 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10411 return type to int.
10412 (struct target_ops) <join>: Add `pid' argument.
10413 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10414 (struct target_ops) <wait>: Add `ptid' field. Change return type
10416 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10417 (mywait): Add `ptid' argument. Change return type to ptid_t.
10418 (target_pid_to_str): Declare.
10419 * target.c (set_desired_inferior): Adjust to use ptids.
10420 (mywait): Add new `ptid' argument. Adjust.
10421 (target_pid_to_str): New.
10422 * mem-break.h (free_all_breakpoints): Declare.
10423 * mem-break.c (breakpoints): Delelete.
10424 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10425 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10426 to use per-process breakpoint list.
10427 (free_all_breakpoints): New.
10428 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10429 (symbol_cache, all_symbols_looked_up): Delete.
10431 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10433 (prepare_resume_reply): Change ptid argument's type from unsigned
10434 long to ptid_t. Adjust. Implement W;process and X;process.
10435 (free_sym_cache, clear_symbol_cache): New.
10436 (look_up_one_symbol): Adjust to per-process symbol cache. *
10437 * server.c (cont_thread, general_thread, step_thread): Change type
10439 (attached): Delete.
10440 (multi_process): New.
10441 (last_ptid): Change type to ptid_t.
10442 (struct vstop_notif) <ptid>: Change type to ptid_t.
10443 (queue_stop_reply, push_event): Change `ptid' argument's type to
10445 (discard_queued_stop_replies): Add `pid' argument.
10446 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10447 changes. Don't reference the `attached' global.
10448 (attach_inferior): Adjust to mywait interface changes.
10449 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10450 features. Handle and report "multiprocess+". Handle
10452 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10454 (handle_v_kill): New.
10455 (handle_v_stopped): Adjust to use target_pid_to_str.
10456 (handle_v_requests): Allow multiple attaches and runs when
10457 multiprocess extensions are in effect. Handle "vKill".
10458 (myresume): Adjust to use ptids.
10459 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10460 (handle_status): Adjust to discard_queued_stop_replies interface
10462 (first_thread_of, kill_inferior_callback)
10463 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10464 (main): Call initialize_inferiors. Adjust to use ptids, killing
10465 and detaching from all inferiors. Handle multiprocess packet
10467 * linux-low.h: Include gdb_proc_service.h.
10468 (struct process_info_private): New.
10469 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10470 <lwpid_of>: Use ptid_get_lwp.
10471 (get_lwp_thread): Adjust.
10472 (struct lwp_info): Add `dead' member.
10473 (find_lwp_pid): Declare.
10474 * linux-low.c (thread_db_active): Delete.
10475 (new_inferior): Adjust comment.
10476 (inferior_pid): Delete.
10477 (linux_add_process): New.
10478 (handle_extended_wait): Adjust.
10479 (add_lwp): Change unsigned long to ptid.
10480 (linux_create_inferior): Add process to processes table. Adjust
10481 to use ptids. Don't set new_inferior here.
10482 (linux_attach_lwp): Rename to ...
10483 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10484 it. Adjust to use ptids.
10485 (linux_attach_lwp): New.
10486 (linux_attach): Add process to processes table. Don't set
10488 (struct counter): New.
10489 (second_thread_of_pid_p, last_thread_of_process_p): New.
10490 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10491 multiple processes.
10492 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10493 processes. Remove process from process table.
10494 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10495 to multiple processes.
10496 (any_thread_of): New.
10497 (linux_detach): Add `pid' argument, and handle it. Remove process
10498 from processes table.
10499 (linux_join): Add `pid' argument. Handle it.
10500 (linux_thread_alive): Change unsighed long argument to ptid_t.
10501 Consider dead lwps as not being alive.
10502 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10503 threads we're not interested in.
10504 (same_lwp, find_lwp_pid): New.
10505 (linux_wait_for_lwp): Change `pid' argument's type from int to
10507 (linux_wait_for_event): Rename to ...
10508 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10509 from int to ptid_t. Adjust.
10510 (linux_wait_for_event): New.
10511 (linux_wait_1): Add `ptid' argument. Change return type to
10512 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10513 that exit from the process table.
10514 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10516 (mark_lwp_dead): New.
10517 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10518 stopping all threads, mark its main lwp as dead.
10519 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10521 (fetch_register, usr_store_inferior_registers)
10522 (regsets_fetch_inferior_registers)
10523 (regsets_store_inferior_registers, linux_read_memory)
10524 (linux_write_memory): Inline `inferior_pid'.
10525 (linux_look_up_symbols): Adjust to use per-process
10526 `thread_db_active'.
10527 (linux_request_interrupt): Adjust to use ptids.
10528 (linux_read_auxv): Inline `inferior_pid'.
10529 (initialize_low): Don't reference thread_db_active.
10530 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10531 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10532 (ps_getpid): Return the pid of the current inferior.
10533 * thread-db.c (proc_handle, thread_agent): Delete.
10534 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10536 (find_one_thread): Change argument type to ptid_t. Adjust to
10538 (maybe_attach_thread): Adjust to per-process data and ptids.
10539 (thread_db_find_new_threads): Ditto.
10540 (thread_db_init): Ditto.
10541 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10542 processes table. Adjust to use ptids.
10543 (spu_kill, spu_detach): Adjust interface. Remove process from
10545 (spu_join, spu_thread_alive): Adjust interface.
10546 (spu_wait): Adjust interface. Remove process from processes
10547 table. Adjust to use ptids.
10548 * win32-low.c (current_inferior_tid): Delete.
10549 (current_inferior_ptid): New.
10550 (debug_event_ptid): New.
10551 (thread_rec): Take a ptid. Adjust.
10552 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10553 (child_delete_thread): Ditto.
10554 (do_initial_child_stuff): Add `attached' argument. Add process to
10556 (child_fetch_inferior_registers, child_store_inferior_registers):
10558 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10559 (win32_attach): Pass 1 to do_initial_child_stuff.
10560 (win32_kill): Adjust interface. Remove process from processes
10562 (win32_detach): Ditto.
10563 (win32_join): Adjust interface.
10564 (win32_thread_alive): Take a ptid.
10565 (win32_resume): Adjust to use ptids.
10566 (get_child_debug_event): Ditto.
10567 (win32_wait): Adjust interface. Remove exiting process from
10570 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10572 Non-stop mode support.
10574 * server.h (non_stop): Declare.
10575 (gdb_client_data, handler_func): Declare.
10576 (delete_file_handler, add_file_handler, start_event_loop):
10578 (handle_serial_event, handle_target_event, push_event)
10579 (putpkt_notif): Declare.
10580 * target.h (enum resume_kind): New.
10581 (struct thread_resume): Replace `step' field by `kind' field.
10582 (TARGET_WNOHANG): Define.
10583 (struct target_ops) <wait>: Add `options' argument.
10584 <supports_non_stop, async, start_non_stop>: New fields.
10585 (target_supports_non_stop, target_async): New.
10586 (start_non_stop): Declare.
10587 (mywait): Add `options' argument.
10588 * target.c (mywait): Add `options' argument. Print child exit
10589 notifications here.
10590 (start_non_stop): New.
10591 * server.c (non_stop, own_buf, mem_buf): New globals.
10592 (struct vstop_notif): New.
10593 (notif_queue): New global.
10594 (queue_stop_reply, push_event, discard_queued_stop_replies)
10595 (send_next_stop_reply): New.
10596 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10598 (attach_inferior): In non-stop mode, don't wait for the target
10600 (handle_general_set): Handle QNonStop.
10601 (handle_query): When handling qC, return the current general
10602 thread, instead of the first thread of the list.
10603 (handle_query): If the backend supports non-stop mode, include
10604 QNonStop+ in the qSupported query response.
10605 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10607 (handle_v_attach, handle_v_run): Handle non-stop mode.
10608 (handle_v_stopped): New.
10609 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10610 (myresume): Adjust to use resume_kind. Handle non-stop.
10611 (queue_stop_reply_callback): New.
10612 (handle_status): Handle non-stop mode.
10613 (main): Clear non_stop flag on reconnection. Use the event-loop.
10614 Refactor serial protocol handling from here ...
10615 (process_serial_event): ... to this new function. When GDB
10616 selects any thread, select one here. In non-stop mode, wait until
10617 GDB acks all pending events before exiting.
10618 (handle_serial_event, handle_target_event): New.
10619 * remote-utils.c (remote_open): Install remote_desc in the event
10621 (remote_close): Remove remote_desc from the event loop.
10622 (putpkt_binary): Rename to...
10623 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10624 (putpkt_binary): New as wrapper around putpkt_binary_1.
10625 (putpkt_notif): New.
10626 (prepare_resume_reply): In non-stop mode, don't change the
10628 * event-loop.c: New.
10629 * Makefile.in (OBJ): Add event-loop.o.
10630 (event-loop.o): New rule.
10632 * linux-low.h (pid_of): Moved here.
10634 (get_lwp_thread): Use lwpid_of.
10635 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10636 * linux-low.c (pid_of): Delete.
10637 (inferior_pid): Use lwpid_of.
10638 (linux_event_pipe): New.
10639 (target_is_async_p): New.
10641 (handle_extended_wait): Use lwpid_of.
10642 (add_lwp): Don't set lwpid field.
10643 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10644 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10645 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10646 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10647 first. Adjust to linux_wait_for_event interface changes. Use
10649 (linux_detach): Don't delete the main lwp here.
10650 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10651 (status_pending_p): Don't consider explicitly suspended lwps.
10652 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10653 pointer. Add OPTIONS argument. Change return type to int. Use
10654 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10655 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10656 pointer. Add status pointer argument. Return a pid instead of a
10657 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10658 changes. In non-stop mode, don't switch to a random thread.
10659 (linux_wait): Rename to...
10660 (linux_wait_1): ... this. Add target_options argument, and handle
10661 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10662 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10663 clean exit and signal exit code. Don't stop all threads in
10664 non-stop mode. In all-stop mode, only stop all threads when
10665 reporting a stop to GDB. Handle explicit thread stop requests.
10666 (async_file_flush, async_file_mark): New.
10668 (send_sigstop): Use lwpid_of.
10669 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10670 interface changes. In non-stop mode, don't switch to a random
10672 (linux_resume_one_lwp): Use lwpid_of.
10673 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10674 (linux_resume_one_thread): ... this. Handle resume_stop. In
10675 non-stop mode, don't look for pending flag in all threads.
10676 (resume_status_pending_p): Don't consider explicitly suspended
10678 (my_waitpid): Reimplement. Emulate __WALL.
10679 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10681 (sigchld_handler, linux_supports_non_stop, linux_async)
10682 (linux_start_non_stop): New.
10683 (linux_target_ops): Register linux_supports_non_stop, linux_async
10684 and linux_start_non_stop.
10685 (initialize_low): Install SIGCHLD handler.
10686 * thread-db.c (thread_db_create_event, find_one_thread)
10687 (thread_db_get_tls_address): Use lwpid_of.
10688 * win32-low.c (win32_detach): Adjust to use resume_kind.
10689 (win32_wait): Add `options' argument.
10690 * spu-low.c (spu_resume): Adjust to use resume_kind.
10691 (spu_wait): Add `options' argument.
10693 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10695 Decouple target code from remote protocol.
10697 * target.h (enum target_waitkind): New.
10698 (struct target_waitstatus): New.
10699 (struct target_ops) <wait>: Return an unsigned long. Take a
10700 target_waitstatus pointer instead of a char pointer.
10701 (mywait): Likewise.
10702 * target.c (mywait): Change prototype to return an unsigned long.
10703 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10704 * server.h (thread_from_wait, old_thread_from_wait): Delete
10706 (prepare_resume_reply): Change prototype to take a
10708 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10709 (last_status, last_ptid): New.
10710 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10711 pid instead of a signal.
10712 (attach_inferior): Remove "status" and "signal" parameters.
10714 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10716 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10717 (handle_v_requests, myresume): Remove "status" and "signal"
10718 parameters. Adjust.
10719 (handle_status): New.
10720 (main): Delete local `status'. Adjust.
10721 * remote-utils.c: Include target.h.
10722 (prepare_resume_reply): Change prototype to take a
10723 target_waitstatus. Adjust.
10725 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10727 * spu-low.c (spu_wait): Adjust.
10728 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10730 (win32_wait): Adjust.
10732 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10734 * target.h (struct thread_resume): Delete leave_stopped member.
10735 (struct target_ops): Add a `n' argument to the `resume' callback.
10736 * server.c (start_inferior): Adjust.
10737 (handle_v_cont, myresume): Adjust.
10738 * linux-low.c (check_removed_breakpoint): Adjust to resume
10739 interface change, and to removed leave_stopped field.
10740 (resume_ptr): Delete.
10741 (struct thread_resume_array): New.
10742 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10743 resume interface change.
10744 (linux_continue_one_thread, linux_queue_one_thread)
10745 (resume_status_pending_p): Check if the resume field is NULL
10746 instead of checking the leave_stopped member.
10747 (linux_resume): Adjust to the target resume interface change.
10748 * spu-low.c (spu_resume): Adjust to the target resume interface
10750 * win32-low.c (win32_detach, win32_resume): Ditto.
10752 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10754 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10756 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10758 (linux_continue_one_thread): Only preserve the stepping flag if
10759 there's a pending breakpoint.
10761 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10763 * server.c (main): After the inferior having exited, call
10764 remote_close before exiting gdbserver.
10766 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10768 Fix size of FPSCR in Power 7 processors.
10769 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10770 (PPC_FEATURE_HAS_DFP): New #define.
10771 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10774 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10776 * server.c (handle_query) Whitespace and formatting.
10778 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10780 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10781 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10782 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10783 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10784 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10785 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10786 Makefile.in, configure.ac: Fix whitespace throughout.
10787 * configure: Regenerate.
10789 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10791 * inferiors.c (find_inferior): Make it safe for the callback
10792 function to delete the currently iterated inferior.
10794 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10796 * Makefile.in (linuw_low_h): Move higher.
10797 (thread-db.o): Depend on $(linux_low_h).
10799 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10801 Rename "process" to "lwp" throughout.
10803 * linux-low.c (all_processes): Rename to...
10804 (all_lwps): ... this.
10805 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10806 (add_process): Rename to ...
10807 (add_lwp): ... this. Adjust.
10808 (linux_create_inferior): Adjust.
10809 (linux_attach_lwp): Adjust.
10810 (linux_attach): Adjust.
10811 (linux_kill_one_process): Rename to ...
10812 (linux_kill_one_lwp): ... this. Adjust.
10813 (linux_kill): Adjust.
10814 (linux_detach_one_process): Rename to ...
10815 (linux_detach_one_lwp): ... this. Adjust.
10816 (linux_detach): Adjust.
10817 (check_removed_breakpoint): Adjust.
10818 (status_pending_p): Adjust.
10819 (linux_wait_for_process): Rename to ...
10820 (linux_wait_for_lwp): ... this. Adjust.
10821 (linux_wait_for_event): Adjust.
10822 (send_sigstop): Adjust.
10823 (wait_for_sigstop): Adjust.
10824 (stop_all_processes): Rename to ...
10825 (stop_all_lwps): ... this.
10826 (linux_resume_one_process): Rename to ...
10827 (linux_resume_one_lwp): ... this. Adjust.
10828 (linux_set_resume_request, linux_continue_one_thread)
10829 (linux_queue_one_thread, resume_status_pending_p)
10830 (usr_store_inferior_registers, regsets_store_inferior_registers)
10831 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10833 * linux-low.h (get_process): Rename to ...
10834 (get_lwp): ... this. Adjust.
10835 (get_thread_process): Rename to ...
10836 (get_thread_lwp): ... this. Adjust.
10837 (get_process_thread): Rename to ...
10838 (get_lwp_thread): ... this. Adjust.
10839 (struct process_info): Rename to ...
10840 (struct lwp_info): ... this.
10841 (all_processes): Rename to ...
10842 (all_lwps): ... this.
10843 * proc-service.c (ps_lgetregs): Adjust.
10844 * thread-db.c (thread_db_create_event, find_one_thread)
10845 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10847 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10849 * server.c (handle_query): Handle "qAttached".
10851 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10853 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10854 GPLv3, update license URL.
10856 2009-03-01 Doug Evans <dje@google.com>
10858 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10859 (server_h): Add gdb_signals.h.
10860 (signals.o): Update.
10861 * server.h (target_signal_from_host,target_signal_to_host_p)
10862 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10864 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10866 * remote-utils.c (getpkt): Also generate remote-debug
10867 information if noack_mode is set.
10869 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10871 * server.c (handle_query): Report qXfer:siginfo:read and
10872 qXfer:siginfo:write as supported and handle them.
10873 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10874 * linux-low.c (linux_xfer_siginfo): New.
10875 (linux_target_ops): Set it.
10877 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10879 * server.c (gdbserver_usage): Mention --remote-debug.
10880 (main): Accept '--remote-debug' switch.
10882 2009-01-18 Doug Evans <dje@google.com>
10884 * regcache.c (new_register_cache): No need to check result of xcalloc.
10885 * server.c (handle_search_memory): Back out calls to xmalloc,
10886 result is checked and error is returned to user upon failure.
10887 (handle_query): Ditto. Add more checks for result of malloc.
10888 (handle_v_cont): Check result of malloc, report error back to
10890 (handle_v_run): Ditto. Call freeargv.
10891 * server.h (freeargv): Declare.
10892 * utils.c (freeargv): New fn.
10894 2009-01-15 Doug Evans <dje@google.com>
10896 * gdbreplay.c (perror_with_name): Make arg const char *.
10897 * server.h (target_signal_to_name): Make return type const char *.
10898 * thread-db.c (thread_db_err_str): Make return type const char *.
10899 * utils.c (perror_with_name): Make arg const char *.
10901 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10903 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10904 when handling a EXIT_PROCESS_DEBUG_EVENT.
10906 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10908 * gdbreplay.c (gdbreplay_version): Update copyright year.
10909 * server.c (gdbserver_version): Likewise.
10911 2009-01-05 Doug Evans <dje@google.com>
10913 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10914 (handle_extended_wait): Improve comment.
10916 2008-12-13 Doug Evans <dje@google.com>
10918 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10919 * server.h (ATTR_MALLOC): New macro.
10920 (xmalloc,xcalloc,xstrdup): Declare.
10921 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10922 * inferiors.c: Ditto.
10923 * linux-low.c: Ditto.
10924 * mem-break.c: Ditto.
10925 * regcache.c: Ditto.
10926 * remote-utils.c: Ditto.
10929 * win32-low.c: Ditto.
10931 2008-12-12 Doug Evans <dje@google.com>
10933 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10934 in debugging printf.
10936 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10938 2008-12-09 Doug Evans <dje@google.com>
10940 * linux-low.h (struct process_info): Delete member tid, unused.
10941 * thread-db.c (find_one_thread): Update.
10942 (maybe_attach_thread): Update.
10944 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10946 * target.h (struct target_ops): Add qxfer_osdata member.
10947 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10949 (linux_qxfer_osdata): New functions.
10950 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10952 * server.c (handle_query): Handle "qXfer:osdata:read:".
10953 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10954 (buffer_xml_printf): New functions.
10955 * server.h (struct buffer): New.
10956 (buffer_grow_str, buffer_grow_str0): New macros.
10957 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10958 (buffer_xml_printf): Declare.
10960 2008-11-24 Doug Evans <dje@google.com>
10962 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10964 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10966 * server.c (handle_v_run): Always use the supplied argument list.
10968 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10970 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10971 (xtensa_regmap_table): Add entry for scompare1.
10973 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10975 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10976 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10977 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10978 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10979 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10980 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10981 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10982 XML target descriptions.
10983 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10984 when inferior is running on an ISA 2.05 or later processor. Add
10985 special case to return offset for full 64-bit slot of FPSCR when
10988 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10990 * Makefile.in (SFILES, clean): Added sparc64 files.
10991 (reg-sparc64.o, reg-sparc64.c): New.
10992 * configure.srv (sparc*-*-linux*): New configuration.
10993 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10994 syscall arguments for SPARC.
10995 (regsets_store_inferior_registers): Likewise.
10996 * linux-sparc-low.c: New file.
10998 2008-10-21 Doug Evans <dje@google.com>
11000 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11001 (READLINE_DIR,READLINE_DEP): Delete.
11002 (INTERNAL_CFLAGS): Update.
11003 (LINTFLAGS): Update.
11005 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11007 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11008 whole argv from the last run, not just argv[0].
11010 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11012 * regcache.c (new_register_cache): Return NULL if the register
11013 cache size isn't known yet.
11014 (free_register_cache): Avoid dereferencing a NULL regcache.
11016 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11018 * configure.srv: Merge MIPS and MIPS64.
11020 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11022 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11024 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11026 * Makefile.in: Add required vsx dependencies.
11028 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11029 Declare init_registers_powerpc_vsx32l.
11030 Declare init_registers_powerpc_vsx64l.
11031 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11032 (ppc_arch_setup): Check for VSX in hwcap.
11033 (ppc_fill_vsxregset): New function.
11034 (ppc_store_vsxregset): New function.
11035 Add new VSX entry in regset_info target_regsets.
11037 * configure.srv: Add new VSX dependencies.
11039 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11041 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11042 (remote_open): Set or clear transport_is_reliable.
11043 (putpkt_binary): Don't expect acks in noack mode.
11044 (getpkt): Don't send ack/nac in noack mode.
11045 * server.c (handle_general_set): Handle QStartNoAckMode.
11046 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11048 (main): Reset noack_mode on every connection.
11049 * server.h (noack_mode): Declare.
11051 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11053 * Makefile.in (GDBREPLAY_OBS): New variable.
11054 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11056 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11057 Daniel Jacobowitz <dan@codesourcery.com>
11059 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11060 (usr_store_inferior_registers): Likewise.
11061 (regsets_store_inferior_registers): Likewise.
11063 2008-07-31 Rolf Jansen <rj@surtec.com>
11064 Pedro Alves <pedro@codesourcery.com>
11066 * configure.ac: Check for memmem declaration.
11067 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11068 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11069 (disable_packet_qfThreadInfo): Unconditionally compile.
11070 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11071 * configure, config.in: Regenerate.
11073 2008-07-28 Doug Kwan <dougkwan@google.com>
11075 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11076 (linux_write_memory): Remove declaration of errno.
11078 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11080 * linux-low.c (handle_extended_wait): Do not use "status"
11081 variable uninitialized.
11083 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11085 * server.c (handle_v_attach): Inhibit reporting dll changes.
11087 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11089 * remote-utils.c (prepare_resume_reply): If requested, don't
11090 output "thread:TID" in the T stop reply.
11092 * server.c (disable_packet_vCont, disable_packet_Tthread)
11093 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11094 (handle_query): If requested, disable support for qC, qfThreadInfo
11096 (handle_v_requests): If requested, disable support for vCont.
11097 (gdbserver_show_disableable): New.
11098 (main): Handle --disable-packet and --disable-packet=LIST.
11100 * server.h (disable_packet_vCont, disable_packet_Tthread)
11101 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11103 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11105 * server.c (gdbserver_usage): Mention --version.
11107 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11109 * Makefile.in (gdbreplay.o): New rule.
11111 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11113 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11114 message, not gdbserver.
11116 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11117 Nathan Sidwell <nathan@codesourcery.com>
11118 Joseph Myers <joseph@codesourcery.com>
11120 * acinclude.m4: Include ../../config/acx.m4.
11121 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11122 * configure, config.in: Regenerate.
11123 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11124 * server.c (gdbserver_version): Print PKGVERSION.
11125 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11126 (main): Adjust gdbserver_usage calls.
11127 * gdbreplay.c (version, host_name): Add declarations.
11128 (gdbreplay_version, gdbreplay_usage): New.
11129 (main): Accept --version and --help options.
11131 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11133 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11134 (arm_breakpoint_at): Handle Thumb.
11135 (the_low_target): Add comment.
11137 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11139 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11141 2008-05-09 Doug Evans <dje@google.com>
11143 * server.h (decode_search_memory_packet): Declare.
11144 * remote-utils.c (decode_search_memory_packet): New fn.
11145 * server.c (handle_search_memory_1): New fn.
11146 (handle_search_memory): New fn.
11147 (handle_query): Process qSearch:memory packets.
11149 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11151 * regcache.c (registers_length): Remove.
11152 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11153 full register packet.
11154 * regcache.h (registers_length): Remove prototype.
11155 * server.h (PBUFSIZ): Define to 16384.
11157 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11159 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11160 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11161 powerpc-64l.o, and powerpc-altivec64l.o.
11162 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11163 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11164 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11165 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11166 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11169 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11170 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11171 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11172 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11173 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11174 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11175 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11176 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11177 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11178 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11181 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11182 (init_registers_powerpc_32l): ... this new prototype.
11183 (init_registers_powerpc_32): Remove, replace by ...
11184 (init_registers_powerpc_altivec32l): ... this new prototype.
11185 (init_registers_powerpc_e500): Remove, replace by ...
11186 (init_registers_powerpc_e500l): ... this new prototype.
11187 (init_registers_ppc64): Remove, replace by ...
11188 (init_registers_powerpc_64l): ... this new prototype.
11189 (init_registers_powerpc_64): Remove, replace by ...
11190 (init_registers_powerpc_altivec64l): ... this new prototype.
11191 (ppc_num_regs): Set to 73.
11192 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11193 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11194 (ppc_cannot_store_register): Handle orig_r3 and trap.
11195 (ppc_arch_setup): Update init_registers_... calls.
11196 (ppc_fill_gregset): Handle orig_r3 and trap.
11198 * inferiors.c (clear_inferiors): Reset current_inferior.
11200 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11202 * acinclude.m4: Add override.m4.
11203 * configure: Regenerate.
11205 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11207 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11208 initial call to init_register_ppc64.
11210 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11212 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11213 single powerpc*-*-linux* case.
11214 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11216 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11218 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11219 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11221 * linux-ppc-low.c: Include <elf.h>.
11222 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11223 (ppc_hwcap): New global variable.
11224 (ppc_regmap): Remove __SPE__ #ifdef sections.
11225 (ppc_regmap_e500): New global variable.
11226 (ppc_cannot_store_register): Update __SPE__ special case.
11227 (ppc_get_hwcap): New function.
11228 (ppc_arch_setup): Use it to determine whether inferior supports
11229 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11230 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11231 Do not access registers if target does not support AltiVec.
11232 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11233 Do not access registers if target does not support SPE.
11234 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11236 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11238 * linux-low.c (disabled_regsets, num_regsets): New.
11239 (use_regsets_p): Delete.
11240 (linux_wait_for_process): Clear disabled_regsets.
11241 (regsets_fetch_inferior_registers): Check and set it.
11242 (regsets_store_inferior_registers): Likewise.
11243 (linux_fetch_registers, linux_store_registers): Do not use
11245 (initialize_low): Allocate disabled_regsets.
11247 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11249 * Makefile.in (LIBOBJS): New.
11250 (OBS): Use LIBOBJS.
11251 (memmem.o): New rule.
11252 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11253 * configure: Regenerated.
11255 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11257 * server.c (handle_query): Never return "unsupported" for
11258 qXfer:features:read queries.
11260 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11262 * server.c (get_features_xml): Fix inverted condition.
11263 (handle_query): Always support qXfer:feature:read.
11265 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11267 * server.c (wrapper_argv): New.
11268 (start_inferior): Handle wrapper_argv. If set, expect an extra
11270 (gdbserver_usage): Document --wrapper.
11271 (main): Parse --wrapper.
11273 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11275 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11276 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11277 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11278 (ppc_set_pc): Likewise.
11279 (ppc_arch_setup): New function.
11280 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11281 of collect_register.
11282 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11284 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11286 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11287 instead of linux-ppc64-low.o.
11288 * linux-ppc64-low.c: Remove file.
11289 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11290 (linux-ppc64-low.o): Remove rule.
11292 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11293 (init_registers_powerpc_64): Likewise.
11294 (ppc_regmap): Conditionally define depending on __powerpc64__.
11295 (ppc_cannot_store_register): Do not special-case "fpscr" when
11296 compiled on __powerpc64__.
11297 (ppc_collect_ptrace_register): New function.
11298 (ppc_supply_ptrace_register): New function.
11299 (ppc_breakpoint): Change type to "unsigned int".
11300 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11301 (the_low_target): Conditionally provide initializers for the
11302 arch_setup member depending on __powerpc64__. Install
11303 collect_ptrace_register and supply_ptrace_register members.
11305 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11307 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11308 * server.c (gdbserver_xmltarget): Define.
11309 (get_features_xml): Use it to replace "target.xml" and arch_string.
11311 * configure.srv: Remove srv_xmltarget. Add XML files that were
11312 mentioned there to srv_xmlfiles instead. Remove conditional tests
11313 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11314 srv_xmlfiles and srv_regobj to include all possible choices.
11315 * configure.ac (srv_xmltarget): Remove.
11316 (srv_xmlfiles): Do not add "target.xml".
11317 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11318 checks for supplementary target information.
11319 * configure: Regenerate.
11320 * Makefile.in (XML_TARGET): Remove.
11321 (target.xml): Remove rule.
11322 (clean): Do not clean up target.xml.
11323 (.PRECIOUS): Do not mention target.xml.
11325 * target.h (struct target_ops): Remove arch_string member.
11326 * linux-low.c (linux_arch_string): Remove.
11327 (linux_target_ops): Remove arch_string initializer.
11328 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11329 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11330 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11331 * spu-low.c (spu_arch_string): Remove.
11332 (spu_target_ops): Remove arch_string initializer.
11333 * win32-low.c (win32_arch_string): Remove.
11334 (win32_target_ops): Remove arch_string initializer.
11335 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11336 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11337 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11339 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11341 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11342 by collect_ptrace_register and supply_ptrace_register hooks.
11343 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11344 instead of checking for the_low_target.left_pad_xfer.
11345 (usr_store_inferior_registers): Use collect_ptrace_register callback
11346 instead of checking for the_low_target.left_pad_xfer.
11348 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11349 (s390_supply_ptrace_register): Likewise.
11350 (s390_fill_gregset): Call s390_collect_ptrace_register.
11351 (the_low_target): Update.
11353 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11354 (ppc_supply_ptrace_register): Likewise.
11355 (the_low_target): Update.
11357 * linux-i386-low.c (the_low_target): Update.
11358 * linux-x86-64-low.c (the_low_target): Update.
11360 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11362 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11363 reg-s390.o and reg-s390x.o.
11365 * linux-low.c (new_inferior): New global variable.
11366 (linux_create_inferior, linux_attach): Set it.
11367 (linux_wait_for_process): Call the_low_target.arch_setup after the
11368 target has stopped for the first time.
11369 (initialize_low): Do not call the_low_target.arch_setup.
11371 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11372 (s390_set_pc): Likewise.
11373 (s390_arch_setup): New function.
11374 (the_low_target): Use s390_arch_setup as arch_setup routine.
11376 * regcache.c (realloc_register_cache): New function.
11377 (set_register_cache): Call it for each existing regcache.
11379 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11381 * server.h (init_registers): Remove prototype.
11383 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11384 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11385 instead of init_registers ().
11386 * linux-arm-low.c (init_registers_arm): Add prototype.
11387 (init_registers_arm_with_iwmmxt): Likewise.
11388 (the_low_target): Add initializer for arch_setup field.
11389 * linux-cris-low.c (init_registers_cris): Add prototype.
11390 (the_low_target): Add initializer for arch_setup field.
11391 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11392 (the_low_target): Add initializer for arch_setup field.
11393 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11394 (the_low_target): Add initializer for arch_setup field.
11395 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11396 (the_low_target): Add initializer for arch_setup field.
11397 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11398 (the_low_target): Add initializer for arch_setup field.
11399 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11400 (the_low_target): Add initializer for arch_setup field.
11401 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11402 (init_registers_mips64_linux): Likewise.
11403 (the_low_target): Add initializer for arch_setup field.
11404 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11405 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11406 (the_low_target): Add initializer for arch_setup field.
11407 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11408 (init_registers_powerpc_64): Likewise.
11409 (the_low_target): Add initializer for arch_setup field.
11410 * linux-s390-low.c (init_registers_s390): Add prototype.
11411 (init_registers_s390x): Likewise.
11412 (the_low_target): Add initializer for arch_setup field.
11413 * linux-sh-low.c (init_registers_sh): Add prototype.
11414 (the_low_target): Add initializer for arch_setup field.
11415 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11416 (the_low_target): Add initializer for arch_setup field.
11417 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11418 (the_low_target): Add initializer for arch_setup field.
11420 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11421 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11422 instead of init_registers ().
11423 * win32-arm-low.c (init_registers_arm): Add prototype.
11424 (the_low_target): Add initializer for arch_setup field.
11425 * win32-i386-low.c (init_registers_i386): Add prototype.
11426 (the_low_target): Add initializer for arch_setup field.
11428 * spu-low.c (init_registers_spu): Add prototype.
11429 (initialize_low): Call initialie_registers_spu () instead of
11430 initialize_registers ().
11432 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11434 * server.c (handle_v_requests): When handling the vRun and vAttach
11435 packets, if already debugging a process, don't kill it. Return an
11438 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11440 * server.c (handle_query): Correct length check.
11442 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11444 * win32-low.c (do_initial_child_stuff): Add process handle
11445 parameter. Set current_process_handle and current_process_id from the
11446 parameters. Clear globals.
11447 (win32_create_inferior): Don't set current_process_handle and
11448 current_process_id here. Instead pass them on the call to
11449 do_initial_child_stuff.
11450 (win32_attach): Likewise.
11451 (win32_clear_inferiors): New.
11452 (win32_kill): Don't close the current process handle or the
11453 current thread handle here. Instead call win32_clear_inferiors.
11454 (win32_detach): Don't open a new handle to the process. Call
11455 win32_clear_inferiors.
11456 (win32_join): Don't rely on current_process_handle; open a new
11457 handle using the process id.
11458 (win32_wait): Call win32_clear_inferiors when the inferior process
11461 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11463 * server.c (monitor_show_help): Add "exit".
11465 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11467 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11468 (clean): Add reg-xtensa.c.
11469 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11470 * configure.srv (xtensa*-*-linux*) New target.
11471 * linux-xtensa-low.c: New.
11472 * xtensa-xtregs.c: New.
11474 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11476 * hostio.c: Don't include errno.h.
11477 (errno_to_fileio_errno): Move to hostio-errno.
11478 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11479 error number outputting to the target->hostio_last_error callback.
11480 (hostio_packet_error): Use FILEIO_EINVAL directly.
11481 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11482 calls to hostio_error.
11483 * hostio-errno.c: New.
11484 * server.h (hostio_last_error_from_errno): Declare.
11485 * target.h (target_ops): Add hostio_last_error member.
11486 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11487 as hostio_last_error handler.
11488 * spu-low.c (spu_target_ops): Likewise.
11489 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11490 (wince_hostio_last_error): New functions.
11491 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11492 as hostio_last_error handler.
11493 (win32_target_ops) [!_WIN32_WCE]: Register
11494 hostio_last_error_from_errno as hostio_last_error handler.
11495 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11496 (hostio-errno.o): New rule.
11497 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11498 * configure.srv (srv_hostio_err_objs): New variable. Default to
11500 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11501 * configure: Regenerate.
11503 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11505 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11506 (linux_kill, linux_detach): Clean up the process list.
11507 * remote-utils.c (remote_open): Improve port number parsing.
11508 (putpkt_binary, input_interrupt): Only send interrupts if the target
11510 * server.c (extended_protocol): Make static.
11511 (attached): Define earlier.
11512 (exit_requested, response_needed, program_argv): New variables.
11513 (target_running): New.
11514 (start_inferior): Clear attached here.
11515 (attach_inferior): Set attached here.
11516 (require_running): Define.
11517 (handle_query): Use require_running and target_running. Implement
11519 (handle_v_attach, handle_v_run): New.
11520 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11521 (gdbserver_usage): Update.
11522 (main): Redo argument parsing. Handle --debug and --multi. Handle
11523 --attach along with other options or after the port. Save
11524 program_argv. Support no initial program. Resynchronize
11525 communication with GDB after an error. Handle "monitor exit".
11526 Use require_running and target_running. Always allow the extended
11527 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11528 restart in extended mode.
11529 * README: Refer to the GDB manual. Update --attach usage.
11531 2007-12-20 Andreas Schwab <schwab@suse.de>
11533 * linux-low.c (STACK_SIZE): Define.
11534 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11535 (linux_test_for_tracefork): Likewise.
11537 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11539 * linux-low.c (linux_wait_for_event): Update messages. Do not
11540 reinsert auto-delete breakpoints.
11541 * mem-break.c (struct breakpoint): Change return type of handler to
11543 (set_breakpoint_at): Update handler type.
11544 (reinsert_breakpoint_handler): Return 1 instead of calling
11546 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11548 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11549 * mem-break.h (set_breakpoint_at): Update handler type.
11550 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11551 * win32-low.c (auto_delete_breakpoint): New.
11552 (get_child_debug_event): Use it.
11554 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11556 * configure.ac: Check for pread and pwrite.
11557 * hostio.c (handle_pread): Fall back to lseek and read.
11558 (handle_pwrite): Fall back to lseek and write.
11559 * config.in, configure: Regenerated.
11561 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11563 * server.c (myresume): Add own_buf argument.
11564 (main): Update calls.
11566 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11568 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11569 * remote-utils.c (remote_open): Do not call disable_async_io.
11570 (block_async_io): Delete.
11571 (unblock_async_io): Make static.
11572 (initialize_async_io): New.
11573 * server.c (handle_v_cont): Handle async I/O here.
11574 (myresume): Likewise. Move other common resume tasks here...
11575 (main): ... from here. Call initialize_async_io. Disable async
11576 I/O before the main loop.
11577 * server.h (initialize_async_io): Declare.
11578 (block_async_io, unblock_async_io): Delete prototypes.
11579 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11581 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11583 * remote-utils.c (readchar): Allow binary data in received messages.
11585 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11587 * win32-low.c (attaching): New global.
11588 (win32_create_inferior): Clear the `attaching' global.
11589 (win32_attach): Set the `attaching' global.
11590 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11591 attaching. Only set a breakpoint at the entry point if not
11594 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11596 * server.c (main): Don't report dll events on the initial
11597 connection on attaches.
11599 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11601 * server.c (main): Relax numerical bases supported for the pid of
11602 the --attach command line argument.
11604 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11606 * win32-low.c (win32_attach): Call OpenProcess before
11607 DebugActiveProcess, not after. Add last error output to error
11610 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11612 * win32-low.c (win32_get_thread_context)
11613 (win32_set_thread_context): New functions.
11614 (thread_rec): Use win32_get_thread_context.
11615 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11616 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11619 2007-12-03 Leo Zayas
11620 Pedro Alves <pedro_alves@portugalmail.pt>
11622 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11624 (child_add_thread): Minor cleanup.
11625 (child_continue): Resume artificially suspended threads before
11626 calling ContinueDebugEvent.
11627 (suspend_one_thread): New.
11628 (fake_breakpoint_event): New.
11629 (get_child_debug_event): Change return type to int. Check here if
11630 gdb sent an interrupt request. If a soft interrupt was requested,
11631 fake a breakpoint event. Return 0 if there is no event to handle,
11633 (win32_wait): Don't check here if gdb sent an interrupt request.
11634 Ensure there is a valid event to handle.
11635 (win32_request_interrupt): Add soft interruption method as last
11638 2007-12-03 Leo Zayas
11639 Pedro Alves <pedro_alves@portugalmail.pt>
11641 * win32-low.h (win32_thread_info): Add descriptions to the
11642 structure members. Replace `suspend_count' counter by a
11644 * win32-low.c (thread_rec): Update condition of when to get the
11645 context from the inferior. Rely on ContextFlags being set if it
11646 has already been retrieved. Only suspend the inferior thread if
11647 we haven't already. Warn if that fails.
11648 (continue_one_thread): s/suspend_count/suspended/. Only call
11649 ResumeThread once. Warn if that fails.
11651 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11653 * win32-low.c (win32_wait): Don't read from the inferior when it
11654 has already exited.
11656 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11658 * Makefile.in (win32_low_h): New variable.
11659 (win32-low.o): Add dependency on $(win32_low_h).
11660 (win32-arm-low.o, win32-i386-low.o): New rules.
11662 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11664 * hostio.c: Correct copyright year.
11666 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11668 * Makefile.in (OBS): Add hostio.o.
11669 (hostio.o): New rule.
11670 * server.h (handle_vFile): Declare.
11671 * hostio.c: New file.
11672 * server.c (handle_v_requests): Take packet_len and new_packet_len
11673 for binary packets. Call handle_vFile.
11674 (main): Update call to handle_v_requests.
11676 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11678 * linux-low.c: Include <sched.h>.
11680 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11682 * linux-low.c (linux_tracefork_grandchild): New.
11683 (linux_tracefork_child): Use clone.
11684 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11686 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11688 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11690 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11692 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11694 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11696 * inferiors.c (change_inferior_id): Delete.
11697 (add_pid_to_list, pull_pid_from_list): New.
11698 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11699 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11700 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11701 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11702 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11703 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11704 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11705 (using_threads): Always set to 1.
11706 (handle_extended_wait): New.
11707 (add_process): Do not set TID.
11708 (linux_create_inferior): Set must_set_ptrace_flags.
11709 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11710 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11711 (linux_thread_alive): Rename TID argument to LWPID.
11712 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11713 (linux_wait_for_event): Do not use TID or check using_threads. Update
11714 call to dead_thread_notify. Call handle_extended_wait.
11715 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11716 (send_sigstop): Delete sigstop_sent.
11717 (wait_for_sigstop): Avoid TID.
11718 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11719 (linux_test_for_tracefork): New.
11720 (linux_lookup_signals): Use thread_db_active and
11721 linux_supports_tracefork_flag.
11722 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11723 * linux-low.h (get_process_thread): Avoid TID.
11724 (struct process_ifo): Move thread_known and tid to the end. Remove
11726 (linux_attach_lwp, thread_db_init): Update prototypes.
11727 * server.h (change_inferior_id): Delete prototype.
11728 (add_pid_to_list, pull_pid_from_list): New prototypes.
11729 * thread-db.c (thread_db_use_events): New.
11730 (find_first_thread): Rename to...
11731 (find_one_thread): ...this. Update callers and messages. Do not
11732 call fatal. Check thread_db_use_events. Do not call
11733 change_inferior_id or new_thread_notify.
11734 (maybe_attach_thread): Update. Do not call new_thread_notify.
11735 (thread_db_init): Set thread_db_use_events. Check use_events.
11736 * utils.c (fatal, warning): Correct message prefix.
11738 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11740 * Makefile.in (clean): Remove new files.
11741 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11742 (powerpc-64.o, powerpc-64.c): New rules.
11743 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11744 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11746 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11748 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11749 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11750 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11751 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11752 (target_regsets): Add AltiVec and SPE register sets.
11753 * configure.ac: Check for AltiVec and SPE.
11754 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11755 (ppc_fill_vrregset, ppc_store_vrregset): New.
11756 (target_regsets): Add AltiVec register set.
11757 * configure: Regenerated.
11759 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11761 * linux-low.c (O_LARGEFILE): Define.
11762 (linux_read_memory): Use /proc/PID/mem.
11763 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11764 * configure, config.in: Regenerated.
11766 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11768 * linux-low.c (linux_wait_for_event): Do not pass signals while
11771 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11773 * win32-low.c (create_process): New.
11774 (win32_create_inferior): Use create_process instead of
11775 CreateProcess. If create_process failed retry appending an ".exe"
11776 suffix. Store the GetLastError result immediatelly after
11777 create_process calls and use it on the call to error.
11779 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11781 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11783 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11785 * configure.ac: Switch license to GPLv3.
11787 2007-08-01 Michael Snyder <msnyder@access-company.com>
11789 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11791 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11793 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11795 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11796 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11797 CloseToolhelp32Snapshot.
11798 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11799 CloseToolhelp32Snapshot.
11801 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11803 * server.c (main): Check for inferior exit before main loop.
11805 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11807 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11808 instead of on tmp_desc.
11810 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11811 Daniel Jacobowitz <dan@codesourcery.com>
11813 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11814 (add_thread): Minor cleanups.
11815 (clear_inferiors): Move lower in the file. Clear the DLL
11817 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11818 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11819 (xml_escape_text): New.
11820 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11822 (handle_v_cont): Report errors.
11823 (gdbserver_version): Update.
11824 (main): Correct size of own_buf. Do not report initial DLL events.
11825 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11826 (unloaded_dll, xml_escape_text): New.
11827 * win32-low.c (enum target_waitkind): Update comments.
11828 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11829 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11830 (win32_EnumProcessModules, win32_GetModuleInformation)
11831 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11832 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11833 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11834 (win32_Module32First, win32_Module32Next, load_toolhelp)
11835 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11836 (get_child_debug_event): Handle DLL events.
11837 (win32_wait): Likewise.
11839 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11841 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11842 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11844 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11846 * win32-low.c (handle_output_debug_string): Ignore event if not
11849 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11851 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11853 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11855 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11857 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11859 * inferiors.c (change_inferior_id): Add comment.
11860 * linux-low.c (check_removed_breakpoint): Add an early
11861 prototype. Improve debug output.
11862 (linux_attach): Doc update.
11863 (linux_detach_one_process, linux_detach): Clean up before releasing
11865 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11866 * linux-low.h (struct process_info): Doc improvement.
11867 * mem-break.c (delete_all_breakpoints): New.
11868 * mem-break.h (delete_all_breakpoints): New prototype.
11869 * thread-db.c (find_first_thread): New.
11870 (thread_db_create_event): Call it instead of
11871 thread_db_find_new_threads. Clean up unused variables.
11872 (maybe_attach_thread): Remove first thread handling.
11873 (thread_db_find_new_threads): Use find_first_thread.
11874 (thread_db_get_tls_address): Likewise.
11876 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11878 * thread-db.c (thread_db_find_new_threads): Add prototype.
11879 (thread_db_create_event): Check for the main thread before adding
11881 (maybe_attach_thread): Only enable event reporting if TID == 0.
11882 (thread_db_get_tls_address): Check for new threads.
11884 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11886 * linux-low.c (linux_create_inferior): Try execv before execvp.
11887 * spu-low.c (spu_create_inferior): Likewise.
11889 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11891 * linux-low.c (linux_create_inferior): Change execv to execvp.
11892 * spu-low.c (spu_create_inferior): Likewies.
11894 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11896 * Makefile.in (clean): Clean new files instead of deleted ones.
11897 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11898 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11900 * configure.srv: Specify XML files and new regformats for MIPS and
11902 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11903 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11904 an entry for the restart register.
11905 (mips_cannot_fetch_register, mips_cannot_store_register)
11906 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11907 register names to match the XML descriptions.
11908 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11909 restart register instead of $0.
11911 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11912 Markus Deuling <deuling@de.ibm.com>
11914 * remote-utils.c (decode_xfer_write): New function.
11915 * server.h (decode_xfer_write): Add prototype.
11916 * server.c (handle_query): Add PACKET_LEN argument. Support
11917 qXfer:spu:read and qXfer:spu:write packets.
11918 (main): Pass packet_len to handle_query.
11919 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11920 * target.h (target_ops): Add qxfer_spu.
11922 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11924 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11925 accessing non-seekable spufs files.
11927 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11929 * server.c (handle_query): Add reply for qC packet.
11931 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11932 Leo Zayas <lerele@champenstudios@com>
11934 * server.h (check_remote_input_interrupt_request): New function.
11935 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11936 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11937 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11938 (check_remote_input_interrupt_request): New function.
11939 * server.h (check_remote_input_interrupt_request): Declare.
11940 * win32-low.c (winapi_DebugBreakProcess,
11941 winapi_GenerateConsoleCtrlEvent): New typedefs.
11942 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11944 (win32_wait): Check for remote interrupt request
11945 with check_remote_input_interrupt_request.
11946 (win32_request_interrupt): New function.
11947 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11949 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11951 * win32-low.c (debug_registers_changed,
11952 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11953 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11954 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11955 (thread_rec): Get context using the low target.
11956 (child_add_thread): Call thread_added on the low target,
11957 which does the same thing.
11959 (do_initial_child_stuff): Remove debug registers references.
11960 Set context using the low target. Resume threads after
11961 setting the contexts.
11962 (child_continue): Remove dead variable. Remove debug
11963 registers references.
11964 (child_fetch_inferior_registers): Go through the low target.
11965 (do_child_store_inferior_registers): Remove.
11966 (child_store_inferior_registers): Go through the low target.
11967 (win32_resume): Remove debug registers references.
11968 Set context using the low target.
11969 (handle_exception): Change return type to void. Don't record
11970 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11971 first chance exception.
11972 (get_child_debug_event): Change return type to void. Remove
11973 goto loop. Always return after waiting for debug event.
11974 (win32_wait): Convert to switch statement. Handle spurious
11977 * win32-i386-low.c (debug_registers_changed,
11978 debug_registers_used): New.
11979 (initial_stuff): Rename to ...
11980 (i386_initial_stuff): ... this. Clear debug registers
11982 (store_debug_registers): Delete.
11983 (i386_get_thread_context): New.
11984 (load_debug_registers): Delete.
11985 (i386_set_thread_context): New.
11986 (i386_thread_added): New.
11987 (single_step): Rename to ...
11988 (i386_single_step): ... this.
11989 (do_fetch_inferior_registers): Rename to ...
11990 (i386_fetch_inferior_register): ... this.
11991 (i386_store_inferior_register): New.
11992 (the_low_target): Adapt to new interface.
11994 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11995 (arm_get_thread_context): New.
11996 (arm_set_thread_context): New.
11998 (do_fetch_inferior_registers): Rename to ...
11999 (arm_fetch_inferior_register): ... this.
12000 (arm_store_inferior_register): New.
12001 (arm_wince_breakpoint): Reimplement as unsigned long.
12002 (arm_wince_breakpoint_len): Define.
12003 (the_low_target): Adapt to new interface.
12005 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12006 load_debug_registers. Add get_thread_context, set_thread_context,
12007 thread_added and store_inferior_register. Rename
12008 fetch_inferior_registers to fetch_inferior_register.
12009 (regptr): Remove declaration.
12011 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12013 * linux-low.c (linux_detach): Change return type to int. Return 0.
12014 * spu-low.c (spu_detach): Likewise.
12016 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12018 * target.h (target_ops): Change return type of detach to int.
12020 (join_inferior): New.
12021 * server.c (main): Don't skip detach support on mingw32.
12022 If the inferior doesn't support detaching return error.
12023 Call join_inferior instead of using waitpid.
12024 * linux-low.c (linux_join): New.
12025 (linux_target_op): Add linux_join.
12026 * spu-low.c (spu_join): New.
12027 (spu_target_ops): Add spu_join.
12028 * win32-low.c (win32_detach): Adapt to new interface.
12029 Reopen current_process_handle before detaching. Issue a child
12030 resume before detaching.
12032 (win32_target_op): Add win32_join.
12034 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12036 * win32-low.c (win32-attach): Fix return value.
12037 * target.h (target_ops): Describe ATTACH return values.
12039 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12041 * win32-low.c (GETPROCADDRESS): Define.
12042 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12043 (winapi_DebugSetProcessKillOnExit): Likewise.
12044 (win32_create_inferior): Force usage of ansi CreateProcessA.
12045 (win32_attach): Use GETPROCADDRESS.
12046 (win32_detach): Likewise.
12048 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12050 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12052 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12054 * win32-low.c: Commit leftover changes from 2007-03-29.
12056 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12058 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12059 fields short instead of int. Add explicit padding.
12060 (i387_cache_to_fsave): Remove unnecessary casts.
12061 (i387_fsave_to_cache): Doc fix.
12062 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12064 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12066 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12067 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12069 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12071 * configure.srv (arm*-*-mingw32ce*): Move near the other
12074 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12076 * configure.ac: Add errno checking.
12077 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12078 sys/file.h and malloc.h.
12079 (AC_CHECK_DECLS): Add perror.
12080 (srv_mingwce): Handle.
12081 * configure.srv (i[34567]86-*-cygwin*): Add
12082 win32-i386-low.o to srv_tgtobj.
12083 (i[34567]86-*-mingw*): Likewise.
12084 (arm*-*-mingw32ce*): Add case.
12085 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12086 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12087 [__MINGW32CE__] (strerror): New function.
12088 [__MINGW32CE__] (errno): Define to GetLastError.
12089 [__MINGW32CE__] (COUNTOF): New macro.
12090 (remote_open): Remove extra close call.
12091 * mem-break.c (delete_breakpoint_at): New function.
12092 * mem-break.h (delete_breakpoint_at): Declare.
12093 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12094 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12095 [USE_WIN32API] (read, write): Add char* casts.
12096 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12097 * server.h: Include wincecompat.h on Windows CE.
12098 [HAVE_ERRNO_H]: Check.
12099 (perror): Declare if not declared.
12100 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12101 (perror_with_name): Remove errno declaration.
12102 * wincecompat.h: New.
12103 * wincecompat.c: New.
12104 * win32-low.h: New.
12105 * win32-arm-low.c: New.
12106 * win32-i386-low.c: New.
12107 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12108 (OUTMSG2): Make it safe.
12110 (COUNTOF): New macro.
12111 (NUM_REGS): Get it from the low target.
12112 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12113 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12114 (thread_rec): Let low target handle debug registers.
12115 (child_add_thread): Likewise.
12116 (child_init_thread_list): Likewise.
12117 (continue_one_thread): Likewise.
12119 (do_child_fetch_inferior_registers): Move to ...
12120 * win32-i386-low.c: ... here, and rename to ...
12121 (do_fetch_inferior_registers): ... this.
12122 * win32-low.c (child_fetch_inferior_registers):
12123 Go through the low target.
12124 (do_child_store_inferior_registers): Use regptr.
12125 (strwinerror): New function.
12126 (win32_create_inferior): Handle Windows CE.
12127 Use strwinerror instead of strerror on Windows error
12128 codes. Add program to the error output.
12129 Don't close the main thread handle on Windows CE.
12130 (win32_attach): Use coredll.dll on Windows CE.
12131 (win32_kill): Close current process and current
12133 (win32_detach): Use coredll.dll on Windows CE.
12134 (win32_resume): Let low target handle debug registers, and
12136 (handle_exception): Add/Remove initial breakpoint. Avoid
12137 non-existant WSTOPSIG on Windows CE.
12138 (win32_read_inferior_memory): Cast to remove warning.
12139 (win32_arch_string): Go through the low target.
12140 (initialize_low): Call set_breakpoint_data with the low
12141 target's breakpoint.
12142 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12143 FOP_REGNUM, mappings): Move to ...
12144 * win32-i386-low.c: ... here.
12145 * win32-low.c (win32_thread_info): Move to ...
12146 * win32-low.h: ... here.
12147 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12148 win32-arm-low.c and wincecompat.c.
12149 (all:): Add $EXEEXT.
12150 (install-only:): Likewise.
12151 (gdbserver:): Likewise.
12152 (gdbreplay:): Likewise.
12153 * config.in: Regenerate.
12154 * configure: Regenerate.
12156 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12158 * win32-low.c: Rename typedef thread_info to
12159 win32_thread_info throughout.
12161 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12163 * win32-i386-low.c: Rename to ...
12164 * win32-low.c: ... this.
12165 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12166 * Makefile.in: Likewise.
12168 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12170 * remote-utils.c (monitor_output): Constify msg parameter.
12171 * server.h (monitor_output): Likewise.
12172 * win32-i386-low.c (handle_output_debug_string): New.
12173 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12174 handle_output_debug_string.
12175 (get_child_debug_event): Likewise.
12177 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12179 * server.c (main): Correct strtoul check.
12181 2007-03-27 Jon Ringle <jon@ringle.org>
12183 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12185 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12187 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12189 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12191 * terminal.h: Check HAVE_SGTTY_H.
12193 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12195 * remote-utils.c (remote_open): Print out the assigned port number.
12197 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12199 * remote-utils.c (monitor_output): New function.
12200 * server.c (debug_threads): Define here.
12201 (monitor_show_help): New function.
12202 (handle_query): Handle qRcmd.
12203 (main): Do not handle 'd' packet.
12204 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12205 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12208 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12210 * Makefile.in (EXEEXT): New.
12211 (clean): Use $(EXEEXT).
12213 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12215 * target.h (target_ops): Rename send_signal to request_interrupt,
12216 and remove enum target_signal parameter.
12217 * linux-low.c (linux_request_interrupt): Rename from
12218 linux_send_signal, and always send SIGINT.
12219 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12220 and always send SIGINT.
12221 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12223 (input_interrupt): Likewise.
12225 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12227 * server.c (get_features_xml): Check if target implemented
12229 * win32-i386-low.c (win32_arch_string): New.
12230 (win32_target_ops): Add win32_arch_string as arch_string member.
12232 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12234 * spu-low.c (spu_arch_string): New.
12235 (spu_target_ops): Add spu_arch_string.
12237 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12239 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12240 * configure.ac: Do not check for terminal.h.
12241 * configure, config.in: Regenerated.
12243 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12245 * Makefile.in (OBS): Add $(XML_BUILTIN).
12246 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12248 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12249 (arm-with-iwmmxt.c): New.
12250 * config.in, configure: Regenerate.
12251 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12252 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12253 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12254 (arm*-*-linux*): Add iWMMXt and regset support.
12255 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12256 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12257 (arm_store_wmmxregset, target_regsets): New.
12258 * server.c (get_features_xml): Take annex argument. Check builtin
12260 (handle_query): Handle multiple annexes.
12262 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12264 * remote-utils.c [USE_WIN32API] (read, write): Define.
12265 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12268 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12270 * linux-i386-low.c (the_low_target): Set arch_string.
12271 * linux-x86-64-low.c (the_low_target): Likewise.
12272 * linux-low.c (linux_arch_string): New.
12273 (linux_target_ops): Add it.
12274 * linux-low.h (struct linux_target_ops): Add arch_string.
12275 * server.c (write_qxfer_response): Use const void * for DATA.
12276 (get_features_xml): New.
12277 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12278 * target.h (struct target_ops): Add arch_string method.
12280 2007-01-03 Denis Pilat <denis.pilat@st.com>
12281 Daniel Jacobowitz <dan@codesourcery.com>
12283 * linux-low.c (linux_kill): Handle being called with no threads.
12284 * win32-i386-low.c (win32_kill): Likewise.
12285 (get_child_debug_event): Clear current_process_handle.
12287 2006-12-30 Denis PILAT <denis.pilat@st.com>
12288 Daniel Jacobowitz <dan@codesourcery.com>
12290 * remote-utils.c (remote_open): Check the type of specified
12291 serial port devices before opening them.
12292 * server.c (main): Kill the inferior if an error occurs during
12293 the first remote_open.
12295 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12297 * README: Update supported targets.
12299 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12301 * Makefile.in (clean): Remove reg-mips64.c.
12302 (reg-mips64.c, reg-mips64.o): New rules.
12303 * configure.srv: Handle mips64. Include regset support for mips.
12304 * linux-mips-low.c (union mips_register): New.
12305 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12306 (mips_breakpoint, mips_breakpoint_at): Use int.
12307 (mips_collect_register, mips_supply_register)
12308 (mips_collect_register_32bit, mips_supply_register_32bit)
12309 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12310 (mips_store_fpregset, target_regsets): New.
12311 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12313 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12315 * configure.srv: Add target "spu*-*-*".
12316 * Makefile.in (clean): Remove reg-spu.c.
12317 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12318 * spu-low.c: New file.
12320 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12322 * configure.ac: Correct td_thr_tls_get_addr test.
12323 * configure: Regenerated.
12325 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12327 * linux-low.c (linux_wait_for_event): Reformat. Use the
12328 pass_signals array.
12329 * remote-utils.c (decode_address_to_semicolon): New.
12330 * server.c (pass_signals, handle_general_set): New.
12331 (handle_query): Mention QPassSignals for qSupported.
12332 (main): Call handle_general_set.
12333 * server.h (pass_signals, decode_address_to_semicolon): New.
12335 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12337 * server.c (handle_query): Correct error handling for read_auxv.
12339 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12341 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12342 and srv_linux_thread_db to yes.
12343 * linux-s390-low.c (s390_fill_gregset): New function.
12344 (target_regsets): Define data structure.
12346 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12348 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12349 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12350 * config.in, configure: Regenerated.
12351 * inferiors.c (gdb_id_to_thread): New function.
12352 (gdb_id_to_thread_id): Use it.
12353 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12354 * linux-low.h (struct process_info): Add th member.
12355 (thread_db_get_tls_address): New prototype.
12356 * remote-utils.c (decode_address): Make non-static.
12357 * server.c (handle_query): Handle qGetTLSAddr.
12358 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12359 * target.h (struct target_ops): Add get_tls_address.
12360 * thread-db.c (maybe_attach_thread): Save the thread handle.
12361 (thread_db_get_tls_address): New.
12363 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12365 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12366 (linux_resume_one_process): Take a siginfo_t *. Update all
12367 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12368 (struct pending_signals): Add a siginfo_t.
12369 (linux_wait_for_process): Always set last_status.
12370 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12371 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12372 * linux-low.h (struct process_info): Add last_status.
12374 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12376 * remote-utils.c (try_rle): New function.
12377 (putpkt_binary): Use it.
12379 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12381 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12382 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12383 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12384 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12385 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12388 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12390 * server.c (terminal_fd): New variable.
12391 (old_foreground_pgrp): Likewise.
12392 (restore_old_foreground_pgrp): New function.
12393 (start_inferior): Record the terminal file descriptor in terminal_fd
12394 and its original foreground group in old_foreground_pgrp. Register
12395 restore_old_foreground_pgrp with atexit().
12397 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12399 * server.c (handle_query): Correct qPart to qXfer.
12401 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12403 * configure.ac: Check for more headers which are missing on
12404 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12405 * configure.srv: Add Cygwin and mingw32.
12406 * remote-utils.c: Don't include headers unconditionally which
12407 are missing on mingw32. Include <winsock.h> for mingw32.
12408 (remote_open): Adjust for mingw32 support. Flush
12409 standard error after writing to it.
12410 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12411 (unblock_async_io, enable_async_io, disable_async_io)
12412 (readchar, getpkt): Update for Winsock support.
12413 (prepare_resume_reply): Expect a protocol signal number.
12414 * server.c: Disable <sys/wait.h> on mingw32.
12415 (start_inferior): Adjust for mingw32 support. Flush
12416 standard error after writing to it.
12417 (attach_inferior): Likewise. Use protocol signal
12419 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12421 * win32-i386-low.c: New file.
12422 * Makefile.in (XM_CLIBS): Set.
12423 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12424 (win32-i386-low.o): New dependency rule.
12425 * linux-low.c (linux_wait): Use target signal numbers.
12426 * target.h (struct target_ops): Doc fix.
12427 * server.h (target_signal_to_name): New prototype.
12428 * gdbreplay.c: Don't include headers unconditionally which
12429 are missing on mingw32. Include <winsock.h> for mingw32.
12430 (remote_close, remote_open): Adjust for Winsock support.
12431 * configure, config.in: Regenerated.
12433 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12435 * server.c (decode_xfer_read, write_qxfer_response): New.
12436 (handle_query): Take a packet length argument. Handle
12437 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12438 the qSupported response.
12439 (main): Update call to handle_query.
12441 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12443 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12444 (putpkt_binary): Renamed from putpkt and adjusted for binary
12446 (putpkt): New wrapper for putpkt_binary.
12447 (readchar): Don't mask off the high bit.
12448 (decode_X_packet): New function.
12449 * server.c (main): Call putpkt_binary if a handler sets the packet
12450 length. Save the length of the incoming packet. Handle 'X'.
12451 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12453 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12455 * server.c (handle_query): Handle qSupported.
12457 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12459 * remote-utils.c (all_symbols_looked_up): New variable.
12460 (look_up_one_symbol): Check it.
12461 * server.h (look_up_one_symbol): New declaration.
12462 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12464 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12466 * Makefile.in (linux-arm-low.o): Update dependencies.
12467 * linux-arm-low.c: Include "gdb_proc_service.h".
12468 (PTRACE_GET_THREAD_AREA): Define.
12469 (ps_get_thread_area): New function.
12471 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12473 * configure.srv (m68k*-*-uclinux*): New target.
12474 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12475 (linux_resume_one_process): Remove extraneous cast.
12476 (linux_read_offsets): New.
12477 (linux_target_op): Add linux_read_offsets on mmuless systems.
12478 * server.c (handle_query): Add qOffsets logic.
12479 * target.h (struct target_ops): Add read_offsets.
12481 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12483 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12484 (PTRACE_GET_THREAD_AREA): Define.
12485 (ps_get_thread_area): New function.
12486 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12487 (linux-x86-64-low.o): Update.
12489 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12491 * configure.ac: Remove checks for prfpregset_t.
12492 * gdb_proc_service.h: New file.
12493 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12494 new "gdb_proc_service.h".
12495 * proc-service.c: Likewise.
12496 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12497 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12498 * Makefile.in (gdb_proc_service_h): Updated.
12499 * configure, config.in: Regenerated.
12501 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12503 * remote-utils.c (prepare_resume_reply): Move declaration
12504 of gdb_id_from_wait to the top of the block.
12506 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12508 * linux-low.c (regsets_store_inferior_registers): Read the regset
12509 from the target before filling it.
12511 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12513 * server.c (attach_inferior): Return SIGTRAP for a successful
12516 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12518 * Makefile.in (OBS): Add version.o.
12519 (STAGESTUFF): Delete.
12520 (version.o): Add dependencies.
12521 (version.c): Replace rule.
12522 (clean): Remove version.c.
12523 * server.c (gdbserver_version): New.
12524 (gdbserver_usage): Use printf.
12525 (main): Handle --version and --help.
12526 * server.h (version, host_name): Add declarations.
12528 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12540 * linux-x86-64-low.c:
12542 * linux-s390-low.c:
12543 * linux-ppc64-low.c:
12545 * linux-mips-low.c:
12546 * linux-m68k-low.c:
12547 * linux-m32r-low.c:
12550 * linux-ia64-low.c:
12551 * linux-i386-low.c:
12552 * linux-crisv32-low.c:
12564 * gdbserver.1: Add (C) after Copyright. Update the FSF
12567 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12569 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12570 (arm_breakpoint_at): Recognize both breakpoints.
12571 (the_low_target): Use the correct breakpoint instruction.
12573 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12575 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12576 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12577 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12578 (the_low_target): Update.
12580 2005-10-25 Andreas Schwab <schwab@suse.de>
12582 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12584 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12585 (ia64_num_regs): Reduce to 462.
12587 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12589 * acinclude.m4: Correct quoting.
12590 * aclocal.m4: Regenerated.
12592 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12593 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12594 (thread_db_init): Call thread_db_err_str.
12595 * configure.ac: Check for TD_VERSION.
12596 * config.in, configure: Regenerated.
12598 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12600 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12602 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12604 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12605 is not available. Define HAVE_PTRACE_GETREGS if it is.
12606 * config.in, configure: Regenerated.
12607 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12608 * linux-i386-low.c, linux-m68k-low.c: Update to use
12609 HAVE_PTRACE_GETREGS.
12610 * linux-low.c (regsets_fetch_inferior_registers)
12611 (regsets_store_inferior_registers): Only return 0 if we processed
12613 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12614 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12616 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12618 * inferiors.c (struct thread_info): Add gdb_id.
12619 (add_thread): Add gdb_id argument.
12620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12621 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12622 calls to add_thread.
12623 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12624 * server.c (handle_query): Use thread_to_gdb_id.
12625 (handle_v_cont, main): Use gdb_id_to_thread_id.
12626 * server.h (add_thread): Update prototype.
12627 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12630 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12632 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12633 left-padded registers.
12634 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12635 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12637 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12639 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12640 * configure: Regenerate.
12641 * config.in: Regenerate.
12642 * server.h (NEED_DECLARATION_STRERROR):
12643 Replace with !HAVE_DECL_STRERROR.
12645 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12647 * linux-low.c (linux_wait, linux_send_signal): Don't test
12648 an unsigned long variable for > 0 if it could be MAX_ULONG.
12649 * server.c (myresume): Likewise.
12650 * target.c (set_desired_inferior): Likewise.
12652 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12654 * configure.ac: Simplify and improve check for socklen_t.
12655 * configure, config.in: Regenerate.
12657 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12659 * acconfig.h: Remove.
12660 * configure.ac: Add a test for socklen_t. Use three-argument
12661 AC_DEFINE throughout.
12662 * config.in: Regenerated using autoheader 2.59.
12663 * configure: Regenerated.
12665 * gdbreplay.c (socklen_t): Provide a default.
12666 (remote_open): Use socklen_t.
12667 * remote-utils.c (socklen_t): Provide a default.
12668 (remote_open): Use socklen_t.
12669 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12672 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12674 * linux-low.c (linux_read_memory, linux_write_memory)
12675 (linux_read_auxv): Likewise.
12676 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12677 (check_mem_write): Likewise.
12678 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12680 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12681 (registers_from_string, register_data): Likewise.
12682 * server.c (handle_query, main): Likewise.
12683 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12684 (decode_M_packet): Likewise.
12685 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12686 * target.h (struct target_ops): Update read_memory, write_memory,
12688 (read_inferior_memory, write_inferior_memory): Update.
12689 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12690 to unsigned char *.
12691 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12692 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12693 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12694 linux-s390-low.c, linux-sh-low.c: Update for changes in
12695 read_inferior_memory and the_low_target->breakpoint.
12697 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12699 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12700 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12701 * configure.srv: Add powerpc64-*-linux*.
12702 * linux-ppc64-low.c: New file.
12704 2005-05-23 Orjan Friberg <orjanf@axis.com>
12706 * linux-cris-low.c: New file with support for CRIS.
12707 * linux-crisv32-low.c: Ditto for CRISv32.
12708 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12709 (clean): Add reg-cris.c and reg-crisv32.c.
12710 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12711 reg-crisv32.o, and reg-crisv32.c to make rules.
12712 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12713 recognized targets.
12715 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12717 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12718 of sizeof (PTRACE_XFER_TYPE).
12719 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12721 2005-05-12 Orjan Friberg <orjanf@axis.com>
12723 * target.h (struct target_ops): Add insert_watchpoint,
12724 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12725 pointers for hardware watchpoint support.
12726 * linux-low.h (struct linux_target_ops): Ditto.
12727 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12728 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12729 to linux_target_ops.
12730 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12732 * server.c (main): Recognize 'Z' and 'z' packets.
12734 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12736 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12737 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12738 (the_low_target): Add new members.
12740 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12742 * proc-service.c (ps_lgetregs): Search all_processes instead of
12745 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12747 * server.c (start_inferior): Change return type to int.
12748 (attach_inferior): Change sigptr to int *.
12749 (handle_v_cont, handle_v_requests): Change signal to int *.
12750 (main): Change signal to int.
12752 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12754 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12755 * configure.srv: Add m32r*-*-linux*.
12756 * linux-m32r-low.c: New file.
12758 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12760 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12762 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12764 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12765 Take unsigned long arguments for PIDs.
12766 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12767 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12768 (wait_for_sigstop, linux_resume_one_process)
12769 (regsets_fetch_inferior_registers, linux_send_signal)
12770 (linux_read_auxv): Likewise. Update the types of variables holding
12771 PIDs. Update format string specifiers.
12772 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12773 * remote-utils.c (prepare_resume_reply): Likewise.
12774 * server.c (cont_thread, general_thread, step_thread)
12775 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12777 (handle_query): Update format specifiers.
12778 (handle_v_cont, main): Use strtoul for thread IDs.
12779 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12780 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12781 (general_thread, step_thread, thread_from_wait)
12782 (old_thread_from_wait): Update.
12783 * target.h (struct thread_resume): Use unsigned long for THREAD.
12784 (struct target_ops): Use unsigned long for arguments to attach and
12787 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12789 * acinclude.m4: Include bfd/bfd.m4 directly.
12790 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12791 <agriffis@toolchain.org>.
12792 * aclocal.m4, configure: Regenerated.
12794 2005-01-07 Andrew Cagney <cagney@gnu.org>
12796 * configure.ac: Rename configure.in, require autoconf 2.59.
12797 * configure: Re-generate.
12799 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12801 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12802 LIBS when finished.
12803 * aclocal.m4: Regenerated.
12804 * configure: Regenerated.
12806 2004-11-21 Andreas Schwab <schwab@suse.de>
12808 * linux-m68k-low.c (m68k_num_gregs): Define.
12809 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12810 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12811 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12812 (m68k_breakpoint_at): New. Add to the_low_target.
12814 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12815 srv_linux_thread_db to yes.
12817 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12819 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12820 (ARCH_SET_FS): Likewise.
12821 (ARCH_GET_FS): Likewise.
12822 (ARCH_GET_GS): Likewise.
12824 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12826 * linux-i386-low.c (ps_get_thread_area): New.
12827 * linux-x86-64-low.c (ps_get_thread_area): New.
12828 * linux-low.c: Include <sys/syscall.h>.
12829 (linux_kill_one_process): Don't kill the first thread here.
12830 (linux_kill): Kill the first thread here.
12831 (kill_lwp): New function.
12832 (send_sigstop, linux_send_signal): Use it.
12833 * proc-service.c: Clean up #ifdefs.
12834 (fpregset_info): Delete.
12835 (ps_lgetregs): Update and enable implementation.
12836 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12838 * remote-utils.c (struct sym_cache, symbol_cache): New.
12839 (input_interrupt): Print a clearer message.
12840 (async_io_enabled): New variable.
12841 (enable_async_io, disable_async_io): Use it. Update comments.
12842 (look_up_one_symbol): Use the symbol cache.
12843 * thread-db.c (thread_db_look_up_symbols): New function.
12844 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12846 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12848 * configure.in: Test for -rdynamic.
12849 * configure: Regenerated.
12850 * Makefile (INTERNAL_LDFLAGS): New.
12851 (gdbserver, gdbreplay): Use it.
12853 2004-09-02 Andrew Cagney <cagney@gnu.org>
12855 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12857 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12859 * linux-low.c (linux_wait): Clear all_processes list also.
12861 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12863 * linux-low.c: Include <errno.h>. Remove extern declaration of
12866 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12868 * gdbreplay.c, server.h, utils.c: Update copyright years.
12870 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12872 * server.c (main): Print child status or termination signal from
12873 variable 'signal', not 'sig'.
12875 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12877 * linux-low.c (linux_read_memory): Change return type to
12878 int. Check for and return error from ptrace().
12879 * target.c (read_inferior_memory): Change return type to int. Pass
12880 back return status from the_target->read_memory().
12881 * target.h (struct target_ops): Adapt *read_memory() prototype.
12883 (read_inferior_memory): Adapt prototype.
12884 * server.c (main): Return an error packet if
12885 read_inferior_memory() returns an error.
12887 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12889 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12890 Unify with other clean targets.
12892 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12894 * server.c (handle_v_cont): Call set_desired_inferior.
12896 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12898 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12900 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12902 * linux-low.c (linux_wait): Unblock async I/O.
12903 (linux_resume): Block and enable async I/O.
12904 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12905 * server.h (block_async_io, unblock_async_io): Add prototypes.
12907 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12909 * remote-utils.c (remote_open): Print a status notice after
12910 opening a TCP port.
12911 * server.c (attach_inferior): Print a status notice after
12914 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12916 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12918 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12920 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12922 * server.c, target.h: Update copyright years.
12924 2004-02-25 Roland McGrath <roland@redhat.com>
12926 * target.h (struct target_ops): New member `read_auxv'.
12927 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12928 * linux-low.c (linux_read_auxv): New function.
12929 (linux_target_ops): Initialize `read_auxv' member to that.
12931 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12933 Committed by Jim Blandy <jimb@redhat.com>.
12935 * linux-s390-low.c (s390_num_regs): Update.
12936 (s390_regmap): Remove control registers. Use __s390x__ predefine
12937 instead of GPR_SIZE to distiguish s390 and s390x targets.
12939 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12941 * linux-low.c: Update copyright year.
12942 (check_removed_breakpoint): Clear pending_is_breakpoint.
12943 (linux_set_resume_request, linux_queue_one_thread)
12944 (resume_status_pending_p): New functions.
12945 (linux_continue_one_thread): Use process->resume.
12946 (linux_resume): Only resume threads if there are no pending events.
12947 * linux-low.h (struct process_info): Add resume request
12950 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12952 * regcache.c (new_register_cache): Clear the allocated register
12953 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12955 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12957 * linux-low.c (linux_resume): Take a struct thread_resume *
12959 (linux_wait): Update call.
12960 (resume_ptr): New static variable.
12961 (linux_continue_one_thread): Renamed from
12962 linux_continue_one_process. Use resume_ptr.
12963 (linux_resume): Use linux_continue_one_thread.
12964 * server.c (handle_v_cont, handle_v_requests): New functions.
12965 (myresume): New function.
12966 (main): Handle 'v' case.
12967 * target.h (struct thread_resume): New type.
12968 (struct target_ops): Change argument of "resume" to struct
12970 (myresume): Delete macro.
12972 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12974 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12975 (uninstall): Support DESTDIR.
12977 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12979 * configure.srv: Add xscale*linux copy of arm*linux entry.
12981 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12983 * linux-arm-low.c (arm_reinsert_addr): New function.
12984 (the_low_target): Add arm_reinsert_addr.
12986 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12988 * mem-break.c: Remove whitespace at end of file.
12990 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12992 * configure.in: Check whether we need to prototype strerror.
12993 * server.h: Optionally prototype strerror.
12994 * gdbreplay.c (perror_with_name): Use strerror.
12995 * linux-low.c (linux_attach_lwp): Use strerror.
12996 * utils.c (perror_with_name): Use strerror.
12997 * config.in, configure: Regenerated.
12999 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13001 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13004 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13006 * Makefile.in (SFILES): Update.
13007 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13008 low-sun3.c: Remove files.
13010 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13012 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13013 (linux_detach_one_process, linux_detach): New functions.
13014 (linux_target_ops): Add linux_detach.
13015 * server.c (main): Handle 'D' packet.
13016 * target.h (struct target_ops): Add "detach" member.
13017 (detach_inferior): Define.
13019 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13021 From Kelley Cook <kelleycook@wideopenwest.com>:
13022 * configure.srv: Accept i[34567]86 variants.
13024 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13026 * linux-low.c (linux_wait_for_event): Correct comment typos.
13027 (linux_resume_one_process): Call check_removed_breakpoint.
13028 (linux_send_signal): New function.
13029 (linux_target_ops): Add linux_send_signal.
13030 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13032 * target.h (struct target_ops): Add send_signal.
13034 2003-05-29 Jim Blandy <jimb@redhat.com>
13036 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13037 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13038 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13039 away part of the register's value.
13041 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13043 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13044 (linux_wait_for_event, linux_init_signals): Likewise.
13046 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13048 * configure.in: Check for stdlib.h.
13049 * configure: Regenerated.
13050 * config.in: Regenerated.
13052 2003-01-04 Andreas Schwab <schwab@suse.de>
13054 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13056 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13058 * Makefile.in: Remove obsolete code.
13060 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13062 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13063 defined(PT_FPR0_HI).
13065 2002-11-17 Stuart Hughes <seh@zee2.com>
13067 * linux-arm-low.c (arm_num_regs): Increase.
13068 (arm_regmap): Include status register.
13070 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13072 * linux-low.c (register_addr): Remove incorrect -1 check.
13074 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13076 * linux-low.c (linux_create_inferior): Call setpgid. Return
13078 (unstopped_p, linux_signal_pid): Remove.
13079 (linux_target_ops): Remove linux_signal_pid.
13080 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13081 global instead of target method.
13082 * target.h (struct target_ops): Remove signal_pid. Update comment
13083 for create_inferior.
13084 * server.c (signal_pid): New variable.
13085 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13086 gdbserver. Set the child to be the foreground process group.
13087 (attach_inferior): Set signal_pid.
13089 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13091 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13093 2002-08-20 Jim Blandy <jimb@redhat.com>
13095 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13098 2002-08-01 Andrew Cagney <cagney@redhat.com>
13100 * Makefile.in: Make chill references obsolete.
13102 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13104 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13105 * configure: Regenerate.
13106 * config.in: Regenerate.
13108 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13110 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13111 (perror_with_name, remote_close, remote_open, expect, play): Static.
13113 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13115 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13116 byte offsets instead of an array of indexes.
13117 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13119 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13121 * regcache.c: Add comment.
13123 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13125 * thread-db.c: New file.
13126 * proc-service.c: New file.
13127 * acinclude.m4: New file.
13128 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13129 proc-service.o, and thread-db.o.
13130 (linux-low.o): Add USE_THREAD_DB.
13131 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13132 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13133 * aclocal.m4: Regenerated.
13134 * config.in: Regenerated.
13135 * configure: Regenerated.
13136 * configure.in: Check for proc_service.h, sys/procfs.h,
13137 thread_db.h, and linux/elf.h headrs.
13138 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13139 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13140 Check for -lthread_db and thread support.
13141 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13142 PowerPC, and SuperH.
13143 * i387-fp.c: Constify arguments.
13144 * i387-fp.h: Likewise.
13145 * inferiors.c: (struct thread_info): Renamed from
13146 `struct inferior_info'. Remove PID member. Use generic inferior
13147 list header. All uses updated.
13148 (inferiors, signal_pid): Removed.
13149 (all_threads): New variable.
13150 (get_thread): Define.
13151 (add_inferior_to_list): New function.
13152 (for_each_inferior): New function.
13153 (change_inferior_id): New function.
13154 (add_inferior): Removed.
13155 (remove_inferior): New function.
13156 (add_thread): New function.
13157 (free_one_thread): New function.
13158 (remove_thread): New function.
13159 (clear_inferiors): Use for_each_inferior and free_one_thread.
13160 (find_inferior): New function.
13161 (find_inferior_id): New function.
13162 (inferior_target_data): Update argument type.
13163 (set_inferior_target_data): Likewise.
13164 (inferior_regcache_data): Likewise.
13165 (set_inferior_regcache_data): Likewise.
13166 * linux-low.c (linux_bp_reinsert): Remove.
13167 (all_processes, stopping_threads, using_thrads)
13168 (struct pending_signals, debug_threads, pid_of): New.
13169 (inferior_pid): Replace with macro.
13170 (struct inferior_linux_data): Remove.
13171 (get_stop_pc, add_process): New functions.
13172 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13173 Use add_process and add_thread.
13174 (linux_attach_lwp): New function, based on old linux_attach. Use
13175 add_process and add_thread. Set stop_expected for new threads.
13176 (linux_attach): New function.
13177 (linux_kill_one_process): New function.
13178 (linux_kill): Kill all LWPs.
13179 (linux_thread_alive): Use find_inferior_id.
13180 (check_removed_breakpoints, status_pending_p): New functions.
13181 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13182 Update. Use WNOHANG. Wait for cloned processes also. Update process
13183 struct for the found process.
13184 (linux_wait_for_event): New function.
13185 (linux_wait): Use it. Support LWPs.
13186 (send_sigstop, wait_for_sigstop, stop_all_processes)
13187 (linux_resume_one_process, linux_continue_one_process): New functions.
13188 (linux_resume): Support LWPs.
13189 (REGISTER_RAW_SIZE): Remove.
13190 (fetch_register): Use register_size instead. Call supply_register.
13191 (usr_store_inferior_registers): Likewise. Call collect_register.
13192 Fix recursive case.
13193 (regsets_fetch_inferior_registers): Improve error message.
13194 (regsets_store_inferior_registers): Add debugging.
13195 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13196 (unstopped_p, linux_signal_pid): New functions.
13197 (linux_target_ops): Add linux_signal_pid.
13198 (linux_init_signals): New function.
13199 (initialize_low): Call it. Initialize using_threads.
13200 * regcache.c (inferior_regcache_data): Add valid
13202 (get_regcache): Fetch registers lazily. Add fetch argument
13203 and update all callers.
13204 (regcache_invalidate_one, regcache_invalidate): New
13206 (new_register_cache): Renamed from create_register_cache.
13207 Return the new regcache.
13208 (free_register_cache): Change argument to a void *.
13209 (registers_to_string, registers_from_string): Call get_regcache
13210 with fetch flag set.
13211 (register_data): Make static. Pass fetch flag to get_regcache.
13212 (supply_register): Call get_regcache with fetch flag clear.
13213 (collect_register): Call get_regcache with fetch flag set.
13214 (collect_register_as_string): New function.
13215 * regcache.h: Update.
13216 * remote-utils.c (putpkt): Flush after debug output and use
13218 Handle input interrupts while waiting for an ACK.
13219 (input_interrupt): Use signal_pid method.
13220 (getpkt): Flush after debug output and use stderr.
13221 (outreg): Use collect_register_as_string.
13222 (new_thread_notify, dead_thread_notify): New functions.
13223 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13224 and general_thread.
13225 (look_up_one_symbol): Flush after debug output.
13226 * server.c (step_thread, server_waiting): New variables.
13227 (start_inferior): Don't use signal_pid. Update call to mywait.
13228 (attach_inferior): Update call to mywait.
13229 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13230 (main): Don't fetch/store registers explicitly. Use
13231 set_desired_inferior. Support proposed ``Hs'' packet. Update
13233 * server.h: Update.
13234 (struct inferior_list, struct_inferior_list_entry): New.
13235 * target.c (set_desired_inferior): New.
13236 (write_inferior_memory): Constify.
13237 (mywait): New function.
13238 * target.h: Update.
13239 (struct target_ops): New signal_pid method.
13240 (mywait): Removed macro, added prototype.
13242 * linux-low.h (regset_func): Removed.
13243 (regset_fill_func, regset_store_func): New.
13244 (enum regset_type): New.
13245 (struct regset_info): Add type field. Use new operation types.
13246 (struct linux_target_ops): stop_pc renamed to get_pc.
13247 Add decr_pc_after_break and breakpoint_at.
13248 (get_process, get_thread_proess, get_process_thread)
13249 (strut process_info, all_processes, linux_attach_lwp)
13250 (thread_db_init): New.
13252 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13253 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13254 (the_low_target): Add new members.
13255 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13256 (i386_store_fpxregset): Constify.
13257 (target_regsets): Add new kind identifier.
13258 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13259 (i386_set_pc): Add debugging.
13260 (i386_breakpoint_at): New function.
13261 (the_low_target): Add new members.
13262 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13263 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13264 (mips_breakpoint_at): New.
13265 (the_low_target): Add new members.
13266 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13267 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13268 (the_low_target): Add new members.
13269 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13270 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13271 (the_low_target): Add new members.
13272 * linux-x86-64-low.c (target_regsets): Add new kind
13275 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13277 From Martin Pool <mbp@samba.org>:
13278 * server.c (gdbserver_usage): New function.
13281 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13283 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13284 stop_at -> stop_pc.
13286 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13288 * Makefile.in: Remove obsolete code.
13290 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13292 * linux-low.c (regsets_fetch_inferior_registers),
13293 (regsets_store_inferior_registers): Removed cast to int from
13295 * regcache.h: Added declaration of struct inferior_info.
13297 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13299 * inferiors.c (struct inferior_info): Add regcache_data.
13300 (add_inferior): Call create_register_cache.
13301 (clear_inferiors): Call free_register_cache.
13302 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13303 * regcache.c (struct inferior_regcache_data): New.
13304 (registers): Remove.
13305 (get_regcache): New function.
13306 (create_register_cache, free_register_cache): New functions.
13307 (set_register_cache): Don't initialize the register cache here.
13308 (registers_to_string, registers_from_string, register_data): Call
13310 * regcache.h: Add prototypes.
13311 * server.h: Likewise.
13313 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13315 * mem-break.c: New file.
13316 * mem-break.h: New file.
13317 * Makefile.in: Add mem-break.o rule; update server.h
13319 * inferiors.c (struct inferior_info): Add target_data
13321 (clear_inferiors): Free target_data member if set.
13322 (inferior_target_data, set_inferior_target_data): New functions.
13323 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13324 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13325 * linux-low.c (linux_bp_reinsert): New variable.
13326 (struct inferior_linux_data): New.
13327 (linux_create_inferior): Use set_inferior_target_data.
13328 (linux_attach): Likewise. Call add_inferior.
13329 (linux_wait_for_one_inferior): New function.
13330 (linux_wait): Call it.
13331 (linux_write_memory): Add const.
13332 (initialize_low): Call set_breakpoint_data.
13333 * linux-low.h (struct linux_target_ops): Add breakpoint
13335 * server.c (attach_inferior): Remove extra add_inferior
13337 * server.h: Include mem-break.h. Update inferior.c
13339 * target.c (read_inferior_memory)
13340 (write_inferior_memory): New functions.
13341 * target.h (read_inferior_memory)
13342 (write_inferior_memory): Change macros to prototypes.
13343 (struct target_ops): Update comments. Add const to write_memory
13346 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13348 * linux-low.c (usr_store_inferior_registers): Support
13349 registers which are allowed to fail to store.
13350 * linux-low.h (linux_target_ops): Likewise.
13351 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13352 (ppc_cannot_store_register): FPSCR may not be storable.
13354 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13356 * server.h: Include <string.h> if HAVE_STRING_H.
13357 * ChangeLog: Correct paths in last ChangeLog entry.
13359 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13361 * linux-low.h: Remove obsolete prototypes.
13362 (struct linux_target_ops): New.
13363 (extern the_low_target): New.
13364 * linux-low.c (num_regs, regmap): Remove declarations.
13365 (register_addr): Use the_low_target explicitly.
13366 (fetch_register): Likewise.
13367 (usr_fetch_inferior_registers): Likewise.
13368 (usr_store_inferior_registers): Likewise.
13369 * linux-arm-low.c (num_regs): Remove.
13370 (arm_num_regs): Define.
13371 (arm_regmap): Renamed from regmap, made static.
13372 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13374 (arm_cannot_store_register): Renamed from cannot_store_register,
13376 (the_low_target): New.
13377 * linux-i386-low.c (num_regs): Remove.
13378 (i386_num_regs): Define.
13379 (i386_regmap): Renamed from regmap, made static.
13380 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13382 (i386_cannot_store_register): Renamed from cannot_store_register,
13384 (the_low_target): New.
13385 * linux-ia64-low.c (num_regs): Remove.
13386 (ia64_num_regs): Define.
13387 (ia64_regmap): Renamed from regmap, made static.
13388 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13390 (ia64_cannot_store_register): Renamed from cannot_store_register,
13392 (the_low_target): New.
13393 * linux-m68k-low.c (num_regs): Remove.
13394 (m68k_num_regs): Define.
13395 (m68k_regmap): Renamed from regmap, made static.
13396 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13398 (m68k_cannot_store_register): Renamed from cannot_store_register,
13400 (the_low_target): New.
13401 * linux-mips-low.c (num_regs): Remove.
13402 (mips_num_regs): Define.
13403 (mips_regmap): Renamed from regmap, made static.
13404 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13406 (mips_cannot_store_register): Renamed from cannot_store_register,
13408 (the_low_target): New.
13409 * linux-ppc-low.c (num_regs): Remove.
13410 (ppc_num_regs): Define.
13411 (ppc_regmap): Renamed from regmap, made static.
13412 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13414 (ppc_cannot_store_register): Renamed from cannot_store_register,
13416 (the_low_target): New.
13417 * linux-s390-low.c (num_regs): Remove.
13418 (s390_num_regs): Define.
13419 (s390_regmap): Renamed from regmap, made static.
13420 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13422 (s390_cannot_store_register): Renamed from cannot_store_register,
13424 (the_low_target): New.
13425 * linux-sh-low.c (num_regs): Remove.
13426 (sh_num_regs): Define.
13427 (sh_regmap): Renamed from regmap, made static.
13428 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13430 (sh_cannot_store_register): Renamed from cannot_store_register,
13432 (the_low_target): New.
13433 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13434 (the_low_target): New.
13436 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13438 * Makefile.in: Add stamp-h target.
13439 * configure.in: Create stamp-h.
13440 * configure: Regenerated.
13442 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13444 * inferiors.c: New file.
13445 * target.c: New file.
13446 * target.h: New file.
13447 * Makefile.in: Add target.o and inferiors.o. Update
13449 * linux-low.c (inferior_pid): New static variable,
13450 moved from server.c.
13451 (linux_create_inferior): Renamed from create_inferior.
13452 Call add_inferior. Return 0 on success instead of a PID.
13453 (linux_attach): Renamed from myattach.
13454 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13455 (linux_thread_alive): Renamed from mythread_alive.
13456 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13458 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13459 (regsets_store_inferior_registers): Correct error message.
13460 Add missing ``return 0''.
13461 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13462 (linux_store_registers): Renamed from store_inferior_registers.
13463 (linux_read_memory): Renamed from read_inferior_memory.
13464 (linux_write_memory): Renamed from write_inferior_memory.
13465 (linux_target_ops): New structure.
13466 (initialize_low): Call set_target_ops ().
13467 * remote-utils.c (unhexify): New function.
13468 (hexify): New function.
13469 (input_interrupt): Send signals to ``signal_pid''.
13470 * server.c (inferior_pid): Remove.
13471 (start_inferior): Update create_inferior call.
13472 (attach_inferior): Call add_inferior.
13473 (handle_query): New function.
13474 (main): Call handle_query for `q' packets.
13475 * server.h: Include "target.h". Remove obsolete prototypes.
13476 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13478 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13480 * Makefile.in: Add WARN_CFLAGS. Update configury
13482 * configure.in: Check for <string.h>
13483 * configure: Regenerate.
13484 * config.in: Regenerate.
13485 * gdbreplay.c: Include needed system headers.
13486 (remote_open): Remove strchr prototype.
13487 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13488 * regcache.c (supply_register): Change buf argument to const void *.
13489 (supply_register_by_name): Likewise.
13490 (collect_register): Change buf argument to void *.
13491 (collect_register_by_name): Likewise.
13492 * regcache.h: Add missing prototypes.
13493 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13494 * server.c (handle_query): New function.
13495 (attached): New static variable, moved out of main.
13496 (main): Quiet longjmp clobber warnings.
13497 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13498 * utils.c (error): Remove NORETURN.