1 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3 * tracepoint.c (x_tracepoint_action_download): Change
4 write_inferior_data_ptr to write_inferior_data_pointer.
5 (cmd_qtstart): Likewise.
6 (write_inferior_data_ptr): Remove.
7 (download_agent_expr): Change write_inferior_data_ptr to
8 write_inferior_data_pointer.
9 (download_tracepoint_1): Likewise.
10 (download_tracepoint): Likewise.
11 (download_trace_state_variables): Likewise.
13 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
14 Marcin Kościelnicki <koriakin@0x04.net>
16 * tracepoint.c (struct tracepoint_action_ops): Remove.
17 (struct tracepoint_action): Remove ops.
18 (m_tracepoint_action_download, r_tracepoint_action_download)
19 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
20 size and offset accordingly.
21 (m_tracepoint_action_ops, r_tracepoint_action_ops)
22 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
23 (tracepoint_action_send, tracepoint_action_download): New functions.
24 Helpers for trace action handlers.
25 (add_tracepoint_action): Remove setup actions ops.
26 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
28 2016-02-10 Yao Qi <yao.qi@linaro.org>
30 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
32 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
34 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
36 * configure: Regenerate.
38 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
40 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
42 * linux-low.c (siginfo_fixup): Likewise.
43 (linux_xfer_siginfo): Likewise.
44 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
46 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
48 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
50 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
52 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
54 * linux-x86-low.c [__x86_64__]: Include
55 "nat/amd64-linux-siginfo.h".
56 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
57 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
58 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
59 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
60 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
61 (cpt_si_fd, si_timerid, si_overrun): Move from
62 nat/amd64-linux-siginfo.c.
63 * Makefile.in (amd64-linux-siginfo.o:): New rule.
65 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
67 * server.c (skip_to_semicolon): Remove.
68 (process_point_options): Use strchrnul instead of
71 2016-01-26 Yao Qi <yao.qi@linaro.org>
73 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
74 * linux-low.c (install_software_single_step_breakpoints): Don't
75 call regcache_read_pc.
76 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
79 2016-01-26 Yao Qi <yao.qi@linaro.org>
81 * linux-low.c (install_software_single_step_breakpoints): Call
82 regcache_read_pc instead of get_pc.
84 2016-01-26 Yao Qi <yao.qi@linaro.org>
86 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
87 (unblock_async_io): Rename to ...
88 (block_unblock_async_io): ... it. New function.
89 (enable_async_io): Don't install SIGIO handler. Unblock it
91 (disable_async_io): Don't ignore SIGIO. Block it instead.
92 (initialize_async_io): Install SIGIO handler. Don't call
95 2016-01-26 Yao Qi <yao.qi@linaro.org>
97 * remote-utils.c (getpkt): If the buffer isn't empty, and the
98 first character is '\003', call *the_target->request_interrupt.
100 2016-01-25 Yao Qi <yao.qi@linaro.org>
102 * remote-utils.c (new_thread_notify): Remove.
103 (dead_thread_notify): Likewise.
104 * remote-utils.h (new_thread_notify): Remove declaration.
105 (dead_thread_notify): Likewise.
107 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
109 * gdb.trace/pending.exp: Fix expected message on continue.
111 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
113 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
114 it works properly on big-endian machines where sizeof (CORE_ADDR)
117 2016-01-21 Pedro Alves <palves@redhat.com>
119 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
120 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
121 * configure: Regenerate.
123 2016-01-21 Yao Qi <yao.qi@linaro.org>
125 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
126 is_thumb and set it according to CPSR saved on the stack.
127 (get_next_pcs_syscall_next_pc): Pass is_thumb to
128 arm_sigreturn_next_pc.
130 2016-01-18 Yao Qi <yao.qi@linaro.org>
132 * linux-low.c (linux_set_pc_64bit): New function.
133 (linux_get_pc_64bit): New function.
134 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
136 * linux-sparc-low.c (debug_threads): Remove declaration.
137 (sparc_get_pc): Remove.
138 (the_low_target): Use linux_get_pc_64bit instead of
140 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
141 (the_low_target): Use linux_get_pc_64bit and
144 2016-01-18 Yao Qi <yao.qi@linaro.org>
146 * linux-arm-low.c (debug_threads): Remove declaration.
147 (arm_get_pc, arm_set_pc): Remove.
148 (the_low_target): Use linux_get_pc_32bit and
150 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
151 (the_low_target): Use linux_get_pc_32bit and
153 * linux-cris-low.c (debug_threads): Remove declaration.
154 (cris_get_pc, cris_set_pc,): Remove.
155 (the_low_target): Use linux_get_pc_32bit and
157 * linux-crisv32-low.c (debug_threads): Remove declaration.
158 (cris_get_pc, cris_set_pc): Remove.
159 (the_low_target): Use linux_get_pc_32bit and
161 * linux-low.c: Include inttypes.h.
162 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
163 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
164 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
165 (the_low_target): Use linux_get_pc_32bit and
167 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
168 (the_low_target): Use linux_get_pc_32bit and
170 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
171 (the_low_target): Use linux_get_pc_32bit and
173 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
174 (the_low_target): Use linux_get_pc_32bit and
176 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
177 (the_low_target): Use linux_get_pc_32bit and
180 2016-01-18 Gary Benson <gbenson@redhat.com>
182 * configure.ac (AC_FUNC_FORK): New check.
183 * config.in: Regenerate.
184 * configure: Likewise.
186 2016-01-14 Yao Qi <yao.qi@linaro.org>
188 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
189 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
190 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
191 arm_get_next_pcs_ctor.
193 2016-01-12 Josh Stone <jistone@redhat.com>
194 Philippe Waroquiers <philippe.waroquiers@skynet.be>
196 * inferiors.h: Include "gdb_vecs.h".
197 (struct process_info): Add syscalls_to_catch.
198 * inferiors.c (remove_process): Free syscalls_to_catch.
199 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
200 syscall_return stops.
201 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
202 * server.c (handle_general_set): Handle QCatchSyscalls.
203 (handle_query): Report support for QCatchSyscalls.
204 * target.h (struct target_ops): Add supports_catch_syscall.
205 (target_supports_catch_syscall): New macro.
206 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
207 (struct lwp_info): Add syscall_state.
208 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
209 Maintain syscall_state and syscalls_to_catch across exec.
210 (get_syscall_trapinfo): New function, proxy to the_low_target.
211 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
212 (linux_low_filter_event): Toggle syscall_state entry/return for
213 syscall traps, and set it ignored for all others.
214 (gdb_catching_syscalls_p): New function.
215 (gdb_catch_this_syscall_p): New function.
216 (linux_wait_1): Handle SYSCALL_SIGTRAP.
217 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
218 (linux_supports_catch_syscall): New function.
219 (linux_target_ops): Install it.
220 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
221 (the_low_target): Install it.
223 2016-01-12 Mike Frysinger <vapier@gentoo.org>
225 * acinclude.m4: Include new ../warning.m4 file.
226 * configure: Regenerated.
227 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
229 2016-01-12 Mike Frysinger <vapier@gentoo.org>
231 * ax.c (is_goto_target): Mark static.
232 * linux-low.c (register_addr): Likewise.
233 (linux_fetch_registers, linux_store_registers): Likewise.
234 * mem-break.c (any_persistent_commands): Fix old prototype.
235 (add_commands_to_breakpoint): Mark static.
236 * regcache.c (find_register_by_name): Delete unused func.
237 * remote-utils.c (hex_or_minus_one): Mark static.
238 * server.c (monitor_show_help): Mark static.
239 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
240 handle_v_requests): Likewise.
242 2016-01-12 Pedro Alves <palves@redhat.com>
244 Remove use of the registered trademark symbol throughout.
246 2016-01-08 Yao Qi <yao.qi@linaro.org>
248 * remote-utils.c (getpkt): If c is '\003', call target hook
251 2016-01-06 Yao Qi <yao.qi@linaro.org>
253 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
255 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
256 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
257 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
258 (thumb2_breakpoint): Declare.
259 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
261 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
262 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
263 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
265 2016-01-01 Joel Brobecker <brobecker@adacore.com>
267 * gdbreplay.c (gdbreplay_version): Change copyright year in
269 * server.c (gdbserver_version): Likewise.
271 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
273 * server.c (crc32_table): Delete.
274 (crc32): Use libiberty's xcrc32 function.
276 2015-12-22 Joel Brobecker <brobecker@adacore.com>
278 * lynx-low.c (lynx_delete_thread_callback): New function.
279 (lynx_mourn): Properly delete our process and all of its
280 threads. Remove call to clear_inferiors.
282 2015-12-22 Joel Brobecker <brobecker@adacore.com>
284 * target.c (thread_search_callback): Add check that
285 the thread_stopped target callback is not NULL before
288 2015-12-21 Yao Qi <yao.qi@linaro.org>
290 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
293 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
295 * server.c (handle_query): Call target_supports_software_single_step.
297 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
299 * linux-low.c (single_step): New function.
300 (linux_resume_one_lwp_throw): Call single_step.
301 (start_step_over): Likewise.
303 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
305 * Makefile.in (SFILES): Append arch/arm-linux.c,
306 arch/arm-get-next-pcs.c.
307 (arm-linux.o): New rule.
308 (arm-get-next-pcs.o): New rule.
309 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
311 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
312 to linux-aarch32-low.c.
313 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
314 (arm_breakpoint_len, thumb_breakpoint): Likewise.
315 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
316 (thumb2_breakpoint_len): Likewise.
317 (arm_is_thumb_mode): Make non-static.
318 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
319 from linux-aarch32-low.c.
320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
323 (thumb2_breakpoint_len): Likewise.
324 (arm_is_thumb_mode): New declaration.
325 * linux-arm-low.c: Include arch/arm-linux.h
326 aarch/arm-get-next-pcs.h, sys/syscall.h.
327 (get_next_pcs_ops): New struct.
328 (get_next_pcs_addr_bits_remove): New function.
329 (get_next_pcs_is_thumb): New function.
330 (get_next_pcs_read_memory_unsigned_integer): Likewise.
331 (arm_sigreturn_next_pc): Likewise.
332 (get_next_pcs_syscall_next_pc): Likewise.
333 (arm_gdbserver_get_next_pcs): Likewise.
334 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
336 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
337 * server.h: Include gdb_vecs.h.
339 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
341 * Makefile.in (SFILES): Append common/common-regcache.c.
342 (OBS): Append common-regcache.o.
343 (common-regcache.o): New rule.
344 * regcache.c (init_register_cache): Initialize cache to
346 (regcache_raw_read_unsigned): New function.
347 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
348 register_status enum.
350 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
352 * linux-aarch64-low.c (the_low_targets): Rename
353 breakpoint_reinsert_addr to get_next_pcs.
354 * linux-arm-low.c (the_low_targets): Likewise.
355 * linux-bfin-low.c (the_low_targets): Likewise.
356 * linux-cris-low.c (the_low_targets): Likewise.
357 * linux-crisv32-low.c (the_low_targets): Likewise.
358 * linux-low.c (can_software_single_step): Likewise.
359 (install_software_single_step_breakpoints): New function.
360 (start_step_over): Use install_software_single_step_breakpoints.
361 * linux-low.h: New CORE_ADDR vector.
362 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
364 * linux-mips-low.c (the_low_targets): Likewise.
365 * linux-nios2-low.c (the_low_targets): Likewise.
366 * linux-sparc-low.c (the_low_targets): Likewise.
368 2015-12-17 Pedro Alves <palves@redhat.com>
370 * linux-low.c (linux_kill_one_lwp): Remove references to
372 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
374 (linux_init_signals): Delete.
375 (initialize_low): Adjust.
376 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
378 2015-12-16 Pedro Alves <palves@redhat.com>
380 * configure.ac (compiler warning flags): When testing a
381 -Wno-foo option, check whether -Wfoo works instead.
382 * configure: Regenerate.
384 2015-12-11 Don Breazeal <donb@codesourcery.com>
386 * server.c (process_serial_event): Don't exit from gdbserver
387 in remote mode if there are still active inferiors.
389 2015-12-11 Yao Qi <yao.qi@linaro.org>
391 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
392 arm_breakpoint_at if the process is 32-bit.
394 2015-12-11 Yao Qi <yao.qi@linaro.org>
396 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
399 2015-12-07 Yao Qi <yao.qi@linaro.org>
401 * configure.srv: Append arm.o to srv_tgtobj for
402 aarch64*-*-linux* target.
403 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
404 from linux-arm-low.c.
405 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
406 (arm_breakpoint_len, thumb_breakpoint): Likewise.
407 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
408 (thumb2_breakpoint_len): Likewise.
409 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
410 (arm_breakpoint_kinds): Likewise.
411 (arm_breakpoint_kind_from_pc): Likewise.
412 (arm_sw_breakpoint_from_kind): Likewise.
413 (arm_breakpoint_kind_from_current_state): Likewise.
414 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
415 (arm_sw_breakpoint_from_kind): Declare.
416 (arm_breakpoint_kind_from_current_state): Declare.
417 (arm_breakpoint_at): Declare.
418 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
419 arm_sw_breakpoint_from_kind if process is 32-bit.
420 (aarch64_breakpoint_kind_from_pc): New function.
421 (aarch64_breakpoint_kind_from_current_state): New function.
422 (the_low_target): Initialize fields breakpoint_kind_from_pc
423 and breakpoint_kind_from_current_state.
424 * linux-arm-low.c (arm_breakpoint_kinds): Move to
426 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
427 (arm_breakpoint, arm_breakpoint_len): Likewise.
428 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
429 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
430 (arm_is_thumb_mode): Likewise.
431 (arm_breakpoint_at): Likewise.
432 (arm_breakpoint_kind_from_pc): Likewise.
433 (arm_sw_breakpoint_from_kind): Likewise.
434 (arm_breakpoint_kind_from_current_state): Likewise.
437 2015-08-04 Yao Qi <yao.qi@linaro.org>
439 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
440 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
441 * server.c (extended_protocol): Remove "static".
442 * server.h (extended_protocol): Declare it.
444 2015-12-04 Josh Stone <jistone@redhat.com>
446 * target.h (struct target_ops) <arch_setup>: Rename to ...
447 (struct target_ops) <post_create_inferior>: ... this.
448 (target_arch_setup): Rename to ...
449 (target_post_create_inferior): ... this, calling post_create_inferior.
450 * server.c (start_inferior): Update target_arch_setup calls to
451 target_post_create_inferior.
452 * linux-low.c (linux_low_ptrace_options): Forward declare.
453 (linux_arch_setup): Update its comment for general use.
454 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
455 (struct linux_target_ops): Use linux_post_create_inferior.
456 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
457 to post_create_inferior.
458 * nto-low.c (struct nto_target_ops): Likewise.
459 * spu-low.c (struct spu_target_ops): Likewise.
460 * win32-low.c (struct win32_target_ops): Likewise.
462 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
464 * linux-arm-low.c: Remove duplicate arch/arm.h include.
466 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
468 * linux-arm-low.c (arm_reinsert_addr): Remove function.
469 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
470 * linux-cris-low.c (cris_reinsert_addr> Remove function.
471 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
472 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
473 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
474 * linux-mips-low.c (mips_reinsert_addr): Remove function.
475 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
476 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
477 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
478 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
479 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
481 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
483 * linux-low.c (linux_look_up_symbols): Don't call
484 linux_supports_traceclone.
485 * linux-low.h (thread_db_init): Remove use_events argument.
486 * thread-db.c (thread_db_use_event): Remove global variable.
487 (struct thread_db) <td_thr_event_enable_p>: Remove field.
488 (struct thread_db) <td_create_bp>: Remove field.
489 (thread_db_create_event): Remove function.
490 (thread_db_enable_reporting): Likewise.
491 (find_one_thread): Don't check for thread_db_use_events.
492 (attach_thread): Likewise.
493 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
494 (try_thread_db_load_1): Don't check for thread_db_use_events.
495 (thread_db_init): Remove use_events argument and thread events
497 (remove_thread_event_breakpoints): Remove function.
498 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
500 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
502 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
504 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
505 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
506 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
507 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
508 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
510 * linux-crisv32-low.c (cris_supports_hardware_single_step):
512 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
513 * linux-low.c (can_hardware_single_step): Use
514 supports_hardware_single_step.
515 (can_software_single_step): New function.
516 (start_step_over): Call can_software_single_step.
517 (linux_supports_hardware_single_step): New function.
518 (struct target_ops) <supports_software_single_step>: Initialize.
519 * linux-low.h (struct linux_target_ops)
520 <supports_hardware_single_step>: Initialize.
521 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
522 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
523 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
524 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
525 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
526 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
527 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
528 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
529 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
530 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
532 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
533 (struct linux_target_ops) <tile_supports_hardware_single_step>:
535 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
536 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
537 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
539 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
540 * target.h (struct target_ops): <supports_software_single_step>:
542 (target_supports_software_single_step): New macro.
544 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
546 * linux-low.c (linux_wait_1): Fix pc advance condition.
547 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
548 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
550 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
552 * linux-arm-low.c (arm_is_thumb_mode): New function.
553 (arm_breakpoint_at): Use arm_is_thumb_mode.
554 (arm_breakpoint_kind_from_current_state): New function.
555 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
557 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
558 (linux_breakpoint_kind_from_current_state): New function.
559 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
560 * linux-low.h (struct linux_target_ops)
561 <breakpoint_kind_from_current_state>: New field.
562 * target.h (struct target_ops): Likewise.
563 (target_breakpoint_kind_from_current_state): New macro.
565 2015-11-30 Pedro Alves <palves@redhat.com>
567 * linux-low.c (linux_resume): Wake up the event loop before
570 2015-11-30 Pedro Alves <palves@redhat.com>
572 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
574 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
576 * target.c (struct thread_search): New structure.
577 (thread_search_callback): New function.
578 (prev_general_thread): New global.
579 (prepare_to_access_memory, done_accessing_memory): New functions.
580 * target.h (prepare_to_access_memory, done_accessing_memory):
581 Replace macros with function declarations.
583 2015-11-30 Pedro Alves <palves@redhat.com>
586 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
587 report TARGET_WAITKIND_NO_RESUMED.
588 * remote-utils.c (prepare_resume_reply): Handle
589 TARGET_WAITKIND_NO_RESUMED.
590 * server.c (report_no_resumed): New global.
591 (handle_query) <qSupported>: Handle "no-resumed+". Report
592 "no-resumed+" support.
593 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
594 return error if the client doesn't support no-resumed events.
595 (push_stop_notification): New function.
596 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
597 events if the client supports them.
599 2015-11-30 Pedro Alves <palves@redhat.com>
601 * linux-low.c (thread_still_has_status_pending_p): Don't check
603 (lwp_resumed): New function.
604 (status_pending_p_callback): Return early if the LWP is not
605 supposed to be resumed.
607 2015-11-30 Pedro Alves <palves@redhat.com>
609 * linux-low.c (handle_extended_wait): Assert that the LWP's
610 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
611 thread create events, leave the new child's status pending.
612 (linux_low_filter_event): If GDB wants to hear about thread exit
613 events, leave the LWP marked dead and don't delete it.
614 (linux_wait_for_event_filtered): Don't check for thread exit.
615 (filter_exit_event): New function.
616 (linux_wait_1): Use it, when returning an exit event.
617 (linux_resume_one_lwp_throw): Assert that the LWP's
618 waitstatus is TARGET_WAITKIND_IGNORE.
619 * remote-utils.c (prepare_resume_reply): Handle
620 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
621 * server.c (report_thread_events): New global.
622 (handle_general_set): Handle QThreadEvents.
623 (handle_query) <qSupported>: Handle and report QThreadEvents+;
624 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
625 TARGET_WAITKIND_THREAD_EXITED.
626 * server.h (report_thread_events): Declare.
628 2015-11-30 Pedro Alves <palves@redhat.com>
630 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
631 the thread's last_resume_kind was resume_stop.
633 2015-11-30 Pedro Alves <palves@redhat.com>
635 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
638 2015-11-30 Pedro Alves <palves@redhat.com>
640 * server.c (handle_v_requests): Handle vCtrlC.
642 2015-11-30 Pedro Alves <palves@redhat.com>
644 * gdbthread.h (find_any_thread_of_pid): Declare.
645 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
647 * server.c (handle_query): If current_thread is NULL, look for
648 another thread of the selected process.
650 2015-11-26 Daniel Colascione <dancol@dancol.org>
651 Simon Marchi <simon.marchi@ericsson.com>
653 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
654 * server.c (handle_qxfer_threads_worker): Refactor to include thread
656 * target.h (struct target_ops) <thread_name>: New field.
657 (target_thread_name): New macro.
659 2015-11-23 Joel Brobecker <brobecker@adacore.com>
661 * regcache.h (regcache_invalidate_pid): Add declaration.
662 * regcache.c (regcache_invalidate_pid): New function, extracted
663 from regcache_invalidate.
664 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
665 Add trivial documentation comment.
666 * lynx-low.c: Use regcache_invalidate_pid instead of
669 2015-11-23 Joel Brobecker <brobecker@adacore.com>
671 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
672 and Elf64_auxv_t if the target is Android.
674 2015-11-22 Doug Evans <xdje42@gmail.com>
676 * target.h: #include <sys/types.h>.
678 2015-11-19 Pedro Alves <palves@redhat.com>
680 * linux-low.c (linux_process_qsupported): Change prototype.
682 * linux-low.h (struct linux_target_ops) <process_qsupported>:
684 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
685 and adjust to loop over all features.
686 * server.c (handle_query) <qSupported>: Adjust to call
687 target_process_qsupported once, passing it a vector of unprocessed
689 * target.h (struct target_ops) <process_qsupported>: Change
691 (target_process_qsupported): Adjust.
693 2015-11-19 Pedro Alves <palves@redhat.com>
695 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
697 * configure: Regenerate.
699 2015-11-19 Pedro Alves <palves@redhat.com>
701 * configure: Regenerate.
703 2015-11-19 Yao Qi <yao.qi@linaro.org>
705 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
708 2015-11-19 Yao Qi <yao.qi@linaro.org>
710 * linux-aarch64-low.c (enum aarch64_operand_type): New.
711 (struct aarch64_operand): Move enum out.
713 2015-11-19 Yao Qi <yao.qi@linaro.org>
715 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
716 struct user_fpsimd_state *.
717 (aarch64_store_fpregset): Likewise.
719 2015-11-19 Yao Qi <yao.qi@linaro.org>
721 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
722 struct user_pt_regs *.
723 (aarch64_store_gregset): Likewise.
725 2015-11-18 Pedro Alves <palves@redhat.com>
727 * Makefile.in (all_object_files): Add $IPA_OBJS.
729 2015-11-17 Pedro Alves <palves@redhat.com>
731 * win32-low.c (win32_resume): Use gdb_signal_from_host,
732 GDB_SIGNAL_0 and gdb_signal_to_string.
734 2015-11-17 Pedro Alves <palves@redhat.com>
736 * win32-low.c (handle_output_debug_string): Remove parameter.
737 (win32_kill): Remove our_status local and adjust call to
738 handle_output_debug_string.
739 (get_child_debug_event): Adjust call to
740 handle_output_debug_string.
742 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
744 * linux-mips-low.c (mips_fill_gregset): Add cast.
745 (mips_store_gregset): Likewise.
746 (mips_fill_fpregset): Likewise.
747 (mips_store_fpregset): Likewise.
749 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
751 * linux-mips-low.c (mips_add_watchpoint): Rename private to
754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
756 * linux-mips-low.c (mips_linux_new_thread): Change type of
757 watch_type to enum target_hw_bp_type.
759 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
761 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
762 Change return type to arm_hwbp_type.
764 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
766 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
767 (arm_store_gregset): Likewise.
768 * linux-arm-low.c (arm_get_hwcap): Likewise.
769 (arm_read_description): Likewise.
771 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
773 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
775 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
777 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
778 (ppc_fill_vsxregset): Likewise.
779 (ppc_store_vsxregset): Likewise.
780 (ppc_fill_vrregset): Likewise.
781 (ppc_store_vrregset): Likewise.
782 (ppc_fill_evrregset): Likewise.
783 (ppc_store_evrregset): Likewise.
785 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
787 * linux-ppc-low.c (ppc_usrregs_info): Remove
789 (ppc_arch_setup): Move lower in file.
791 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
793 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
794 (ps_pdwrite): Likewise.
796 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
798 * linux-arm-low.c (arm_new_thread): Move pointer dereference
799 to after assert checks.
801 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
803 * proc-service.c (ps_pdread): Add/adjust casts.
804 (ps_pdwrite): Add/adjust casts.
806 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
808 * server.c (handle_search_memory_1): Cast return value of
811 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
813 * server.c (write_qxfer_response): Change type of data to
816 2015-10-29 Pedro Alves <palves@redhat.com>
818 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
820 2015-10-29 Pedro Alves <palves@redhat.com>
822 * tracepoint.c (clear_installed_tracepoints): Add casts.
824 2015-10-29 Pedro Alves <palves@redhat.com>
826 * server.c (handle_v_cont, process_serial_event): Add enum
827 gdb_signal casts to signal parsing code.
829 2015-10-29 Pedro Alves <palves@redhat.com>
831 * linux-low.h (NULL_REGSET): Define.
832 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
833 * linux-arm-low.c (arm_regsets): Likewise.
834 * linux-crisv32-low.c (cris_regsets): Likewise.
835 * linux-m68k-low.c (m68k_regsets): Likewise.
836 * linux-mips-low.c (mips_regsets): Likewise.
837 * linux-nios2-low.c (nios2_regsets): Likewise.
838 * linux-ppc-low.c (ppc_regsets): Likewise.
839 * linux-s390-low.c (s390_regsets): Likewise.
840 * linux-sh-low.c (sh_regsets): Likewise.
841 * linux-sparc-low.c (sparc_regsets): Likewise.
842 * linux-tic6x-low.c (tic6x_regsets): Likewise.
843 * linux-tile-low.c (tile_regsets): Likewise.
844 * linux-x86-low.c (x86_regsets): Likewise.
845 * linux-xtensa-low.c (xtensa_regsets): Likewise.
847 2015-10-29 Pedro Alves <palves@redhat.com>
849 * linux-low.h (NULL_REGSET): Define.
850 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
851 * linux-arm-low.c (arm_regsets): Likewise.
852 * linux-crisv32-low.c (cris_regsets): Likewise.
853 * linux-m68k-low.c (m68k_regsets): Likewise.
854 * linux-mips-low.c (mips_regsets): Likewise.
855 * linux-nios2-low.c (nios2_regsets): Likewise.
856 * linux-ppc-low.c (ppc_regsets): Likewise.
857 * linux-s390-low.c (s390_regsets): Likewise.
858 * linux-sh-low.c (sh_regsets): Likewise.
859 * linux-sparc-low.c (sparc_regsets): Likewise.
860 * linux-tic6x-low.c (tic6x_regsets): Likewise.
861 * linux-tile-low.c (tile_regsets): Likewise.
862 * linux-x86-low.c (x86_regsets): Likewise.
863 * linux-xtensa-low.c (xtensa_regsets): Likewise.
865 2015-10-26 Doug Evans <dje@google.com>
867 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
869 2015-10-26 Doug Evans <dje@google.com>
871 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
873 2015-10-26 Doug Evans <dje@google.com>
875 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
877 (attach_thread, find_new_threads_callback): Ditto.
879 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
881 * mem-break.h (set_breakpoint_data): Remove.
883 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
885 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
886 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
887 (initialize_low): Remove set_breakpoint_data call.
888 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
889 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
890 (initialize_low): Remove set_breakpoint_data call.
891 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
892 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
893 (initialize_low): Remove set_breakpoint_data call.
895 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
897 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
898 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
899 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
900 * target.h (target_breakpoint_kind_from_pc): New macro.
902 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
904 * linux-low.c (default_breakpoint_kind_from_pc): New function.
905 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
906 the default breakpoint kind.
908 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
910 * linux-arm-low.c (arm_supports_z_point_type): Add software
913 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
915 * linux-arm-low.c: Refactor breakpoint definitions.
916 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
917 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
919 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
921 * Makefile.in: Add arm.c/o.
922 * configure.srv: Likewise.
923 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
924 (arm_breakpoint_kind_from_pc): New function.
925 (arm_sw_breakpoint_from_kind): Return proper kind.
926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
928 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
930 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
932 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
933 (struct raw_breakpoint) <size>: Remove.
934 (struct raw_breakpoint) <kind>: Add.
935 (bp_size): New function.
936 (bp_opcode): Likewise.
937 (find_raw_breakpoint_at): Adjust for kind.
938 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
939 (remove_memory_breakpoint): Adjust for kind call bp_size.
940 (set_raw_breakpoint_at): Adjust for kind.
941 (set_breakpoint): Likewise.
942 (set_breakpoint_at): Call breakpoint_kind_from_pc.
943 (delete_raw_breakpoint): Adjust for kind.
944 (delete_breakpoint): Likewise.
945 (find_gdb_breakpoint): Likewise.
946 (set_gdb_breakpoint_1): Likewise.
947 (set_gdb_breakpoint): Likewise.
948 (delete_gdb_breakpoint_1): Likewise.
949 (delete_gdb_breakpoint): Likewise.
950 (uninsert_raw_breakpoint): Likewise.
951 (reinsert_raw_breakpoint): Likewise.
952 (set_breakpoint_data): Remove.
953 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
954 (check_mem_read): Adjust for kind call bp_size.
955 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
956 (clone_one_breakpoint): Adjust for kind.
957 * mem-break.h (set_gdb_breakpoint): Likewise.
958 (delete_gdb_breakpoint): Likewise.
959 * server.c (process_serial_event): Likewise.
961 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
963 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
964 (struct linux_target_ops) <breakpoint>: Remove.
965 (struct linux_target_ops) <breakpoint_len>: Remove.
966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
968 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
969 (arm_sw_breakpoint_from_kind): New function.
970 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
971 (struct linux_target_ops) <breakpoint>: Remove.
972 (struct linux_target_ops) <breakpoint_len>: Remove.
973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
975 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
976 (struct linux_target_ops) <breakpoint>: Remove.
977 (struct linux_target_ops) <breakpoint_len>: Remove.
978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
980 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
981 (struct linux_target_ops) <breakpoint>: Remove.
982 (struct linux_target_ops) <breakpoint_len>: Remove.
983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
984 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
985 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
986 and sw_breakpoint_from_kind to increment the pc.
987 (linux_breakpoint_kind_from_pc): New function.
988 (linux_sw_breakpoint_from_kind): New function.
989 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
990 (initialize_low): Call breakpoint_kind_from_pc and
991 sw_breakpoint_from_kind to replace breakpoint_data/len.
992 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
994 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
995 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
996 (struct linux_target_ops) <breakpoint>: Remove.
997 (struct linux_target_ops) <breakpoint_len>: Remove.
998 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
999 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1000 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1001 (struct linux_target_ops) <breakpoint>: Remove.
1002 (struct linux_target_ops) <breakpoint_len>: Remove.
1003 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1004 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1005 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1006 (struct linux_target_ops) <breakpoint>: Remove.
1007 (struct linux_target_ops) <breakpoint_len>: Remove.
1008 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1009 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1010 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1026 (struct linux_target_ops) <breakpoint>: Remove.
1027 (struct linux_target_ops) <breakpoint_len>: Remove.
1028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1029 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1030 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1031 (struct linux_target_ops) <breakpoint>: Remove.
1032 (struct linux_target_ops) <breakpoint_len>: Remove.
1033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1034 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1035 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1041 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1042 (struct linux_target_ops) <breakpoint>: Remove.
1043 (struct linux_target_ops) <breakpoint_len>: Remove.
1044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1046 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1047 (struct linux_target_ops) <breakpoint>: Remove.
1048 (struct linux_target_ops) <breakpoint_len>: Remove.
1049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1050 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1052 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1054 * linux-cris-low.c (cris_get_pc): Remove void arg.
1056 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1058 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1061 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1063 * inferiors.c (thread_pid_matches_callback): New function.
1064 (find_thread_process): New function.
1065 (remove_thread): Reset current_thread.
1066 (remove_process): Assert threads have been removed first.
1068 2015-10-15 Yao Qi <yao.qi@linaro.org>
1070 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1072 (aarch64_remove_point): Likewise.
1073 * regcache.c (regcache_register_size): New function.
1075 2015-10-12 Yao Qi <yao.qi@linaro.org>
1077 * linux-aarch64-low.c: Update all callers as emit_load_store
1078 is renamed to aarch64_emit_load_store.
1080 2015-10-12 Yao Qi <yao.qi@linaro.org>
1082 * linux-aarch64-low.c: Update all callers of function renaming
1083 from emit_insn to aarch64_emit_insn.
1085 2015-10-12 Yao Qi <yao.qi@linaro.org>
1087 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1088 arch/aarch64-insn.h.
1089 (struct aarch64_memory_operand): Likewise.
1091 (emit_insn): Move to arch/aarch64-insn.c.
1092 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1093 (emit_load_store): Move to arch/aarch64-insn.c.
1094 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1095 (can_encode_int32): Remove.
1097 2015-10-12 Yao Qi <yao.qi@linaro.org>
1099 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1100 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1101 (aarch64_relocate_instruction): Likewise.
1102 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1103 (struct aarch64_insn_visitor): Likewise.
1105 2015-10-12 Yao Qi <yao.qi@linaro.org>
1107 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1108 (struct aarch64_insn_visitor): New.
1109 (struct aarch64_insn_relocation_data): New.
1110 (aarch64_ftrace_insn_reloc_b): New function.
1111 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1112 (aarch64_ftrace_insn_reloc_cb): Likewise.
1113 (aarch64_ftrace_insn_reloc_tb): Likewise.
1114 (aarch64_ftrace_insn_reloc_adr): Likewise.
1115 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1116 (aarch64_ftrace_insn_reloc_others): Likewise.
1118 (aarch64_relocate_instruction): Use visitor.
1120 2015-10-12 Yao Qi <yao.qi@linaro.org>
1122 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1123 int. Add argument buf.
1124 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1125 aarch64_relocate_instruction.
1127 2015-10-12 Yao Qi <yao.qi@linaro.org>
1129 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1130 argument insn. Remove local variable insn. Don't call
1132 (aarch64_install_fast_tracepoint_jump_pad): Call
1135 2015-09-30 Yao Qi <yao.qi@linaro.org>
1137 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1138 (emit_load_store_pair): Likewise.
1140 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1142 * dll.c (match_dll): Add cast(s).
1143 (unloaded_dll): Likewise.
1144 * linux-low.c (second_thread_of_pid_p): Likewise.
1145 (delete_lwp_callback): Likewise.
1146 (count_events_callback): Likewise.
1147 (select_event_lwp_callback): Likewise.
1148 (linux_set_resume_request): Likewise.
1149 * server.c (accumulate_file_name_length): Likewise.
1150 (emit_dll_description): Likewise.
1151 (handle_qxfer_threads_worker): Likewise.
1152 (visit_actioned_threads): Likewise.
1153 * thread-db.c (any_thread_of): Likewise.
1154 * tracepoint.c (same_process_p): Likewise.
1155 (match_blocktype): Likewise.
1156 (build_traceframe_info_xml): Likewise.
1158 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1160 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1162 (gdb_unparse_agent_expr): Likewise.
1163 * hostio.c (require_data): Likewise.
1164 (handle_pread): Likewise.
1165 * linux-low.c (disable_regset): Likewise.
1166 (fetch_register): Likewise.
1167 (store_register): Likewise.
1168 (get_dynamic): Likewise.
1169 (linux_qxfer_libraries_svr4): Likewise.
1170 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1171 (set_fast_tracepoint_jump): Likewise.
1172 (uninsert_fast_tracepoint_jumps_at): Likewise.
1173 (reinsert_fast_tracepoint_jumps_at): Likewise.
1174 (validate_inserted_breakpoint): Likewise.
1175 (clone_agent_expr): Likewise.
1176 * regcache.c (init_register_cache): Likewise.
1177 * remote-utils.c (putpkt_binary_1): Likewise.
1178 (decode_M_packet): Likewise.
1179 (decode_X_packet): Likewise.
1180 (look_up_one_symbol): Likewise.
1181 (relocate_instruction): Likewise.
1182 (monitor_output): Likewise.
1183 * server.c (handle_search_memory): Likewise.
1184 (handle_qxfer_exec_file): Likewise.
1185 (handle_qxfer_libraries): Likewise.
1186 (handle_qxfer): Likewise.
1187 (handle_query): Likewise.
1188 (handle_v_cont): Likewise.
1189 (handle_v_run): Likewise.
1190 (captured_main): Likewise.
1191 * target.c (write_inferior_memory): Likewise.
1192 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1193 * tracepoint.c (init_trace_buffer): Likewise.
1194 (add_tracepoint_action): Likewise.
1195 (add_traceframe): Likewise.
1196 (add_traceframe_block): Likewise.
1197 (cmd_qtdpsrc): Likewise.
1198 (cmd_qtdv): Likewise.
1199 (cmd_qtstatus): Likewise.
1200 (response_source): Likewise.
1201 (response_tsv): Likewise.
1202 (cmd_qtnotes): Likewise.
1203 (gdb_collect): Likewise.
1204 (initialize_tracepoint): Likewise.
1206 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1208 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1209 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1210 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1212 (enum aarch64_condition_codes): New enum.
1213 (w0): New static global.
1216 (struct aarch64_memory_operand) <type>: New
1217 MEMORY_OPERAND_POSTINDEX type.
1218 (postindex_memory_operand): New helper function.
1219 (emit_ret): New function.
1220 (emit_load_store_pair): New function, factored out of emit_stp
1221 with support for MEMORY_OPERAND_POSTINDEX.
1222 (emit_stp): Rewrite using emit_load_store_pair.
1223 (emit_ldp): New function.
1224 (emit_load_store): Likewise.
1225 (emit_ldr): Mention post-index instruction in comment.
1226 (emit_ldrh): New function.
1227 (emit_ldrb): New function.
1228 (emit_ldrsw): Mention post-index instruction in comment.
1229 (emit_str): Likewise.
1230 (emit_subs): New function.
1231 (emit_cmp): Likewise.
1232 (emit_and): Likewise.
1233 (emit_orr): Likewise.
1234 (emit_orn): Likewise.
1235 (emit_eor): Likewise.
1236 (emit_mvn): Likewise.
1237 (emit_lslv): Likewise.
1238 (emit_lsrv): Likewise.
1239 (emit_asrv): Likewise.
1240 (emit_mul): Likewise.
1241 (emit_sbfm): Likewise.
1242 (emit_sbfx): Likewise.
1243 (emit_ubfm): Likewise.
1244 (emit_ubfx): Likewise.
1245 (emit_csinc): Likewise.
1246 (emit_cset): Likewise.
1247 (emit_nop): Likewise.
1248 (emit_ops_insns): New helper function.
1249 (emit_pop): Likewise.
1250 (emit_push): Likewise.
1251 (aarch64_emit_prologue): New function.
1252 (aarch64_emit_epilogue): Likewise.
1253 (aarch64_emit_add): Likewise.
1254 (aarch64_emit_sub): Likewise.
1255 (aarch64_emit_mul): Likewise.
1256 (aarch64_emit_lsh): Likewise.
1257 (aarch64_emit_rsh_signed): Likewise.
1258 (aarch64_emit_rsh_unsigned): Likewise.
1259 (aarch64_emit_ext): Likewise.
1260 (aarch64_emit_log_not): Likewise.
1261 (aarch64_emit_bit_and): Likewise.
1262 (aarch64_emit_bit_or): Likewise.
1263 (aarch64_emit_bit_xor): Likewise.
1264 (aarch64_emit_bit_not): Likewise.
1265 (aarch64_emit_equal): Likewise.
1266 (aarch64_emit_less_signed): Likewise.
1267 (aarch64_emit_less_unsigned): Likewise.
1268 (aarch64_emit_ref): Likewise.
1269 (aarch64_emit_if_goto): Likewise.
1270 (aarch64_emit_goto): Likewise.
1271 (aarch64_write_goto_address): Likewise.
1272 (aarch64_emit_const): Likewise.
1273 (aarch64_emit_call): Likewise.
1274 (aarch64_emit_reg): Likewise.
1275 (aarch64_emit_pop): Likewise.
1276 (aarch64_emit_stack_flush): Likewise.
1277 (aarch64_emit_zero_ext): Likewise.
1278 (aarch64_emit_swap): Likewise.
1279 (aarch64_emit_stack_adjust): Likewise.
1280 (aarch64_emit_int_call_1): Likewise.
1281 (aarch64_emit_void_call_2): Likewise.
1282 (aarch64_emit_eq_goto): Likewise.
1283 (aarch64_emit_ne_goto): Likewise.
1284 (aarch64_emit_lt_goto): Likewise.
1285 (aarch64_emit_le_goto): Likewise.
1286 (aarch64_emit_gt_goto): Likewise.
1287 (aarch64_emit_ge_got): Likewise.
1288 (aarch64_emit_ops_impl): New static global variable.
1289 (aarch64_emit_ops): New target function, return
1290 &aarch64_emit_ops_impl.
1291 (struct linux_target_ops): Install it.
1293 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1295 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1296 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1298 * linux-aarch64-ipa.c: New file.
1299 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1301 (aarch64_get_thread_area): New target method.
1302 (extract_signed_bitfield): New helper function.
1303 (aarch64_decode_ldr_literal): New function.
1304 (enum aarch64_opcodes): New enum.
1305 (struct aarch64_register): New struct.
1306 (struct aarch64_operand): New struct.
1307 (x0): New static global.
1316 (aarch64_register): New helper function.
1317 (register_operand): Likewise.
1318 (immediate_operand): Likewise.
1319 (struct aarch64_memory_operand): New struct.
1320 (offset_memory_operand): New helper function.
1321 (preindex_memory_operand): Likewise.
1322 (enum aarch64_system_control_registers): New enum.
1323 (ENCODE): New macro.
1324 (emit_insn): New helper function.
1325 (emit_b): New function.
1326 (emit_bcond): Likewise.
1327 (emit_cb): Likewise.
1328 (emit_tb): Likewise.
1329 (emit_blr): Likewise.
1330 (emit_stp): Likewise.
1331 (emit_ldp_q_offset): Likewise.
1332 (emit_stp_q_offset): Likewise.
1333 (emit_load_store): Likewise.
1334 (emit_ldr): Likewise.
1335 (emit_ldrsw): Likewise.
1336 (emit_str): Likewise.
1337 (emit_ldaxr): Likewise.
1338 (emit_stxr): Likewise.
1339 (emit_stlr): Likewise.
1340 (emit_data_processing_reg): Likewise.
1341 (emit_data_processing): Likewise.
1342 (emit_add): Likewise.
1343 (emit_sub): Likewise.
1344 (emit_mov): Likewise.
1345 (emit_movk): Likewise.
1346 (emit_mov_addr): Likewise.
1347 (emit_mrs): Likewise.
1348 (emit_msr): Likewise.
1349 (emit_sevl): Likewise.
1350 (emit_wfe): Likewise.
1351 (append_insns): Likewise.
1352 (can_encode_int32_in): New helper function.
1353 (aarch64_relocate_instruction): New function.
1354 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1355 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1356 (struct linux_target_ops): Install aarch64_get_thread_area,
1357 aarch64_install_fast_tracepoint_jump_pad and
1358 aarch64_get_min_fast_tracepoint_insn_len.
1360 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1362 * Makefile.in (aarch64-insn.o): New rule.
1363 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1365 2015-09-21 Yao Qi <yao.qi@linaro.org>
1367 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1369 2015-09-21 Yao Qi <yao.qi@linaro.org>
1371 * tracepoint.c (max_jump_pad_size): Remove.
1373 2015-09-18 Yao Qi <yao.qi@linaro.org>
1375 * linux-aarch64-low.c: Don't include sys/uio.h.
1376 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1378 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1380 * tracepoint.c (eval_result_type): Change prototype.
1381 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1383 2015-09-15 Pedro Alves <palves@redhat.com>
1385 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1386 Check whether to report exec events instead of checking whether
1387 multiprocess is enabled.
1389 2015-09-15 Pedro Alves <palves@redhat.com>
1392 * remote-utils.c (prepare_resume_reply): Merge
1393 TARGET_WAITKIND_VFORK_DONE switch case with the
1394 TARGET_WAITKIND_FORKED case.
1396 2015-09-15 Yao Qi <yao.qi@linaro.org>
1398 * server.c (handle_query): Check string comparison using
1399 "else if" instead of "if".
1401 2015-09-15 Yao Qi <yao.qi@linaro.org>
1403 * server.c (vCont_supported): New global variable.
1404 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1405 matches. Append ";vContSupported+" to own_buf.
1406 (handle_v_requests): Append ";s;S" to own_buf if target supports
1407 hardware single step or vCont_supported is false.
1408 (capture_main): Set vCont_supported to zero.
1410 2015-09-15 Yao Qi <yao.qi@linaro.org>
1412 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1414 (linux_supports_hardware_single_step): ... New function.
1415 (linux_target_ops): Update.
1416 * lynx-low.c (lynx_target_ops): Set field
1417 supports_hardware_single_step to target_can_do_hardware_single_step.
1418 * nto-low.c (nto_target_ops): Likewise.
1419 * spu-low.c (spu_target_ops): Likewise.
1420 * win32-low.c (win32_target_ops): Likewise.
1421 * target.c (target_can_do_hardware_single_step): New function.
1422 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1423 Remove. <supports_hardware_single_step>: New field.
1424 (target_supports_conditional_breakpoints): Remove.
1425 (target_supports_hardware_single_step): New macro.
1426 (target_can_do_hardware_single_step): Declare.
1427 * server.c (handle_query): Use target_supports_hardware_single_step
1428 instead of target_supports_conditional_breakpoints.
1430 2015-09-15 Yao Qi <yao.qi@linaro.org>
1432 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1434 (struct linux_target_ops the_low_target): Install
1435 aarch64_linux_siginfo_fixup.
1437 2015-09-11 Don Breazeal <donb@codesourcery.com>
1438 Luis Machado <lgustavo@codesourcery.com>
1440 * linux-low.c (linux_mourn): Static declaration.
1441 (linux_arch_setup): Move in front of
1442 handle_extended_wait.
1443 (linux_arch_setup_thread): New function.
1444 (handle_extended_wait): Handle exec events. Call
1445 linux_arch_setup_thread. Make event_lwp argument a
1446 pointer-to-a-pointer.
1447 (check_zombie_leaders): Do not check stopped threads.
1448 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1449 (linux_low_filter_event): Add lwp and thread for exec'ing
1450 non-leader thread if leader thread has been deleted.
1451 Refactor code into linux_arch_setup_thread and call it.
1452 Pass child lwp pointer by reference to handle_extended_wait.
1453 (linux_wait_for_event_filtered): Update comment.
1454 (linux_wait_1): Prevent clobbering exec event status.
1455 (linux_supports_exec_events): New function.
1456 (linux_target_ops) <supports_exec_events>: Initialize new member.
1457 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1459 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1460 * server.c (report_exec_events): New global variable.
1461 (handle_query): Handle qSupported query for exec-events feature.
1462 (captured_main): Initialize report_exec_events.
1463 * server.h (report_exec_events): Declare new global variable.
1464 * target.h (struct target_ops) <supports_exec_events>: New
1466 (target_supports_exec_events): New macro.
1467 * win32-low.c (win32_target_ops) <supports_exec_events>:
1468 Initialize new member.
1470 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1472 * linux-low.c (linux_low_enable_btrace): Remove.
1473 (linux_target_ops): Replace linux_low_enable_btrace with
1474 linux_enable_btrace.
1476 2015-09-03 Yao Qi <yao.qi@linaro.org>
1478 * linux-aarch64-low.c (aarch64_insert_point): Call
1479 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1482 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1484 * linux-low.c (check_stopped_by_breakpoint): Use
1485 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1487 2015-08-27 Pedro Alves <palves@redhat.com>
1489 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1491 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1493 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1494 the XNEW-family equivalent.
1495 (compile_bytecodes): Likewise.
1496 * dll.c (loaded_dll): Likewise.
1497 * event-loop.c (append_callback_event): Likewise.
1498 (create_file_handler): Likewise.
1499 (create_file_event): Likewise.
1500 * hostio.c (handle_open): Likewise.
1501 * inferiors.c (add_thread): Likewise.
1502 (add_process): Likewise.
1503 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1504 * linux-arm-low.c (arm_new_process): Likewise.
1505 (arm_new_thread): Likewise.
1506 * linux-low.c (add_to_pid_list): Likewise.
1507 (linux_add_process): Likewise.
1508 (handle_extended_wait): Likewise.
1509 (add_lwp): Likewise.
1510 (enqueue_one_deferred_signal): Likewise.
1511 (enqueue_pending_signal): Likewise.
1512 (linux_resume_one_lwp_throw): Likewise.
1513 (linux_resume_one_thread): Likewise.
1514 (linux_read_memory): Likewise.
1515 (linux_write_memory): Likewise.
1516 * linux-mips-low.c (mips_linux_new_process): Likewise.
1517 (mips_linux_new_thread): Likewise.
1518 (mips_add_watchpoint): Likewise.
1519 * linux-x86-low.c (initialize_low_arch): Likewise.
1520 * lynx-low.c (lynx_add_process): Likewise.
1521 * mem-break.c (set_raw_breakpoint_at): Likewise.
1522 (set_breakpoint): Likewise.
1523 (add_condition_to_breakpoint): Likewise.
1524 (add_commands_to_breakpoint): Likewise.
1525 (clone_agent_expr): Likewise.
1526 (clone_one_breakpoint): Likewise.
1527 * regcache.c (new_register_cache): Likewise.
1528 * remote-utils.c (look_up_one_symbol): Likewise.
1529 * server.c (queue_stop_reply): Likewise.
1530 (start_inferior): Likewise.
1531 (queue_stop_reply_callback): Likewise.
1532 (handle_target_event): Likewise.
1533 * spu-low.c (fetch_ppc_memory): Likewise.
1534 (store_ppc_memory): Likewise.
1535 * target.c (set_target_ops): Likewise.
1536 * thread-db.c (thread_db_load_search): Likewise.
1537 (try_thread_db_load_1): Likewise.
1538 * tracepoint.c (add_tracepoint): Likewise.
1539 (add_tracepoint_action): Likewise.
1540 (create_trace_state_variable): Likewise.
1541 (cmd_qtdpsrc): Likewise.
1542 (cmd_qtro): Likewise.
1543 (add_while_stepping_state): Likewise.
1544 * win32-low.c (child_add_thread): Likewise.
1545 (get_image_name): Likewise.
1547 2015-08-25 Yao Qi <yao.qi@linaro.org>
1549 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1551 2015-08-25 Yao Qi <yao.qi@linaro.org>
1553 * Makefile.in (aarch64-linux.o): New rule.
1554 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1556 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1557 (aarch64_init_debug_reg_state): Make it extern.
1558 (aarch64_linux_prepare_to_resume): Remove.
1560 2015-08-25 Yao Qi <yao.qi@linaro.org>
1562 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1563 lwp_arch_private_info and ptid_of_lwp.
1565 2015-08-25 Yao Qi <yao.qi@linaro.org>
1567 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1568 Find proc_info by find_process_pid. All callers updated.
1570 2015-08-25 Yao Qi <yao.qi@linaro.org>
1572 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1574 (debug_reg_change_callback): Remove.
1575 (aarch64_notify_debug_reg_change): Remove.
1577 2015-08-25 Yao Qi <yao.qi@linaro.org>
1579 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1580 Call current_lwp_ptid.
1582 2015-08-25 Yao Qi <yao.qi@linaro.org>
1584 * linux-aarch64-low.c (debug_reg_change_callback): Use
1587 2015-08-25 Yao Qi <yao.qi@linaro.org>
1589 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1591 2015-08-25 Yao Qi <yao.qi@linaro.org>
1593 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1595 2015-08-25 Yao Qi <yao.qi@linaro.org>
1597 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1600 2015-08-25 Yao Qi <yao.qi@linaro.org>
1602 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1604 (debug_reg_change_callback): Remove argument entry and add argument
1605 lwp. Remove local variable thread. Don't print thread id in the
1606 debugging output. Don't check whether pid of thread equals to pid.
1607 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1608 iterate_over_lwps instead find_inferior.
1610 2015-08-24 Pedro Alves <palves@redhat.com>
1612 * inferiors.c (get_first_process): New function.
1613 * inferiors.h (get_first_process): New declaration.
1614 * remote-utils.c (read_ptid): Default to the first process in the
1615 list, instead of to the current thread's process.
1617 2015-08-24 Pedro Alves <palves@redhat.com>
1619 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1620 * event-loop.c: Likewise.
1621 * remote-utils.c: Likewise.
1622 * tracepoint.c: Likewise.
1624 2015-08-24 Pedro Alves <palves@redhat.com>
1626 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1629 2015-08-21 Pedro Alves <palves@redhat.com>
1631 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1632 instead of literal 1.
1634 2015-08-21 Pedro Alves <palves@redhat.com>
1636 * tdesc.c (default_description): Explicitly zero-initialize.
1638 2015-08-21 Pedro Alves <palves@redhat.com>
1641 * inferiors.c (remove_thread): Discard any pending stop reply for
1643 * server.c (remove_all_on_match_pid): Rename to ...
1644 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1646 (discard_queued_stop_replies): Change parameter to a ptid. Now
1648 (handle_v_kill, kill_inferior_callback, captured_main)
1649 (process_serial_event): Adjust.
1650 * server.h (discard_queued_stop_replies): Declare.
1652 2015-08-21 Pedro Alves <palves@redhat.com>
1654 * linux-low.c (wait_for_sigstop): Always switch to no thread
1655 selected if the previously current thread dies.
1656 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1657 process instead of the current thread's.
1658 * remote-utils.c (input_interrupt): Don't check if there's no
1660 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1661 current thread to the general thread fails, error out.
1662 (handle_qxfer_auxv, handle_qxfer_libraries)
1663 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1664 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1665 (handle_query): Check if there's a thread selected instead of
1666 checking whether there's any thread in the thread list.
1667 (handle_qxfer_threads, handle_qxfer_btrace)
1668 (handle_qxfer_btrace_conf): Don't error out early if there's no
1669 thread in the thread list.
1670 (handle_v_cont, myresume): Don't set the current thread to the
1672 (process_serial_event) <Hg handling>: Also set thread_id if the
1673 previous general thread is still alive.
1674 (process_serial_event) <g/G handling>: If setting the current
1675 thread to the general thread fails, error out.
1676 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1677 thread's lwp instead of the current thread's.
1678 * target.c (set_desired_thread): If the desired thread was not
1679 found, leave the current thread pointing to NULL. Return an int
1680 (boolean) indicating success.
1681 * target.h (set_desired_thread): Change return type to int.
1683 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1685 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1686 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1688 (ps_get_thread_area): New function.
1690 2015-08-19 Gary Benson <gbenson@redhat.com>
1692 * hostio.c (handle_pread): Do not attempt to read more data
1693 than hostio_reply_with_data can fit in a packet.
1695 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1697 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1699 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1701 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1703 2015-08-06 Pedro Alves <palves@redhat.com>
1705 * tracepoint.c (expr_eval_result): Now an int.
1707 2015-08-06 Pedro Alves <palves@redhat.com>
1709 * gdbthread.h (struct regcache): Forward declare.
1710 (struct thread_info) <regcache_data>: Now a struct regcache
1712 * inferiors.c (inferior_regcache_data)
1713 (set_inferior_regcache_data): Now work with struct regcache
1715 * inferiors.h (struct regcache): Forward declare.
1716 (inferior_regcache_data, set_inferior_regcache_data): Now work
1717 with struct regcache pointers.
1718 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1719 (free_register_cache_thread): Remove struct regcache pointer
1722 2015-08-06 Pedro Alves <palves@redhat.com>
1724 * server.c (captured_main): On error, print the exception message
1725 to stderr, and if run_once is set, throw a quit.
1727 2015-08-06 Pedro Alves <palves@redhat.com>
1729 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1732 2015-08-06 Pedro Alves <palves@redhat.com>
1734 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1735 reading beyond the passed in buffer length.
1737 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1739 * tracepoint.c (symbol_list) <required>: Remove.
1741 2015-08-06 Pedro Alves <palves@redhat.com>
1743 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1744 count if stopping and suspending threads.
1745 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1746 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1747 (linux_detach): Complete an ongoing step-over.
1748 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1750 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1751 (linux_wait_1): If passing a signal to the inferior after
1752 finishing a step-over, unsuspend and re-resume all lwps. If we
1753 see a single-step event but the thread should be continuing, don't
1754 pass the trap to gdb.
1755 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1756 internal_error instead of gdb_assert.
1757 (enqueue_pending_signal): New function.
1758 (check_ptrace_stopped_lwp_gone): Add debug output.
1759 (start_step_over): Use internal_error instead of gdb_assert.
1760 (complete_ongoing_step_over): New function.
1761 (linux_resume_one_thread): Don't resume a suspended thread.
1762 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1765 2015-08-06 Pedro Alves <palves@redhat.com>
1767 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1768 (linux_thread_alive): Use lwp_is_marked_dead.
1769 (extended_event_reported): Delete.
1770 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1771 instead of extended_event_reported.
1772 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1774 (lwp_is_marked_dead): New function.
1775 (lwp_running): Use lwp_is_marked_dead.
1776 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1779 2015-08-06 Pedro Alves <palves@redhat.com>
1781 * linux-low.c (linux_wait_1): Move fork event output out of the
1782 !report_to_gdb check. Pass event_child->waitstatus to
1783 target_waitstatus_to_string instead of ourstatus.
1785 2015-08-04 Yao Qi <yao.qi@linaro.org>
1787 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1788 if current_thread is 32 bit.
1790 2015-08-04 Yao Qi <yao.qi@linaro.org>
1792 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1793 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1794 * server.c (extended_protocol): Remove "static".
1795 * server.h (extended_protocol): Declare it.
1797 2015-08-04 Yao Qi <yao.qi@linaro.org>
1799 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1800 both aarch64 and aarch32.
1801 (aarch64_set_pc): Likewise.
1803 2015-08-04 Yao Qi <yao.qi@linaro.org>
1805 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1806 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1807 arm-with-neon.xml to srv_xmlfiles.
1808 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1809 (is_64bit_tdesc): New function.
1810 (aarch64_linux_read_description): New function.
1811 (aarch64_arch_setup): Call aarch64_linux_read_description.
1812 (regs_info): Rename to regs_info_aarch64.
1813 (aarch64_regs_info): Return right regs_info.
1814 (initialize_low_arch): Call initialize_low_arch_aarch32.
1816 2015-08-04 Yao Qi <yao.qi@linaro.org>
1818 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1819 * linux-aarch32-low.c: New file.
1820 * linux-aarch32-low.h: New file.
1821 * linux-arm-low.c (arm_fill_gregset): Move it to
1822 linux-aarch32-low.c.
1823 (arm_store_gregset): Likewise.
1824 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1825 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1826 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1827 (regs_info): Rename to regs_info_arm.
1828 (arm_regs_info): Return regs_info_aarch32 if
1829 have_ptrace_getregset is 1 and target description is
1830 arm_with_neon or arm_with_vfpv3.
1831 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1832 Call initialize_low_arch_aarch32 instead.
1834 2015-08-04 Yao Qi <yao.qi@linaro.org>
1836 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1837 * linux-low.c: ... here.
1838 * linux-low.h (have_ptrace_getregset): Declare it.
1840 2015-08-04 Pedro Alves <palves@redhat.com>
1842 * thread-db.c (struct thread_db): Use new typedefs.
1843 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1845 (disable_thread_event_reporting): Cast result of dlsym to
1846 destination function pointer type.
1847 (thread_db_mourn): Use td_ta_delete_ftype.
1849 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1851 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1853 (CDX_BREAKPOINT): Define for R2.
1854 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1855 (the_low_target): Add comments.
1857 2015-07-30 Yao Qi <yao.qi@linaro.org>
1859 * linux-arm-low.c (arm_hwcap): Remove it.
1860 (arm_read_description): New local variable arm_hwcap. Don't
1861 set arm_hwcap to zero.
1863 2015-07-30 Yao Qi <yao.qi@linaro.org>
1865 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1866 Use regcache->tdesc instead.
1867 (arm_store_wmmxregset): Likewise.
1868 (arm_fill_vfpregset): Likewise.
1869 (arm_store_vfpregset): Likewise.
1871 2015-07-30 Yao Qi <yao.qi@linaro.org>
1873 * linux-arm-low.c: Include arch/arm.h.
1874 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1875 (arm_store_gregset): Likewise.
1877 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1879 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1880 ptrace's 4th parameter.
1882 2015-07-27 Yao Qi <yao.qi@linaro.org>
1884 * configure.srv (case aarch64*-*-linux*): Don't set
1887 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1889 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1891 * linux-arm-low.c: Likewise.
1892 * linux-cris-low.c: Likewise.
1893 * linux-crisv32-low.c: Likewise.
1894 * linux-low.c: Likewise.
1895 * linux-m68k-low.c: Likewise.
1896 * linux-mips-low.c: Likewise.
1897 * linux-nios2-low.c: Likewise.
1898 * linux-s390-low.c: Likewise.
1899 * linux-sparc-low.c: Likewise.
1900 * linux-tic6x-low.c: Likewise.
1901 * linux-tile-low.c: Likewise.
1902 * linux-x86-low.c: Likewise.
1904 2015-07-24 Pedro Alves <palves@redhat.com>
1906 * config.in: Regenerate.
1907 * configure: Regenerate.
1909 2015-07-24 Pedro Alves <palves@redhat.com>
1911 * acinclude.m4: Include ../ptrace.m4.
1912 * configure.ac: Call GDB_AC_PTRACE.
1913 * config.in, configure: Regenerate.
1915 2015-07-24 Yao Qi <yao.qi@linaro.org>
1917 * linux-low.c (linux_create_inferior): Remove setting to
1918 proc->priv->new_inferior.
1919 (linux_attach): Likewise.
1920 (linux_low_filter_event): Likewise.
1921 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1923 2015-07-24 Yao Qi <yao.qi@linaro.org>
1925 * linux-low.c (linux_arch_setup): New function.
1926 (linux_low_filter_event): If proc->tdesc is NULL and
1927 proc->attached is true, call the_low_target.arch_setup.
1928 Otherwise, keep status pending, and return.
1929 (linux_resume_one_lwp_throw): Don't call get_pc if
1930 thread->while_stepping isn't NULL. Don't call
1931 get_thread_regcache if proc->tdesc is NULL.
1932 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1933 (linux_target_ops): Install arch_setup.
1934 * server.c (start_inferior): Call the_target->arch_setup.
1935 * target.h (struct target_ops) <arch_setup>: New field.
1936 (target_arch_setup): New marco.
1937 * lynx-low.c (lynx_target_ops): Update.
1938 * nto-low.c (nto_target_ops): Update.
1939 * spu-low.c (spu_target_ops): Update.
1940 * win32-low.c (win32_target_ops): Update.
1942 2015-07-24 Yao Qi <yao.qi@linaro.org>
1944 * linux-low.c (linux_add_process): Don't set
1945 proc->priv->new_inferior.
1946 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1947 (linux_attach): Likewise.
1949 2015-07-24 Yao Qi <yao.qi@linaro.org>
1951 * server.c (start_inferior): Code refactor.
1953 2015-07-24 Yao Qi <yao.qi@linaro.org>
1955 * server.c (process_serial_event): Set general_thread.
1957 2015-07-21 Yao Qi <yao.qi@linaro.org>
1959 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1960 aarch64_linux_get_debug_reg_capacity.
1962 2015-07-17 Yao Qi <yao.qi@linaro.org>
1964 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1965 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1966 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1967 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1968 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1969 (AARCH64_HWP_ALIGNMENT): Likewise.
1970 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1971 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1972 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1973 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1974 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1975 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1976 (struct aarch64_debug_reg_state): Likewise.
1977 (struct arch_lwp_info): Likewise.
1978 (aarch64_align_watchpoint): Likewise.
1979 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1980 (aarch64_watchpoint_length): Likewise.
1981 (aarch64_point_encode_ctrl_reg): Likewise
1982 (aarch64_point_is_aligned): Likewise.
1983 (aarch64_align_watchpoint): Likewise.
1984 (aarch64_linux_set_debug_regs):
1985 (aarch64_dr_state_insert_one_point): Likewise.
1986 (aarch64_dr_state_remove_one_point): Likewise.
1987 (aarch64_handle_breakpoint): Likewise.
1988 (aarch64_handle_aligned_watchpoint): Likewise.
1989 (aarch64_handle_unaligned_watchpoint): Likewise.
1990 (aarch64_handle_watchpoint): Likewise.
1992 2015-07-17 Yao Qi <yao.qi@linaro.org>
1994 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1995 and don't aarch64_get_debug_reg_state. All callers update.
1996 (aarch64_handle_aligned_watchpoint): Likewise.
1997 (aarch64_handle_unaligned_watchpoint): Likewise.
1998 (aarch64_handle_watchpoint): Likewise.
1999 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2000 (aarch64_remove_point): Likewise.
2002 2015-07-17 Yao Qi <yao.qi@linaro.org>
2004 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2006 (aarch64_handle_unaligned_watchpoint): Likewise.
2008 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2010 Revert the previous 3 commits:
2011 Move gdb_regex* to common/
2012 Move linux_find_memory_regions_full & co.
2013 gdbserver build-id attribute generator
2015 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2016 Jan Kratochvil <jan.kratochvil@redhat.com>
2018 gdbserver build-id attribute generator.
2019 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2020 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2021 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2023 (get_dynamic): Use find_pdhr to traverse program headers.
2024 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2025 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2026 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2027 (get_hex_build_id): New.
2028 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2029 to reply XML document.
2031 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2032 Jan Kratochvil <jan.kratochvil@redhat.com>
2034 * target.c: Include target/target-utils.h and fcntl.h.
2035 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2036 (target_fileio_read_stralloc): New functions.
2038 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2040 * Makefile.in (OBS): Add gdb_regex.o.
2042 * config.in: Rebuilt.
2043 * configure: Rebuilt.
2045 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2046 Jan Kratochvil <jan.kratochvil@redhat.com>
2048 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2049 * Makefile.in (OBS): Add target-utils.o.
2050 (linux-maps.o, target-utils.o): New.
2051 * configure.srv (srv_linux_obj): Add linux-maps.o.
2053 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2055 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2057 (the_low_target): Install it.
2059 2015-07-14 Pedro Alves <palves@redhat.com>
2061 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2062 Instead, ignore ECHILD, and throw an error for other errnos.
2064 2015-07-10 Pedro Alves <palves@redhat.com>
2066 * event-loop.c (struct callback_event) <data>: Change type to
2067 gdb_client_data instance instead of gdb_client_data pointer.
2068 (append_callback_event): Adjust.
2070 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2072 * linux-aarch64-low.c: Add comments for each linux_target_ops
2073 method. Remove comments already covered in target_ops and
2074 linux_target_ops definitions.
2075 (the_low_target): Add comments for each unimplemented method.
2077 2015-07-09 Yao Qi <yao.qi@linaro.org>
2079 * linux-aarch64-low.c (aarch64_regmap): Remove.
2080 (aarch64_usrregs_info): Remove.
2081 (regs_info): Set field usrregs to NULL.
2083 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2085 * linux-low.c: Include "rsp-low.h"
2086 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2087 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2088 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2089 (handle_btrace_enable_pt): New.
2090 (handle_btrace_general_set): Support "pt".
2091 (handle_btrace_conf_general_set): Support "pt:size".
2093 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2095 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2098 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2100 * linux-aarch64-low.c: Remove comment about endianness.
2101 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2102 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2105 2015-06-24 Gary Benson <gbenson@redhat.com>
2107 * linux-i386-ipa.c (stdint.h): Do not include.
2108 * lynx-i386-low.c (stdint.h): Likewise.
2109 * lynx-ppc-low.c (stdint.h): Likewise.
2110 * mem-break.c (stdint.h): Likewise.
2111 * thread-db.c (stdint.h): Likewise.
2112 * tracepoint.c (stdint.h): Likewise.
2113 * win32-low.c (stdint.h): Likewise.
2115 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2117 * server.c (write_qxfer_response): Update call to
2118 remote_escape_output.
2120 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2121 Jan Kratochvil <jan.kratochvil@redhat.com>
2123 Merge multiple hex conversions.
2124 * gdbreplay.c (tohex): Rename to 'fromhex'.
2125 (logchar): Use fromhex.
2127 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2129 * server.c (handle_qxfer_libraries): Set `version' attribute for
2132 2015-06-10 Gary Benson <gbenson@redhat.com>
2134 * target.h (struct target_ops) <multifs_open>: New field.
2135 <multifs_unlink>: Likewise.
2136 <multifs_readlink>: Likewise.
2137 * linux-low.c (nat/linux-namespaces.h): New include.
2138 (linux_target_ops): Initialize the_target->multifs_open,
2139 the_target->multifs_unlink and the_target->multifs_readlink.
2140 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2141 * hostio.c (hostio_fs_pid): New static variable.
2142 (hostio_handle_new_gdb_connection): New function.
2143 (handle_setfs): Likewise.
2144 (handle_open): Use the_target->multifs_open as appropriate.
2145 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2146 (handle_readlink): Use the_target->multifs_readlink as
2148 (handle_vFile): Handle vFile:setfs packets.
2149 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2150 after target_handle_new_gdb_connection.
2152 2015-06-10 Gary Benson <gbenson@redhat.com>
2154 * configure.ac (AC_CHECK_FUNCS): Add setns.
2155 * config.in: Regenerate.
2156 * configure: Likewise.
2157 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2158 (linux-namespaces.o): New rule.
2159 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2161 2015-06-09 Gary Benson <gbenson@redhat.com>
2163 * hostio.c (handle_open): Process mode argument with
2164 fileio_to_host_mode.
2166 2015-06-01 Yao Qi <yao.qi@linaro.org>
2168 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2169 * linux-x86-low.c: Likewise.
2171 2015-05-28 Don Breazeal <donb@codesourcery.com>
2173 * linux-low.c (handle_extended_wait): Initialize
2174 thread_info.last_resume_kind for new fork children.
2176 2015-05-15 Pedro Alves <palves@redhat.com>
2178 * target.h (target_handle_new_gdb_connection): Rewrite using if
2179 wrapped in do/while.
2181 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2183 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2184 * configure, config.in: Regenerate.
2185 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2188 2015-05-12 Don Breazeal <donb@codesourcery.com>
2190 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2191 PTRACE_EVENT_VFORK_DONE.
2192 (linux_low_ptrace_options, extended_event_reported): Add vfork
2194 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2195 and "vforkdone" for RSP 'T' Stop Reply Packet.
2196 * server.h (report_vfork_events): Declare
2199 2015-05-12 Don Breazeal <donb@codesourcery.com>
2201 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2202 (the_low_target) <new_fork>: Initialize new member.
2203 * linux-arm-low.c (arm_new_fork): New function.
2204 (the_low_target) <new_fork>: Initialize new member.
2205 * linux-low.c (handle_extended_wait): Call new target function
2207 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2208 * linux-mips-low.c (mips_add_watchpoint): New function
2209 extracted from mips_insert_point.
2210 (the_low_target) <new_fork>: Initialize new member.
2211 (mips_linux_new_fork): New function.
2212 (mips_insert_point): Call mips_add_watchpoint.
2213 * linux-x86-low.c (x86_linux_new_fork): New function.
2214 (the_low_target) <new_fork>: Initialize new member.
2216 2015-05-12 Don Breazeal <donb@codesourcery.com>
2218 * linux-low.c (handle_extended_wait): Implement return value,
2219 rename argument 'event_child' to 'event_lwp', handle
2220 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2221 (linux_low_ptrace_options): New function.
2222 (linux_low_filter_event): Call linux_low_ptrace_options,
2223 use different argument fo linux_enable_event_reporting,
2224 use return value from handle_extended_wait.
2225 (extended_event_reported): New function.
2226 (linux_wait_1): Call extended_event_reported and set
2227 status to report fork events.
2228 (linux_write_memory): Add pid to debug message.
2229 (reset_lwp_ptrace_options_callback): New function.
2230 (linux_handle_new_gdb_connection): New function.
2231 (linux_target_ops): Initialize new structure member.
2232 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2233 * lynx-low.c: Initialize new structure member.
2234 * remote-utils.c (prepare_resume_reply): Implement stop reason
2235 "fork" for "T" stop message.
2236 * server.c (handle_query): Call handle_new_gdb_connection.
2237 * server.h (report_fork_events): Declare global flag.
2238 * target.h (struct target_ops) <handle_new_gdb_connection>:
2240 (target_handle_new_gdb_connection): New macro.
2241 * win32-low.c: Initialize new structure member.
2243 2015-05-12 Don Breazeal <donb@codesourcery.com>
2245 * mem-break.c (APPEND_TO_LIST): Define macro.
2246 (clone_agent_expr): New function.
2247 (clone_one_breakpoint): New function.
2248 (clone_all_breakpoints): New function.
2249 * mem-break.h: Declare new functions.
2251 2015-05-12 Don Breazeal <donb@codesourcery.com>
2253 * linux-low.c (linux_supports_fork_events): New function.
2254 (linux_supports_vfork_events): New function.
2255 (linux_target_ops): Initialize new structure members.
2256 (initialize_low): Call linux_check_ptrace_features.
2257 * lynx-low.c (lynx_target_ops): Initialize new structure
2259 * server.c (report_fork_events, report_vfork_events):
2261 (handle_query): Add new features to qSupported packet and
2263 (captured_main): Initialize new global variables.
2264 * target.h (struct target_ops) <supports_fork_events>:
2266 <supports_vfork_events>: New member.
2267 (target_supports_fork_events): New macro.
2268 (target_supports_vfork_events): New macro.
2269 * win32-low.c (win32_target_ops): Initialize new structure
2272 2015-05-12 Gary Benson <gbenson@redhat.com>
2274 * server.c (handle_qxfer_exec_file): Use current process
2277 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2279 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2280 Remove HAVE_PTRACE_GETREGS conditionals.
2281 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2282 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2284 2015-05-08 Yao Qi <yao.qi@linaro.org>
2286 * linux-low.c (linux_supports_conditional_breakpoints): New
2288 (linux_target_ops): Install new target method.
2289 * lynx-low.c (lynx_target_ops): Install NULL hook for
2290 supports_conditional_breakpoints.
2291 * nto-low.c (nto_target_ops): Likewise.
2292 * spu-low.c (spu_target_ops): Likewise.
2293 * win32-low.c (win32_target_ops): Likewise.
2294 * server.c (handle_query): Check
2295 target_supports_conditional_breakpoints.
2296 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2298 (target_supports_conditional_breakpoints): New macro.
2300 2015-05-06 Pedro Alves <palves@redhat.com>
2303 * server.c (start_inferior): If the process exits, mourn it.
2305 2015-04-21 Gary Benson <gbenson@redhat.com>
2307 * hostio.c (fileio_open_flags_to_host): Factored out to
2308 fileio_to_host_openflags in common/fileio.c. Single use
2311 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2313 * linux-xtensa-low.c (xtensa_fill_gregset)
2314 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2317 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2319 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2320 (regs_info): Replace usrregs pointer with NULL.
2322 2015-04-17 Gary Benson <gbenson@redhat.com>
2324 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2325 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2326 * server.c (handle_qxfer_exec_file): New function.
2327 (qxfer_packets): Add exec-file entry.
2328 (handle_query): Report qXfer:exec-file:read as supported packet.
2330 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2332 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2334 2015-04-09 Gary Benson <gbenson@redhat.com>
2336 * hostio-errno.c (errno_to_fileio_error): Remove function.
2337 Update caller to use remote_fileio_to_fio_error.
2339 2015-04-09 Yao Qi <yao.qi@linaro.org>
2341 * linux-low.c (linux_insert_point): Call
2342 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2343 (linux_remove_point): Call remove_memory_breakpoint if type is
2345 * linux-x86-low.c (x86_insert_point): Don't call
2346 insert_memory_breakpoint.
2347 (x86_remove_point): Don't call remove_memory_breakpoint.
2349 2015-04-01 Pedro Alves <palves@redhat.com>
2350 Cleber Rosa <crosa@redhat.com>
2352 * server.c (gdbserver_usage): Reorganize and extend the usage
2355 2015-03-24 Pedro Alves <palves@redhat.com>
2357 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2358 output. Also dump TRAP_TRACE.
2359 (linux_low_filter_event): In debug output, distinguish a
2360 resume_stop SIGSTOP from a delayed SIGSTOP.
2362 2015-03-24 Gary Benson <gbenson@redhat.com>
2364 * linux-x86-low.c (x86_linux_new_thread): Moved to
2366 (x86_linux_prepare_to_resume): Likewise.
2368 2015-03-24 Gary Benson <gbenson@redhat.com>
2370 * Makefile.in (x86-linux-dregs.o): New rule.
2371 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2372 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2373 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2374 (x86_linux_dr_get): Likewise.
2375 (x86_linux_dr_set): Likewise.
2376 (update_debug_registers_callback): Likewise.
2377 (x86_linux_dr_set_addr): Likewise.
2378 (x86_linux_dr_get_addr): Likewise.
2379 (x86_linux_dr_set_control): Likewise.
2380 (x86_linux_dr_get_control): Likewise.
2381 (x86_linux_dr_get_status): Likewise.
2382 (x86_linux_update_debug_registers): Likewise.
2384 2015-03-24 Gary Benson <gbenson@redhat.com>
2386 * linux-x86-low.c (x86_linux_update_debug_registers):
2387 New function, factored out from...
2388 (x86_linux_prepare_to_resume): ...this.
2390 2015-03-24 Gary Benson <gbenson@redhat.com>
2392 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2393 (x86_linux_dr_set): Likewise.
2394 (update_debug_registers_callback): Likewise.
2395 (x86_linux_dr_set_addr): Likewise.
2396 (x86_linux_dr_get_addr): Likewise.
2397 (x86_linux_dr_set_control): Likewise.
2398 (x86_linux_dr_get_control): Likewise.
2399 (x86_linux_dr_get_status): Likewise.
2400 (x86_linux_prepare_to_resume): Likewise.
2402 2015-03-24 Gary Benson <gbenson@redhat.com>
2404 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2405 Use perror_with_name. Pass string through gettext.
2406 (x86_linux_dr_set): Likewise.
2408 2015-03-24 Gary Benson <gbenson@redhat.com>
2410 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2411 (x86_linux_dr_set_addr): ...this.
2412 (x86_dr_low_get_addr): Rename to...
2413 (x86_linux_dr_get_addr): ...this.
2414 (x86_dr_low_set_control): Rename to...
2415 (x86_linux_dr_set_control): ...this.
2416 (x86_dr_low_get_control): Rename to...
2417 (x86_linux_dr_get_control): ...this.
2418 (x86_dr_low_get_status): Rename to...
2419 (x86_linux_dr_get_status): ...this.
2420 (x86_dr_low): Update with new function names.
2422 2015-03-24 Gary Benson <gbenson@redhat.com>
2424 * Makefile.in (x86-linux.o): New rule.
2425 * configure.srv: Add x86-linux.o to relevant targets.
2426 * linux-low.c (lwp_set_arch_private_info): New function.
2427 (lwp_arch_private_info): Likewise.
2428 * linux-x86-low.c: Include nat/x86-linux.h.
2429 (arch_lwp_info): Removed structure.
2430 (update_debug_registers_callback):
2431 Use lwp_set_debug_registers_changed.
2432 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2433 and lwp_set_debug_registers_changed.
2434 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2436 2015-03-24 Gary Benson <gbenson@redhat.com>
2438 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2439 * linux-arm-low.c (arm_new_thread): Likewise.
2440 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2441 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2442 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2443 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2445 2015-03-24 Gary Benson <gbenson@redhat.com>
2447 * linux-low.c (ptid_of_lwp): New function.
2448 (lwp_is_stopped): Likewise.
2449 (lwp_stop_reason): Likewise.
2450 * linux-x86-low.c (update_debug_registers_callback):
2452 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2455 2015-03-24 Gary Benson <gbenson@redhat.com>
2457 * linux-low.h (linux_stop_lwp): Remove declaration.
2459 2015-03-24 Gary Benson <gbenson@redhat.com>
2461 * linux-low.h: Include nat/linux-nat.h.
2462 * linux-low.c (iterate_over_lwps_args): New structure.
2463 (iterate_over_lwps_filter): New function.
2464 (iterate_over_lwps): Likewise.
2465 * linux-x86-low.c (update_debug_registers_callback):
2466 Update signature to what iterate_over_lwps expects.
2467 Remove PID check that iterate_over_lwps now performs.
2468 (x86_dr_low_set_addr): Use iterate_over_lwps.
2469 (x86_dr_low_set_control): Likewise.
2471 2015-03-24 Gary Benson <gbenson@redhat.com>
2473 * linux-x86-low.c (x86_debug_reg_state): New function.
2474 (x86_linux_prepare_to_resume): Use the above.
2476 2015-03-24 Gary Benson <gbenson@redhat.com>
2478 * linux-low.c (current_lwp_ptid): New function.
2479 * linux-x86-low.c: Include nat/linux-nat.h.
2480 (x86_dr_low_get_addr): Use current_lwp_ptid.
2481 (x86_dr_low_get_control): Likewise.
2482 (x86_dr_low_get_status): Likewise.
2484 2015-03-20 Pedro Alves <palves@redhat.com>
2486 * tracepoint.c (cmd_qtstatus): Make "str" const.
2488 2015-03-20 Pedro Alves <palves@redhat.com>
2490 * server.c (handle_general_set): Make "req_str" const.
2492 2015-03-19 Pedro Alves <palves@redhat.com>
2494 * linux-low.c (linux_resume_one_lwp): Rename to ...
2495 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2496 instead call perror_with_name.
2497 (check_ptrace_stopped_lwp_gone): New function.
2498 (linux_resume_one_lwp): Reimplement as wrapper around
2499 linux_resume_one_lwp_throw that swallows errors if the LWP is
2502 2015-03-19 Pedro Alves <palves@redhat.com>
2504 * linux-low.c (count_events_callback, select_event_lwp_callback):
2505 No longer check whether the thread has resume_stop as last resume
2508 2015-03-19 Pedro Alves <palves@redhat.com>
2510 * linux-low.c (count_events_callback, select_event_lwp_callback):
2511 Use the lwp's status_pending_p field, not the thread's.
2513 2015-03-19 Pedro Alves <palves@redhat.com>
2515 * linux-low.c (select_event_lwp_callback): Update comments to
2516 no longer mention SIGTRAP.
2518 2015-03-18 Gary Benson <gbenson@redhat.com>
2520 * server.c (handle_query): Do not report vFile:fstat as supported.
2522 2015-03-11 Gary Benson <gbenson@redhat.com>
2524 * hostio.c (sys/types.h): New include.
2525 (sys/stat.h): Likewise.
2526 (common-remote-fileio.h): Likewise.
2527 (handle_fstat): New function.
2528 (handle_vFile): Handle vFile:fstat packets.
2530 2015-03-11 Gary Benson <gbenson@redhat.com>
2532 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2533 struct stat.st_blocks and struct stat.st_blksize.
2534 * configure: Regenerate.
2535 * config.in: Likewise.
2536 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2537 (OBS): Add common-remote-fileio.o.
2538 (common-remote-fileio.o): New rule.
2540 2015-03-09 Pedro Alves <palves@redhat.com>
2542 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2543 'struct sockaddr' pointer in 'accept' call.
2545 2015-03-09 Pedro Alves <palves@redhat.com>
2548 2015-03-07 Pedro Alves <palves@redhat.com>
2549 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2550 or <winsock2.h> here. Instead include "gdb_socket.h".
2551 (remote_open): Use union gdb_sockaddr_u.
2552 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2553 or <winsock2.h> here. Instead include "gdb_socket.h".
2554 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2555 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2557 (init_named_socket, gdb_agent_helper_thread): Use union
2560 2015-03-07 Pedro Alves <palves@redhat.com>
2562 * configure.ac (build_warnings): Move
2563 -Wdeclaration-after-statement to the C-specific set.
2564 * configure: Regenerate.
2566 2015-03-07 Pedro Alves <palves@redhat.com>
2568 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2569 or <winsock2.h> here. Instead include "gdb_socket.h".
2570 (remote_open): Use union gdb_sockaddr_u.
2571 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2572 or <winsock2.h> here. Instead include "gdb_socket.h".
2573 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2574 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2576 (init_named_socket, gdb_agent_helper_thread): Use union
2579 2015-03-07 Pedro Alves <palves@redhat.com>
2581 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2584 2015-03-06 Yao Qi <yao.qi@linaro.org>
2586 * linux-aarch64-low.c (aarch64_insert_point): Use
2587 show_debug_regs as a boolean.
2588 (aarch64_remove_point): Likewise.
2590 2015-03-05 Pedro Alves <palves@redhat.com>
2592 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2593 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2594 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2595 * nto-low.c (nto_target_ops): Likewise.
2596 * spu-low.c (spu_target_ops): Likewise.
2597 * win32-low.c (win32_target_ops): Likewise.
2599 2015-03-04 Pedro Alves <palves@redhat.com>
2601 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2602 Decide whether a breakpoint triggered based on the SIGTRAP's
2604 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2605 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2606 (linux_low_filter_event): Check for breakpoints before checking
2608 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2610 (linux_stopped_by_sw_breakpoint)
2611 (linux_supports_stopped_by_sw_breakpoint)
2612 (linux_stopped_by_hw_breakpoint)
2613 (linux_supports_stopped_by_hw_breakpoint): New functions.
2614 (linux_target_ops): Install new target methods.
2616 2015-03-04 Pedro Alves <palves@redhat.com>
2618 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2619 * server.c (swbreak_feature, hwbreak_feature): New globals.
2620 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2621 (captured_main): Clear swbreak_feature and hwbreak_feature.
2622 * server.h (swbreak_feature, hwbreak_feature): Declare.
2623 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2624 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2625 supports_stopped_by_hw_breakpoint>: New fields.
2626 (target_supports_stopped_by_sw_breakpoint)
2627 (target_stopped_by_sw_breakpoint)
2628 (target_supports_stopped_by_hw_breakpoint)
2629 (target_stopped_by_hw_breakpoint): Declare.
2631 2015-03-04 Pedro Alves <palves@redhat.com>
2633 enum lwp_stop_reason -> enum target_stop_reason
2634 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2635 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2636 (linux_wait_1, stuck_in_jump_pad_callback)
2637 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2638 (linux_stopped_by_watchpoint):
2639 * linux-low.h (enum lwp_stop_reason): Delete.
2640 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2641 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2643 2015-03-04 Yao Qi <yao.qi@linaro.org>
2645 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2647 2015-03-03 Gary Benson <gbenson@redhat.com>
2649 * hostio.c (handle_vFile): Fix prefix lengths.
2651 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2653 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2656 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2658 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2659 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2660 (clean): Add "rm -f" for above C files.
2661 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2662 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2663 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2664 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2665 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2666 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2667 (init_registers_s390x_vx_linux64)
2668 (init_registers_s390x_tevx_linux64)
2669 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2670 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2672 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2673 (s390_store_vxrs_high): New functions.
2674 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2676 (s390_arch_setup): Add logic for selecting one of the new target
2677 descriptions. Activate the new vector regsets if applicable.
2678 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2679 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2680 and init_registers_s390x_tevx_linux64.
2682 2015-03-01 Pedro Alves <palves@redhat.com>
2684 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2687 2015-02-27 Pedro Alves <palves@redhat.com>
2689 * linux-x86-low.c (u_debugreg_offset): New function.
2690 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2692 2015-02-27 Pedro Alves <palves@redhat.com>
2694 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2695 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2696 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2697 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2698 (ps_lsetfpregs, ps_getpid)
2699 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2700 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2701 (ps_lsetxregs, ps_plog): Declare.
2703 2015-02-27 Pedro Alves <palves@redhat.com>
2705 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2706 IP_AGENT_EXPORT_FUNC.
2707 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2708 IP_AGENT_EXPORT_FUNC.
2709 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2710 (IP_AGENT_EXPORT): Delete.
2711 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2712 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2713 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2714 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2715 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2716 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2717 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2718 (traceframe_read_count, traceframe_write_count)
2719 (traceframes_created, trace_state_variables, get_raw_reg)
2720 (get_trace_state_variable_value, set_trace_state_variable_value)
2721 (ust_loaded, helper_thread_id, cmd_buf): Use
2722 IPA_SYM_EXPORTED_NAME.
2723 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2724 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2725 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2726 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2727 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2728 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2729 EXTERN_C_PUSH/EXTERN_C_POP.
2730 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2731 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2732 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2733 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2734 (traceframe_write_count, traceframe_read_count)
2735 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2736 (about_to_request_buffer_space, get_trace_state_variable_value)
2737 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2738 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2739 EXTERN_C_PUSH/EXTERN_C_POP.
2740 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2741 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2742 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2743 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2744 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2745 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2746 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2747 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2749 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2750 (IP_AGENT_EXPORT_VAR_DECL): Define.
2752 (gdb_agent_get_raw_reg): Declare.
2754 2015-02-27 Tom Tromey <tromey@redhat.com>
2755 Pedro Alves <palves@redhat.com>
2757 Rename symbols whose names are reserved C++ keywords throughout.
2759 2015-02-27 Pedro Alves <palves@redhat.com>
2761 * Makefile.in (COMPILER): New, get it from autoconf.
2762 (CXX): Get from autoconf instead.
2763 (COMPILE.pre): Use COMPILER.
2764 (CC-LD): Rename to ...
2765 (CC_LD): ... this. Use COMPILER.
2766 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2767 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2768 * acinclude.m4: Include build-with-cxx.m4.
2769 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2770 Disable -Werror by default if building in C++ mode.
2771 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2772 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2773 the C++ compiler. Save/restore CXXFLAGS too.
2774 * configure: Regenerate.
2776 2015-02-27 Pedro Alves <palves@redhat.com>
2778 * acinclude.m4: Include libiberty.m4.
2779 * configure.ac: Call libiberty_INIT.
2780 * config.in, configure: Regenerate.
2782 2015-02-26 Pedro Alves <palves@redhat.com>
2784 * linux-low.c (linux_wait_1): When incrementing the PC past a
2785 program breakpoint always use the_low_target.breakpoint_len as
2786 increment, rather than the maximum between that and
2787 the_low_target.decr_pc_after_break.
2789 2015-02-23 Pedro Alves <palves@redhat.com>
2791 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2792 thread was doing a step-over; always adjust the PC if
2793 we stepped over a permanent breakpoint.
2794 (linux_wait_1): If we stepped over breakpoint that was on top of a
2795 permanent breakpoint, manually advance the PC past it.
2797 2015-02-23 Pedro Alves <palves@redhat.com>
2799 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2801 (x86_fill_gregset, x86_store_gregset): Use it when handling
2804 2015-02-20 Pedro Alves <palves@redhat.com>
2806 * thread-db.c: Include "nat/linux-procfs.h".
2807 (thread_db_init): Skip listing new threads if the kernel supports
2808 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2810 2015-02-20 Pedro Alves <palves@redhat.com>
2812 * linux-low.c (status_pending_p_callback): Use ptid_match.
2814 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2816 PR breakpoints/16812
2817 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2818 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2819 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2821 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2823 PR breakpoints/15956
2824 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2826 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2828 * linux-low.c (linux_low_btrace_conf): Print size.
2829 * server.c (handle_btrace_conf_general_set): New.
2830 (hanle_general_set): Call handle_btrace_conf_general_set.
2831 (handle_query): Report Qbtrace-conf:bts:size as supported.
2833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2835 * linux-low.c (linux_low_enable_btrace): Update parameters.
2836 (linux_low_btrace_conf): New.
2837 (linux_target_ops)<to_btrace_conf>: Initialize.
2838 * server.c (current_btrace_conf): New.
2839 (handle_btrace_enable): Rename to ...
2840 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2841 to target_enable_btrace. Update comment. Update users.
2842 (handle_qxfer_btrace_conf): New.
2843 (qxfer_packets): Add btrace-conf entry.
2844 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2845 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2846 (target_ops)<read_btrace_conf>: New.
2847 (target_enable_btrace): Update parameters.
2848 (target_read_btrace_conf): New.
2850 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2852 * server.c (handle_btrace_general_set): Remove call to
2853 target_supports_btrace.
2854 (supported_btrace_packets): New.
2855 (handle_query): Call supported_btrace_packets.
2856 * target.h: include btrace-common.h.
2857 (btrace_target_info): Removed.
2858 (supports_btrace, target_supports_btrace): Update parameters.
2860 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2862 * Makefile.in (SFILES): Add common/btrace-common.c.
2863 (OBS): Add common/btrace-common.o.
2864 (btrace-common.o): Add build rules.
2865 * linux-low: Include btrace-common.h.
2866 (linux_low_read_btrace): Use struct btrace_data. Call
2867 btrace_data_init and btrace_data_fini.
2869 2015-02-06 Pedro Alves <palves@redhat.com>
2871 * thread-db.c (find_new_threads_callback): Add debug output.
2873 2015-02-04 Pedro Alves <palves@redhat.com>
2875 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2876 (resume_stopped_resumed_lwps): New function.
2877 (linux_wait_for_event_filtered): Use it.
2879 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2881 * Makefile.in (SFILES): Add linux-personality.c.
2882 (linux-personality.o): New rule.
2883 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2884 list of objects to be built.
2885 * linux-low.c: Include nat/linux-personality.h.
2886 (linux_create_inferior): Remove code to disable address space
2887 randomization (moved to ../nat/linux-personality.c). Create
2888 cleanup to disable address space randomization.
2890 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2892 * Makefile.in (posix-strerror.o): New rule.
2893 (mingw-strerror.o): Likewise.
2894 * configure: Regenerated.
2895 * configure.ac: Source file ../common/common.host. Initialize new
2896 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2898 2015-01-14 Yao Qi <yao@codesourcery.com>
2900 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2901 (ppc-linux.o): New rule.
2902 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2903 * configure.ac: AC_CHECK_FUNCS(getauxval).
2904 * config.in: Re-generated.
2905 * configure: Re-generated.
2906 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2907 ppc64_64bit_inferior_p
2909 2015-01-14 Yao Qi <yao@codesourcery.com>
2911 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2912 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2913 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2914 (PT_ORIG_R3, PT_TRAP): Likewise.
2915 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2916 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2917 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2919 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2921 * i387-fp.c (i387_cache_to_xsave): In look over
2922 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2923 zmmh_low_space field by use of zmmh_high_space.
2925 2015-01-09 Pedro Alves <palves@redhat.com>
2927 * linux-low.c (step_over_bkpt): Move higher up in the file.
2928 (handle_extended_wait): Don't store the stop_pc here.
2929 (get_stop_pc): Adjust comments and rename to ...
2930 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2931 stopped for a software breakpoint or hardware breakpoint.
2932 (thread_still_has_status_pending_p): New function.
2933 (status_pending_p_callback): Use
2934 thread_still_has_status_pending_p. If the event is no longer
2935 interesting, resume the LWP.
2936 (handle_tracepoints): Add assert.
2937 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2938 (wstatus_maybe_breakpoint): New function.
2939 (cancel_breakpoint): Delete function.
2940 (check_stopped_by_watchpoint): New function, factored out from
2941 linux_low_filter_event.
2942 (lp_status_maybe_breakpoint): Delete function.
2943 (linux_low_filter_event): Remove filter_ptid argument.
2944 Leave thread group exits pending here. Store the LWP's stop PC.
2945 Always leave events pending.
2946 (linux_wait_for_event_filtered): Pull all events out of the
2947 kernel, and leave them all pending.
2948 (count_events_callback, select_event_lwp_callback): Consider all
2950 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2951 (select_event_lwp): Only give preference to the stepping LWP in
2952 all-stop mode. Adjust comments.
2953 (ignore_event): New function.
2954 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2955 references to cancel_breakpoints. Adjust to renames. Also give
2956 equal priority to all LWPs that have had events in non-stop mode.
2957 If reporting a software breakpoint event, unadjust the LWP's PC.
2958 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2959 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2961 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2962 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2963 (linux_stopped_by_watchpoint): Adjust.
2964 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2965 * linux-low.h (enum lwp_stop_reason): New.
2966 (struct lwp_info) <stop_pc>: Adjust comment.
2967 <stopped_by_watchpoint>: Delete field.
2968 <stop_reason>: New field.
2969 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2970 * mem-break.c (software_breakpoint_inserted_here)
2971 (hardware_breakpoint_inserted_here): New function.
2972 * mem-break.h (software_breakpoint_inserted_here)
2973 (hardware_breakpoint_inserted_here): Declare.
2974 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2975 (cancel_breakpoints): Delete.
2976 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2977 (upload_fast_traceframes): Remove references to
2980 2015-01-09 Pedro Alves <palves@redhat.com>
2982 * thread-db.c (find_new_threads_callback): Ignore thread if the
2983 kernel thread ID is -1.
2985 2015-01-09 Pedro Alves <palves@redhat.com>
2987 * linux-low.c (linux_attach_fail_reason_string): Move to
2988 nat/linux-ptrace.c, and rename.
2989 (linux_attach_lwp): Update comment.
2990 (attach_proc_task_lwp_callback): New function.
2991 (linux_attach): Adjust to rename and use
2992 linux_proc_attach_tgid_threads.
2993 (linux_attach_fail_reason_string): Delete declaration.
2995 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2997 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2998 * server.c (gdbserver_version): Likewise.
3000 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3002 * remote-utils.c: Include ctype.h.
3003 (input_interrupt): Explicitly handle the case when the char
3004 received is the NUL byte. Improve the printing of non-ASCII
3007 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3009 * linux-low.c (linux_low_filter_event): Update call to
3010 linux_enable_event_reporting following the addition of
3011 a new parameter to that function.
3013 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3016 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3017 (AARCH64_FPCR_REGNO): Likewise.
3018 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3019 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3020 (aarch64_store_fpregset): Likewise.
3022 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3024 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3025 Remove FIXME comment about assumption about N.
3027 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3029 * configure.ac: If large-file support is disabled in GDBserver,
3030 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3031 * configure: Regenerate.
3033 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3035 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3036 warning upon ENODATA from ptrace.
3037 * linux-s390-low.c (s390_store_tdb): New.
3038 (s390_regsets): Add regset for NT_S390_TDB.
3040 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3042 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3043 without a fill_function.
3044 * linux-s390-low.c (s390_fill_last_break): Remove.
3045 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3046 (s390_arch_setup): Use regset's size instead of fill_function for
3049 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3051 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3052 the regset's store function when ptrace returned an error.
3053 * regcache.c (get_thread_regcache): Invalidate register cache
3054 before fetching inferior's registers.
3056 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3058 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3059 while-loop as for-loop.
3060 (regsets_store_inferior_registers): Likewise.
3062 2014-11-28 Yao Qi <yao@codesourcery.com>
3064 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3065 * config.in, configure: Re-generate.
3066 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3069 2014-11-21 Yao Qi <yao@codesourcery.com>
3071 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3072 (AC_CHECK_HEADERS): Remove malloc.h.
3073 * configure: Re-generated.
3074 * config.in: Re-generated.
3075 * server.h: Don't include alloca.h and malloc.h.
3076 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3077 Don't include malloc.h.
3079 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3081 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3082 corresponding ERRNO check in same block.
3084 2014-11-12 Pedro Alves <palves@redhat.com>
3086 * server.c (cont_thread): Update comment.
3087 (start_inferior, attach_inferior): No longer clear cont_thread.
3088 (handle_v_cont): No longer set cont_thread.
3089 (captured_main): Clear cont_thread each time a GDB connects.
3091 2014-11-12 Pedro Alves <palves@redhat.com>
3093 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3094 thread, and don't resume all threads if the Hc thread has exited.
3096 2014-11-12 Pedro Alves <palves@redhat.com>
3098 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3099 the process group instead of to a specific LWP.
3101 2014-10-15 Pedro Alves <palves@redhat.com>
3104 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3106 (arm_set_thread_context): Delete.
3107 (the_low_target): Adjust.
3108 * win32-i386-low.c (debug_registers_changed)
3109 (debug_registers_used): Delete.
3110 (update_debug_registers_callback): New function.
3111 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3112 needing to update their debug registers.
3113 (win32_get_current_dr): New function.
3114 (x86_dr_low_get_addr, x86_dr_low_get_control)
3115 (x86_dr_low_get_status): Fetch the debug register from the thread
3117 (i386_initial_stuff): Adjust.
3118 (i386_get_thread_context): Remove current_event parameter. Don't
3119 clear debug_registers_changed nor copy DR values to
3121 (i386_set_thread_context): Delete.
3122 (i386_prepare_to_resume): New function.
3123 (i386_thread_added): Mark the thread as needing to update irs
3125 (the_low_target): Remove i386_set_thread_context and install
3126 i386_prepare_to_resume.
3127 * win32-low.c (win32_get_thread_context): Adjust.
3128 (win32_set_thread_context): Use SetThreadContext
3130 (win32_prepare_to_resume): New function.
3131 (win32_require_context): New function, factored out from ...
3132 (thread_rec): ... this.
3133 (continue_one_thread): Call win32_prepare_to_resume on each thread
3134 we're about to continue.
3135 (win32_resume): Call win32_prepare_to_resume on the event thread.
3136 * win32-low.h (struct win32_thread_info)
3137 <debug_registers_changed>: New field.
3138 (struct win32_target_ops): Change prototype of set_thread_context,
3139 delete set_thread_context and add prepare_to_resume.
3140 (win32_require_context): New declaration.
3142 2014-10-08 Gary Benson <gbenson@redhat.com>
3144 * server.h: Do not include common-exceptions.h.
3146 2014-10-08 Gary Benson <gbenson@redhat.com>
3148 * server.h: Do not include cleanups.h.
3150 2014-09-30 James Hogan <james.hogan@imgtec.com>
3152 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3155 2014-09-23 Yao Qi <yao@codesourcery.com>
3157 * linux-low.c (lp_status_maybe_breakpoint): New function.
3158 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3159 (count_events_callback): Likewise.
3160 (select_event_lwp_callback): Likewise.
3161 (cancel_breakpoints_callback): Likewise.
3163 2014-09-19 Don Breazeal <donb@codesourcery.com>
3165 * linux-low.c (handle_extended_wait): Call
3166 linux_ptrace_get_extended_event.
3167 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3168 linux_is_extended_waitstatus.
3170 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3172 * Makefile.in (CPPFLAGS): Define.
3173 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3174 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3176 2014-09-16 Gary Benson <gbenson@redhat.com>
3178 * inferiors.h (current_inferior): Renamed as...
3179 (current_thread): New variable. All uses updated.
3180 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3181 (maybe_move_out_of_jump_pad): Likewise.
3182 (cancel_breakpoint): Likewise.
3183 (linux_low_filter_event): Likewise.
3184 (wait_for_sigstop): Likewise.
3185 (linux_resume_one_lwp): Likewise.
3186 (need_step_over_p): Likewise.
3187 (start_step_over): Likewise.
3188 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3189 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3190 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3191 and save_inferior as saved_thread.
3192 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3194 (regcache_invalidate_thread): Likewise.
3195 * remote-utils.c (prepare_resume_reply): Likewise.
3196 * thread-db.c (thread_db_get_tls_address): Likewise.
3197 (disable_thread_event_reporting): Likewise.
3198 (remove_thread_event_breakpoints): Likewise.
3199 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3201 * target.h (set_desired_inferior): Renamed as...
3202 (set_desired_thread): New declaration. All uses updated.
3203 * server.c (myresume): Updated comment to reference thread instead
3205 (handle_serial_event): Likewise.
3206 (handle_target_event): Likewise.
3208 2014-09-12 Tom Tromey <tromey@redhat.com>
3209 Gary Benson <gbenson@redhat.com>
3211 * regcache.h: Include common-regcache.h.
3212 (regcache_read_pc): Don't declare.
3213 * regcache.c (get_thread_regcache_for_ptid): New function.
3215 2014-09-11 Tom Tromey <tromey@redhat.com>
3216 Gary Benson <gbenson@redhat.com>
3218 * symbol.c: New file.
3219 * Makefile.in (SFILES): Add symbol.c.
3220 (OBS): Add symbol.o.
3222 2014-09-11 Gary Benson <gbenson@redhat.com>
3224 * target.c (target_stop_ptid, target_continue_ptid): New
3227 2014-09-11 Tom Tromey <tromey@redhat.com>
3228 Gary Benson <gbenson@redhat.com>
3230 * target.h: Include target/target.h.
3231 * target.c (target_read_memory, target_read_uint32)
3232 (target_write_memory): New functions.
3234 2014-09-11 Gary Benson <gbenson@redhat.com>
3236 * server.h (debug_hw_points): Don't declare.
3237 * server.c (debug_hw_points): Don't define. Replace all uses
3238 with show_debug_regs.
3239 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3240 all uses with show_debug_regs.
3242 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3244 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3245 endianness into account.
3246 (ppc_supply_ptrace_register): Likewise.
3248 2014-09-03 James Hogan <james.hogan@imgtec.com>
3250 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3251 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3253 2014-09-03 Gary Benson <gbenson@redhat.com>
3255 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3256 ALL_DEBUG_ADDRESS_REGISTERS.
3258 2014-09-02 Gary Benson <gbenson@redhat.com>
3260 * i386-low.h: Renamed as...
3261 * x86-low.h: New file. All type, function and variable name
3262 prefixes changed from "i386_" to "x86_". All references updated.
3263 * i386-low.c: Renamed as...
3264 * x86-low.c: New file. All type, function and variable name
3265 prefixes changed from "i386_" to "x86_". All references updated.
3267 2014-09-02 Gary Benson <gbenson@redhat.com>
3269 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3270 (x86_linux_new_thread): Likewise.
3272 2014-08-29 Gary Benson <gbenson@redhat.com>
3274 * server.h (setjmp.h): Do not include.
3275 (toplevel): Do not declare.
3276 (common-exceptions.h): Include.
3277 (cleanups.h): Likewise.
3278 * server.c (toplevel): Do not define.
3279 (exit_code): New static global.
3280 (detach_or_kill_for_exit_cleanup): New function.
3281 (main): New function. Original main renamed to...
3282 (captured_main): New function.
3283 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3285 2014-08-29 Gary Benson <gbenson@redhat.com>
3287 * Makefile.in (SFILES): Add common/common-exceptions.c.
3288 (OBS): Add common-exceptions.o.
3289 (common-exceptions.o): New rule.
3290 * utils.c (prepare_to_throw_exception): New function.
3292 2014-08-29 Gary Benson <gbenson@redhat.com>
3294 * config.in: Regenerate.
3295 * configure: Likewise.
3297 2014-08-29 Gary Benson <gbenson@redhat.com>
3299 * Makefile.in (SFILES): Add common/cleanups.c.
3301 (cleanups.o): New rule.
3303 2014-08-29 Gary Benson <gbenson@redhat.com>
3305 * utils.c (internal_vwarning): New function.
3307 2014-08-28 Gary Benson <gbenson@redhat.com>
3309 * utils.h (fatal): Remove declaration.
3310 * utils.c (fatal): Remove function.
3312 2014-08-28 Gary Benson <gbenson@redhat.com>
3314 * tracepoint.c (gdb_agent_init): Replace fatal with
3316 (initialize_tracepoint): Likewise.
3318 2014-08-28 Gary Benson <gbenson@redhat.com>
3320 * remote-utils.c (remote_prepare): Replace fatal with error.
3322 2014-08-28 Gary Benson <gbenson@redhat.com>
3324 * linux-low.c (linux_async): Replace fatal with warning.
3326 (linux_start_non_stop): Return -1 if linux_async failed.
3328 2014-08-28 Gary Benson <gbenson@redhat.com>
3330 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3332 (i386_dr_low_get_addr): Remove vague comment.
3333 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3336 2014-08-28 Gary Benson <gbenson@redhat.com>
3338 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3339 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3341 (linux_resume_one_lwp): Likewise.
3342 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3344 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3345 with internal_error.
3346 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3347 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3348 (find_register_by_name): Replace fatal with internal_error.
3349 (find_regno): Likewise.
3350 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3351 * thread-db.c (thread_db_create_event): Likewise.
3352 (thread_db_load_search): Likewise.
3353 (try_thread_db_load_1): Likewise.
3354 * tracepoint.c (get_jump_space_head): Replace fatal with
3356 (claim_trampoline_space): Likewise.
3357 (have_fast_tracepoint_trampoline_buffer): Likewise.
3358 (cmd_qtstart): Likewise.
3359 (stop_tracing): Likewise.
3360 (fast_tracepoint_collecting): Likewise.
3361 (target_malloc): Likewise.
3362 (download_tracepoint): Likewise.
3363 (download_trace_state_variables): Replace check with gdb_assert.
3364 (upload_fast_traceframes): Replace fatal with internal_error.
3366 2014-08-19 Tom Tromey <tromey@redhat.com>
3367 Gary Benson <gbenson@redhat.com>
3369 * Makefile.in (SFILES): Add common/common-debug.c.
3370 (OBS): Add common-debug.o.
3371 (common-debug.o): New rule.
3372 * debug.h (debug_printf): Don't declare.
3373 * debug.c (debug_printf): Renamed and rewritten as...
3374 (debug_vprintf): New function.
3376 2014-08-19 Gary Benson <gbenson@redhat.com>
3378 * utils.h: Do not include print-utils.h.
3380 2014-08-19 Tom Tromey <tromey@redhat.com>
3381 Gary Benson <gbenson@redhat.com>
3383 * server.h: Add static assertion.
3384 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3386 2014-08-19 Tom Tromey <tromey@redhat.com>
3387 Gary Benson <gbenson@redhat.com>
3389 * Makefile.in (SFILES): Add common/errors.c.
3390 (OBS): Add errors.o.
3391 (IPA_OBS): Add errors-ipa.o.
3392 (errors.o): New rule.
3393 (errors-ipa.o): Likewise.
3394 * utils.h (perror_with_name, error, warning): Don't declare.
3395 * utils.c (warning): Renamed and rewritten as...
3396 (vwarning): New function.
3397 (error): Renamed and rewritten as...
3398 (verror): New function.
3399 (internal_error): Renamed and rewritten as...
3400 (internal_verror): New function.
3402 2014-08-07 Gary Benson <gbenson@redhat.com>
3404 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3405 * configure: Regenerate.
3406 * config.in: Likewise.
3407 * server.h: Do not include errno.h.
3408 * event-loop.c: Likewise.
3409 * hostio-errno.c: Likewise.
3410 * linux-low.c: Likewise.
3411 * remote-utils.c: Likewise.
3412 * spu-low.c: Likewise.
3413 * utils.c: Likewise.
3414 * gdbreplay.c: Unconditionally include errno.h.
3416 2014-08-07 Gary Benson <gbenson@redhat.com>
3418 * server.h: Do not include string.h.
3419 * event-loop.c: Likewise.
3420 * linux-low.c: Likewise.
3421 * regcache.c: Likewise.
3422 * remote-utils.c: Likewise.
3423 * spu-low.c: Likewise.
3424 * utils.c: Likewise.
3426 2014-08-07 Gary Benson <gbenson@redhat.com>
3428 * server.h: Do not include gdb_assert.h.
3430 2014-08-07 Gary Benson <gbenson@redhat.com>
3432 * server.h: Do not include common-utils.h.
3434 2014-08-07 Gary Benson <gbenson@redhat.com>
3436 * server.h: Do not include ptid.h.
3437 * notif.h: Likewise.
3439 2014-08-07 Gary Benson <gbenson@redhat.com>
3441 * server.h: Do not include gdb_locale.h.
3443 2014-08-07 Gary Benson <gbenson@redhat.com>
3445 * server.h: Do not include gdb/signals.h.
3446 * win32-low.c: Likewise.
3448 2014-08-07 Gary Benson <gbenson@redhat.com>
3450 * server.h: Do not include pathmax.h.
3452 2014-08-07 Gary Benson <gbenson@redhat.com>
3454 * server.h: Do not include libiberty.h.
3455 * linux-bfin-low.c: Likewise.
3457 2014-08-07 Gary Benson <gbenson@redhat.com>
3459 * server.h: Do not include ansidecl.h.
3461 2014-08-07 Gary Benson <gbenson@redhat.com>
3463 * linux-x86-low.c: Do not include stddef.h.
3464 * lynx-ppc-low.c: Likewise.
3465 * tracepoint.c: Likewise.
3467 2014-08-07 Gary Benson <gbenson@redhat.com>
3469 * server.h: Do not include stdarg.h.
3470 * nto-low.c: Likewise.
3472 2014-08-07 Gary Benson <gbenson@redhat.com>
3474 * server.h: Do not include stdlib.h.
3475 * inferiors.c: Likewise.
3476 * linux-low.c: Likewise.
3477 * regcache.c: Likewise.
3478 * spu-low.c: Likewise.
3479 * tracepoint.c: Likewise.
3480 * utils.c: Likewise.
3482 2014-08-07 Gary Benson <gbenson@redhat.com>
3484 * server.h: Do not include stdio.h.
3485 * linux-low.c: Likewise.
3486 * remote-utils.c: Likewise.
3487 * spu-low.c: Likewise.
3488 * utils.c: Likewise.
3489 * wincecompat.c: Likewise.
3491 2014-08-06 Gary Benson <gbenson@redhat.com>
3493 * regcache.c (init_register_cache): Move conditionals inside if.
3495 2014-08-06 Gary Benson <gbenson@redhat.com>
3497 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3499 2014-07-31 Gary Benson <gbenson@redhat.com>
3501 * ax.h: Do not include server.h.
3502 * gdbthread.h: Likewise.
3503 * lynx-low.h: Likewise.
3504 * notif.h: Likewise.
3506 2014-07-30 Gary Benson <gbenson@redhat.com>
3508 * server.h: Include common-defs.h.
3509 Do not include config.h or build-gnulib-gdbserver/config.h.
3511 2014-07-30 Gary Benson <gbenson@redhat.com>
3513 * hostio-errno.c: Move server.h to top of includes list.
3514 * inferiors.c: Likewise.
3515 * linux-x86-low.c: Likewise.
3516 * notif.c: Include server.h.
3518 2014-07-24 Tom Tromey <tromey@redhat.com>
3519 Gary Benson <gbenson@redhat.com>
3521 * server.h (CORE_ADDR): Now unsigned.
3523 2014-07-16 Pedro Alves <palves@redhat.com>
3525 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3527 2014-07-15 Pedro Alves <palves@redhat.com>
3529 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3532 2014-07-11 Pedro Alves <palves@redhat.com>
3534 * linux-low.c (kill_wait_lwp): New function, based on
3535 kill_one_lwp_callback, but use my_waitpid directly.
3536 (kill_one_lwp_callback, linux_kill): Use it.
3538 2014-06-23 Pedro Alves <palves@redhat.com>
3540 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3541 before setting DR0..DR3.
3543 2014-06-20 Gary Benson <gbenson@redhat.com>
3545 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3546 * configure: Regenerated.
3547 * config.in: Likewise.
3549 2014-06-20 Gary Benson <gbenson@redhat.com>
3551 * Makefile.in (SFILES): Update locations for files moved
3553 (object file files): Reordered.
3555 2014-06-20 Gary Benson <gbenson@redhat.com>
3557 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3558 (i386_dr_low_set_addr): Likewise.
3559 (i386_dr_low_get_addr): Likewise.
3560 (i386_dr_low_can_set_control): Likewise.
3561 (i386_dr_low_set_control): Likewise.
3562 (i386_dr_low_get_control): Likewise.
3563 (i386_dr_low_get_status): Likewise.
3564 (i386_get_debug_register_length): Likewise.
3565 * linux-x86-low.c (i386_dr_low_set_addr):
3566 Changed signature. Made static.
3567 (i386_dr_low_get_addr): Likewise.
3568 (i386_dr_low_set_control): Likewise.
3569 (i386_dr_low_get_control): Likewise.
3570 (i386_dr_low_get_status): Likewise.
3571 (i386_dr_low): New global variable.
3572 * win32-i386-low.c (i386_dr_low_set_addr):
3573 Changed signature. Made static.
3574 (i386_dr_low_get_addr): Likewise.
3575 (i386_dr_low_set_control): Likewise.
3576 (i386_dr_low_get_control): Likewise.
3577 (i386_dr_low_get_status): Likewise.
3578 (i386_dr_low): New global variable.
3580 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3582 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3583 * Makefile.in (AR, AR_FLAGS): Define.
3584 * configure: Regenerate.
3586 2014-06-19 Gary Benson <gbenson@redhat.com>
3588 * Makefile.in (i386-dregs.o): New rule.
3589 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3590 * i386-low.c (target.h): Remove include.
3591 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3592 (DR_CONTROL_SHIFT): Likewise.
3593 (DR_CONTROL_SIZE): Likewise.
3594 (DR_RW_EXECUTE): Likewise.
3595 (DR_RW_WRITE): Likewise.
3596 (DR_RW_READ): Likewise.
3597 (DR_RW_IORW): Likewise.
3598 (DR_LEN_1): Likewise.
3599 (DR_LEN_2): Likewise.
3600 (DR_LEN_4): Likewise.
3601 (DR_LEN_8): Likewise.
3602 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3603 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3604 (DR_ENABLE_SIZE): Likewise.
3605 (DR_LOCAL_SLOWDOWN): Likewise.
3606 (DR_GLOBAL_SLOWDOWN): Likewise.
3607 (DR_CONTROL_RESERVED): Likewise.
3608 (I386_DR_CONTROL_MASK): Likewise.
3609 (I386_DR_VACANT): Likewise.
3610 (I386_DR_LOCAL_ENABLE): Likewise.
3611 (I386_DR_GLOBAL_ENABLE): Likewise.
3612 (I386_DR_DISABLE): Likewise.
3613 (I386_DR_SET_RW_LEN): Likewise.
3614 (I386_DR_GET_RW_LEN): Likewise.
3615 (I386_DR_WATCH_HIT): Likewise.
3616 (i386_wp_op_t): Likewise.
3617 (i386_show_dr): Likewise.
3618 (i386_length_and_rw_bits): Likewise.
3619 (i386_insert_aligned_watchpoint): Likewise.
3620 (i386_remove_aligned_watchpoint): Likewise.
3621 (i386_handle_nonaligned_watchpoint): Likewise.
3622 i386_update_inferior_debug_regs(): Likewise.
3623 (i386_dr_insert_watchpoint): Likewise.
3624 (i386_dr_remove_watchpoint): Likewise.
3625 (i386_dr_region_ok_for_watchpoint): Likewise.
3626 (i386_dr_stopped_data_address): Likewise.
3627 (i386_dr_stopped_by_watchpoint): Likewise.
3629 2014-06-19 Gary Benson <gbenson@redhat.com>
3631 * i386-low.c (i386_dr_show): Renamed to
3632 i386_show_dr and made static. All uses updated.
3633 (i386_dr_length_and_rw_bits): Renamed to
3634 i386_length_and_rw_bits and made static.
3636 (i386_dr_insert_aligned_watchpoint): Renamed to
3637 i386_insert_aligned_watchpoint and made static.
3639 (i386_dr_remove_aligned_watchpoint): Renamed to
3640 i386_remove_aligned_watchpoint and made static.
3642 (i386_dr_update_inferior_debug_regs): Renamed to
3643 i386_update_inferior_debug_regs and made static.
3646 2014-06-18 Gary Benson <gbenson@redhat.com>
3648 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3649 (i386_dr_low_can_set_control): Likewise.
3650 (i386_get_debug_register_length): Likewise.
3651 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3652 (i386_dr_low_can_set_control): Likewise.
3653 (i386_get_debug_register_length): Likewise.
3655 2014-06-17 Gary Benson <gbenson@redhat.com>
3657 * i386-low.h (i386-dregs.h): New include.
3658 (DR_FIRSTADDR): Now in i386-dregs.h.
3659 (DR_LASTADDR): Likewise.
3660 (DR_NADDR): Likewise.
3661 (DR_STATUS): Likewise.
3662 (DR_CONTROL): Likewise.
3663 (i386_debug_reg_state): Likewise.
3664 (i386_dr_insert_watchpoint): Likewise.
3665 (i386_dr_remove_watchpoint): Likewise.
3666 (i386_dr_region_ok_for_watchpoint): Likewise.
3667 (i386_dr_stopped_data_address): Likewise.
3668 (i386_dr_stopped_by_watchpoint): Likewise.
3669 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3671 2014-06-18 Gary Benson <gbenson@redhat.com>
3673 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3674 i386_dr_insert_watchpoint.
3675 (i386_low_remove_watchpoint): Renamed to
3676 i386_dr_remove_watchpoint.
3677 (i386_low_region_ok_for_watchpoint): Renamed to
3678 i386_dr_region_ok_for_watchpoint.
3679 (i386_low_stopped_data_address): Renamed to
3680 i386_dr_stopped_data_address.
3681 (i386_low_stopped_by_watchpoint): Renamed to
3682 i386_dr_stopped_by_watchpoint.
3683 * i386-low.c (i386_show_dr): Renamed to
3684 i386_dr_show and made nonstatic. All uses updated.
3685 (i386_length_and_rw_bits): Renamed to
3686 i386_dr_length_and_rw_bits and made nonstatic.
3688 (i386_insert_aligned_watchpoint): Renamed to
3689 i386_dr_insert_aligned_watchpoint and made nonstatic.
3691 (i386_remove_aligned_watchpoint): Renamed to
3692 i386_dr_remove_aligned_watchpoint and made nonstatic.
3694 (i386_update_inferior_debug_regs): Renamed to
3695 i386_dr_update_inferior_debug_regs and made nonstatic.
3697 (i386_low_insert_watchpoint): Renamed to
3698 i386_dr_insert_watchpoint. All uses updated.
3699 (i386_low_remove_watchpoint): Renamed to
3700 i386_dr_remove_watchpoint. All uses updated.
3701 (i386_low_region_ok_for_watchpoint): Renamed to
3702 i386_dr_region_ok_for_watchpoint. All uses updated.
3703 (i386_low_stopped_data_address): Renamed to
3704 i386_dr_stopped_data_address. All uses updated.
3705 (i386_low_stopped_by_watchpoint): Renamed to
3706 i386_dr_stopped_by_watchpoint. All uses updated.
3708 2014-06-18 Gary Benson <gbenson@redhat.com>
3710 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3711 (i386_dr_low_can_set_control): Likewise.
3712 (i386_insert_aligned_watchpoint): New check.
3714 2014-06-18 Gary Benson <gbenson@redhat.com>
3716 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3719 2014-06-18 Gary Benson <gbenson@redhat.com>
3721 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3722 instead of fatal and error.
3723 (i386_handle_nonaligned_watchpoint): Likewise.
3725 2014-06-18 Gary Benson <gbenson@redhat.com>
3727 * i386-low.c (i386_get_debug_register_length): New macro.
3728 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3729 (i386_show_dr): Use debug_printf instead of fprintf. Use
3730 phex to format values.
3732 2014-06-18 Gary Benson <gbenson@redhat.com>
3734 * i386-low.h: Comment changes.
3735 * i386-low.c: Likewise.
3737 2014-06-18 Gary Benson <gbenson@redhat.com>
3739 * i386-low.c: Whitespace changes.
3741 2014-06-12 Tom Tromey <tromey@redhat.com>
3743 * utils.c (freeargv): Remove.
3745 2014-06-12 Tom Tromey <tromey@redhat.com>
3747 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3748 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3749 (parse_debug_format_options): Likewise.
3750 (gdbserver_usage): Likewise.
3751 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3752 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3753 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3755 ($(LIBGNU)): Depend on libiberty.
3756 (all-lib): Recurse into all subdirs.
3757 (install-only): Invoke "install" target in subdirs.
3758 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3760 * configure: Rebuild.
3761 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3762 for vasprintf, vsnprintf, or gettimeofday.
3763 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3766 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3768 * development.sh: Delete.
3769 * Makefile.in (config.status): Adjust dependency on development.sh.
3770 * configure.ac: Adjust development.sh source call.
3771 * configure: Regenerate.
3773 2014-06-02 Pedro Alves <palves@redhat.com>
3775 * ax.c (gdb_free_agent_expr): New function.
3776 * ax.h (gdb_free_agent_expr): New declaration.
3777 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3779 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3781 (clear_breakpoint_conditions_and_commands): New function.
3782 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3783 (clear_breakpoint_conditions_and_commands): New declaration.
3785 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3787 * linux-aarch64-low.c (asm/ptrace.h): Include.
3789 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3791 Fix TLS access for -static -pthread.
3792 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3793 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3794 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3796 2014-05-20 Pedro Alves <palves@redhat.com>
3798 * linux-aarch64-low.c (aarch64_insert_point)
3799 (aarch64_remove_point): No longer check whether the type is
3800 supported here. Adjust to new interface.
3801 (the_low_target): Install aarch64_supports_z_point_type as
3802 supports_z_point_type method.
3803 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3804 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3805 instead of a Z packet char. Adjust.
3806 (arm_supports_z_point_type): New function.
3807 (arm_insert_point, arm_remove_point): Adjust to new interface.
3808 (the_low_target): Install arm_supports_z_point_type.
3809 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3810 (cris_insert_point, cris_remove_point): Adjust to new interface.
3811 Don't check whether the type is supported here.
3812 (the_low_target): Install cris_supports_z_point_type.
3813 * linux-low.c (linux_supports_z_point_type): New function.
3814 (linux_insert_point, linux_remove_point): Adjust to new interface.
3815 * linux-low.h (struct linux_target_ops) <insert_point,
3816 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3817 raw_breakpoint pointer parameter.
3818 <supports_z_point_type>: New method.
3819 * linux-mips-low.c (mips_supports_z_point_type): New function.
3820 (mips_insert_point, mips_remove_point): Adjust to new interface.
3821 Use mips_supports_z_point_type.
3822 (the_low_target): Install mips_supports_z_point_type.
3823 * linux-ppc-low.c (the_low_target): Install NULL as
3824 supports_z_point_type method.
3825 * linux-s390-low.c (the_low_target): Install NULL as
3826 supports_z_point_type method.
3827 * linux-sparc-low.c (the_low_target): Install NULL as
3828 supports_z_point_type method.
3829 * linux-x86-low.c (x86_supports_z_point_type): New function.
3830 (x86_insert_point): Adjust to new insert_point interface. Use
3831 insert_memory_breakpoint. Adjust to new
3832 i386_low_insert_watchpoint interface.
3833 (x86_remove_point): Adjust to remove_point interface. Use
3834 remove_memory_breakpoint. Adjust to new
3835 i386_low_remove_watchpoint interface.
3836 (the_low_target): Install x86_supports_z_point_type.
3837 * lynx-low.c (lynx_target_ops): Install NULL as
3838 supports_z_point_type callback.
3839 * nto-low.c (nto_supports_z_point_type): New.
3840 (nto_insert_point, nto_remove_point): Adjust to new interface.
3841 (nto_target_ops): Install nto_supports_z_point_type.
3842 * mem-break.c: Adjust intro comment.
3843 (struct raw_breakpoint) <raw_type, size>: New fields.
3844 <inserted>: Update comment.
3845 <shlib_disabled>: Delete field.
3846 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3847 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3848 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3849 (raw_bkpt_type_to_target_hw_bp_type): New function.
3850 (find_enabled_raw_code_breakpoint_at): New function.
3851 (find_raw_breakpoint_at): New type and size parameters. Use them.
3852 (insert_memory_breakpoint): New function, based off
3853 set_raw_breakpoint_at.
3854 (remove_memory_breakpoint): New function.
3855 (set_raw_breakpoint_at): Reimplement.
3856 (set_breakpoint): New, based on set_breakpoint_at.
3857 (set_breakpoint_at): Reimplement.
3858 (delete_raw_breakpoint): Go through the_target->remove_point
3859 instead of assuming memory breakpoints.
3860 (find_gdb_breakpoint_at): Delete.
3861 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3862 (find_gdb_breakpoint): New function.
3863 (set_gdb_breakpoint_at): Delete.
3864 (z_type_supported): New function.
3865 (set_gdb_breakpoint_1): New function, loosely based off
3866 set_gdb_breakpoint_at.
3867 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3868 (delete_gdb_breakpoint_at): Delete.
3869 (delete_gdb_breakpoint_1): New function, loosely based off
3870 delete_gdb_breakpoint_at.
3871 (delete_gdb_breakpoint): New function.
3872 (clear_gdb_breakpoint_conditions): Rename to ...
3873 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3875 (add_condition_to_breakpoint): Make static.
3876 (add_breakpoint_condition): Take a struct breakpoint pointer
3877 instead of an address. Adjust.
3878 (gdb_condition_true_at_breakpoint): Rename to ...
3879 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3881 (gdb_condition_true_at_breakpoint): Reimplement.
3882 (add_breakpoint_commands): Take a struct breakpoint pointer
3883 instead of an address. Adjust.
3884 (gdb_no_commands_at_breakpoint): Rename to ...
3885 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3886 parameter. Return true if no breakpoint was found. Change debug
3888 (gdb_no_commands_at_breakpoint): Reimplement.
3889 (run_breakpoint_commands): Rename to ...
3890 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3891 and change return type to boolean.
3892 (run_breakpoint_commands): New function.
3893 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3894 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3895 breakpoint. Go through the_target->remove_point instead of
3896 assuming memory breakpoint.
3897 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3898 software and hardware breakpoints.
3899 (reinsert_raw_breakpoint): Go through the_target->insert_point
3900 instead of assuming memory breakpoint.
3901 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3902 software and hardware breakpoints.
3903 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3904 Check both software and hardware breakpoints.
3905 (validate_inserted_breakpoint): Assert the breakpoint is a
3906 software breakpoint. Set the inserted flag to -1 instead of
3907 setting shlib_disabled.
3908 (delete_disabled_breakpoints): Adjust.
3909 (validate_breakpoints): Only validate software breakpoints.
3910 Adjust to inserted flag change.
3911 (check_mem_read, check_mem_write): Skip breakpoint types other
3912 than software breakpoints. Adjust to inserted flag change.
3913 * mem-break.h (enum raw_bkpt_type): New enum.
3914 (raw_breakpoint, struct process_info): Forward declare.
3915 (Z_packet_to_target_hw_bp_type): Delete declaration.
3916 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3917 (set_gdb_breakpoint, delete_gdb_breakpoint)
3918 (clear_breakpoint_conditions): New declarations.
3919 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3920 (breakpoint_inserted_here): Update comment.
3921 (add_breakpoint_condition, add_breakpoint_commands): Replace
3922 address parameter with a breakpoint pointer parameter.
3923 (gdb_breakpoint_here): Update comment.
3924 (delete_gdb_breakpoint_at): Delete.
3925 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3926 * server.c (process_point_options): Take a struct breakpoint
3927 pointer instead of an address. Adjust.
3928 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3929 delete_gdb_breakpoint.
3930 * spu-low.c (spu_target_ops): Install NULL as
3931 supports_z_point_type method.
3932 * target.h: Include mem-break.h.
3933 (struct target_ops) <prepare_to_access_memory>: Update comment.
3934 <supports_z_point_type>: New field.
3935 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3936 instead of a char. Also take a raw breakpoint pointer.
3937 * win32-arm-low.c (the_low_target): Install NULL as
3938 supports_z_point_type.
3939 * win32-i386-low.c (i386_supports_z_point_type): New function.
3940 (i386_insert_point, i386_remove_point): Adjust to new interface.
3941 (the_low_target): Install i386_supports_z_point_type.
3942 * win32-low.c (win32_supports_z_point_type): New function.
3943 (win32_insert_point, win32_remove_point): Adjust to new interface.
3944 (win32_target_ops): Install win32_supports_z_point_type.
3945 * win32-low.h (struct win32_target_ops):
3946 <supports_z_point_type>: New method.
3947 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3948 instead of a char. Also take a raw breakpoint pointer.
3950 2014-05-20 Pedro Alves <palves@redhat.com>
3952 * mem-break.h: Include break-common.h.
3953 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3954 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3955 (Z_packet_to_target_hw_bp_type): New declaration.
3956 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3957 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3958 (Z_PACKET_ACCESS_WP): Delete macros.
3959 (Z_packet_to_hw_type): Delete function.
3960 * i386-low.h: Don't include break-common.h here.
3961 (Z_packet_to_hw_type): Delete declaration.
3962 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3963 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3964 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3965 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3966 * linux-aarch64-low.c: Don't include break-common.h here.
3967 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3968 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3969 (Z_packet_to_target_hw_bp_type): Delete function.
3970 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3972 (mips_insert_point, mips_remove_point): Use
3973 Z_packet_to_target_hw_bp_type.
3975 2014-05-20 Pedro Alves <palves@redhat.com>
3977 * linux-aarch64-low.c: Include break-common.h.
3978 (enum target_point_type): Delete.
3979 (Z_packet_to_point_type): Rename to ...
3980 (Z_packet_to_target_hw_bp_type): ... this, and return a
3981 target_hw_bp_type instead.
3982 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3983 instead of an enum target_point_type.
3984 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3986 (aarch64_dr_state_insert_one_point)
3987 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3988 (aarch64_handle_aligned_watchpoint)
3989 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3990 Take an enum target_hw_bp_type instead of an enum
3992 (aarch64_supports_z_point_type): New function.
3993 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3994 use Z_packet_to_target_hw_bp_type.
3996 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3998 * configure.ac: Only use -Werror by default when DEVELOPMENT
4000 * configure: Regenerate.
4002 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4004 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4005 * linux-x86-low.c (X86_64_USER_REGS): New.
4006 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4008 2014-04-28 Yao Qi <yao@codesourcery.com>
4010 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4013 2014-04-25 Pedro Alves <palves@redhat.com>
4016 * linux-low.c (linux_attach_fail_reason_string): New function.
4017 (linux_attach_lwp): Delete.
4018 (linux_attach_lwp_1): Rename to ...
4019 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4020 argument. Remove "initial" parameter. Return int instead of
4021 void. Don't error or warn here.
4022 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4023 failure to attach to the tgid. Call warning when failing to
4025 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4026 argument. Remove "initial" parameter. Return int instead of
4027 void. Don't error or warn here.
4028 (linux_attach_fail_reason_string): New declaration.
4029 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4030 interface change. Use linux_attach_fail_reason_string.
4032 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4033 Walfred Tedeschi <walfred.tedeschi@intel.com>
4035 * Makefile.in: Added rules to handle new files
4036 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4037 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4038 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4039 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4040 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4041 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4043 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4044 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4045 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4046 i386/x32-avx512.xml.
4047 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4048 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4049 i386/x32-avx512-linux.xml.
4050 * i387-fp.c (num_avx512_k_registers): New constant for number
4052 (num_avx512_zmmh_low_registers): New constant for number of
4053 lower ZMM registers (0-15).
4054 (num_avx512_zmmh_high_registers): New constant for number of
4055 higher ZMM registers (16-31).
4056 (num_avx512_ymmh_registers): New contant for number of higher
4057 YMM registers (ymm16-31 added by avx521 on x86_64).
4058 (num_avx512_xmm_registers): New constant for number of higher
4059 XMM registers (xmm16-31 added by AVX512 on x86_64).
4060 (struct i387_xsave): Add space for AVX512 registers.
4061 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4062 Add code to handle AVX512 registers.
4063 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4064 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4065 prototypei from generated file.
4066 (tdesc_amd64_avx512_linux): Likewise.
4067 (init_registers_x32_avx512_linux): Likewise.
4068 (tdesc_x32_avx512_linux): Likewise.
4069 (init_registers_i386_avx512_linux): Likewise.
4070 (tdesc_i386_avx512_linux): Likewise.
4071 (x86_64_regmap): Add AVX512 registers.
4072 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4074 (initialize_low_arch): Add code to initialize AVX512 registers.
4076 2014-04-23 Pedro Alves <palves@redhat.com>
4078 * mem-break.c (find_gdb_breakpoint_at): Make static.
4079 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4081 2014-04-23 Pedro Alves <palves@redhat.com>
4083 * i386-low.c: Don't include break-common.h here.
4084 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4085 prototype to take target_hw_bp_type as argument instead of a Z
4087 * i386-low.h: Include break-common.h here.
4088 (Z_packet_to_hw_type): Declare.
4089 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4091 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4092 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4093 (x86_remove_point): Convert the packet number to a
4094 target_hw_bp_type before calling i386_low_remove_watchpoint.
4095 * win32-i386-low.c (i386_insert_point): Convert the packet number
4096 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4097 (i386_remove_point): Convert the packet number to a
4098 target_hw_bp_type before calling i386_low_remove_watchpoint.
4100 2014-04-23 Pedro Alves <palves@redhat.com>
4102 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4104 2014-04-10 Pedro Alves <palves@redhat.com>
4106 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4107 Check if the condition or command is NULL before checking if the
4108 breakpoint is known. On success, return true.
4109 * mem-break.h (add_breakpoint_condition): Document return.
4110 (add_breakpoint_commands): Add describing comment.
4111 * server.c (skip_to_semicolon): New function.
4112 (process_point_options): Use it.
4114 2014-04-09 Pedro Alves <palves@redhat.com>
4116 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4119 2014-02-27 Pedro Alves <palves@redhat.com>
4122 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4124 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4126 (last_thread_of_process_p): Take a PID argument instead of a
4128 (linux_wait_for_lwp): Delete.
4129 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4131 (linux_low_filter_event): New function, party factored out from
4132 linux_wait_for_event.
4133 (linux_wait_for_event): Rename to ...
4134 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4135 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4136 sigsuspend. Check for zombie leaders.
4137 (linux_wait_for_event): Reimplement as wrapper around
4138 linux_wait_for_event_filtered.
4139 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4140 a normal or signal exit is seen, it's the whole process exiting.
4141 (wait_for_sigstop): No longer a for_each_inferior callback.
4142 Rewrite on top of linux_wait_for_event_filtered.
4143 (stop_all_lwps): Call wait_for_sigstop directly.
4144 * server.c (resume, handle_target_event): Handle
4145 TARGET_WAITKIND_NO_RESUMED.
4147 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4149 * win32-low.c (psapi_get_dll_name,
4150 * win32_CreateToolhelp32Snapshot): Delete.
4151 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4152 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4154 (handle_load_dll): Add function description.
4155 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4157 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4159 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4161 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4162 base address when calling win32_add_one_solib.
4163 (handle_load_dll): Delete local variable load_addr.
4164 Remove 0x1000 offset applied to DLL base address when calling
4165 win32_add_one_solib.
4166 (handle_unload_dll): Add comment.
4168 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4170 * win32-low.c (win32_add_all_dlls): Renames
4171 win32_ensure_ntdll_loaded. Rewrite function documentation.
4172 Adjust implementation to always load all DLLs.
4173 Add 0x1000 offset to DLL base address when calling
4174 win32_add_one_solib.
4175 (child_initialization_done): New static global.
4176 (do_initial_child_stuff): Set child_initialization_done to
4177 zero during child initialization, and 1 after. Replace call
4178 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4180 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4181 (handle_unload_dll): Add function documentation.
4182 (get_child_debug_event): Ignore load and unload DLL events
4183 during child initialization.
4185 2014-02-20 Doug Evans <dje@google.com>
4187 Remove global all_lwps.
4188 * inferiors.h (ptid_of): Move here from linux-low.h.
4189 (pid_of, lwpid_of): Ditto.
4190 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4191 parameter is a struct thread_info * now.
4192 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4193 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4194 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4196 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4197 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4198 * linux-arm-low.c (update_registers_callback): Update, "entry"
4199 parameter is a struct thread_info * now.
4200 Fetch lwpid from current_inferior directly.
4201 (arm_insert_point): Pass &all_threads to find_inferior instead of
4203 (arm_remove_point): Ditto.
4204 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4205 (arm_prepare_to_resume): Fetch pid from thread.
4206 (arm_read_description): Fetch lwpid from current_inferior directly.
4207 * linux-low.c (all_lwps): Delete.
4208 (delete_lwp): Delete call to remove_inferior.
4209 (handle_extended_wait): Fetch lwpid from thread.
4210 (add_lwp): Don't set lwp->entry.id. Remove call to
4211 add_inferior_to_list.
4212 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4213 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4214 (kill_one_lwp_callback): Ditto.
4215 (linux_kill): Don't dereference NULL pointer.
4216 Fetch ptid,lwpid from thread.
4217 (get_detach_signal): Fetch ptid from thread.
4218 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4219 Simplify call to regcache_invalidate_thread.
4220 (delete_lwp_callback): Update, "entry" parameter is a
4221 struct thread_info * now. Fetch pid from thread.
4222 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4223 (status_pending_p_callback): Update, "entry" parameter is a
4224 struct thread_info * now. Fetch ptid from thread.
4225 (find_lwp_pid): Update, "entry" parameter is a
4226 struct thread_info * now.
4227 (linux_wait_for_lwp): Fetch pid from thread.
4228 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4229 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4230 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4231 (dequeue_one_deferred_signal): Ditto.
4232 (cancel_breakpoint): Fetch ptid from current_inferior.
4233 (linux_wait_for_event): Pass &all_threads to find_inferior,
4234 not &all_lwps. Fetch ptid, lwpid from thread.
4235 (count_events_callback): Update, "entry" parameter is a
4236 struct thread_info * now.
4237 (select_singlestep_lwp_callback): Ditto.
4238 (select_event_lwp_callback): Ditto.
4239 (cancel_breakpoints_callback): Ditto.
4240 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4242 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4243 (unsuspend_one_lwp): Update, "entry" parameter is a
4244 struct thread_info * now.
4245 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4247 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4248 Fetch lwpid from thread, not lwp.
4249 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4250 Pass &all_threads to find_inferior, not &all_lwps.
4251 (send_sigstop): Fetch lwpid from thread, not lwp.
4252 (send_sigstop_callback): Update, "entry" parameter is a
4253 struct thread_info * now.
4254 (suspend_and_send_sigstop_callback): Ditto.
4255 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4256 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4257 struct thread_info * now.
4258 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4260 (lwp_running): Update, "entry" parameter is a
4261 struct thread_info * now.
4262 (stop_all_lwps): Fetch ptid from thread.
4263 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4264 (linux_resume_one_lwp): Fetch lwpid from thread.
4265 (linux_set_resume_request): Update, "entry" parameter is a
4266 struct thread_info * now. Fetch pid, lwpid from thread.
4267 (resume_status_pending_p): Update, "entry" parameter is a
4268 struct thread_info * now.
4269 (need_step_over_p): Ditto. Fetch lwpid from thread.
4270 (start_step_over): Fetch lwpid from thread.
4271 (linux_resume_one_thread): Update, "entry" parameter is a
4272 struct thread_info * now. Fetch lwpid from thread.
4273 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4274 (proceed_one_lwp): Update, "entry" parameter is a
4275 struct thread_info * now. Fetch lwpid from thread.
4276 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4277 struct thread_info * now.
4278 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4279 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4280 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4282 (regsets_store_inferior_registers): Ditto.
4283 (fetch_register, store_register): Ditto.
4284 (linux_read_memory, linux_write_memory): Ditto.
4285 (linux_request_interrupt): Ditto.
4286 (linux_read_auxv): Ditto.
4287 (linux_xfer_siginfo): Ditto.
4288 (linux_qxfer_spu): Ditto.
4289 (linux_qxfer_libraries_svr4): Ditto.
4290 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4291 moved to inferiors.h.
4293 (get_thread_lwp): Update.
4294 (struct lwp_info): Delete member "entry". Simplify comment for
4297 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4298 current_inferior directly.
4299 (update_watch_registers_callback): Update, "entry" parameter is a
4300 struct thread_info * now. Fetch pid from thread.
4301 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4302 (mips_insert_point): Fetch lwpid from current_inferior.
4303 Pass &all_threads to find_inferior, not &all_lwps.
4304 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4305 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4307 (mips_stopped_data_address): Ditto.
4308 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4310 * linux-tile-low.c (tile_arch_setup): Ditto.
4311 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4312 (update_debug_registers_callback): Update, "entry" parameter is a
4313 struct thread_info * now. Fetch pid from thread.
4314 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4315 Pass &all_threads to find_inferior, not &all_lwps.
4316 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4317 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4318 Pass &all_threads to find_inferior, not &all_lwps.
4319 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4320 (i386_dr_low_get_status): Ditto.
4321 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4322 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4323 (x86_linux_read_description): Ditto.
4324 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4326 2014-02-20 Doug Evans <dje@google.com>
4328 * inferiors.c (get_first_inferior): Fix buglet.
4330 2014-02-19 Doug Evans <dje@google.com>
4332 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4333 * inferiors.c (add_thread): Change result type to struct thread_info *.
4334 All callers updated.
4335 (add_lwp): Call add_thread here instead of in callers.
4336 All callers updated.
4337 * linux-low.h (get_lwp_thread): Rewrite.
4338 (struct lwp_info): New member "thread".
4340 2014-02-19 Doug Evans <dje@google.com>
4342 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4343 All callers updated.
4345 2014-02-19 Doug Evans <dje@google.com>
4347 * inferiors.c (add_thread): Fix whitespace.
4349 2014-02-19 Doug Evans <dje@google.com>
4351 * dll.c (clear_dlls): Replace accessing list implemention details
4353 * gdbthread.h (get_first_thread): Declare.
4354 * inferiors.c (for_each_inferior_with_data): New function.
4355 (get_first_thread): New function.
4356 (find_thread_ptid): Simplify.
4357 (get_first_inferior): New function.
4358 (clear_list): Delete.
4359 (one_inferior_p): New function.
4360 (clear_inferior_list): New function.
4361 (clear_inferiors): Update.
4362 * inferiors.h (for_each_inferior_with_data): Declare.
4363 (clear_inferior_list): Declare.
4364 (one_inferior_p): Declare.
4365 (get_first_inferior): Declare.
4366 * linux-low.c (linux_wait_for_event): Replace accessing list
4367 implemention details with API function.
4368 * server.c (target_running): Ditto.
4369 (accumulate_file_name_length): New function.
4370 (emit_dll_description): New function.
4371 (handle_qxfer_libraries): Replace accessing list implemention
4372 details with API function.
4373 (handle_qxfer_threads_worker): New function.
4374 (handle_qxfer_threads_proper): Replace accessing list implemention
4375 details with API function.
4376 (handle_query): Ditto.
4377 (visit_actioned_threads_callback_ftype): New typedef.
4378 (visit_actioned_threads_data): New struct.
4379 (visit_actioned_threads): Rewrite to be find_inferior callback.
4380 (resume): Call find_inferior.
4381 (handle_status): Replace accessing list implemention
4382 details with API function.
4383 (process_serial_event): Replace accessing list implemention details
4385 * target.c (set_desired_inferior): Replace accessing list implemention
4386 details with API function.
4387 * tracepoint.c (same_process_p): New function.
4388 (gdb_agent_about_to_close): Replace accessing list implemention
4389 details with API function.
4390 * win32-low.c (child_delete_thread): Replace accessing list
4391 implemention details with API function.
4392 (match_dll_by_basename): New function.
4393 (dll_is_loaded_by_basename): New function.
4394 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4395 details call to dll_is_loaded_by_basename.
4397 2014-02-19 Doug Evans <dje@google.com>
4399 * dll.h (struct dll_info): Add comment.
4400 * gdbthread.h (struct thread_info): Add comment.
4401 (current_ptid): Simplify.
4402 * inferiors.c (add_process): Update.
4403 (remove_process): Update.
4404 * inferiors.h (struct process_info): Rename member "head" to "entry".
4405 * linux-low.c (delete_lwp): Update.
4407 (last_thread_of_process_p): Update.
4408 (kill_one_lwp_callback, linux_kill): Update.
4409 (status_pending_p_callback): Update.
4410 (wait_for_sigstop): Update. Simplify read of ptid.
4411 (start_step_over): Update.
4412 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4413 (get_lwp_thread): Update.
4414 (struct lwp_info): Rename member "head" to "entry".
4415 * regcache.h (inferior_list_entry): Delete.
4416 * server.c (kill_inferior_callback): Update.
4417 (detach_or_kill_inferior_callback): Update.
4418 (print_started_pid): Update.
4419 (print_attached_pid): Update.
4420 (process_serial_event): Simplify read of ptid.
4421 * thread-db.c (thread_db_create_event): Update.
4422 (thread_db_get_tls_address): Update.
4423 * win32-low.c (current_inferior_ptid): Simplify.
4425 2014-02-19 Tom Tromey <tromey@redhat.com>
4427 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4429 (target_supports_btrace): Update.
4431 2014-02-14 Yao Qi <yao@codesourcery.com>
4433 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4434 (rsp-low-ipa.o): New target.
4436 2014-02-12 Tom Tromey <tromey@redhat.com>
4438 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4439 convert_ascii_to_int.
4440 * regcache.c (registers_to_string): Likewise.
4441 * remote-utils.c (decode_M_packet): Likewise.
4442 * server.c (process_serial_event): Likewise.
4444 2014-02-12 Tom Tromey <tromey@redhat.com>
4446 * server.c (handle_query, handle_v_run): Use hex2bin, not
4448 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4450 2014-02-12 Tom Tromey <tromey@redhat.com>
4452 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4453 convert_int_to_ascii.
4454 * regcache.c (registers_to_string, collect_register_as_string):
4456 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4458 * server.c (process_serial_event): Likewise.
4459 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4460 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4462 2014-02-12 Tom Tromey <tromey@redhat.com>
4464 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4465 bin2hex, not hexify.
4466 * tracepoint.c (cmd_qtstatus): Likewise.
4468 2014-02-12 Tom Tromey <tromey@redhat.com>
4470 * remote-utils.c (monitor_output): Pass explicit length to
4473 2014-02-12 Tom Tromey <tromey@redhat.com>
4475 * tracepoint.c: Include rsp-low.h.
4476 * server.c: Include rsp-low.h.
4477 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4478 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4480 * remote-utils.c: Include rsp-low.h.
4481 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4482 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4483 (convert_int_to_ascii, convert_ascii_to_int): Move to
4485 * regcache.c: Include rsp-low.h.
4486 * ax.c: Include rsp-low.h.
4487 * Makefile.in (SFILES): Add common/rsp-low.c.
4488 (OBS): Add rsp-low.o.
4489 (rsp-low.o): New target.
4491 2014-02-12 Tom Tromey <tromey@redhat.com>
4493 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4494 Include print-utils.h.
4495 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4496 (plongest, thirty_two, phex_nz): Remove.
4497 * Makefile.in (SFILES): Add common/print-utils.c.
4498 (OBS): Add print-utils.o.
4499 (print-utils-ipa.o): New target.
4500 (print-utils.o): New target.
4501 (IPA_OBJS): Add print-utils-ipa.o.
4503 2014-02-06 Tom Tromey <tromey@redhat.com>
4505 * Makefile.in (SFILES): Fix indentation.
4507 2014-02-05 Doug Evans <dje@google.com>
4509 * linux-low.c (linux_wait_for_event): Improve comment.
4510 (linux_wait_1): Keep current_inferior in sync with event_child.
4512 2014-01-22 Doug Evans <dje@google.com>
4514 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4516 2014-01-22 Doug Evans <dje@google.com>
4518 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4519 * configure: Regenerate.
4520 * config.in: Regenerate.
4521 * Makefile.in (SFILES): Add debug.c.
4523 * debug.c: New file.
4524 * debug.h: New file.
4525 * linux-aarch64-low.c (*): Update all debugging printfs to use
4526 debug_printf instead of fprintf.
4527 * linux-arm-low.c (*): Ditto.
4528 * linux-cris-low.c (*): Ditto.
4529 * linux-crisv32-low.c (*): Ditto.
4530 * linux-m32r-low.c (*): Ditto.
4531 * linux-sparc-low.c (*): Ditto.
4532 * linux-x86.c (*): Ditto.
4533 * linux-low.c (*): Ditto.
4534 (linux_wait_1): Add calls to debug_enter, debug_exit.
4535 (linux_wait): Remove redundant debugging printf.
4536 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4537 (linux_resume, unstop_all_lwps): Ditto.
4538 * mem-break.c (*): Update all debugging printfs to use
4539 debug_printf instead of fprintf.
4540 * remote-utils.c (*): Ditto.
4541 * thread-db.c (*): Ditto.
4542 * server.c #include <ctype.h>, "gdb_vecs.h".
4543 (debug_threads): Moved to debug.c.
4544 (*): Update all debugging printfs to use debug_printf instead of
4546 (start_inferior): Replace call to fflush with call to debug_flush.
4547 (monitor_show_help): Mention set debug-format.
4548 (parse_debug_format_options): New function.
4549 (handle_monitor_command): Handle "monitor set debug-format".
4550 (gdbserver_usage): Mention --debug-format.
4551 (main): Parse --debug-format.
4552 * server.h (debug_threads): Declaration moved to debug.h.
4554 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4555 trace_debug_1 that uses debug_printf.
4556 (tracepoint_look_up_symbols): Update all debugging printfs to use
4557 debug_printf instead of fprintf.
4559 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4561 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4564 2014-01-17 Pedro Alves <palves@redhat.com>
4567 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4568 defined after including gdb_proc_service.h.
4570 2014-01-16 Doug Evans <dje@google.com>
4572 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4573 (match_dll): Use it.
4575 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4577 * target.h (target_ops) <read_btrace>: Change parameters and
4578 return type to allow error reporting.
4579 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4580 trace reading errors on.
4581 * linux-low.c (linux_low_read_btrace): Pass trace reading
4583 (linux_low_disable_btrace): New.
4585 2014-01-15 Doug Evans <dje@google.com>
4587 * inferiors.c (thread_id_to_gdb_id): Delete.
4588 * inferiors.h (thread_id_to_gdb_id): Delete.
4590 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4592 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4593 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4596 2014-01-08 Pedro Alves <palves@redhat.com>
4598 * server.c (handle_status): Don't discard previous queued stop
4599 replies or thread's pending status here.
4600 (main) <disconnection>: Do it here instead.
4602 2014-01-08 Pedro Alves <palves@redhat.com>
4604 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4605 * server.c (visit_actioned_threads, handle_pending_status): New
4607 (handle_v_cont): Factor out parts to ...
4608 (resume): ... this new function. If in all-stop, and a thread
4609 being resumed has a pending status, report it without actually
4611 (myresume): Adjust to use the new 'resume' function.
4612 (clear_pending_status_callback, set_pending_status_callback)
4613 (find_status_pending_thread_callback): New functions.
4614 (handle_status): Handle the case of multiple threads having
4615 interesting statuses to report. Report threads' real last signal
4616 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4617 with an interesting thread to report the status for, instead of
4618 always reporting the status of the first thread.
4620 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4622 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4623 * gdbreplay.c (gdbreplay_version): Likewise.
4625 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4627 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4628 iov.iov_len with the real length in use.
4630 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4632 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4633 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4634 for all targets that use win32-low.c.
4635 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4636 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4638 2013-12-13 Pedro Alves <palves@redhat.com>
4640 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4641 if equal to TARGET_WAITKIND_LOADED.
4642 * win32-low.c (cached_status): New static global.
4643 (win32_wait): Add declaration.
4644 (do_initial_child_stuff): Flush all initial pending debug events
4645 up to the initial breakpoint.
4646 (win32_wait): If CACHED_STATUS was set, return that instead
4647 of doing a real wait. Remove the code resuming the execution
4648 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4649 during the initial phase. Also remove the code changing
4650 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4651 TARGET_WAITKIND_STOPPED.
4653 2013-12-11 Yao Qi <yao@codesourcery.com>
4655 * notif.c (handle_notif_ack): Return 0 if no notification
4658 2013-11-20 Doug Evans <dje@google.com>
4660 * linux-low.c (linux_set_resume_request): Fix comment.
4662 2013-11-20 Doug Evans <dje@google.com>
4664 * linux-low.c (resume_status_pending_p): Tweak comment.
4666 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4668 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4669 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4670 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4671 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4672 (srv_amd64_regobj): Add amd64-mpx.o.
4673 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4674 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4675 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4676 * i387-fp.c (num_pl_bnd_register) Added constant.
4677 (num_pl_bnd_cfg_registers) Added constant.
4678 (struct i387_xsave) Added reserved area and MPX fields.
4679 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4680 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4682 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4683 (init_registers_amd64_mpx_linux): Declare new function.
4684 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4685 (x86_64_regmap): Add MPX registers.
4686 (x86_linux_read_description): Add MPX case.
4687 (initialize_low_arch): Initialize MPX targets.
4689 2013-11-18 Tom Tromey <tromey@redhat.com>
4691 * configure: Rebuild.
4692 * configure.ac: Don't check for stdlib.h.
4693 * gdbreplay.c: Unconditionally include stdlib.h.
4695 2013-11-18 Tom Tromey <tromey@redhat.com>
4697 * config.in: Rebuild.
4698 * configure: Rebuild.
4699 * configure.ac: Don't use AC_HEADER_DIRENT.
4701 2013-11-18 Tom Tromey <tromey@redhat.com>
4703 * server.h: Don't check HAVE_STRING_H.
4704 * gdbreplay.c: Don't check HAVE_STRING_H.
4705 * configure: Rebuild.
4707 2013-11-18 Tom Tromey <tromey@redhat.com>
4709 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4712 2013-11-08 Tom Tromey <tromey@redhat.com>
4714 * configure, config.in: Rebuild.
4715 * configure.ac: Remove unused configury.
4717 2013-11-08 Tom Tromey <tromey@redhat.com>
4719 * acinclude.m4: Include common.m4, codeset.m4.
4720 * configure, config.in: Rebuild.
4721 * configure.ac: Use GDB_AC_COMMON.
4723 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4725 * linux-s390-low.c (HWCAP_S390_TE): New define.
4726 (s390_arch_setup): Consider the TE field in the HWCAP for
4727 determining 'have_regset_tdb'.
4729 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4732 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4735 2013-10-02 Pedro Alves <palves@redhat.com>
4737 * server.c (process_serial_event): Don't output "GDBserver
4738 exiting" if GDB is connected through stdio.
4739 * target.c (mywait): Likewise, be silent if GDB is connected
4742 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4744 * lynx-low.c (lynx_add_threads_after_attach): New function.
4745 (lynx_attach): Remove call to add_thread. Add call to
4746 lynx_add_threads_after_attach instead.
4748 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4750 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4751 * config.in, configure: Regenerated.
4753 2013-09-18 Yao Qi <yao@codesourcery.com>
4756 * server.c (start_inferior): Clear 'resume_info'.
4758 2013-09-16 Jiong Wang <jiwang@tilera.com>
4760 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4763 2013-09-16 Jiong Wang <jiwang@tilera.com>
4765 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4766 linux-tile-low.o to srv_tgtobj.
4768 2013-09-16 Will Newton <will.newton@linaro.org>
4770 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4773 2013-09-06 Pedro Alves <palves@redhat.com>
4775 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4776 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4777 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4778 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4779 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4780 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4782 2013-09-06 Pedro Alves <palves@redhat.com>
4784 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4785 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4787 2013-09-06 Pedro Alves <palves@redhat.com>
4789 * linux-amd64-ipa.c: Include tracepoint.h.
4790 * linux-i386-ipa.c: Include tracepoint.h.
4792 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4794 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4795 (ps_get_thread_area): New function.
4797 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4799 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4800 (initialize_low_arch): Call init_registers_crisv32 rather than
4801 init_register_crisv32.
4803 2013-09-05 Pedro Alves <palves@redhat.com>
4805 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4807 * hostio.h: ... this new file.
4808 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4809 win32-low.c: Include hostio.h.
4811 2013-09-05 Pedro Alves <palves@redhat.com>
4813 * server.h (gdb_client_data, handler_func, callback_handler_func)
4814 (delete_file_handler, add_file_handler, append_callback_event)
4815 (delete_callback_event, start_event_loop, initialize_event_loop):
4816 Move to event-loop.h and include it.
4817 * event-loop.h: New file.
4819 2013-09-05 Pedro Alves <palves@redhat.com>
4821 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4822 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4823 (loaded_dll, unloaded_dll): Move to ...
4824 * dll.h: ... this new file.
4825 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4827 2013-09-05 Pedro Alves <palves@redhat.com>
4829 * server.h (current_process, get_thread_process, all_processes)
4830 (add_inferior_to_list, for_each_inferior, current_inferior)
4831 (remove_inferior, add_process, remove_process, find_process_pid)
4832 (have_started_inferiors_p, have_attached_inferiors_p)
4833 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4834 (clear_inferiors, find_inferior, find_inferior_id)
4835 (inferior_target_data, set_inferior_target_data)
4836 (inferior_regcache_data, set_inferior_regcache_data): Move to
4837 inferiors.h, and include it.
4838 * inferiors.h: New file.
4840 2013-09-05 Pedro Alves <palves@redhat.com>
4842 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4846 2013-09-05 Pedro Alves <palves@redhat.com>
4848 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4850 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4851 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4852 (handle_tracepoint_general_set, handle_tracepoint_query)
4853 (tracepoint_finished_step, tracepoint_was_hit)
4854 (release_while_stepping_state_list, current_traceframe)
4855 (in_readonly_region, traceframe_read_mem)
4856 (fetch_traceframe_registers, traceframe_read_sdata)
4857 (traceframe_read_info, struct fast_tpoint_collect_status)
4858 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4859 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4860 (supply_fast_tracepoint_registers)
4861 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4862 (ipa_tdesc, claim_trampoline_space)
4863 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4864 (agent_mem_read, agent_get_trace_state_variable_value)
4865 (agent_set_trace_state_variable_value, agent_tsv_read)
4866 (agent_mem_read_string, get_raw_reg_func_addr)
4867 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4868 * tracepoint.h: ... this new file.
4870 2013-09-05 Pedro Alves <palves@redhat.com>
4872 * server.h (perror_with_name, error, fatal, warning, paddress)
4873 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4875 * utils.h: New file.
4877 2013-09-05 Pedro Alves <palves@redhat.com>
4879 * server.h (remote_debug, noack_mode, transport_is_reliable)
4880 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4881 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4882 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4883 (write_enn, initialize_async_io, enable_async_io)
4884 (disable_async_io, check_remote_input_interrupt_request)
4885 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4886 (dead_thread_notify, prepare_resume_reply)
4887 (decode_address_to_semicolon, decode_address, decode_m_packet)
4888 (decode_M_packet, decode_X_packet, decode_xfer_write)
4889 (decode_search_memory_packet, unhexify, hexify)
4890 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4891 (look_up_one_symbol, relocate_instruction)
4892 (monitor_output): Move to remote-utils.h, and include it.
4893 * remote-utils.h: New file.
4895 2013-09-05 Pedro Alves <palves@redhat.com>
4897 * server.h (_): Delete.
4899 2013-09-02 Pedro Alves <palves@redhat.com>
4901 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4902 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4904 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4906 2013-09-02 Pierre Muller <muller@sourceware.org>
4908 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4909 or WriteProcessMemory complete successfully and handle
4910 ERROR_PARTIAL_COPY error.
4912 2013-09-02 Pedro Alves <palves@redhat.com>
4914 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4915 error instead of EIO.
4917 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4920 * linux-low.c: Include filestuff.h.
4921 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4922 * lynx-low.c: Include filestuff.h.
4923 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4924 * server.c: Include filestuff.h.
4925 (main): Call notice_open_fds.
4926 * spu-low.c: Include filestuff.h.
4927 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4929 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4931 * Makefile.in: Explain why ../target and ../nat are not
4932 listed as include file search paths.
4933 (linux-waitpid.o): New object file rule.
4934 * configure.srv (srv_native_linux_obj): New variable.
4935 Replace all occurrences of linux native object files with
4936 $srv_native_linux_obj.
4937 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4938 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4939 (linux_enable_event_reporting): Remove declaration.
4940 (my_waitpid): Moved to common/linux-waitpid.c.
4941 (linux_wait_for_event): Pass ptid when calling
4942 linux_enable_event_reporting.
4943 (linux_supports_tracefork_flag): Remove.
4944 (linux_enable_event_reporting): Likewise.
4945 (linux_tracefork_grandchild): Remove.
4946 (STACK_SIZE): Moved to common/linux-ptrace.c.
4947 (linux_tracefork_child): Remove.
4948 (linux_test_for_tracefork): Remove.
4949 (linux_look_up_symbols): Call linux_supports_traceclone.
4950 (initialize_low): Remove call to linux_test_for_tracefork.
4951 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4952 common/linux-ptrace.h.
4953 (PTRACE_TYPE_ARG4): Likewise.
4954 Include linux-ptrace.h.
4956 2013-08-21 Pedro Alves <palves@redhat.com>
4958 * config.in: Renegerate.
4960 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4962 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4963 (SFILES): Remove $(srcdir)/common/target-common.c and
4964 add $(srcdir)/target/waitstatus.c.
4965 (OBS): Remove target-common.o and add waitstatus.o.
4966 (server_h): Remove $(srcdir)/../common/target-common.h and
4967 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4968 and $(srcdir)/../target/waitstatus.h.
4969 (target-common.o): Remove.
4970 (waitstatus.o): New target object file.
4971 * target.h: Do not include target-common.h and
4972 include target/resume.h, target/wait.h and
4973 target/waitstatus.h.
4975 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4977 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4978 to PTRACE_TYPE_ARG3.
4979 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4980 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4982 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4983 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4985 2013-07-27 Jie Zhang <jie@codesourcery.com>
4986 Daniel Jacobowitz <dan@codesourcery.com>
4987 Yao Qi <yao@codesourcery.com>
4989 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4990 (mips-linux-watch.o): New rule.
4991 (mips_linux_watch_h): New variable.
4992 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4994 * linux-mips-low.c: Include mips-linux-watch.h.
4995 (struct arch_process_info, struct arch_lwp_info): New.
4996 (update_watch_registers_callback): New function.
4997 (mips_linux_new_process, mips_linux_new_thread) New functions.
4998 (mips_linux_prepare_to_resume, mips_insert_point): New
5000 (mips_remove_point, mips_stopped_by_watchpoint): New
5002 (rsp_bp_type_to_target_hw_bp_type): New function.
5003 (mips_stopped_data_address): New function.
5004 (the_low_target): Add watchpoint support functions.
5006 2013-07-27 Yao Qi <yao@codesourcery.com>
5008 * i386-low.c: Include break-common.h.
5009 (enum target_hw_bp_type): Remove.
5011 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5013 * Makefile.in (SFILES): /common/target-common.c.
5014 (OBS): Add target-common.o.
5015 (server_h): Add $(srcdir)/../common/target-common.h.
5016 (target-common.o): New target.
5017 * server.c (queue_stop_reply_callback): Free
5018 status string after use.
5019 * target.c (target_waitstatus_to_string): Remove.
5020 * target.h: Include target-common.h.
5021 (resume_kind): Likewise.
5022 (target_waitkind): Likewise.
5023 (target_waitstatus): Likewise.
5024 (TARGET_WNOHANG): Likewise.
5026 2013-07-04 Yao Qi <yao@codesourcery.com>
5028 * Makefile.in (host_alias): Use @host_noncanonical@.
5029 (target_alias): Use @target_noncanonical@.
5030 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5031 ACX_NONCANONICAL_HOST.
5032 * configure: Regenerated.
5035 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5037 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5038 * configure: Rebuild.
5039 * Makefile.in (version_host, version_target): Get from configure.
5040 (version.c): Use $(version_host) and $(version_target).
5042 2013-07-03 Pedro Alves <palves@redhat.com>
5044 * Makefile.in (config.status): Depend on development.sh.
5045 * acinclude.m4: Include libmcheck.m4.
5046 * configure: Regenerate.
5048 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5050 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5051 attribute inside the parentheses.
5052 (winapi_DebugSetProcessKillOnExit): Ditto.
5053 (winapi_DebugBreakProcess): Ditto.
5054 (winapi_GenerateConsoleCtrlEvent): Ditto.
5056 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5058 * notif.h (notif_event): Add a dummy member to avoid compiler
5061 2013-07-01 Pedro Alves <palves@redhat.com>
5063 * hostio.c (HOSTIO_PATH_MAX): Define.
5064 (require_filename, handle_open, handle_unlink, handle_readlink):
5067 2013-07-01 Pedro Alves <palves@redhat.com>
5069 * server.h: Include "pathmax.h".
5070 * linux-low.c: Don't include sys/param.h.
5071 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5073 * win32-low.c: Don't include sys/param.h.
5074 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5076 2013-07-01 Pedro Alves <palves@redhat.com>
5078 * event-loop.c: Don't check HAVE_UNISTD_H before including
5080 * gdbreplay.c: Likewise.
5081 * remote-utils.c: Likewise.
5082 * server.c: Likewise.
5083 * configure.ac: Don't check for unistd.h.
5084 * configure: Regenerate.
5086 2013-06-28 Tom Tromey <tromey@redhat.com>
5088 * Makefile.in (version.c): Use version.in, not
5091 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5093 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5094 * configure: Rebuild.
5095 * Makefile.in (version_host, version_target): Get from configure.
5096 (version.c): Use $(version_host) and $(version_target).
5098 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5100 Fix trace-status to output user name without trailing colon.
5101 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5103 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5105 Fix trace-status to output proper start-time and stop-time.
5106 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5107 output start time and stop time in hex as gdb expects.
5109 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5111 * tracepoint.c (build_traceframe_info_xml): Output trace state
5112 variables present in the trace buffer.
5114 2013-06-24 Tom Tromey <tromey@redhat.com>
5116 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5118 (version.o): Remove.
5119 * gdbreplay.c: Include version.h.
5120 (version, host_name): Don't declare.
5121 * server.h: Include version.h.
5122 (version, host_name): Don't declare.
5124 2013-06-12 Pedro Alves <palves@redhat.com>
5126 * linux-x86-low.c (linux_is_elf64): Delete global.
5127 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5128 with local linux_pid_exe_is_elf_64_file use.
5130 2013-06-11 Pedro Alves <palves@redhat.com>
5132 * linux-low.c (regset_disabled, disable_regset): New functions.
5133 (regsets_fetch_inferior_registers)
5134 (regsets_store_inferior_registers): Use them.
5135 (initialize_regsets_info); Don't allocate the disabled_regsets
5137 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5140 2013-06-11 Pedro Alves <palves@redhat.com>
5142 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5145 2013-06-11 Pedro Alves <palves@redhat.com>
5147 * linux-x86-low.c (initialize_low_arch): Call
5148 init_registers_x32_avx_linux.
5150 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5152 Fix compatibility with Android Bionic.
5153 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5156 2013-06-07 Pedro Alves <palves@redhat.com>
5159 * Makefile.in (OBS): Add tdesc.o.
5160 (IPA_OBJS): Add tdesc-ipa.o.
5161 (tdesc-ipa.o): New rule.
5162 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5164 * linux-low.c (new_inferior): Delete.
5165 (disabled_regsets, num_regsets): Delete.
5166 (linux_add_process): Adjust to set the new per-process
5168 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5169 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5170 was a stop. When calling arch_setup, switch the current inferior
5171 to the thread that got an event.
5172 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5173 (regsets_fetch_inferior_registers)
5174 (regsets_store_inferior_registers): New regsets_info parameter.
5176 (linux_register_in_regsets): New regs_info parameter. Adjust to
5178 (register_addr, fetch_register, store_register): New usrregs_info
5179 parameter. Adjust to use it.
5180 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5181 parameter regs_info. Adjust to use it.
5182 (linux_fetch_registers): Get the current inferior's regs_info, and
5184 (linux_store_registers): Ditto.
5185 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5186 (initialize_low): Don't initialize the target_regsets here. Call
5187 initialize_low_arch.
5188 * linux-low.h (target_regsets): Delete declaration.
5189 (struct regsets_info): New.
5190 (struct usrregs_info): New.
5191 (struct regs_info): New.
5192 (struct process_info_private) <new_inferior>: New field.
5193 (struct linux_target_ops): Delete the num_regs, regmap, and
5194 regset_bitmap fields. New field regs_info.
5195 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5196 * i387-fp.c (num_xmm_registers): Delete.
5197 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5198 calls to new interface.
5199 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5200 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5201 Infer the number of xmm registers from the regcache's target
5203 * i387-fp.h (num_xmm_registers): Delete.
5204 * inferiors.c (add_thread): Don't install the thread's regcache
5206 * proc-service.c (gregset_info): Fetch the current inferior's
5207 regs_info. Adjust to use it.
5208 * regcache.c: Include tdesc.h.
5209 (register_bytes, reg_defs, num_registers)
5210 (gdbserver_expedite_regs): Delete.
5211 (get_thread_regcache): If the thread doesn't have a regcache yet,
5212 create one, instead of aborting gdbserver.
5213 (regcache_invalidate_one): Rename to ...
5214 (regcache_invalidate_thread): ... this.
5215 (regcache_invalidate_one): New.
5216 (regcache_invalidate): Only invalidate registers of the current
5218 (init_register_cache): Add target_desc parameter, and use it.
5219 (new_register_cache): Ditto. Assert the target description has a
5220 non zero registers_size.
5221 (regcache_cpy): Add assertions. Adjust.
5222 (realloc_register_cache, set_register_cache): Delete.
5223 (registers_to_string, registers_from_string): Adjust.
5224 (find_register_by_name, find_regno, find_register_by_number)
5225 (register_cache_size): Add target_desc parameter, and use it.
5226 (free_register_cache_thread, free_register_cache_thread_one)
5227 (regcache_release, register_cache_size): New.
5228 (register_size): Add target_desc parameter, and use it.
5229 (register_data, supply_register, supply_register_zeroed)
5230 (supply_regblock, supply_register_by_name, collect_register)
5231 (collect_register_as_string, collect_register_by_name): Adjust.
5232 * regcache.h (struct target_desc): Forward declare.
5233 (struct regcache) <tdesc>: New field.
5234 (init_register_cache, new_register_cache): Add target_desc
5236 (regcache_invalidate_thread): Declare.
5237 (regcache_invalidate_one): Delete declaration.
5238 (regcache_release): Declare.
5239 (find_register_by_number, register_cache_size, register_size)
5240 (find_regno): Add target_desc parameter.
5241 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5243 * remote-utils.c: Include tdesc.h.
5244 (outreg, prepare_resume_reply): Adjust.
5245 * server.c: Include tdesc.h.
5246 (gdbserver_xmltarget): Delete declaration.
5247 (get_features_xml, process_serial_event): Adjust.
5248 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5250 (struct process_info) <tdesc>: New field.
5251 (ipa_tdesc): Declare.
5252 * tdesc.c: New file.
5253 * tdesc.h: New file.
5254 * tracepoint.c: Include tdesc.h.
5255 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5256 (get_context_regcache): Adjust to pass ipa_tdesc down.
5257 (do_action_at_tracepoint): Adjust to get the register cache size
5258 from the context regcache's description.
5259 (traceframe_walk_blocks): Adjust to get the register cache size
5260 from the current trace frame's description.
5261 (traceframe_get_pc): Adjust to get current trace frame's
5262 description and pass it down.
5263 (gdb_collect): Adjust to get the register cache size from the
5265 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5266 (gdbserver_xmltarget): Delete.
5267 (initialize_low_tracepoint): Set the ipa's target description.
5268 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5269 (initialize_low_tracepoint): Set the ipa's target description.
5270 * linux-x86-low.c: Include tdesc.h.
5271 [__x86_64__] (is_64bit_tdesc): New.
5272 (ps_get_thread_area, x86_get_thread_area): Use it.
5273 (i386_cannot_store_register): Rename to ...
5274 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5275 (i386_cannot_fetch_register): Rename to ...
5276 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5277 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5279 (target_regsets): Rename to ...
5280 (x86_regsets): ... this.
5281 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5283 (x86_siginfo_fixup): Use is_64bit_tdesc.
5284 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5285 (tdesc_x32_avx_linux, tdesc_x32_linux)
5286 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5288 (x86_linux_update_xmltarget): Delete.
5289 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5290 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5291 (AMD64_LINUX_USER64_CS): New.
5292 (x86_linux_read_description): New, based on
5293 x86_linux_update_xmltarget.
5294 (same_process_callback): New.
5295 (x86_arch_setup_process_callback): New.
5296 (x86_linux_update_xmltarget): New.
5297 (x86_regsets_info): New.
5298 (amd64_linux_regs_info): New.
5299 (i386_linux_usrregs_info): New.
5300 (i386_linux_regs_info): New.
5301 (x86_linux_regs_info): New.
5302 (x86_arch_setup): Reimplement.
5303 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5304 (x86_emit_ops): Ditto.
5305 (the_low_target): Adjust. Install x86_linux_regs_info,
5306 x86_cannot_fetch_register, and x86_cannot_store_register.
5307 (initialize_low_arch): New.
5308 * linux-ia64-low.c (tdesc_ia64): Declare.
5309 (ia64_fetch_register): Adjust.
5310 (ia64_usrregs_info, regs_info): New globals.
5311 (ia64_regs_info): New function.
5312 (the_low_target): Adjust.
5313 (initialize_low_arch): New function.
5314 * linux-sparc-low.c (tdesc_sparc64): Declare.
5315 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5317 (sparc_arch_setup): New function.
5318 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5319 (the_low_target): Adjust.
5320 (initialize_low_arch): New function.
5321 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5322 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5323 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5324 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5325 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5326 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5327 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5328 (tdesc_powerpc_isa205_vsx64l): Declare.
5329 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5330 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5331 (ppc_set_pc, ppc_get_hwcap): Adjust.
5332 (ppc_usrregs_info): Forward declare.
5333 (!__powerpc64__) ppc_regmap_adjusted: New global.
5334 (ppc_arch_setup): Adjust to the current process'es target
5336 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5337 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5338 (ppc_store_evrregset): Adjust.
5339 (target_regsets): Rename to ...
5340 (ppc_regsets): ... this, and make static.
5341 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5342 (ppc_regs_info): New function.
5343 (the_low_target): Adjust.
5344 (initialize_low_arch): New function.
5345 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5346 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5347 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5348 (tdesc_s390x_linux64v2): Declare.
5349 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5350 (s390_fill_gregset, s390_store_last_break): Adjust.
5351 (target_regsets): Rename to ...
5352 (s390_regsets): ... this, and make static.
5353 (s390_get_pc, s390_set_pc): Adjust.
5354 (s390_get_hwcap): New target_desc parameter, and use it.
5355 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5356 (s390_arch_setup): Adjust to set the current process'es target
5357 description. Don't adjust the regmap.
5358 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5359 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5360 (regs_info_3264): New globals.
5361 (s390_regs_info): New function.
5362 (the_low_target): Adjust.
5363 (initialize_low_arch): New function.
5364 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5365 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5366 [__mips64] (init_registers_mips_linux)
5367 (init_registers_mips_dsp_linux): Delete defines.
5368 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5369 (have_dsp): New global.
5370 (mips_read_description): New, based on mips_arch_setup.
5371 (mips_arch_setup): Reimplement.
5372 (get_usrregs_info): New function.
5373 (mips_cannot_fetch_register, mips_cannot_store_register)
5374 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5375 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5376 (target_regsets): Rename to ...
5377 (mips_regsets): ... this, and make static.
5378 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5379 (dsp_regs_info, regs_info): New globals.
5380 (mips_regs_info): New function.
5381 (the_low_target): Adjust.
5382 (initialize_low_arch): New function.
5383 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5384 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5386 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5387 (arm_read_description): New, with bits factored from
5389 (arm_arch_setup): Reimplement.
5390 (target_regsets): Rename to ...
5391 (arm_regsets): ... this, and make static.
5392 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5393 (arm_regs_info): New function.
5394 (the_low_target): Adjust.
5395 (initialize_low_arch): New function.
5396 * linux-m68k-low.c (tdesc_m68k): Declare.
5397 (target_regsets): Rename to ...
5398 (m68k_regsets): ... this, and make static.
5399 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5400 (m68k_regs_info): New function.
5401 (m68k_arch_setup): New function.
5402 (the_low_target): Adjust.
5403 (initialize_low_arch): New function.
5404 * linux-sh-low.c (tdesc_sharch): Declare.
5405 (target_regsets): Rename to ...
5406 (sh_regsets): ... this, and make static.
5407 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5408 (sh_regs_info, sh_arch_setup): New functions.
5409 (the_low_target): Adjust.
5410 (initialize_low_arch): New function.
5411 * linux-bfin-low.c (tdesc_bfin): Declare.
5412 (bfin_arch_setup): New function.
5413 (bfin_usrregs_info, regs_info): New globals.
5414 (bfin_regs_info): New function.
5415 (the_low_target): Adjust.
5416 (initialize_low_arch): New function.
5417 * linux-cris-low.c (tdesc_cris): Declare.
5418 (cris_arch_setup): New function.
5419 (cris_usrregs_info, regs_info): New globals.
5420 (cris_regs_info): New function.
5421 (the_low_target): Adjust.
5422 (initialize_low_arch): New function.
5423 * linux-cris-low.c (tdesc_crisv32): Declare.
5424 (cris_arch_setup): New function.
5425 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5426 (cris_regs_info): New function.
5427 (the_low_target): Adjust.
5428 (initialize_low_arch): New function.
5429 * linux-m32r-low.c (tdesc_m32r): Declare.
5430 (m32r_arch_setup): New function.
5431 (m32r_usrregs_info, regs_info): New globals.
5432 (m32r_regs_info): Adjust.
5433 (initialize_low_arch): New function.
5434 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5435 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5436 (tic6x_usrregs_info): Forward declare.
5437 (tic6x_read_description): New function, based on ...
5438 (tic6x_arch_setup): ... this. Reimplement.
5439 (target_regsets): Rename to ...
5440 (tic6x_regsets): ... this, and make static.
5441 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5442 (tic6x_regs_info): New function.
5443 (the_low_target): Adjust.
5444 (initialize_low_arch): New function.
5445 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5446 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5447 (target_regsets): Rename to ...
5448 (xtensa_regsets): ... this, and make static.
5449 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5451 (xtensa_arch_setup, xtensa_regs_info): New functions.
5452 (the_low_target): Adjust.
5453 (initialize_low_arch): New function.
5454 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5455 (nios2_arch_setup): Set the current process'es tdesc.
5456 (target_regsets): Rename to ...
5457 (nios2_regsets): ... this.
5458 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5459 (nios2_regs_info): New function.
5460 (the_low_target): Adjust.
5461 (initialize_low_arch): New function.
5462 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5463 (aarch64_arch_setup): Set the current process'es tdesc.
5464 (target_regsets): Rename to ...
5465 (aarch64_regsets): ... this.
5466 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5467 (aarch64_regs_info): New function.
5468 (the_low_target): Adjust.
5469 (initialize_low_arch): New function.
5470 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5472 (target_regsets): Rename to ...
5473 (tile_regsets): ... this.
5474 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5475 (tile_regs_info): New function.
5476 (tile_arch_setup): Set the current process'es tdesc.
5477 (the_low_target): Adjust.
5478 (initialize_low_arch): New function.
5479 * spu-low.c (tdesc_spu): Declare.
5480 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5481 * win32-arm-low.c (tdesc_arm): Declare.
5482 (arm_arch_setup): New function.
5483 (the_low_target): Install arm_arch_setup instead of
5485 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5486 (init_windows_x86): Rename to ...
5487 (i386_arch_setup): ... this. Set `win32_tdesc'.
5488 (the_low_target): Adjust.
5489 * win32-low.c (win32_tdesc): New global.
5490 (child_add_thread): Don't create the thread cache here.
5491 (do_initial_child_stuff): Set the new process'es tdesc.
5492 * win32-low.h (struct target_desc): Forward declare.
5493 (win32_tdesc): Declare.
5494 * lynx-i386-low.c (tdesc_i386): Declare global.
5495 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5496 * lynx-low.c (lynx_tdesc): New global.
5497 (lynx_add_process): Set the new process'es tdesc.
5498 * lynx-low.h (struct target_desc): Forward declare.
5499 (lynx_tdesc): Declare global.
5500 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5501 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5502 * nto-low.c (nto_tdesc): New global.
5503 (do_attach): Set the new process'es tdesc.
5504 * nto-low.h (struct target_desc): Forward declare.
5505 (nto_tdesc): Declare.
5506 * nto-x86-low.c (tdesc_i386): Declare.
5507 (nto_x86_arch_setup): Set `nto_tdesc'.
5509 2013-06-04 Gary Benson <gbenson@redhat.com>
5511 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5512 to qSupported response when appropriate.
5513 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5514 with nonzero-length annex.
5515 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5516 arguments supplied in annex.
5518 2013-05-31 Doug Evans <dje@google.com>
5521 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5522 64 bits in 64-cross-32 environment.
5524 2013-05-28 Pedro Alves <palves@redhat.com>
5526 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5527 (aarch64-without-fpu.c): Delete rule.
5528 * configure.srv (aarch64*-*-linux*): Remove references to
5529 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5530 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5533 2013-05-24 Pedro Alves <palves@redhat.com>
5535 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5536 instead of strchr/decode_address. Error if the range isn't split
5537 with a ','. Don't assume there's be a ':' in the action.
5539 2013-05-23 Yao Qi <yao@codesourcery.com>
5540 Pedro Alves <palves@redhat.com>
5542 * linux-low.c (lwp_in_step_range): New function.
5543 (linux_wait_1): If the thread was range stepping and stopped
5544 outside the stepping range, report the stop to GDB. Otherwise,
5545 continue stepping. Add range stepping debug output.
5546 (linux_set_resume_request): Copy the step range from the resume
5548 (linux_supports_range_stepping): New.
5549 (linux_target_ops) <supports_range_stepping>: Set to
5550 linux_supports_range_stepping.
5551 * linux-low.h (struct linux_target_ops)
5552 <supports_range_stepping>: New field.
5553 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5554 * linux-x86-low.c (x86_supports_range_stepping): New.
5555 (the_low_target) <supports_range_stepping>: Set to
5556 x86_supports_range_stepping.
5557 * server.c (handle_v_cont): Handle 'r' action.
5558 (handle_v_requests): Append ";r" if the target supports range
5560 * target.h (struct thread_resume) <step_range_start,
5561 step_range_end>: New fields.
5562 (struct target_ops) <supports_range_stepping>:
5564 (target_supports_range_stepping): New macro.
5566 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5568 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5569 confusion in comment.
5571 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5573 * lynx-low.c (struct process_info_private): New type.
5574 (lynx_add_process): New function.
5575 (lynx_create_inferior, lynx_attach): Replace calls to
5576 add_process by calls to lynx_add_process.
5577 (lynx_resume): If PTID is null, then try using
5578 current_process()->private->last_wait_event_ptid.
5580 (lynx_clear_inferiors): Delete. The contents of that function
5581 has been inlined in lynx_mourn;
5582 (lynx_wait_1): Save the ptid in the process's private data.
5583 (lynx_mourn): Free the process' private data. Replace call
5584 to lynx_clear_inferiors by call to clear_inferiors.
5586 2013-05-17 Yao Qi <yao@codesourcery.com>
5588 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5591 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5593 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5594 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5595 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5596 PT_TEXT_END_ADDR guards. Update comments.
5597 (linux_target_op) <read_offsets>: Conditionally define to
5598 linux_read_offsets if the target is UCLIBC and if it defines
5599 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5601 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5602 Andrew Jenner <andrew@codesourcery.com>
5604 * Makefile.in (SFILES): Add linux-nios2-low.c.
5605 (clean): Add action to delete nios2-linux.c.
5606 (nios2-linux.c): New rule.
5607 * configure.srv: Add nios2*-*-linux*.
5608 * linux-nios2-low.c: New.
5610 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5612 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5614 2013-04-25 Hui Zhu <hui@codesourcery.com>
5617 * ax.c (ax_printf): Add fflush.
5619 2013-04-22 Tom Tromey <tromey@redhat.com>
5621 * Makefile.in (SFILES): Add filestuff.c.
5622 (OBS): Add filestuff.o.
5623 (filestuff.o): New target.
5624 * config.in, configure: Rebuild.
5625 * configure.ac: Check for fdwalk, pipe2.
5627 2013-04-17 Pedro Alves <palves@redhat.com>
5629 * configure.ac (USE_THREAD_DB): Delete variable.
5630 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5631 Don't AC_SUBST USE_THREAD_DB.
5632 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5633 * config.in, configure: Regenerate.
5635 2013-04-16 Pedro Alves <palves@redhat.com>
5637 * linux-low.h (struct lwp_info) <thread_known>: Move under
5638 the USE_THREAD_DB #ifdef.
5640 2013-04-16 Pedro Alves <palves@redhat.com>
5642 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5643 (linux-low.o): Delete rule.
5644 * linux-low.h: Always include "gdb_thread_db.h" instead of
5645 conditionally including thread_db.h.
5646 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5649 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5651 * Makefile.in (install-only): Fix make install regression.
5653 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5655 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5656 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5658 * gdbserver.1: Remove.
5660 2013-03-22 Pedro Alves <palves@redhat.com>
5662 * linux-low.c (handle_extended_wait): Don't call
5663 linux_enable_event_reporting.
5665 2013-03-15 Tony Theodore <tonyt@logyst.com>
5668 * Makefile.in (SHELL): Use @SHELL@.
5670 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5672 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5675 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5677 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5678 Remove extraneous NULL element.
5680 2013-03-13 Yao Qi <yao@codesourcery.com>
5682 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5683 'V' block in trace frame.
5685 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5687 * target.h (struct target_ops): Add btrace ops.
5688 (target_supports_btrace): New macro.
5689 (target_enable_btrace): New macro.
5690 (target_disable_btrace): New macro.
5691 (target_read_btrace): New macro.
5692 * gdbthread.h (struct thread_info): Add btrace field.
5693 * server.c: Include btrace-common.h.
5694 (handle_btrace_general_set): New function.
5695 (handle_btrace_enable): New function.
5696 (handle_btrace_disable): New function.
5697 (handle_general_set): Call handle_btrace_general_set.
5698 (handle_qxfer_btrace): New function.
5699 (struct qxfer qxfer_packets[]): Add btrace entry.
5700 * inferiors.c (remove_thread): Disable btrace.
5701 * linux-low: Include linux-btrace.h.
5702 (linux_low_enable_btrace): New function.
5703 (linux_low_read_btrace): New function.
5704 (linux_target_ops): Add btrace ops.
5705 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5706 Add srv_linux_btrace=yes.
5707 (x86_64-*-linux*): Add linux-btrace.o.
5708 Add srv_linux_btrace=yes.
5709 * configure.ac: Define HAVE_LINUX_BTRACE.
5710 * config.in: Regenerated.
5711 * configure: Regenerated.
5713 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5715 * server.c (handle_qxfer): Preserve error message if -3 is
5717 (qxfer): Document the -3 return value.
5719 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5721 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5722 (linux_btrace_h): New variable.
5723 (linux-btrace.o): New rule.
5725 2013-03-08 Stan Shebs <stan@codesourcery.com>
5726 Hafiz Abid Qadeer <abidh@codesourcery.com>
5728 * tracepoint.c (trace_buffer_size): New global.
5729 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5730 (init_trace_buffer): Change to one-argument function. Allocate
5731 trace buffer memory.
5732 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5733 handle QTBuffer:size packet.
5734 (cmd_bigqtbuffer_size): New function.
5735 (initialize_tracepoint): Call init_trace_buffer with
5736 DEFAULT_TRACE_BUFFER_SIZE.
5737 * server.c (handle_query): Add QTBuffer:size in the
5740 2013-03-07 Yao Qi <yao@codesourcery.com>
5742 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5743 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5745 (cmd_qtsp): Adjust condition. Do post increment.
5746 Set cur_action and cur_step_action back to 0.
5748 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5751 * linux-low.c (linux_write_memory): Return early success if LEN is
5754 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5756 * configure.srv: Add x86_64-*-cygwin* as target.
5758 2013-02-28 Tom Tromey <tromey@redhat.com>
5760 * configure.ac: Invoke AC_SYS_LARGEFILE.
5761 * configure, config.in: Rebuild.
5763 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5765 * win32-low.c: Throughout, fix format strings and casts of
5766 printf-like functions to avoid type related warnings on all
5768 (get_child_debug_event): Print dwDebugEventCode as hex since
5769 that's how it's usually documented.
5771 2013-02-28 Yao Qi <yao@codesourcery.com>
5773 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5776 2013-02-27 Jiong Wang <jiwang@tilera.com>
5778 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5779 (reg-tilegx32.c): New rule.
5780 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5781 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5782 different register info initializer according to elf class.
5783 (init_registers_tilgx32): New function. The tilegx32 register info
5785 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5786 (tile_store_gregset): Likewise.
5788 2013-02-27 Yao Qi <yao@codesourcery.com>
5790 * server.c (process_point_options): Print debug message when
5791 debug_threads is true.
5793 2013-02-26 Yao Qi <yao@codesourcery.com>
5795 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5797 2013-02-19 Pedro Alves <palves@redhat.com>
5798 Kai Tietz <ktietz@redhat.com>
5802 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5803 instead of strtoul to extract address from packet.
5804 (process_serial_event) <'z'>: Likewise.
5806 2013-02-18 Yao Qi <yao@codesourcery.com>
5808 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5810 2013-02-14 Pedro Alves <palves@redhat.com>
5814 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5815 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5817 2013-02-14 Pedro Alves <palves@redhat.com>
5819 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5821 2013-02-14 Pedro Alves <palves@redhat.com>
5823 * tracepoint.c (save_string): Delete.
5824 (add_tracepoint_action): Use savestring instead of save_string.
5826 2013-02-12 Pedro Alves <palves@redhat.com>
5828 * linux-xtensa-low.c: Ditto.
5829 * xtensa-xtregs.c: Ditto.
5831 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5833 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5836 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5838 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5839 aarch64_num_wp_regs and aarch64_num_bp_regs to
5840 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5842 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5844 * linux-aarch64-low.c (ps_get_thread_area): Replace
5845 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5847 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5848 Marcus Shawcroft <marcus.shawcroft@arm.com>
5849 Nigel Stephens <nigel.stephens@arm.com>
5850 Yufeng Zhang <yufeng.zhang@arm.com>
5852 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5853 (aarch64.c, aarch64-without-fpu.c): New targets.
5854 * configure.srv (aarch64*-*-linux*): New.
5855 * linux-aarch64-low.c: New file.
5857 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5859 * linux-low.c (handle_extended_wait, linux_create_inferior)
5860 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5861 (dequeue_one_deferred_signal, linux_resume_one_thread)
5862 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5863 (linux_tracefork_grandchild, linux_test_for_tracefork)
5864 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5865 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5866 where the argument is 0.
5868 2013-01-25 Yao Qi <yao@codesourcery.com>
5870 * event-loop.c: Include "queue.h".
5871 (gdb_event_p): New typedef.
5872 (struct gdb_event) <next_event>: Remove.
5873 (event_queue): Change to QUEUE(gdb_event_p).
5874 (async_queue_event): Remove.
5875 (gdb_event_xfree): New.
5876 (initialize_event_loop): New.
5877 (process_event): Use API from QUEUE.
5878 (wait_for_event): Likewise.
5879 * server.c (main): Call initialize_event_loop.
5880 * server.h (initialize_event_loop): Declare.
5882 2013-01-18 Yao Qi <yao@codesourcery.com>
5884 * ax.h (struct eval_agent_expr_context): New.
5885 (gdb_eval_agent_expr): Update declaration.
5886 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5887 TFRAME. Add new argument CTX.
5888 * server.h (struct eval_agent_expr_context): Declare.
5889 (agent_mem_read, agent_tsv_read): Update declaration.
5890 (agent_mem_read_string): Likewise.
5891 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5892 (add_traceframe_block): Add new argument TPOINT.
5893 Increase TPOINT->traceframe_usage.
5894 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5895 eval_tracepoint_agent_expr.
5896 (condition_true_at_tracepoint): Likewise.
5897 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5898 (agent_mem_read_string, agent_tsv_read): Likewise.
5900 2013-01-16 Yao Qi <yao@codesourcery.com>
5902 * linux-low.c (linux_resume_one_lwp): Don't check
5903 'lwp->bp_reinsert != 0'.
5905 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5906 Pedro Alves <palves@redhat.com>
5908 * lynx-low.c (ptrace_request_to_str): Define a temporary
5909 macro and use it to simplify this function's implementation.
5911 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5913 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5916 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5918 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5920 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5922 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5924 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5926 * lynx-low.c (lynx_resume): Use the resume_info parameter
5927 to determine the ptid for the lynx_ptrace call, unless
5928 it is equal to minus_one_ptid, in which case we use the
5929 ptid of the current_inferior.
5930 (lynx_wait_1): After having received a thread create/exit
5931 event, resume the inferior's execution using the signaling
5932 thread's ptid, rather than the old ptid.
5934 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5936 * lynx-low.c (lynx_resume): Delete variable ret.
5938 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5940 * gdbreplay.c (gdbreplay_version): Update copyright year.
5941 * server.c (gdbserver_version): Likewise.
5943 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5945 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5948 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5950 * lynx-low.c (ptrace_request_to_str): Add handling for
5953 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5955 * lynx-low.c (lynx_attach): Delete variable new_process.
5957 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5959 * lynx-low.c (lynx_create_inferior): Delete variable
5962 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5964 * lynx-low.c (ptrace_request_to_str): Do not handle
5965 PTRACE_GETTHREADLIST if this macro does not exist.
5967 2012-12-15 Yao Qi <yao@codesourcery.com>
5969 * Makefile.in (OBS): Add notif.o.
5970 * notif.c, notif.h: New.
5971 * server.c: Include "notif.h".
5972 (struct vstop_notif) <next>: Remove.
5974 (queue_stop_reply): Update.
5975 (push_event, send_next_stop_reply): Remove.
5976 (discard_queued_stop_replies): Update.
5977 (notif_stop): New variable.
5978 (handle_v_stopped): Remove.
5979 (handle_v_requests): Don't call handle_v_stopped. Call
5980 handle_ack_notif instead.
5981 (queue_stop_reply_callback): Call notif_event_enque instead
5982 of queue_stop_reply.
5983 (handle_status): Don't call send_next_stop_reply, call
5984 notif_write_event instead.
5985 (kill_inferior_callback): Likewise.
5986 (detach_or_kill_inferior_callback): Likewise.
5987 (main): Call initialize_notif.
5988 (process_serial_event): Call QUEUE_is_empty.
5989 (handle_target_event): Call notif_push instead of push event.
5990 * server.h (push_event): Remove declaration.
5992 2012-12-10 Tom Tromey <tromey@redhat.com>
5994 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5995 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5998 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5999 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6000 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6001 (amd64-linux-ipa.o, ax.o): Rewrite.
6002 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6003 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6004 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6005 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6006 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6007 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6008 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6009 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6010 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6011 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6012 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6013 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6014 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6015 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6016 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6017 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6018 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6019 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6020 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6021 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6022 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6023 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6024 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6025 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6026 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6027 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6028 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6029 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6030 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6031 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6032 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6033 (reg-tilegx.o): Remove.
6034 (all_object_files): New macro.
6035 Include .deps files.
6036 * aclocal.m4, configure: Rebuild.
6037 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6038 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6039 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6041 2012-12-05 Tom Tromey <tromey@redhat.com>
6044 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6046 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6048 * configure.ac: Check for linux/perf_event.h.
6049 * config.in: Regenerated.
6050 * configure: Regenerated.
6052 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6054 * hostio.c (handle_readlink): Decrease buffer size
6055 parameter passed to readlink by one byte.
6057 2012-11-26 Yao Qi <yao@codesourcery.com>
6059 * configure.ac (build_warnings): Append '-Wempty-body'.
6060 * configure: Regenerated.
6061 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6064 2012-11-15 Pierre Muller <muller@sourceware.org>
6066 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6067 * config.in: Regenerate.
6068 * configure: Regenerate.
6069 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6070 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6071 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6072 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6074 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6075 instead of <sys/wait.h> header.
6076 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6078 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6080 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6081 (various make rules): Remove -DGDBSERVER
6083 2012-11-09 Yao Qi <yao@codesourcery.com>
6085 * spu-low.c (current_ptid): Move it to ..
6086 * gdbthread.h: ... here. New.
6087 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6088 * server.c (myresume, process_serial_event): Likewise.
6089 * thread-db.c (thread_db_find_new_threads): Likewise.
6090 * tracepoint.c (run_inferior_command): Likewise.
6092 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6094 * server.c (handle_search_memory_1): Include access length in
6097 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6099 * linux-crisv32-low.c: Fix compile errors.
6101 2012-09-04 Yao Qi <yao@codesourcery.com>
6103 * tracepoint.c (cmd_qtsv): Adjust debug message.
6104 Don't check CUR_TPOINT.
6106 2012-08-28 Yao Qi <yao@codesourcery.com>
6108 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6109 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6110 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6111 Remove declarations of xmalloc, xreallloc, xstrdup and
6113 * Makefile.in (libiberty_h): New.
6114 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6115 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6117 2012-08-23 Yao Qi <yao@codesourcery.com>
6119 * server.h: Remove declaration of 'xsnprintf'.
6121 2012-08-22 Keith Seitz <keiths@redhat.com>
6123 * server.h: Include build-gnulib-gbserver/config.h.
6124 * gdbreplay.c: Likewise.
6126 2012-08-08 Doug Evans <dje@google.com>
6128 * Makefile.in (SFILES): Add gdb_vecs.c.
6129 (OBS): Add gdb_vecs.o.
6130 (gdb_vecs_h, host_defs_h): New variables.
6131 (thread-db.o): Add $(gdb_vecs_h) dependency.
6132 (gdb_vecs.o): New rule.
6133 * thread-db.c: #include "gdb_vecs.h".
6134 (thread_db_load_search): Use a vector to iterate over path elements.
6135 Handle text appearing after "$pdir".
6137 * configure.ac: Add check for strstr.
6138 * config.in: Regenerate.
6139 * configure: Regenerate.
6141 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6143 * hostio.c (handle_pread): If pread fails, fall back to attempting
6145 (handle_pwrite): Likewise for pwrite.
6147 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6149 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6150 between unsupported TYPE and unimplementable ADDR/LEN combination.
6151 (arm_insert_point): Act on new return value.
6153 2012-07-31 Pedro Alves <palves@redhat.com>
6155 * server.c (process_point_options): Only skip tokens if we find
6156 one that is unrecognized. Don't treat 'X' specially while
6157 skipping unrecognized tokens.
6159 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6161 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6162 to 4-byte-align HW breakpoint addresses for Thumb.
6164 2012-07-27 Yao Qi <yao@codesourcery.com>
6168 * server.h: Declare gdb_agent_about_to_close.
6169 * target.c (kill_inferior): Include "agent.h".
6170 New. Send command 'kill'.
6171 * target.h (kill_inferior): Removed macro.
6172 * tracepoint.c (gdb_agent_about_to_close): New.
6173 (gdb_agent_helper_thread): Handle command 'close'.
6174 Wait endlessly until the inferior stops.
6175 Install gdb_agent_remove_socket to atexit hook.
6176 (agent_socket_name): New static variable.
6177 (gdb_agent_socket_init): Replace local variable 'name' with
6178 'agent_socket_name'.
6179 (gdb_agent_remove_socket): New.
6181 2012-07-27 Yao Qi <yao@codesourcery.com>
6183 * server.c (process_point_options): Stop at 'X' when parsing.
6185 2012-07-19 Michael Eager <eager@eagercon.com>
6187 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6189 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6190 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6191 hardware breakpoint.
6193 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6195 * gdbserver/linux-low.c (initialize_low): Call
6196 linux_ptrace_init_warnings.
6198 2012-07-02 Doug Evans <dje@google.com>
6200 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6203 2012-07-02 Stan Shebs <stan@codesourcery.com>
6205 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6206 (ax.o): Add it to build rule.
6208 (OBS): Add format.o.
6209 (IPA_OBS): Add format.o.
6210 * server.c (handle_query): Claim support for breakpoint commands.
6211 (process_point_options): Add command case.
6212 (process_serial_event): Leave running if there are printfs in
6214 * mem-break.h (any_persistent_commands): Declare.
6215 (add_breakpoint_commands): Declare.
6216 (gdb_no_commands_at_breakpoint): Declare.
6217 (run_breakpoint_commands): Declare.
6218 * mem-break.c (struct point_command_list): New struct.
6219 (struct breakpoint): New field command_list.
6220 (any_persistent_commands): New function.
6221 (add_commands_to_breakpoint): New function.
6222 (add_breakpoint_commands): New function.
6223 (gdb_no_commands_at_breakpoint): New function.
6224 (run_breakpoint_commands): New function.
6225 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6227 * ax.c: Include format.h.
6228 (ax_printf): New function.
6229 (gdb_eval_agent_expr): Add printf opcode.
6231 2012-06-13 Yao Qi <yao@codesourcery.com>
6233 * server.c (start_inferior): Remove duplicated writes to fields
6234 'last_resume_kind' and 'last_status' of 'current_inferior'.
6236 2012-06-12 Yao Qi <yao@codesourcery.com>
6237 Pedro Alves <palves@redhat.com>
6239 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6241 * server.c (handle_v_cont): Extend comment.
6243 2012-06-11 Yao Qi <yao@codesourcery.com>
6245 * linux-low.c (linux_attach): Add 'static'.
6247 2012-06-06 Yao Qi <yao@codesourcery.com>
6249 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6251 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6253 Fix gcc -flto compilation warning.
6254 * server.c (main): Make variable multi_mode and attach volatile.
6256 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6258 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6259 if the platform doesn't know about it.
6261 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6263 * Makefile.in (SFILES): Add linux-tile-low.c.
6264 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6265 * configure.srv: Handle tilegx-*-linux*.
6266 * linux-tile-low.c: New file.
6268 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6270 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6272 2012-05-24 Pedro Alves <palves@redhat.com>
6276 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6278 2012-05-24 Pedro Alves <palves@redhat.com>
6282 Replace target_signal with gdb_signal throughout.
6284 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6286 * linux-low.c (linux_store_registers): Avoid the copying sequence
6287 when no data has been retrieved by ptrace.
6289 2012-05-22 Will Deacon <will.deacon@arm.com>
6291 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6292 Include asm/ptrace.h.
6293 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6296 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6298 * linux-low.c (linux_store_registers): Don't re-retrieve data
6299 with ptrace that has already been obtained from /proc. Always
6300 copy any data retrieved with ptrace to the buffer supplied.
6302 2012-05-11 Yao Qi <yao@codesourcery.com>
6303 Pedro Alves <palves@redhat.com>
6305 * linux-low.c (enum stopping_threads_kind): New.
6306 (stopping_threads): Change type to `enum stopping_threads_kind'.
6307 (handle_extended_wait): If stopping and suspending threads, leave
6308 the new_lwp suspended too.
6309 (linux_wait_for_event): Adjust.
6310 (stop_all_lwps): Set `stopping_threads' to
6311 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6312 whether we're suspending threads or just stopping them. Assert no
6315 2012-04-29 Yao Qi <yao@codesourcery.com>
6317 * server.h: Move some code to ...
6318 * gdbthread.h: ... here. New.
6319 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6320 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6321 (nto-low.o, win32-low.o): Likewise.
6322 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6323 * regcache.c, remote-utils.c, server.c: Likewise.
6324 * target.c, tracepoint.c, win32-low.c: Likewise.
6326 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6328 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6329 (PTRACE_ARG4_TYPE): Likewise.
6330 (PTRACE_XFER_TYPE): Likewise.
6331 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6332 ptrace to PTRACE_ARG3_TYPE.
6333 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6334 (PTRACE_ARG4_TYPE): Likewise.
6335 (PTRACE_XFER_TYPE): Likewise.
6336 (linux_detach_one_lwp): Cast fourth argument of
6337 ptrace to long then PTRACE_ARG4_TYPE.
6338 (regsets_fetch_inferior_registers): Cast third argument of
6339 ptrace to long then PTRACE_ARG3_TYPE.
6340 (regsets_store_inferior_registers): Likewise.
6342 2012-04-20 Pedro Alves <palves@redhat.com>
6344 * configure: Regenerate.
6346 2012-04-19 Pedro Alves <palves@redhat.com>
6348 * Makefile.in (GNULIB_BUILDDIR): New.
6349 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6350 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6351 (all, install-only, uninstall, clean-info, all-lib, clean): No
6352 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6353 (maintainer-clean realclean distclean): Use subdir_do.
6355 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6356 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6357 * acinclude.m4: Include acx_configure_dir.m4.
6358 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6359 calls. Call AC_PROG_RANLIB. Configure gnulib using
6362 (GNULIB_STDINT_H): Adjust.
6363 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6364 * gdbreplay.c: Include build-gnulib/config.h.
6365 * server.h: Likewise.
6366 * aclocal.m4: Regenerate.
6367 * config.in: Regenerate.
6368 * configure: Regenerate.
6370 2012-04-19 Pedro Alves <palves@redhat.com>
6372 * Makefile.in (LIBGNU, INCGNU): Adjust.
6373 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6374 (all, install-only, uninstall, clean-info, all-lib, clean)
6375 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6376 * configure.ac: Adjust AC_OUTPUT output.
6377 * aclocal.m4: Regenerate.
6378 * configure: Regenerate.
6380 2012-04-19 Pedro Alves <palves@redhat.com>
6382 * Makefile.in (generated_files): New.
6383 (server_h): Remove the explicit dependency on config.h, and depend
6384 on $generated_files.
6386 2012-04-19 Pedro Alves <palves@redhat.com>
6388 * Makefile.in (INCGNU): Add -Ignulib.
6390 2012-04-19 Pedro Alves <palves@redhat.com>
6392 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6393 (INCGNU): ... this, and spell out -I here.
6394 (GNULIB_LIB): Rename to ...
6396 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6398 2012-04-19 Pedro Alves <palves@redhat.com>
6400 * config.in: Regenerate.
6402 2012-04-19 Pedro Alves <palves@redhat.com>
6404 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6405 * server.h (memmem): Remove declaration.
6406 * config.in: Regenerate.
6407 * configure: Regenerate.
6409 2012-04-19 Yao Qi <yao@codesourcery.com>
6411 * Makefile.in (SFILES): Add common/vec.c.
6415 2012-04-19 Yao Qi <yao@codesourcery.com>
6417 * remote-utils.c (prepare_resume_reply): Replace with macro
6418 target_core_of_thread.
6419 * server.c (handle_qxfer_threads_proper): Likewise.
6420 * target.h (traget_core_of_thread): New macro.
6422 2012-04-18 Pedro Alves <palves@redhat.com>
6424 * aclocal.m4: Regenerate.
6425 * configure: Regenerate.
6427 2012-04-16 Yao Qi <yao@codesourcery.com>
6429 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6430 duplicated on address.
6432 2012-04-16 Yao Qi <yao@codesourcery.com>
6434 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6435 (struct tracepoint_action_ops) <send>: New field.
6436 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6437 (agent_expr_send, x_tracepoint_action_send): New.
6438 (l_tracepoint_action_send): New.
6439 (cmd_qtdp): Download and install tracepoint
6440 according to `use_agent'.
6441 (run_inferior_command): Add one more parameter `len'.
6443 (tracepoint_send_agent): New.
6444 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6446 2012-04-16 Yao Qi <yao@codesourcery.com>
6448 * tracepoint.c (download_tracepoints): Moved to ...
6449 (cmd_qtstart): ... here.
6451 2012-04-14 Yao Qi <yao@codesourcery.com>
6453 * tracepoint.c: Include inttypes.h.
6454 (struct collect_memory_action): Use sized types.
6455 (struct tracepoint): Likewise.
6456 (cmd_qtdp, stop_tracing): Update print specifiers.
6457 (cmd_qtp, response_tracepoint): Likewise.
6458 (collect_data_at_tracepoint): Likewise.
6459 (collect_data_at_step): Likewise.
6461 2012-04-14 Yao Qi <yao@codesourcery.com>
6463 Import gnulib module inttypes.
6464 * aclocal.m4, config.in, configure: Regenerated.
6466 2012-04-14 Yao Qi <yao@codesourcery.com>
6468 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6469 Makefile and config.status at last.
6471 2012-04-13 Yao Qi <yao@codesourcery.com>
6473 * tracepoint.c: Include stdint.h unconditionally.
6475 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6477 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6478 on BFD_HAVE_SYS_PROCFS_TYPE.
6479 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6480 * configure: Regenerate.
6481 * config.in: Likewise.
6483 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6485 * Makefile.in (clean): Also remove x32.c x32-linux.c
6486 x32-avx.c x32-avx-linux.c.
6487 (x32.o): New target.
6489 (x32-linux.o): Likewise.
6490 (x32-linux.c): Likewise.
6491 (x32-avx.o): Likewise.
6492 (x32-avx.c): Likewise.
6493 (x32-avx-linux.o): Likewise.
6494 (x32-avx-linux.c): Likewise.
6496 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6497 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6498 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6499 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6500 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6501 i386/x32-avx-linux.xml.
6503 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6504 (init_registers_x32_avx_linux): Likwise.
6505 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6506 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6508 2012-04-13 Pedro Alves <palves@redhat.com>
6510 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6511 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6512 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6513 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6516 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6518 * linux-x86-low.c (compat_x32_clock_t): New.
6519 (compat_x32_siginfo_t): Likewise.
6520 (compat_x32_siginfo_from_siginfo): Likewise.
6521 (siginfo_from_compat_x32_siginfo): Likewise.
6522 (linux_is_elf64): Likewise.
6523 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6524 and siginfo_from_compat_x32_siginfo for x32.
6525 (x86_arch_setup): Set linux_is_elf64.
6527 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6530 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6532 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6533 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6534 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6535 compatible with process.
6537 2012-04-12 Yao Qi <yao@codesourcery.com>
6539 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6540 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6541 (install-only, install-info, clean): Handle sub dir gnulib.
6542 (all-lib, am--refresh): New targets.
6543 (memmem.o): Remove target.
6544 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6545 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6546 (AC_REPLACE_FUNCS): Remove memmem.
6547 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6548 (AC_OUTPUT): Generate Makefile in gnulib/.
6549 * aclocal.m4, config.in, configure: Regenerated.
6551 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6553 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6555 2012-04-05 Pedro Alves <palves@redhat.com>
6557 -Werror=strict-aliasing
6559 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6562 2012-04-04 Pedro Alves <palves@redhat.com>
6564 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6565 (sparc_store_gregset_from_stack, sparc_store_gregset)
6566 (sparc_breakpoint_at): Fix formatting.
6568 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6570 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6572 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6573 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6574 * config.in: Regenerate.
6575 * configure: Likewise.
6577 2012-03-29 Pedro Alves <palves@redhat.com>
6579 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6580 Correct ptrace arguments.
6582 2012-03-28 Pedro Alves <palves@redhat.com>
6584 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6585 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6586 (IA64_FR1_REGNUM): New defines.
6587 (ia64_fetch_register): New.
6588 (the_low_target): Install it.
6589 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6591 * linux-low.c (linux_fetch_registers): Try the
6592 the_low_target.fetch_register hook first.
6594 * linux-arm-low.c (the_low_target): Adjust.
6595 * linux-bfin-low.c (the_low_target): Adjust.
6596 * linux-cris-low.c (the_low_target): Adjust.
6597 * linux-crisv32-low.c (the_low_target): Adjust.
6598 * linux-m32r-low.c (the_low_target): Adjust.
6599 * linux-m68k-low.c (the_low_target): Adjust.
6600 * linux-mips-low.c (the_low_target): Adjust.
6601 * linux-ppc-low.c (the_low_target): Adjust.
6602 * linux-s390-low.c (the_low_target): Adjust.
6603 * linux-sh-low.c (the_low_target): Adjust.
6604 * linux-sparc-low.c (the_low_target): Adjust.
6605 * linux-tic6x-low.c (the_low_target): Adjust.
6606 * linux-x86-low.c (the_low_target): Adjust.
6607 * linux-xtensa-low.c (the_low_target): Adjust.
6609 2012-03-26 Pedro Alves <palves@redhat.com>
6611 * server.c (handle_qxfer_libraries): Don't bail early if
6612 the_target->qxfer_libraries_svr4 is not NULL.
6614 2012-03-26 Pedro Alves <palves@redhat.com>
6616 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6618 2012-03-23 Pedro Alves <palves@redhat.com>
6620 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6621 "library-list-svr4" element's start tag when the the DSO list is
6624 2012-03-23 Pedro Alves <palves@redhat.com>
6626 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6627 a variable whose type size is the same as the inferior's pointer
6630 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6632 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6634 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6635 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6636 * linux-low.h: Include <signal.h>.
6637 (struct siginfo): Remove forward declaration.
6638 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6641 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6643 * .gitignore: Ignore more files.
6645 2012-03-19 Pedro Alves <palves@redhat.com>
6646 Jan Kratochvil <jan.kratochvil@redhat.com>
6648 * server.c (cont_thread, general_thread): Add describing comments.
6649 (start_inferior): Clear `cont_thread'.
6650 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6653 2012-03-15 Yao Qi <yao@codesourcery.com>
6655 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6657 (cmd_qtdp): ... here.
6659 2012-03-15 Yao Qi <yao@codesourcery.com>
6661 * tracepoint.c (struct tracepoint_action_ops): New.
6662 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6663 (m_tracepoint_action_download): New.
6664 (r_tracepoint_action_download): New.
6665 (x_tracepoint_action_download): New.
6666 (l_tracepoint_action_download): New.
6667 (add_tracepoint_action): Install `action->ops' according type.
6668 (download_tracepoint_1): Move code `download' function pointer
6669 of various tracepoint_action_ops.
6671 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6673 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6674 linux_ptrace_attach_warnings.
6676 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6678 * Makefile.in (linux-ptrace.o): New.
6679 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6680 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6681 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6682 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6683 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6685 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6687 2012-03-08 Yao Qi <yao@codesourcery.com>
6688 Pedro Alves <palves@redhat.com>
6690 Fix PR server/13392.
6691 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6693 * tracepoint.c (remove_tracepoint): New.
6694 (cmd_qtdp): Call remove_tracepoint when failed to install.
6696 2012-03-07 Pedro Alves <palves@redhat.com>
6698 * linux-low.c (get_detach_signal): New.
6699 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6700 Pass on pending signals to PTRACE_DETACH. Check the result of the
6702 * server.c (program_signals, program_signals_p): New.
6703 (handle_general_set): Handle QProgramSignals.
6704 * server.h (program_signals, program_signals_p): Declare.
6706 2012-03-05 Pedro Alves <palves@redhat.com>
6707 Jan Kratochvil <jan.kratochvil@redhat.com>
6709 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6712 2012-03-03 Yao Qi <yao@codesourcery.com>
6714 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6715 agent_look_up_symbols.
6717 2012-03-03 Yao Qi <yao@codesourcery.com>
6719 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6720 (linux-x86-low.o): Likewise.
6721 * server.h: Remove in_process_agent_loaded.
6722 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6726 2012-03-03 Yao Qi <yao@codesourcery.com>
6728 * tracepoint.c (gdb_agent_capability): New global.
6729 (in_process_agent_loaded_ust): Renamed to
6730 `in_process_agent_supports_ust'.
6732 (in_process_agent_supports_ust): Call agent_capability_check.
6733 (clear_installed_tracepoints): Assert that agent supports
6736 2012-03-03 Yao Qi <yao@codesourcery.com>
6738 * linux-low.c (linux_supports_agent): New.
6739 (linux_target_ops): Initialize field `supports_agent' with
6740 linux_supports_agent.
6741 * target.h (struct target_ops) <supports_agent>: New.
6742 (target_supports_agent): New macro.
6743 * server.c (handle_general_set): Handle packet 'QAgent'.
6744 (handle_query): Send `QAgent+'.
6745 * Makefile.in (server.o): Depends on agent.h.
6747 2012-03-03 Yao Qi <yao@codesourcery.com>
6749 * Makefile.in (OBS): Add agent.o.
6750 Add new rule for agent.o.
6751 Track dependence of tracepoint.c on agent.h.
6752 * tracepoint.c (run_inferior_command_1):
6753 (run_inferior_command): Call agent_run_command.
6754 (gdb_ust_connect_sync_socket): Deleted. Move it to
6756 (resume_thread, stop_thread): Likewise.
6757 (gdb_ust_socket_init): Renamed to ...
6758 (gdb_agent_socket_init): ... New.
6759 (gdb_ust_thread): Renamed to ...
6760 (gdb_agent_helper_thread): ... New.
6761 (gdb_ust_init): Move some code to ...
6762 (gdb_agent_init): ... here. New.
6763 [HAVE_UST]: Call gdb_ust_init.
6764 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6765 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6766 * config.in, configure: Regenerated.
6768 2012-03-02 Pedro Alves <palves@redhat.com>
6770 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6771 * linux-low.c (struct simple_pid_list): New.
6772 (stopped_pids): New a struct simple_pid_list pointer.
6773 (add_to_pid_list, pull_pid_from_list): New.
6774 (handle_extended_wait): Don't assume the first signal new children
6775 report is SIGSTOP. Adjust call to pull_pid_from_list.
6776 (linux_wait_for_lwp): Adjust.
6778 2012-03-02 Yao Qi <yao@codesourcery.com>
6780 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6783 2012-03-02 Yao Qi <yao@codesourcery.com>
6785 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6786 `stop_pc' and `tpoint'. Update caller.
6788 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6790 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6791 * linux-low.c (use_linux_regsets): New macro.
6792 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6793 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6794 (linux_register_in_regsets): New function.
6795 (usr_fetch_inferior_registers): Skip registers covered by
6797 (usr_store_inferior_registers): Likewise.
6798 (usr_fetch_inferior_registers): New macro.
6799 (usr_store_inferior_registers): Likewise.
6800 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6801 (linux_store_registers): Likewise.
6802 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6804 (init_registers_mips64_dsp_linux): Likewise.
6805 (init_registers_mips_linux): New macro.
6806 (init_registers_mips_dsp_linux): Likewise.
6807 (mips_dsp_num_regs): Likewise.
6808 (DSP_BASE, DSP_CONTROL): New fallback macros.
6809 (mips_base_regs): New macro.
6810 (mips_regmap): Use it. Fix the size.
6811 (mips_dsp_regmap): New variable.
6812 (mips_dsp_regset_bitmap): Likewise.
6813 (mips_arch_setup): New function.
6814 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6816 (mips_cannot_store_register): Likewise.
6817 (the_low_target): Update .arch_setup, .num_regs and .regmap
6818 initializers. Add .regset_bitmap initializer.
6819 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6821 * linux-bfin-low.c (the_low_target): Likewise.
6822 * linux-cris-low.c (the_low_target): Likewise.
6823 * linux-crisv32-low.c (the_low_target): Likewise.
6824 * linux-ia64-low.c (the_low_target): Likewise.
6825 * linux-m32r-low.c (the_low_target): Likewise.
6826 * linux-m68k-low.c (the_low_target): Likewise.
6827 * linux-ppc-low.c (the_low_target): Likewise.
6828 * linux-s390-low.c (the_low_target): Likewise.
6829 * linux-sh-low.c (the_low_target): Likewise.
6830 * linux-sparc-low.c (the_low_target): Likewise.
6831 * linux-tic6x-low.c (the_low_target): Likewise.
6832 * linux-x86-low.c (the_low_target): Likewise.
6833 * linux-xtensa-low.c (the_low_target): Likewise.
6834 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6835 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6836 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6838 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6839 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6841 2012-02-29 Yao Qi <yao@codesourcery.com>
6842 Pedro Alves <palves@redhat.com>
6844 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6845 `step_over_finished' is true.
6847 2012-02-27 Pedro Alves <palves@redhat.com>
6849 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6850 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6852 2012-02-27 Pedro Alves <palves@redhat.com>
6855 * linux-low.c (pid_is_stopped): New.
6856 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6858 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6860 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6863 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6865 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6867 2012-02-24 Luis Machado <lgustavo@codesourcery>
6869 * server.c (handle_query): Advertise support for target-side
6870 breakpoint condition evaluation.
6871 (process_point_options): New function.
6872 (process_serial_event): When inserting a breakpoint, check for
6873 a target-side condition that should be evaluated.
6875 * mem-break.c: Include regcache.h and ax.h.
6876 (point_cond_list_t): New data structure.
6877 (breakpoint) <cond_list>: New field.
6878 (find_gdb_breakpoint_at): Make non-static.
6879 (delete_gdb_breakpoint_at): Clear any target-side
6881 (clear_gdb_breakpoint_conditions): New function.
6882 (add_condition_to_breakpoint): Likewise.
6883 (add_breakpoint_condition): Likewise.
6884 (gdb_condition_true_at_breakpoint): Likewise.
6885 (gdb_breakpoint_here): Return result directly instead
6886 of going through a local variable.
6888 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6889 (clear_gdb_breakpoint_conditions): Likewise.
6890 (add_breakpoint_condition): Likewise.
6891 (gdb_condition_true_at_breakpoint): Likewise.
6893 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6894 (need_step_over_p): Take target-side breakpoint condition into
6897 2012-02-24 Luis Machado <lgustavo@codesourcery>
6899 * server.h: Include tracepoint.h.
6900 (agent_mem_read, agent_get_trace_state_variable_value,
6901 agent_set_trace_state_variable_value,
6902 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6903 get_set_tsv_func_addr): New prototypes.
6905 * ax.h: New include file.
6906 * ax.c: New source file.
6908 * tracepoint.c: Include ax.h.
6909 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6910 agent_expr, eval_result_type): Move to ax.h.
6911 (parse_agent_expr): Rename to ...
6912 (gdb_parse_agent_expr): ... this, make it non-static and move
6914 (unparse_agent_expr) Rename to ...
6915 (gdb_unparse_agent_expr): ... this, make it non-static and move
6917 (eval_agent_expr): Rename to ...
6918 (eval_tracepoint_agent_expr): ... this.
6919 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6920 forward declarations.
6921 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6922 (agent_get_trace_state_variable_value): New function.
6923 (agent_set_trace_state_variable_value): New function.
6924 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6925 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6926 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6927 (condition_true_at_tracepoint): Likewise.
6928 (parse_agent_expr): Rename to ...
6929 (gdb_parse_agent_expr): ... this and move to ax.c.
6930 (unparse_agent_expr): Rename to ...
6931 (gdb_unparse_agent_expr): ... this and move to ax.c.
6932 (gdb_agent_op_name): Move to ax.c.
6933 (eval_agent_expr): Rename to ...
6934 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6936 (eval_tracepoint_agent_expr): New function.
6937 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6939 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6941 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6942 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6943 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6944 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6945 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6946 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6947 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6948 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6949 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6950 (compile_bytecodes): Remove forward declaration.
6951 (is_goto_target): Move to ax.c.
6952 (compile_bytecodes): Move to ax.c and call
6953 agent_get_trace_state_variable_value (...) and
6954 agent_set_trace_state_variable_value (...).
6956 * Makefile.in: Update ax.c and IPA dependencies.
6958 2012-02-24 Pedro Alves <palves@redhat.com>
6960 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6961 (cmd_bigqtbuffer_circular): ... this. Only handle
6962 'QTBuffer:circular:'.
6963 (handle_tracepoint_general_set): Adjust.
6965 2012-02-16 Yao Qi <yao@codesourcery.com>
6967 * inferiors.c: Move code to ...
6968 * dll.c: .... here. New.
6969 * server.h: Declare clear_dlls.
6970 * Makefile.in (SFILES): Add dll.c.
6974 2012-02-11 Yao Qi <yao@codesourcery.com>
6976 * server.c: (handle_monitor_command): Add a new parameter
6978 (handle_query): Update caller.
6980 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6982 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6983 * configure, config.in: Regenerate.
6984 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6987 2012-02-02 Pedro Alves <palves@redhat.com>
6989 Try SIGKILL first, then PTRACE_KILL.
6990 * linux-low.c (linux_kill_one_lwp): New.
6991 (linux_kill_one_lwp): Rename to ...
6992 (kill_one_lwp_callback): ... this. Use the new
6995 2012-02-02 Pedro Alves <palves@redhat.com>
6997 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7000 2012-01-27 Pedro Alves <palves@redhat.com>
7002 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7003 (elf_64_file_p): Make static.
7004 (linux_pid_exe_is_elf_64_file): New.
7005 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7006 Delete declarations.
7007 (linux_pid_exe_is_elf_64_file): Declare.
7008 * linux-x86-low.c (x86_arch_setup): Use
7009 linux_pid_exe_is_elf_64_file.
7011 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7013 * linux-low.c (linux_wait_for_event_1): Rename to ...
7014 (linux_wait_for_event): ... here and merge it with former
7015 linux_wait_for_event - new variable wait_ptid, use it.
7016 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7018 2012-01-23 Pedro Alves <palves@redhat.com>
7020 * server.c (main): Avoid yet another case of infinite loop while
7021 detaching/killing after a longjmp.
7023 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7026 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7028 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7030 * hostio.c (handle_readlink): New function.
7031 (handle_vFile): Call it to handle "vFile:readlink" packets.
7033 2012-01-20 Pedro Alves <palves@redhat.com>
7034 Ulrich Weigand <ulrich.weigand@linaro.org>
7036 * server.c (handle_v_requests): Only support vAttach and vRun to
7037 start multiple processes when in extended protocol mode.
7039 2012-01-17 Pedro Alves <palves@redhat.com>
7041 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7042 memalign plus mprotect to allocate the scratch buffer.
7044 2012-01-13 Pedro Alves <palves@redhat.com>
7046 * server.c (attach_inferior): Clear `cont_thread'.
7048 2012-01-13 Pedro Alves <palves@redhat.com>
7050 * server.c (main): Avoid infinite loop while detaching/killing
7053 2012-01-09 Doug Evans <dje@google.com>
7055 * server.c (start_inferior): Set last_ptid in --wrapper case.
7057 2012-01-06 Yao Qi <yao@codesourcery.com>
7059 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7061 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7063 2012-01-04 Yao Qi <yao@codesourcery.com>
7065 * tracepoint.c (cmd_qtdp): Print debug message
7066 for static tracepoint.
7068 2012-01-04 Yao Qi <yao@codesourcery.com>
7070 * tracepoint.c (trace_vdebug): Differentiate debug message
7071 between gdbserver and IPA.
7073 2012-01-03 Yao Qi <yao@codesourcery.com>
7075 * tracepoint.c (tracepoint_was_hit): Don't collect for
7078 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7080 * terminal.h: Reformat copyright header.
7082 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7084 * server.c (gdbserver_version): Update copyright year.
7085 * gdbreplay.c (gdbreplay_version): Likewise.
7087 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7089 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7092 2011-12-18 Hui Zhu <teawater@gmail.com>
7093 * linux-low.c (linux_create_inferior): Save return value to ret.
7095 2011-12-18 Hui Zhu <teawater@gmail.com>
7097 * linux-low.c (linux_create_inferior): Save return value to ret.
7099 2011-12-16 Doug Evans <dje@google.com>
7101 * linux-low.c (linux_create_inferior): If stdio connection,
7102 redirect stdin from /dev/null, stdout to stderr.
7103 * remote-utils.c (remote_is_stdio): New static global.
7104 (remote_connection_is_stdio): New function.
7105 (remote_prepare): Handle stdio connection.
7106 (remote_open): Ditto.
7107 (remote_close): Don't close stdin for stdio connections.
7108 (read_prim,write_prim): New functions. Replace all calls to
7109 read/write to these.
7110 * server.c (main): Watch for "-" argument. Move call to
7111 remote_prepare before start_inferior.
7112 * server.h (STDIO_CONNECTION_NAME): New macro.
7113 (remote_connection_is_stdio): Declare.
7115 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7116 in debugging output.
7118 2011-12-15 Yao Qi <yao@codesourcery.com>
7120 * tracepoint.c: Include sys/syscall.h.
7121 (gdb_ust_thread): Remove preprocessor conditional.
7123 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7125 * linux-low.c (linux_detach_one_lwp): Call
7126 the_low_target.prepare_to_resume before detaching.
7128 2011-12-14 Yao Qi <yao@codesourcery.com>
7130 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7133 2011-12-14 Yao Qi <yao@codesourcery.com>
7135 * i386-low.c (i386_low_stopped_data_address): Initialize local
7138 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7142 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7143 DR_CONTROL unless necessary. Extend comments.
7144 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7145 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7147 2011-12-13 Yao Qi <yao@codesourcery.com>
7149 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7151 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7153 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7155 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7156 Print new debug message for such case.
7158 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7160 Fix overlapping memcpy.
7161 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7162 the read_inferior_memory transfer.
7163 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7164 write_inferior_memory transfer.
7165 (set_fast_tracepoint_jump): New variable buf. Use it for the
7166 read_inferior_memory and write_inferior_memory transfers.
7167 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7168 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7169 Use it for the write_inferior_memory transfer.
7170 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7173 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7175 * linux-low.c (fetch_register, store_register): Make code
7176 consistent, fix formatting.
7178 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7180 * linux-low.c (usr_store_inferior_registers): Factor out code
7181 to handle individual registers into...
7182 (store_register): ... this new function.
7184 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7186 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7187 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7188 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7189 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7190 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7191 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7192 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7193 (srv_xmlfiles): Add new XML files.
7195 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7197 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7198 (init_registers_s390_linux32v1): Add prototype.
7199 (init_registers_s390_linux32v2): Likewise.
7200 (init_registers_s390_linux64v1): Likewise.
7201 (init_registers_s390_linux64v2): Likewise.
7202 (init_registers_s390x_linux64v1): Likewise.
7203 (init_registers_s390x_linux64v2): Likewise.
7204 (s390_num_regs): Increment to 52.
7205 (s390_regmap): Add orig_r2 register.
7206 (s390_num_regs_3264): Increment to 68.
7207 (s390_regmap_3264): Add orig_r2 register.
7208 (s390_collect_ptrace_register): Handle orig_r2 register.
7209 (s390_supply_ptrace_register): Likewise.
7210 (s390_fill_last_break): New function.
7211 (s390_store_last_break): Likewise.
7212 (s390_fill_system_call): New function.
7213 (s390_store_system_call): Likewise.
7214 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7216 (s390_check_regset): New function.
7217 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7218 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7219 Update target_regsets for available register sets.
7221 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7222 Jan Kratochvil <jan.kratochvil@redhat.com>
7224 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7225 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7227 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7228 * linux-low.h (struct process_info_private): New member r_debug.
7229 * server.c (handle_qxfer_libraries): Call
7230 the_target->qxfer_libraries_svr4.
7231 (handle_qxfer_libraries_svr4): New function.
7232 (qxfer_packets): New entry "libraries-svr4".
7233 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7234 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7235 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7236 PACKET_qXfer_libraries_svr4.
7238 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7240 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7241 PSW address/mask between 8-byte and 16-byte formats.
7242 (s390_supply_ptrace_register): Likewise.
7243 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7244 basic addressing mode bit.
7246 2011-11-24 Stan Shebs <stan@codesourcery.com>
7248 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7250 2011-11-17 Stan Shebs <stan@codesourcery.com>
7252 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7253 (tracing_start_time): New global.
7254 (tracing_stop_time): New global.
7255 (tracing_user_name): New global.
7256 (tracing_notes): New global.
7257 (tracing_stop_note): New global.
7258 (cmd_qtstart): Set traceframe_usage, start_time.
7259 (stop_tracing): Set stop_time.
7260 (cmd_qtstatus): Report additional status.
7261 (cmd_qtp): New function.
7262 (handle_tracepoint_query): Call it.
7263 (cmd_qtnotes): New function.
7264 (handle_tracepoint_general_set): Call it.
7265 (get_timestamp): Rename from tsv_get_timestamp.
7267 2011-11-14 Stan Shebs <stan@codesourcery.com>
7268 Kwok Cheung Yeung <kcy@codesourcery.com>
7270 * linux-x86-low.c (small_jump_insn): New.
7271 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7272 trampoline and error message, build a trampoline and issue a small
7273 jump instruction to it.
7274 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7275 trampoline and error message.
7276 (x86_get_min_fast_tracepoint_insn_len): New.
7277 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7278 * linux-low.h (struct linux_target_ops): Add arguments to
7279 install_fast_tracepoint_jump_pad operation, add new operation.
7280 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7282 (linux_get_min_fast_tracepoint_insn_len): New function.
7283 (linux_target_op): Add new operation.
7284 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7285 (gdb_trampoline_buffer_end): Ditto.
7286 (gdb_trampoline_buffer_error): Ditto.
7287 (struct ipa_sym_addresses): Add fields for new IPA variables.
7288 (symbol_list): Add entries for new IPA variables.
7289 (struct tracepoint): Add fields to hold the address range of the
7290 trampoline used by the tracepoint.
7291 (trampoline_buffer_head): New static variable.
7292 (trampoline_buffer_tail): Ditto.
7293 (claim_trampoline_space): New function.
7294 (have_fast_tracepoint_trampoline_buffer): New function.
7295 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7297 (install_fast_tracepoint): Ditto, also add error buffer argument.
7298 (cmd_qtminftpilen): New function.
7299 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7300 (fast_tracepoint_from_trampoline_address): New function.
7301 (fast_tracepoint_collecting): Handle trampoline as part of jump
7303 (set_trampoline_buffer_space): New function.
7304 (initialize_tracepoint): Initialize new IPA variables.
7305 * target.h (struct target_ops): Add arguments to
7306 install_fast_tracepoint_jump_pad operation, add new
7307 get_min_fast_tracepoint_insn_len operation.
7308 (target_get_min_fast_tracepoint_insn_len): New.
7309 (install_fast_tracepoint_jump_pad): Add arguments.
7310 * server.h (IPA_BUFSIZ): Define.
7311 * linux-i386-ipa.c: Include extra header files.
7312 (initialize_fast_tracepoint_trampoline_buffer): New function.
7313 (initialize_low_tracepoint): Call it.
7314 * server.h (set_trampoline_buffer_space): Declare.
7315 (claim_trampoline_space): Ditto.
7316 (have_fast_tracepoint_trampoline_buffer): Ditto.
7318 2011-11-14 Yao Qi <yao@codesourcery.com>
7320 * server.c (handle_query): Handle InstallInTrace for qSupported.
7321 * tracepoint.c (add_tracepoint): Sort list.
7322 (install_tracepoint, download_tracepoint): New.
7323 (cmd_qtdp): Call them to install and download tracepoints.
7324 (sort_tracepoints): Removed.
7325 (cmd_qtstart): Update.
7327 2011-11-14 Yao Qi <yao@codesourcery.com>
7329 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7330 * mem-break.h: Declare.
7331 * tracepoint.c (cmd_qtstart): Move some code to ...
7332 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7334 (download_tracepoints): Move some code to ...
7335 (download_tracepoint_1): ... here. New.
7337 2011-11-08 Yao Qi <yao@codesourcery.com>
7339 * remote-utils.c (relocate_instruction): A comment fix.
7341 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7343 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7344 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7345 dr_status_mirror and dr_control_mirror from debug_reg_state.
7346 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7347 (i386_initial_stuff): Remove use of deleted globals.
7348 (i386_get_thread_context, i386_set_thread_context,
7349 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7350 from debug_reg_state.
7352 2011-11-05 Yao Qi <yao@codesourcery.com>
7354 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7355 address as TPOINT's.
7357 2011-11-02 Stan Shebs <stan@codesourcery.com>
7359 * tracepoint.c (agent_mem_read_string): New function.
7360 (eval_agent_expr): Call it for tracenz.
7361 * server.c (handle_query): Report support for tracenz.
7363 2011-11-02 Yao Qi <yao@codesourcery.com>
7365 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7367 2011-11-02 Yao Qi <yao@codesourcery.com>
7369 * target.h: Fix a typo in comment.
7371 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7373 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7374 clobber the breakpoints' shadows with fast tracepoint jumps.
7375 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7376 * target.c (write_inferior_memory): Also pass MYADDR down to
7379 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7381 * configure.ac: Check support for personality routine.
7382 * configure: Regenerate.
7383 * config.in: Likewise.
7384 * linux-low.c: Include <sys/personality.h>.
7385 Define ADDR_NO_RANDOMIZE if necessary.
7386 (linux_create_inferior): Disable address space randomization when
7387 forking inferior, if requested.
7388 (linux_supports_disable_randomization): New function.
7389 (linux_target_ops): Install it.
7390 * server.h (disable_randomization): Declare.
7391 * server.c (disable_randomization): New global variable.
7392 (handle_general_set): Handle QDisableRandomization.
7393 (handle_query): Likewise for qSupported.
7394 (main): Support --disable-randomization and --no-disable-randomization
7395 command line arguments.
7396 * target.h (struct target_ops): Add supports_disable_randomization.
7397 (target_supports_disable_randomization): New macro.
7399 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7401 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7403 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7404 [!PT_GETDSBT] (target_loadmap): New definition.
7405 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7406 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7407 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7408 and PT_GETDSBT to LINUX_LOADMAP.
7409 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7410 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7412 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7414 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7415 (arm_linux_hwbp_cap): New static variable.
7416 (arm_linux_get_hwbp_cap): Replace by ...
7417 (arm_linux_init_hwbp_cap): ... this new function.
7418 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7419 (arm_linux_get_hw_watchpoint_count): Likewise.
7420 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7421 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7422 (arm_prepare_to_resume): Use perror_with_name instead of error.
7424 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7426 * linux-arm-low.c: Include <signal.h>.
7427 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7428 (struct arm_linux_hwbp_cap): New data type.
7429 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7430 (struct arm_linux_hw_breakpoint): New data type.
7431 (MAX_BPTS, MAX_WPTS): Define.
7432 (struct arch_process_info, struct arch_lwp_info): New data types.
7433 (arm_linux_get_hwbp_cap): New function.
7434 (arm_linux_get_hw_breakpoint_count): Likewise.
7435 (arm_linux_get_hw_watchpoint_count): Likewise.
7436 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7437 (arm_hwbp_control_initialize): Likewise.
7438 (arm_hwbp_control_is_enabled): Likewise.
7439 (arm_hwbp_control_is_initialized): Likewise.
7440 (arm_hwbp_control_disable): Likewise.
7441 (arm_linux_hw_breakpoint_equal): Likewise.
7442 (arm_linux_hw_point_initialize): Likewise.
7443 (struct update_registers_data): New data structure.
7444 (update_registers_callback: New function.
7445 (arm_insert_point): Likewise.
7446 (arm_remove_point): Likewise.
7447 (arm_stopped_by_watchpoint): Likewise.
7448 (arm_stopped_data_address): Likewise.
7449 (arm_new_process): Likewise.
7450 (arm_new_thread): Likewise.
7451 (arm_prepare_to_resume): Likewise.
7452 (the_low_target): Register arm_insert_point, arm_remove_point,
7453 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7454 arm_new_thread, and arm_prepare_to_resume.
7456 2011-09-15 Stan Shebs <stan@codesourcery.com>
7458 * server.h (struct emit_ops): Add compare-goto fields.
7459 * tracepoint.c (gdb_agent_op_sizes): New table.
7460 (emit_eq_goto): New function.
7461 (emit_ne_goto): New function.
7462 (emit_lt_goto): New function.
7463 (emit_le_goto): New function.
7464 (emit_gt_goto): New function.
7465 (emit_ge_goto): New function.
7466 (is_goto_target): New function.
7467 (compile_bytecodes): Recognize special cases of compare-goto
7468 combinations and call specialized emitters for them.
7469 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7470 (amd64_emit_ne_goto): New function.
7471 (amd64_emit_lt_goto): New function.
7472 (amd64_emit_le_goto): New function.
7473 (amd64_emit_gt_goto): New function.
7474 (amd64_emit_ge_goto): New function.
7475 (amd64_emit_ops): Add the new functions.
7476 (i386_emit_eq_goto): New function.
7477 (i386_emit_ne_goto): New function.
7478 (i386_emit_lt_goto): New function.
7479 (i386_emit_le_goto): New function.
7480 (i386_emit_gt_goto): New function.
7481 (i386_emit_ge_goto): New function.
7482 (i386_emit_ops): Add the new functions.
7484 2011-09-08 Stan Shebs <stan@codesourcery.com>
7486 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7487 (i386_emit_epilogue): Restore %ebx.
7489 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7491 * server.c (step_thread): Remove definition.
7492 (process_serial_event): Don't handle Hs.
7493 * server.h (step_thread): Remove declaration.
7494 * target.c (set_desired_inferior): Remove use of step_thread.
7496 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7498 * linux-low.c: Include linux-procfs.h.
7499 (linux_attach_lwp_1): Update comments.
7500 (linux_attach): Scan for existing threads when attaching to a
7501 process that is the tgid.
7502 * Makefile.in: Update dependencies.
7504 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7506 * configure.srv: Add linux-procfs.o dependencies.
7508 2011-08-14 Yao Qi <yao@codesourcery.com>
7510 * target.h (struct target_ops): Fix indent.
7511 * win32-low.c (win32_target_ops): Fix comment.
7513 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7514 Yao Qi <yao@codesourcery.com>
7516 * Makefile.in (clean): Remove tic6x-*.c files.
7517 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7518 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7519 (tic6x-c64xp-linux.c): Likewise.
7520 * configure.srv: Add support for tic6x-*-uclinux.
7521 * linux-tic6x-low.c: New.
7522 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7524 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7525 Yao Qi <yao@codesourcery.com>
7527 * target.h (struct target_ops): Add read_loadmap.
7528 * linux-low.c (struct target_loadseg): New type.
7529 (struct target_loadmap): New type.
7530 (linux_read_loadmap): New function.
7531 (linux_target_ops): Add linux_read_loadmap.
7532 * server.c (handle_query): Support qXfer:fdpic:read packet.
7533 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7536 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7538 * win32-low.c: Include <stdint.h>.
7540 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7542 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7543 to the inferior here.
7544 (i386_remove_aligned_watchpoint): Ditto.
7545 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7546 fit part of the watchpoint in the debug registers.
7547 (i386_update_inferior_debug_regs): New.
7548 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7549 registers, and only update the inferior on success.
7550 (i386_low_remove_watchpoint): Ditto.
7552 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7554 * linux-low.c (compare_ints, unique, list_threads, show_process,
7555 linux_core_of_thread): Delete.
7556 (linux_target_ops): Change linux_core_of_thread to
7557 linux_common_core_of_thread.
7558 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7559 * utils.c (malloc_failure): Change type of argument.
7560 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7561 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7562 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7563 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7564 (IPA_OBJS): Add common-utils-ipa.o.
7565 (ptid_h, linux_osdata_h): New macros.
7566 (server_h): Add common/common-utils.h, common/xml-utils.h,
7567 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7569 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7570 ptid.o, buffer.o): New rules.
7571 (linux-low.o): Add common/linux-osdata.h as a dependency.
7572 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7573 * configure.ac: Add AC_HEADER_DIRENT check.
7574 * config.in: Regenerate.
7575 * configure: Regenerate.
7576 * remote-utils.c (xml_escape_text): Delete.
7577 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7578 buffer_xml_printf): Move to common/buffer.c.
7579 * server.c (main): Remove call to initialize_inferiors.
7580 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7581 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7582 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7583 internal_error, gdb_assert, gdb_assert_fail): Delete.
7584 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7585 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7587 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7588 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7589 initialize_inferiors): Delete.
7591 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7593 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7596 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7598 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7600 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7602 2011-05-26 Yao Qi <yao@codesourcery.com>
7604 * Makefile.in (thread-db.o): Track dependence to
7605 common/gdb_thread_db.h.
7606 * thread-db.c: include gdb_thread_db.h from right place.
7608 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7610 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7611 __FILE__ and __LINE__ to internal_error.
7613 2011-05-13 Doug Evans <dje@google.com>
7615 * thread-db.c (try_thread_db_load_from_sdir): New function.
7616 (try_thread_db_load_from_dir): New function.
7617 (thread_db_load_search): Handle $sdir, ignore $pdir.
7618 Remove trying of system directories if search of
7619 libthread-db-search-path fails, that is now done via $sdir.
7621 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7623 * server.c (handle_query): Add EnableDisableTracepoints to the list
7624 of supported features.
7625 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7627 (cmd_qtenable_disable): New.
7628 (cmd_qtstart): Install tracepoints even if disabled.
7629 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7630 receiving a QTEnable or QTDisable packet.
7631 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7632 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7634 (gdb_probe): Skip data collection if static tracepoint is disabled.
7636 2011-05-10 Doug Evans <dje@google.com>
7638 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7640 2011-05-04 Doug Evans <dje@google.com>
7642 * linux-low.c (linux_join): Skip process lookup.
7643 * spu-low.c (spu_join): Ditto.
7644 * server.c (join_inferiors_callback): Delete.
7645 (process_serial_event): For 'D' packet (detach) call join_inferior
7648 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7650 * README: Don't mention xscale*-*-linux*.
7651 * configure.srv (xscale*-*-linux*): Don't handle target.
7653 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7655 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7657 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7658 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7659 (i386_emit_void_call_2): Likewise.
7661 2011-04-26 Yao Qi <yao@codesourcery.com>
7663 * linux-low.c: Move common macros to linux-ptrace.h.
7664 Include linux-ptrace.h.
7665 * Makefile.in (linux_ptrace_h): New.
7666 (linux-low.o): Depends on linux-ptrace.h.
7668 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7670 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7671 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7672 (remote_prepare): New function with most of the TCP code from ...
7673 (remote_open): ... here. Detect PORT here unconditionally. Move also
7674 setting transport_is_reliable.
7675 * server.c (run_once): New variable.
7676 (gdbserver_usage): Document it.
7677 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7678 the first run if RUN_ONCE.
7679 * server.h (run_once, remote_prepare): New declarations.
7681 2011-04-19 Tom Tromey <tromey@redhat.com>
7683 * win32-low.c (handle_load_dll): Remove duplicate "the".
7685 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7687 Remove support for old Cygwin 1.5 versions.
7688 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7689 function to avoid warning.
7690 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7693 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7695 * gdbserver/server.h (Macro _): Define it if not available.
7697 2011-03-14 Michael Snyder <msnyder@vmware.com>
7699 * hostio.c (handle_close): Remove unnecessary null test.
7701 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7703 * Makefile.in (maintainer-clean realclean distclean): Remove
7704 "make ... subdir_do" command.
7706 2011-03-10 Michael Snyder <msnyder@vmware.com>
7708 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7710 * server.c (handle_v_run): Free alloced buffer on early return.
7712 2011-03-09 Yao Qi <yao@codesourcery.com>
7715 2011-03-04 Yao Qi <yao@codesourcery.com>
7717 * Makefile.in: Remove GNU make feature --directory.
7719 2011-03-05 Yao Qi <yao@codesourcery.com>
7721 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7722 (subdir_do): New make target. Copied from gdb/Makefile.
7723 (maintainer-clean, realclean, distclean, clean): Call corresponding
7724 make targets in common/Makefile.
7726 2011-02-11 Yao Qi <yao@codesourcery.com>
7728 * configure.ac: Call AC_PROG_RANLIB.
7729 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7730 * configure: Regenerate.
7732 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7734 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7736 2011-03-06 Yao Qi <yao@codesourcery.com>
7738 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7740 2011-03-05 Yao Qi <yao@codesourcery.com>
7742 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7743 (subdir_do): New make target. Copied from gdb/Makefile.
7744 (maintainer-clean, realclean, distclean, clean): Call corresponding
7745 make targets in common/Makefile.
7747 2011-03-04 Yao Qi <yao@codesourcery.com>
7749 * Makefile.in: Remove GNU make feature --directory.
7751 2011-03-04 Michael Snyder <msnyder@vmware.com>
7753 * server.c (queue_stop_reply): Call xmalloc not malloc.
7755 2011-03-02 Michael Snyder <msnyder@vmware.com>
7757 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7759 2011-02-28 Michael Snyder <msnyder@vmware.com>
7761 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7762 (cmd_qtframe): Ditto.
7763 (cmd_qtbuffer): Ditto.
7764 (cmd_bigqtbuffer): Ditto.
7766 * utils.c (decimal2str): Initialize 'width' to nine, then
7769 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7771 * hostio.c (require_data): Free *data, not data.
7773 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7775 * hostio.c (require_data): Use free, not xfree.
7777 2011-02-27 Michael Snyder <msnyder@vmware.com>
7779 * server.c (handle_query): Discard unused value.
7781 * hostio.c (require_data): Free malloc memory before returning
7784 2011-02-26 Michael Snyder <msnyder@vmware.com>
7786 * linux-low.c (list_threads): Call closedir for dirent.
7788 2011-02-27 Michael Snyder <msnyder@vmware.com>
7790 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7791 a case statement falls through.
7793 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7795 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7798 2011-02-26 Michael Snyder <msnyder@vmware.com>
7800 * utils.c (decimal2str): Eliminate dead code and dead param.
7801 (pulongest): Drop dead param from call to decimal2str.
7804 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7806 Revert the following patch (not approved yet):
7807 2011-02-21 Hui Zhu <teawater@gmail.com>
7808 * tracepoint.c (tp_printf): New function.
7809 (eval_agent_expr): Handle gdb_agent_op_printf.
7811 2011-02-21 Hui Zhu <teawater@gmail.com>
7813 * tracepoint.c (tp_printf): New function.
7814 (eval_agent_expr): Handle gdb_agent_op_printf.
7816 2011-02-18 Tom Tromey <tromey@redhat.com>
7818 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7819 (tracepoint.o): Likewise.
7820 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7821 (gdb_agent_op_names): Likewise.
7823 2011-02-18 Tom Tromey <tromey@redhat.com>
7825 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7826 gdb_agent_op_rot>: New constants.
7827 (gdb_agent_op_names): Add pick and roll.
7828 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7831 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7833 * aclocal.m4: Regenerated with aclocal-1.11.1.
7835 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7837 * server.c (handle_qxfer_traceframe_info): New.
7838 (qxfer_packets): Register "traceframe-info".
7839 (handle_query): Report support for qXfer:traceframe-info:read+.
7840 * tracepoint.c (match_blocktype): New.
7841 (traceframe_find_block_type): Rename to ...
7842 (traceframe_walk_blocks): ... this. Add callback filter argument,
7844 (traceframe_find_block_type): New, reimplemented on top of
7845 traceframe_walk_blocks.
7846 (build_traceframe_info_xml): New.
7847 (traceframe_read_info): New.
7848 * server.h (traceframe_read_info): Declare.
7850 2011-02-11 Yao Qi <yao@codesourcery.com>
7852 * configure.ac: Call AC_PROG_RANLIB.
7853 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7854 * configure: Regenerate.
7856 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7858 * server.c (gdb_read_memory): Change return semantics to allow
7860 (handle_search_memory_1): Adjust.
7861 (process_serial_event) <'m' packet>: Handle partial transfers.
7862 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7864 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7866 * regcache.c (init_register_cache): Initialize
7867 regcache->register_status.
7868 (free_register_cache): Release regcache->register_status.
7869 (regcache_cpy): Copy register_status.
7870 (registers_to_string): Print 'x's for unavailable registers.
7871 (supply_register): Mark the register's status valid or
7872 unavailable, depending on whether a buffer was passed in or not.
7873 (supply_register_zeroed): New.
7874 (supply_regblock): Mark the registers' status valid or
7875 unavailable, depending on whether a buffer was passed in or not.
7876 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7877 (struct regcache): New `register_status' field.
7878 (supply_register_zeroed): Declare.
7879 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7880 supply_register_zeroed, rather than passing a NULL buffer to
7882 * tracepoint.c (fetch_traceframe_registers): Update comment.
7884 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7886 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7889 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7891 * server.h (decode_xfer_write): Change prototype.
7892 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7893 and don't extract the annex here.
7894 * server.c (decode_xfer_read): Remove `annex' parameter,
7895 and don't extract the annex here.
7897 (struct qxfer): New.
7898 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7899 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7900 (handle_qxfer_statictrace): New functions, abstracted out from
7901 handle_query, and made to use the struct qxfer interface.
7902 (handle_threads_qxfer_proper): Rename to ...
7903 (handle_qxfer_threads_proper): ... this.
7904 (handle_threads_qxfer): Rename to ...
7905 (handle_qxfer_threads): ... this. Adjust.
7906 (qxfer_packets): New array.
7907 (handle_qxfer): New function.
7908 (handle_query): Use handle_qxfer.
7910 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7912 * gdbreplay.c: Shorten lines of >= 80 columns.
7913 * linux-low.c: Ditto.
7914 * linux-ppc-low.c: Ditto.
7915 * linux-s390-low.c: Ditto.
7916 * linux-sparc-low.c: Ditto.
7917 * linux-x86-low.c: Ditto.
7918 * linux-xtensa-low.c: Ditto.
7919 * mem-break.c: Ditto.
7921 * regcache.h: Ditto.
7922 * remote-utils.c: Ditto.
7925 * thread-db.c: Ditto.
7926 * tracepoint.c: Ditto.
7928 * win32-low.h: Ditto.
7930 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7932 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7935 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7937 * server.c (gdbserver_version): Update copyright year in version
7939 * gdbreplay.c (gdbreplay_version): Ditto.
7941 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7943 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7944 * linux-bfin-low.c: New file.
7945 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7946 PT_DATA_ADDR for BFIN targets.
7947 * Makefile.in (SFILES): Add linux-bfin-low.c.
7948 (clean): Remove reg-bfin.c.
7949 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7950 * README: Mention supported Blackfin targets.
7952 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7954 * .gitignore: New file.
7956 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7958 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7960 2010-10-22 Jie Zhang <jie@codesourcery.com>
7962 * Makefile.in: Add FLAGS_TO_PASS variable.
7963 (install): Remove dependency of install-only and recursively
7964 invoke make for install-only.
7966 2010-10-04 Doug Evans <dje@google.com>
7968 * Makefile.in (uninstall): Use $(DESTDIR).
7970 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7974 * linux-x86-low.c (compat_siginfo_from_siginfo)
7975 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7976 si_code is < 0. Check for si_code == SI_TIMER before checking for
7979 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7981 * lynx-i386-low.c: New file.
7982 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7984 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7986 * lynx-low.c (ptrace_request_to_str): Remove handling for
7987 request values that have been removed in LynxOS 5.x.
7989 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7991 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7994 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7996 * configure.ac: Add --enable-inprocess-agent option.
7997 * configure: Rebuilt.
7999 2010-09-06 Yao Qi <yao@codesourcery.com>
8001 * linux-low.c (linux_kill): Remove unused variable.
8002 (linux_stabilize_threads): Likewise.
8003 * server.c (start_inferior): Likewise.
8004 (queue_stop_reply_callback): Likewise.
8005 * tracepoint.c (do_action_at_tracepoint): Likewise.
8007 2010-09-06 Yao Qi <yao@codesourcery.com>
8009 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8012 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8014 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8016 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8018 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8021 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8023 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8024 gdbserver/lynx-ppc-low.c: New files.
8025 * Makefile.in (lynx_low_h): New variable.
8026 (lynx-low.o, lynx-ppc-low.o): New rules.
8027 * configure.ac: On LynxOS, link with -lnetinet.
8028 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8029 * configure: regenerate.
8031 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8033 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8034 * configure.ac: Add check for vasprintf and vsnprintf.
8035 * configure, config.in: Regenerate.
8036 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8040 * gdbreplay.c: Move include of alloca.h up, next to include of
8042 * server.h: Add include of malloc.h.
8043 * mem-break.c: Remove include of malloc.h.
8044 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8046 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8048 * Makefile.in (memmem.o): Build with -Wno-error.
8050 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8052 * utils.c (xsnprintf): Make non-static.
8053 * server.h: Add xsnprintf declaration.
8054 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8055 replace calls to snprintf by calls to xsnprintf throughout.
8057 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8059 * configure.ac: Add configure check for alloca.
8060 * configure, config.in: Regenerate.
8061 * server.h: Include alloca.h if it exists.
8062 * gdbreplay.c: Include alloca.h if it exists.
8064 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8066 * linux-low.c (__SIGRTMIN): Define if not already defined.
8067 (linux_create_inferior): Check for __ANDROID__ rather than
8069 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8070 are already deferred.
8071 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8072 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8073 stopped and already has a pending signal to report.
8074 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8075 a pending signal to report or is moving out of a jump pad.
8076 (linux_init_signals): Check for __ANDROID__ rather than
8079 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8081 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8082 debug_threads check. Avoid a linear search when not doing debug
8085 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8087 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8088 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8089 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8090 (process_event): Change local fd's type to gdb_fildes_t.
8091 (create_file_handler): Adjust prototype.
8092 (delete_file_handler): Adjust prototype.
8093 (handle_file_event): Adjust prototype. Use pfildes.
8094 (create_file_event): Adjsut prototype.
8095 * remote-utils.c (remote_desc, listen_desc): Change type to
8097 * server.h: New gdb_fildes_t typedef.
8098 [USE_WIN32API]: Include winsock2.h.
8099 (delete_file_handler, add_file_handler): Adjust prototypes.
8101 * utils.c (pfildes): New.
8103 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8105 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8106 * configure: Regenerate.
8108 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8110 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8111 (linux_done_accessing_memory): ... this.
8112 (linux_target_ops): Adjust.
8113 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8114 * nto-low.c (nto_target_ops): Adjust comment.
8115 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8116 * spu-low.c (spu_target_ops): Adjust comment.
8117 * target.h (target_ops): Rename unprepare_to_access_memory field
8118 to done_accessing_memory.
8119 (unprepare_to_access_memory): Rename to ...
8120 (done_accessing_memory): ... this.
8122 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8124 * linux-low.c (linux_prepare_to_access_memory): New.
8125 (linux_unprepare_to_access_memory): New.
8126 (linux_target_ops): Install them.
8127 * server.c (read_memory): Rename to ...
8128 (gdb_read_memory): ... this. Use
8129 prepare_to_access_memory/prepare_to_access_memory.
8130 (write_memory): Rename to ...
8131 (gdb_write_memory): ... this. Use
8132 prepare_to_access_memory/prepare_to_access_memory.
8133 (handle_search_memory_1): Adjust.
8134 (process_serial_event): Adjust.
8135 * target.h (struct target_ops): New fields
8136 prepare_to_access_memory and unprepare_to_access_memory.
8137 (prepare_to_access_memory, unprepare_to_access_memory): New.
8138 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8139 prepare_to_access_memory/prepare_to_access_memory.
8140 * nto-low.c (nto_target_ops): Adjust.
8141 * spu-low.c (spu_target_ops): Adjust.
8142 * win32-low.c (win32_target_ops): Adjust.
8144 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8146 * Makefile.in (WARN_CFLAGS): Get it from configure.
8147 (WERROR_CFLAGS): New.
8148 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8149 * configure.ac: Introduce --enable-werror, which adds -Werror to
8150 the compiler command line. Enabled by default. Disable with
8151 --disable-werror. Add -Wdeclaration-after-statement
8152 Wpointer-arith and -Wformat-nonliteral to warning flags.
8153 * configure: Regenerate.
8155 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8157 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8159 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8161 * gdbreplay.c (remote_error): New.
8163 (expect): Use gdbchar. Check for error reading from GDB.
8164 Clarify sync error output.
8165 (play): Check for errors writing to GDB.
8166 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8167 * remote-utils.c (getpkt): Check for errors writing to the remote
8170 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8172 * linux-low.c (linux_wait_1): Move non-debugging code out of
8173 `debug_threads' control.
8175 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8177 * linux-low.c (linux_wait_1): Don't set last_status here.
8178 * server.c (push_event, queue_stop_reply_callback): Assert we're
8179 not pushing a TARGET_WAITKIND_IGNORE event.
8180 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8181 (myresume, handle_target_event): Set the thread's last_resume_kind
8182 and last_status from the target returned status.
8184 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8188 * linux-x86-low.c (update_debug_registers_callback): New.
8189 (i386_dr_low_set_addr): Use it.
8190 (i386_dr_low_get_addr): New.
8191 (i386_dr_low_set_control): Use update_debug_registers_callback.
8192 (i386_dr_low_get_control): New.
8193 (i386_dr_low_get_status): Adjust.
8194 * linux-low.c (linux_stop_lwp): New.
8195 * linux-low.h (linux_stop_lwp): Declare.
8197 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8198 argument instead of a i386_debug_reg_state.
8199 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8200 a i386_debug_reg_state.
8201 (i386_insert_aligned_watchpoint): Adjust.
8202 (i386_remove_aligned_watchpoint): Adjust.
8203 (i386_low_stopped_data_address): Read the debug registers from the
8204 inferior instead of from the mirrors.
8205 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8206 (i386_dr_low_get_addr): Declare.
8207 (i386_dr_low_get_control): Declare.
8208 (i386_dr_low_get_status): Change prototype.
8210 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8211 (i386_dr_low_get_addr): New.
8212 (i386_dr_low_get_control): New.
8213 (i386_dr_low_get_status): Adjust prototype. Return
8215 (i386_initial_stuff): Clear dr_status_mirror and
8217 (i386_get_thread_context): Adjust.
8218 (i386_set_thread_context): Adjust.
8219 (i386_thread_added): Adjust.
8221 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8223 * linux-low.h (linux_thread_area): Delete declaration.
8225 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8227 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8228 after its termination.
8230 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8232 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8233 (gdb_wants_all_stopped): Delete.
8234 (linux_wait_1): Don't call them.
8235 * server.c (handle_v_cont): Tag all threads as want-stopped.
8236 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8237 stopped as "client-wants-stopped".
8239 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8241 * Makefile.in (signals_h): New.
8242 (server_h): Depend on it.
8243 (server.o): Don't depend on $(signals_def).
8244 (signals.o): Depend on $(signals_def).
8246 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8248 * Makefile.in (signals_def): New.
8249 (server_h): Append include/gdb/signals.h and signals_def.
8250 (server.o): Append signals_def.
8252 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8254 * server.c (handle_target_event): Use target_signal_to_host for
8255 resume_info.sig initialization.
8256 * target.h (struct thread_resume) <sig>: New comment.
8258 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8260 * server.c (handle_query): strcpy() the returned string from paddress()
8261 instead of sprintf().
8262 * utils.c (paddress): Return phex_nz().
8264 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8266 * server.c (handle_v_cont): Call mourn_inferior if process
8268 (myresume): Likewise.
8270 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8272 Static tracepoints, and integration with UST.
8274 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8275 * mem-break.c (uninsert_all_breakpoints)
8276 (reinsert_all_breakpoints): New.
8277 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8278 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8279 (gdb_agent_ust_loaded, helper_thread_id)
8280 (gdb_agent_helper_thread_id): New macros.
8281 (struct ipa_sym_addresses): Add addr_ust_loaded,
8282 addr_helper_thread_id, addr_cmd_buf.
8283 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8284 (in_process_agent_loaded_ust): New.
8285 (write_e_ust_not_loaded): New.
8286 (maybe_write_ipa_ust_not_loaded): New.
8287 (struct collect_static_trace_data_action): New.
8288 (enum tracepoint_type) <static_tracepoint>: New.
8289 (struct tracepoint) <handle>: Mention static tracepoints.
8290 (struct static_tracepoint_ctx): New.
8291 (CMD_BUF_SIZE): New.
8292 (add_tracepoint_action): Handle static tracepoint actions.
8293 (unprobe_marker_at): New.
8294 (clear_installed_tracepoints): Handle static tracepoints.
8295 (cmd_qtdp): Handle static tracepoints.
8296 (probe_marker_at): New.
8297 (cmd_qtstart): Handle static tracepoints.
8298 (response_tracepoint): Handle static tracepoints.
8299 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8300 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8301 (get_context_regcache): Handle static tracepoints.
8302 (do_action_at_tracepoint): Handle static tracepoint actions.
8303 (traceframe_find_block_type): Handle static trace data blocks.
8304 (traceframe_read_sdata): New.
8305 (download_tracepoints): Download static tracepoint actions.
8306 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8307 (GDB_PROBE_NAME): New.
8312 (ust_marker_to_static_tracepoint): New.
8314 (collect_ust_data_at_tracepoint): New.
8315 (gdb_ust_probe): New.
8316 (UNIX_PATH_MAX, SOCK_DIR): New.
8317 (gdb_ust_connect_sync_socket): New.
8318 (resume_thread, stop_thread): New.
8319 (run_inferior_command): New.
8320 (init_named_socket): New.
8321 (gdb_ust_socket_init): New.
8322 (cstr_to_hexstr): New.
8324 (first_marker, next_marker): New.
8325 (response_ust_marker): New.
8326 (cmd_qtfstm, cmd_qtsstm): New.
8327 (unprobe_marker_at, probe_marker_at): New.
8328 (cmd_qtstmat, gdb_ust_thread): New.
8329 (gdb_ust_init): New.
8330 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8331 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8333 (x86_64_st_collect_regmap): New.
8334 (X86_64_NUM_ST_COLLECT_GREGS): New.
8335 (AMD64_RIP_REGNUM): New.
8336 (supply_static_tracepoint_registers): New.
8337 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8339 (i386_st_collect_regmap): New.
8340 (i386_NUM_ST_COLLECT_GREGS): New.
8341 (supply_static_tracepoint_registers): New.
8342 * server.c (handle_query): Handle qXfer:statictrace:read.
8343 <qSupported>: Report support for StaticTracepoints, and
8344 qXfer:statictrace:read features.
8345 * server.h (traceframe_read_sdata)
8346 (supply_static_tracepoint_registers): Declare.
8347 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8348 (unpack_varlen_hex): Include in IPA build.
8349 * Makefile.in (ustlibs, ustinc): New.
8350 (IPA_OBJS): Add remote-utils-ipa.o.
8351 ($(IPA_LIB)): Link -ldl and -lpthread.
8353 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8354 * config.in, configure: Regenerate.
8356 2010-06-20 Ian Lance Taylor <iant@google.com>
8357 Pedro Alves <pedro@codesourcery.com>
8359 * linux-x86-low.c (always_true): Delete.
8360 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8361 trying to fool the compiler with always_true.
8363 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8365 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8366 conditions in gdbserver.
8368 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8370 * spu-low.c (spu_read_memory): Wrap around local store limit.
8371 (spu_write_memory): Likewise.
8373 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8375 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8376 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8378 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8380 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8381 uses with LONGEST uses.
8383 2010-06-14 Stan Shebs <stan@codesourcery.com>
8384 Pedro Alves <pedro@codesourcery.com>
8388 * linux-x86-low.c: Include limits.h.
8393 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8394 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8395 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8396 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8397 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8398 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8399 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8400 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8401 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8402 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8403 (amd64_emit_void_call_2): New.
8404 (amd64_emit_ops): New.
8405 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8406 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8407 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8408 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8409 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8410 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8411 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8412 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8413 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8414 (i386_emit_stack_adjust, i386_emit_int_call_1)
8415 (i386_emit_void_call_2): New.
8416 (i386_emit_ops): New.
8417 (x86_emit_ops): New.
8418 (the_low_target): Install x86_emit_ops.
8419 * server.h (struct emit_ops): New.
8420 (get_raw_reg_func_addr): Declare.
8421 (current_insn_ptr, emit_error): Declare.
8422 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8423 (set_trace_state_variable_value): New defines.
8424 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8425 addr_get_trace_state_variable_value and
8426 addr_set_trace_state_variable_value.
8427 (symbol_list): New fields for get_raw_reg,
8428 get_trace_state_variable_value and set_trace_state_variable_value.
8429 (condfn): New typedef.
8430 (struct tracepoint): New field `compiled_cond'.
8431 (do_action_at_tracepoint): Clear compiled_cond.
8432 (get_trace_state_variable_value, set_trace_state_variable_value):
8434 (condition_true_at_tracepoint): If there's a compiled condition,
8436 (current_insn_ptr, emit_error): New globals.
8437 (struct bytecode_address): New.
8438 (get_raw_reg_func_addr): New.
8439 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8440 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8441 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8442 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8443 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8444 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8445 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8446 (compile_tracepoint_condition, compile_bytecodes): New.
8447 * target.h (emit_ops): Forward declare.
8448 (struct target_ops): New field emit_ops.
8449 (target_emit_ops): New.
8450 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8451 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8452 * linux-low.c (linux_emit_ops): New.
8453 (linux_target_ops): Install it.
8454 * linux-low.h (struct linux_target_ops): New field emit_ops.
8456 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8458 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8459 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8461 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8462 Stan Shebs <stan@codesourcery.com>
8464 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8465 (all): Depend on $(extra_libraries).
8466 (install-only): Install the IPA.
8467 (IPA_OBJS, IPA_LIB): New.
8468 (clean): Remove the IPA lib.
8469 (IPAGENT_CFLAGS): New.
8470 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8471 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8472 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8473 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8474 * configure.ac: Check for atomic builtins support in the compiler.
8475 (IPA_DEPFILES, extra_libraries): Define.
8476 * configure.srv (ipa_obj): Add description.
8477 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8478 (i[34567]86-*-linux*): Set ipa_obj.
8479 (x86_64-*-linux*): Set ipa_obj.
8480 * linux-low.c (stabilizing_threads): New.
8481 (supports_fast_tracepoints): New.
8482 (linux_detach): Stabilize threads before detaching.
8483 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8484 the lwp is either not stabilizing, or is moving out of a jump pad.
8485 (linux_fast_tracepoint_collecting): New.
8486 (maybe_move_out_of_jump_pad): New.
8487 (enqueue_one_deferred_signal): New.
8488 (dequeue_one_deferred_signal): New.
8489 (linux_wait_for_event_1): If moving out of a jump pad, defer
8490 pending signals to later.
8491 (linux_stabilize_threads): New.
8492 (linux_wait_1): Check if threads need moving out of jump pads, and
8494 (stuck_in_jump_pad_callback): New.
8495 (move_out_of_jump_pad_callback): New.
8497 (linux_resume_one_lwp): Handle moving out of jump pads.
8498 (linux_set_resume_request): Dequeue deferred signals.
8499 (need_step_over_p): Also step over fast tracepoint jumps.
8500 (start_step_over): Also uninsert fast tracepoint jumps.
8501 (finish_step_over): Also reinsert fast tracepoint jumps.
8502 (linux_install_fast_tracepoint_jump): New.
8503 (linux_target_ops): Install linux_stabilize_threads and
8504 linux_install_fast_tracepoint_jump_pad.
8505 * linux-low.h (linux_target_ops) <get_thread_area,
8506 install_fast_tracepoint_jump_pad>: New fields.
8507 (struct lwp_info) <collecting_fast_tracepoint,
8508 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8509 (linux_get_thread_area): Declare.
8510 * linux-x86-low.c (jump_insn): New.
8511 (x86_get_thread_area): New.
8512 (append_insns): New.
8514 (amd64_install_fast_tracepoint_jump_pad): New.
8515 (i386_install_fast_tracepoint_jump_pad): New.
8516 (x86_install_fast_tracepoint_jump_pad): New.
8517 (the_low_target): Install x86_get_thread_area and
8518 x86_install_fast_tracepoint_jump_pad.
8519 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8520 (struct fast_tracepoint_jump): New.
8521 (fast_tracepoint_jump_insn): New.
8522 (fast_tracepoint_jump_shadow): New.
8523 (find_fast_tracepoint_jump_at): New.
8524 (fast_tracepoint_jump_here): New.
8525 (delete_fast_tracepoint_jump): New.
8526 (set_fast_tracepoint_jump): New.
8527 (uninsert_fast_tracepoint_jumps_at): New.
8528 (reinsert_fast_tracepoint_jumps_at): New.
8529 (set_breakpoint_at): Use write_inferior_memory.
8530 (uninsert_raw_breakpoint): Use write_inferior_memory.
8531 (check_mem_read): Mask out fast tracepoint jumps.
8532 (check_mem_write): Mask out fast tracepoint jumps.
8533 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8534 (set_fast_tracepoint_jump): Declare.
8535 (delete_fast_tracepoint_jump)
8536 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8537 (reinsert_fast_tracepoint_jumps_at): Declare.
8538 * regcache.c: Don't compile many functions when building the
8539 in-process agent library.
8540 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8541 the register buffer in the heap.
8542 (free_register_cache): If the register buffer isn't owned by the
8543 regcache, don't free it.
8544 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8545 pre-existing register caches.
8546 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8548 (convert_ascii_to_int): : Constify `from' parameter type.
8549 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8550 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8551 the needed buffer in-place.
8552 (relocate_instruction): New.
8553 * server.c (handle_query) <qSymbols>: If the target supports
8554 tracepoints, give it a chance of looking up symbols. Report
8555 support for fast tracepoints.
8556 (handle_status): Stabilize threads.
8557 (process_serial_event): Adjust.
8558 * server.h (struct fast_tracepoint_jump): Forward declare.
8559 (struct process_info) <fast_tracepoint_jumps>: New field.
8560 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8561 (decode_X_packet, decode_M_packet): Adjust.
8562 (relocate_instruction): Declare.
8563 (in_process_agent_loaded): Declare.
8564 (tracepoint_look_up_symbols): Declare.
8565 (struct fast_tpoint_collect_status): Declare.
8566 (fast_tracepoint_collecting): Declare.
8567 (force_unlock_trace_buffer): Declare.
8568 (handle_tracepoint_bkpts): Declare.
8569 (initialize_low_tracepoint)
8570 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8571 * target.h (struct target_ops) <stabilize_threads,
8572 install_fast_tracepoint_jump_pad>: New fields.
8573 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8574 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8575 [HAVE_STDINT_H]: Include stdint.h.
8576 (trace_debug_1): Rename to ...
8577 (trace_vdebug): ... this.
8578 (trace_debug): Rename to ...
8579 (trace_debug_1): ... this. Add `level' parameter.
8581 (ATTR_USED, ATTR_NOINLINE): New.
8582 (IP_AGENT_EXPORT): New.
8583 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8584 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8585 (about_to_request_buffer_space, trace_buffer_is_full)
8586 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8587 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8588 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8589 (traceframe_write_count, traceframes_created)
8590 (trace_state_variables)
8591 New renaming defines.
8592 (struct ipa_sym_addresses): New.
8593 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8595 (ipa_sym_addrs): New.
8596 (all_tracepoint_symbols_looked_up): New.
8597 (in_process_agent_loaded): New.
8598 (write_e_ipa_not_loaded): New.
8599 (maybe_write_ipa_not_loaded): New.
8600 (tracepoint_look_up_symbols): New.
8601 (debug_threads) [IN_PROCESS_AGENT]: New.
8602 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8603 (UNKNOWN_SIDE_EFFECTS): New.
8604 (stop_tracing): New.
8605 (flush_trace_buffer): New.
8606 (stop_tracing_bkpt): New.
8607 (flush_trace_buffer_bkpt): New.
8608 (read_inferior_integer): New.
8609 (read_inferior_uinteger): New.
8610 (read_inferior_data_pointer): New.
8611 (write_inferior_data_pointer): New.
8612 (write_inferior_integer): New.
8613 (write_inferior_uinteger): New.
8614 (struct collect_static_trace_data_action): Delete.
8615 (enum tracepoint_type): New.
8616 (struct tracepoint) <type>: New field `type'.
8617 <actions_str, step_actions, step_actions_str>: Only include in
8619 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8620 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8621 (tracepoints): Use IP_AGENT_EXPORT.
8622 (last_tracepoint): Don't include in the IPA.
8623 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8624 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8625 (alloced_trace_state_variables): New.
8626 (trace_state_variables): Use IP_AGENT_EXPORT.
8627 (traceframe_t): Delete unused variable.
8628 (circular_trace_buffer): Don't include in the IPA.
8629 (trace_buffer_start): Delete.
8630 (struct trace_buffer_control): New.
8631 (trace_buffer_free): Delete.
8632 (struct ipa_trace_buffer_control): New.
8633 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8634 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8636 (trace_buffer_ctrl): New.
8637 (TRACE_BUFFER_CTRL_CURR): New.
8638 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8639 Reimplement as macros.
8640 (trace_buffer_wrap): Delete.
8641 (traceframe_write_count, traceframe_read_count)
8642 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8643 (struct tracepoint_hit_ctx) <type>: New field.
8644 (struct fast_tracepoint_ctx): New.
8645 (memory_barrier): New.
8647 (record_tracepoint_error): Update atomically in the IPA.
8648 (clear_inferior_trace_buffer): New.
8649 (about_to_request_buffer_space): New.
8650 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8651 updating the same buffer.
8652 (add_tracepoint): Default the tracepoint's type to trap
8653 tracepoint, and orig_size to -1.
8654 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8656 (create_trace_state_variable): New parameter `gdb'. Handle it.
8657 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8658 (cmd_qtdp): Handle fast tracepoints.
8660 (max_jump_pad_size): New.
8661 (gdb_jump_pad_head): New.
8662 (get_jump_space_head): New.
8663 (claim_jump_space): New.
8664 (sort_tracepoints): New.
8665 (MAX_JUMP_SIZE): New.
8666 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8668 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8669 support. Upload fast traceframes, and delete internal IPA
8671 (stop_tracing_handler): New.
8672 (flush_trace_buffer_handler): New.
8673 (cmd_qtstop): Upload fast tracepoints.
8674 (response_tracepoint): Handle fast tracepoints.
8675 (tracepoint_finished_step): Upload fast traceframes. Set the
8676 tracepoint hit context's tracepoint type.
8677 (handle_tracepoint_bkpts): New.
8678 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8679 type. Add comment about fast tracepoints.
8680 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8681 non-existing action_str field.
8682 (get_context_regcache): Handle fast tracepoints.
8683 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8685 (fast_tracepoint_from_jump_pad_address): New.
8686 (fast_tracepoint_from_ipa_tpoint_address): New.
8687 (collecting_t): New.
8688 (force_unlock_trace_buffer): New.
8689 (fast_tracepoint_collecting): New.
8692 (write_inferior_data_ptr): New.
8693 (target_tp_heap): New.
8694 (target_malloc): New.
8695 (download_agent_expr): New.
8697 (download_tracepoints): New.
8698 (download_trace_state_variables): New.
8699 (upload_fast_traceframes): New.
8700 (IPA_FIRST_TRACEFRAME): New.
8701 (IPA_NEXT_TRACEFRAME_1): New.
8702 (IPA_NEXT_TRACEFRAME): New.
8703 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8704 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8705 (gdb_jump_pad_buffer_end): New.
8706 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8707 (initialize_tracepoint): Adjust.
8708 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8709 buffer. Initialize the low module.
8710 * utils.c (PREFIX, TOOLNAME): New.
8711 (malloc_failure): Use PREFIX.
8712 (error): In the IPA, an error causes an exit.
8713 (fatal, warning): Use PREFIX.
8714 (internal_error): Use TOOLNAME.
8715 (NUMCELLS): Increase to 10.
8716 * configure, config.in: Regenerate.
8718 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8720 * server.c (handle_query) <qSupported>: Do two passes over the
8721 qSupported string to avoid nesting strtok.
8723 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8725 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8727 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8729 * configure: Regenerate.
8730 * proc-service.list: New.
8732 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8734 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8737 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8739 * gdbreplay.c (remote_open): Check error return from socket() call by
8740 its equality to -1 not by it being negative.
8741 * remote-utils.c (remote_open): Likewise.
8743 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8745 * config.h: Regenerate.
8747 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8749 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8750 doesn't provide PTRACE_GET_THREAD_AREA.
8752 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8754 * linux-m68k-low.c: Include <asm/ptrace.h>
8755 (ps_get_thread_area): Implement.
8757 2010-05-03 Doug Evans <dje@google.com>
8759 * event-loop.c (struct callback_event): New struct.
8760 (callback_list): New global.
8761 (append_callback_event, delete_callback_event): New functions.
8762 (process_callback): New function.
8763 (start_event_loop): Call it.
8764 * remote-utils.c (NOT_SCHEDULED): Define.
8765 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8766 moved out of readchar.
8767 (readchar): Rewrite. Call reschedule before returning.
8768 (reset_readchar): New function.
8769 (remote_close): Call it.
8770 (process_remaining, reschedule): New functions.
8771 * server.h (callback_handler_func): New typedef.
8772 (append_callback_event, delete_callback_event): Declare.
8774 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8776 * proc-service.c (ps_pglobal_lookup): Use
8777 thread_db_look_up_one_symbol.
8778 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8779 parameter. Use it instead of all_symbols_looked_up.
8780 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8782 (all_symbols_looked_up): Don't declare.
8783 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8784 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8786 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8787 Set all_symbols_looked_up here.
8788 (thread_db_look_up_one_symbol): New.
8789 (thread_db_get_tls_address): Adjust.
8790 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8791 thread_db object on the heap, and tentatively set it in the
8793 (thread_db_init): Don't set all_symbols_looked_up here.
8794 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8796 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8798 * linux-low.c (linux_kill, linux_detach): Adjust.
8799 (status_pending_p_callback): Remove redundant statement. Check
8800 for !TARGET_WAITIKIND_IGNORE, instead of
8801 TARGET_WAITKIND_STOPPED.
8802 (handle_tracepoints): Make sure LWP is locked. Adjust.
8803 (linux_wait_for_event_1): Adjust.
8804 (linux_cancel_breakpoints): New.
8805 (unsuspend_one_lwp): New.
8806 (unsuspend_all_lwps): New.
8807 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8808 (send_sigstop_callback): Change return type to int, add new
8809 `except' parameter and handle it.
8810 (suspend_and_send_sigstop_callback): New.
8811 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8812 pass them down. If SUSPEND, also increment the lwp's suspend
8814 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8815 (need_step_over_p): Don't consider suspended LWPs.
8816 (start_step_over): Adjust.
8817 (proceed_one_lwp): Change return type to int, add new `except'
8818 parameter and handle it.
8819 (unsuspend_and_proceed_one_lwp): New.
8820 (proceed_all_lwps): Use find_inferior instead of
8822 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8823 also decrement the suspend count of LWPs. Pass `except' down,
8824 instead of hacking its suspend count.
8825 (linux_pause_all): Add `freeze' parameter. Adjust.
8826 (linux_unpause_all): New.
8827 (linux_target_ops): Install linux_unpause_all.
8828 * server.c (handle_status): Adjust.
8829 * target.h (struct target_ops): New fields `unpause_all' and
8830 `cancel_breakpoints'. Add new parameter to `pause_all'.
8831 (pause_all): Add new `freeze' parameter.
8833 (cancel_breakpoints): New.
8834 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8836 (cmd_qtstart): Pause threads.
8837 (stop_tracing): Pause threads, and cancel breakpoints.
8838 * win32-low.c (win32_target_ops): Adjust.
8840 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8842 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8843 the inferior right away from here...
8844 (linux_wait_1): ... to here, and adjust to check the thread's
8845 last_resume_kind instead of the lwp's step or stop_expected flags.
8847 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8849 * README: Use consistent `GDB' and `GDBserver' spellings.
8851 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8853 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8854 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8855 (linux_detach_one_lwp): Assume the lwp is stopped.
8856 (any_thread_of): Delete.
8857 (linux_detach): Stop all lwps here. Don't blindly delete all
8859 (delete_lwp_callback): New.
8860 (linux_mourn): Delete all lwps of the process that is gone.
8861 (linux_wait_1): Don't delete the last lwp of the process here.
8862 * mem-break.h (mark_breakpoints_out): Declare.
8863 * mem-break.c (mark_breakpoints_out): New.
8864 (free_all_breakpoints): Use it.
8865 * server.c (handle_target_event): If the process is gone, mark
8867 * thread-db.c (struct thread_db) <create_bp>: New field.
8868 (thread_db_enable_reporting): Fix prototype. Store a thread event
8869 breakpoint reference in the thread_db struct.
8870 (thread_db_load_search): Clear the thread_db object.
8871 (try_thread_db_load_1): Ditto.
8872 (switch_to_process): New.
8873 (disable_thread_event_reporting): Use it.
8874 (remove_thread_event_breakpoints): New.
8875 (thread_db_detach, thread_db_mourn): Use it.
8877 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8879 * linux-low.c (linux_enable_event_reporting): New.
8880 (linux_wait_for_event_1, handle_extended_wait): Use it.
8882 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8884 * linux-low.c (linux_kill_one_lwp, linux_kill)
8885 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8886 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8887 SIGSTOP even if the LWP is stopped.
8888 (send_sigstop_callback): New.
8889 (stop_all_lwps): Use send_sigstop_callback instead.
8890 (linux_resume_one_thread): Adjust.
8891 (proceed_one_lwp): Still proceed an LWP that the client has
8892 requested to stop, if we haven't reported it as stopped yet. Make
8893 sure that LWPs the client want stopped, have a pending SIGSTOP.
8895 2010-04-26 Doug Evans <dje@google.com>
8897 * server.c (handle_general_set): Make static.
8899 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8900 Print received char after testing for error/eof instead of before.
8901 (input_interrupt): Tweak comment.
8903 2010-04-23 Doug Evans <dje@google.com>
8905 * server.c (start_inferior): Print inferior argv if --debug.
8907 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8909 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8910 * nto-x86-low.c: Include server.h
8912 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8914 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8915 be consistent with other sources of this directory.
8916 (init_registers_amd64): Correct name of source file of this function
8919 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8921 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8924 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8926 * win32-i386-low.c: Add 64-bit support.
8927 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8928 (init_registers_amd64): Declare.
8929 (mappings): Add 64-bit version of array.
8930 (init_windows_x86): New function.
8931 (the_low_target): Change init_arch field to init_windows_x86.
8933 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8935 * win32-low.c: Adapt to support also 64-bit architecture.
8936 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8937 (get_image_name): Use SIZE_T type for local variable `done'.
8938 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8939 (toolhelp_get_dll_name): Idem.
8940 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8941 Use uintptr_t typecast to avoid warning.
8942 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8943 (handle_exception): Use phex_nz to avoid warning.
8944 (win32_wait): Remove unused local variable `process'.
8946 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8948 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8951 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8953 * configure.ac: Use `ws2_32' library for srv_mingw.
8954 * configure: Regenerate.
8955 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8956 * remote-utils.c: Likewise.
8958 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8960 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8961 if __x86_64__ is defined.
8963 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8965 * configure: Regenerate.
8967 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8969 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8970 * target.h (target_ops): New get_tib_address field.
8971 * win32-low.h (win32_thread_info): Add thread_local_base field.
8972 * win32-low.c (child_add_thread): Add tlb argument.
8973 Set thread_local_base field to TLB.
8974 (get_child_debug_event): Adapt to child_add_thread change.
8975 (win32_get_tib_address): New function.
8976 (win32_target_ops): Set get_tib_address field to
8977 win32_get_tib_address.
8978 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8980 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8982 * linux-low.c (linux_mourn): Also remove the process.
8983 * server.c (handle_target_event): Don't remove the process here.
8984 * nto-low.c (nto_mourn): New.
8985 (nto_target_ops): Install it.
8986 * spu-low.c (spu_mourn): New.
8987 (spu_target_ops): Install it.
8988 * win32-low.c (win32_mourn): New.
8989 (win32_target_ops): Install it.
8991 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8993 * server.h (buffer_xml_printf): Remove redundant `;'.
8995 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8997 * regcache.c (set_register_cache): Invalidate regcaches before
8998 changing the register cache layout.
8999 (regcache_invalidate_one): Allow a NULL regcache.
9000 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9001 regcaches before changing the register cache layout or the target
9004 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9006 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9007 variable warning on Linux/x86-64.
9009 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9011 GDBserver disconnected tracing support.
9013 * linux-low.c (linux_remove_process): Delete.
9014 (add_lwp): Don't set last_resume_kind here.
9015 (linux_kill): Use `mourn'.
9016 (linux_detach): Use `thread_db_detach', and `mourn'.
9018 (linux_attach_lwp_1): Adjust comment.
9019 (linux_attach): last_resume_kind moved the thread_info; adjust.
9020 (status_pending_p_callback): Adjust.
9021 (linux_wait_for_event_1): Adjust.
9022 (count_events_callback, select_singlestep_lwp_callback)
9023 (select_event_lwp_callback, cancel_breakpoints_callback)
9024 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9025 (proceed_one_lwp): Adjust.
9026 (linux_async): Add debug output.
9027 (linux_thread_stopped): New.
9028 (linux_pause_all): New.
9029 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9031 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9032 (thread_db_free): Delete declaration.
9033 (thread_db_detach, thread_db_mourn): Declare.
9034 * thread-db.c (thread_db_init): Use thread_db_mourn.
9035 (thread_db_free): Delete, split in two.
9036 (disable_thread_event_reporting): New.
9037 (thread_db_detach): New.
9038 (thread_db_mourn): New.
9040 * server.h (struct thread_info) <last_resume_kind>: New field.
9041 <attached>: Add comment.
9042 <gdb_detached>: New field.
9043 (handler_func): Change return type to int.
9044 (handle_serial_event, handle_target_event): Ditto.
9045 (gdb_connected): Declare.
9047 (disconnected_tracing): Declare.
9048 (stop_tracing): Declare.
9050 * server.c (handle_query) <qSupported>: Report support for
9051 disconnected tracing.
9052 (queue_stop_reply_callback): Account for running threads.
9053 (gdb_wants_thread_stopped): New.
9054 (gdb_wants_all_threads_stopped): New.
9055 (gdb_reattached_process): New.
9056 (handle_status): Clear the `gdb_detached' flag of all processes.
9057 In all-stop, stop all threads.
9058 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9059 (process_serial_event): If the remote connection breaks, or if an
9060 exit was forced with "monitor exit", force an event loop exit.
9061 Handle disconnected tracing on detach.
9062 (handle_serial_event): Adjust.
9063 (handle_target_event): If GDB isn't connected, forward events back
9064 to the inferior, unless the last process exited, in which case,
9065 exit gdbserver. Adjust interface.
9067 * remote-utils.c (remote_open): Don't block in accept. Instead
9068 register an event loop source on the listen socket file
9069 descriptor. Refactor bits into ...
9070 (listen_desc): ... this new global.
9071 (gdb_connected): ... this new function.
9072 (enable_async_notification): ... this new function.
9073 (handle_accept_event): ... this new function.
9074 (remote_close): Clear remote_desc.
9076 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9078 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9080 (mourn_inferior): Define.
9081 (target_process_qsupported): Avoid the dangling else problem.
9082 (thread_stopped): Define.
9083 (pause_all): Define.
9084 (target_waitstatus_to_string): Declare.
9085 * target.c (target_waitstatus_to_string): New.
9087 * tracepoint.c (tracing): Make extern.
9088 (disconnected_tracing): New.
9089 (stop_tracing): Make extern. Handle tracing stops due to GDB
9091 (cmd_qtdisconnected): New.
9092 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9093 (handle_tracepoint_general_set): Handle QTDisconnected.
9095 * event-loop.c (event_handler_func): Change return type to int.
9096 (process_event): Bail out if the event handler wants the event
9098 (handle_file_event): Ditto.
9099 (start_event_loop): Bail out if the event handler wants the event
9102 * nto-low.c (nto_target_ops): Adjust.
9103 * spu-low.c (spu_wait): Don't remove the process here.
9104 (spu_target_ops): Adjust.
9105 * win32-low.c (win32_wait): Don't remove the process here.
9106 (win32_target_ops): Adjust.
9108 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9110 * regcache.c (realloc_register_cache): Invalidate inferior's
9111 regcache before recreating it.
9113 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9115 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9117 2010-04-09 Stan Shebs <stan@codesourcery.com>
9118 Pedro Alves <pedro@codesourcery.com>
9120 * server.h (LONGEST): New.
9121 (struct thread_info) <while_stepping>: New field.
9122 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9124 (initialize_tracepoint, handle_tracepoint_general_set)
9125 (handle_tracepoint_query, tracepoint_finished_step)
9126 (tracepoint_was_hit, release_while_stepping_state_list):
9127 (current_traceframe): Declare.
9128 * server.c (handle_general_set): Handle tracepoint packets.
9130 (write_memory): New.
9131 (handle_search_memory_1): Use read_memory.
9132 (handle_query): Report support for conditional tracepoints, trace
9133 state variables, and tracepoint sources. Handle tracepoint
9135 (main): Initialize the tracepoints module.
9136 (process_serial_event): Handle traceframe reads/writes.
9138 * linux-low.c (handle_tracepoints): New.
9139 (linux_wait_1): Call it.
9140 (linux_resume_one_lwp): Handle while-stepping.
9141 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9142 (linux_target_ops): Install them.
9143 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9145 * linux-x86-low.c (x86_supports_tracepoints): New.
9146 (the_low_target). Install it.
9148 * mem-break.h (delete_breakpoint): Declare.
9149 * mem-break.c (delete_breakpoint): Make external.
9151 * target.h (struct target_ops): Add `supports_tracepoints',
9152 `read_pc', and `write_pc' fields.
9153 (target_supports_tracepoints): Define.
9154 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9157 * regcache.h (struct regcache) <registers_owned>: New field.
9158 (init_register_cache, regcache_cpy): Declare.
9159 (regcache_read_pc, regcache_write_pc): Declare.
9160 (register_cache_size): Declare.
9161 (supply_regblock): Declare.
9162 * regcache.c (init_register_cache): New.
9163 (new_register_cache): Use it.
9164 (regcache_cpy): New.
9165 (register_cache_size): New.
9166 (supply_regblock): New.
9167 (regcache_read_pc, regcache_write_pc): New.
9169 * tracepoint.c: New.
9171 * Makefile.in (OBS): Add tracepoint.o.
9172 (tracepoint.o): New rule.
9174 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9176 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9178 (i386-mmx.c): Likewise.
9179 (i386-mmx-linux.o): Likewise.
9180 (i386-mmx-linux.c): Likewise.
9182 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9183 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9184 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9185 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9187 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9188 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9189 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9191 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9193 * Makefile.in (clean): Updated.
9195 (i386-avx.c): Likewise.
9196 (i386-avx-linux.o): Likewise.
9197 (i386-avx-linux.c): Likewise.
9198 (amd64-avx.o): Likewise.
9199 (amd64-avx.c): Likewise.
9200 (amd64-avx-linux.o): Likewise.
9201 (amd64-avx-linux.c): Likewise.
9203 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9204 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9205 (srv_amd64_regobj): Add amd64-avx.o.
9206 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9207 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9208 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9209 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9210 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9211 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9212 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9214 * i387-fp.c: Include "i386-xstate.h".
9216 (i387_cache_to_xsave): Likewise.
9217 (i387_xsave_to_cache): Likewise.
9218 (x86_xcr0): Likewise.
9220 * i387-fp.h (i387_cache_to_xsave): Likewise.
9221 (i387_xsave_to_cache): Likewise.
9222 (x86_xcr0): Likewise.
9224 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9225 * linux-crisv32-low.c (target_regsets): Likewise.
9226 * linux-m68k-low.c (target_regsets): Likewise.
9227 * linux-mips-low.c (target_regsets): Likewise.
9228 * linux-ppc-low.c (target_regsets): Likewise.
9229 * linux-s390-low.c (target_regsets): Likewise.
9230 * linux-sh-low.c (target_regsets): Likewise.
9231 * linux-sparc-low.c (target_regsets): Likewise.
9232 * linux-xtensa-low.c (target_regsets): Likewise.
9234 * linux-low.c: Include <sys/uio.h>.
9235 (regsets_fetch_inferior_registers): Support nt_type.
9236 (regsets_store_inferior_registers): Likewise.
9237 (linux_process_qsupported): New.
9238 (linux_target_ops): Add linux_process_qsupported.
9240 * linux-low.h (regset_info): Add nt_type.
9241 (linux_target_ops): Add process_qsupported.
9243 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9245 (init_registers_i386_avx_linux): New.
9246 (init_registers_amd64_avx_linux): Likewise.
9247 (xmltarget_i386_linux_no_xml): Likewise.
9248 (xmltarget_amd64_linux_no_xml): Likewise.
9249 (PTRACE_GETREGSET): Likewise.
9250 (PTRACE_SETREGSET): Likewise.
9251 (x86_fill_xstateregset): Likewise.
9252 (x86_store_xstateregset): Likewise.
9253 (use_xml): Likewise.
9254 (x86_linux_update_xmltarget): Likewise.
9255 (x86_linux_process_qsupported): Likewise.
9256 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9257 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9258 init_registers_i386_linux here. Call
9259 x86_linux_update_xmltarget.
9260 (the_low_target): Add x86_linux_process_qsupported.
9262 * server.c (handle_query): Call target_process_qsupported.
9264 * target.h (target_ops): Add process_qsupported.
9265 (target_process_qsupported): New.
9267 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9269 * inferiors.c (add_thread): Set last_status kind to
9270 TARGET_WAITKIND_IGNORE.
9271 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9272 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9273 (linux_wait_1): Move `thread' local definition to block that uses
9274 it. Don't NULL initialize `event_child'.
9275 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9276 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9277 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9279 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9281 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9282 an extended waitstatus, or by a watchpoint.
9283 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9284 thread was stepping or has been stopped by a watchpoint.
9286 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9288 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9289 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9290 of another, then delete the previous, and validate all
9292 (validate_inserted_breakpoint): New.
9293 (delete_disabled_breakpoints): New.
9294 (validate_breakpoints): New.
9295 (check_mem_read): Validate breakpoints before trusting their
9296 shadow. Delete disabled breakpoints.
9297 (check_mem_write): Validate breakpoints before trusting they
9298 should be inserted. Delete disabled breakpoints.
9299 * mem-break.h (validate_breakpoints):
9300 * server.c (handle_query): Validate breakpoints when we see a
9303 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9305 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9306 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9307 if we could tell there's a GDB breakpoint at stop_pc.
9308 (need_step_over_p): Don't do a step over if we find a GDB
9309 breakpoint at the resume PC.
9311 * mem-break.c (struct raw_breakpoint): New.
9312 (enum bkpt_type): New type `gdb_breakpoint'.
9313 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9314 fields. New field `raw'.
9315 (find_raw_breakpoint_at): New.
9316 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9318 (set_breakpoint_at): Adjust.
9319 (delete_raw_breakpoint): New.
9320 (release_breakpoint): New.
9321 (delete_breakpoint): Rename to...
9322 (delete_breakpoint_1): ... this. Add proc parameter. Use
9323 release_breakpoint. Return ENOENT.
9324 (delete_breakpoint): Reimplement.
9325 (find_breakpoint_at): Delete.
9326 (find_gdb_breakpoint_at): New.
9327 (delete_breakpoint_at): Delete.
9328 (set_gdb_breakpoint_at): New.
9329 (delete_gdb_breakpoint_at): New.
9330 (gdb_breakpoint_here): New.
9331 (set_reinsert_breakpoint): Use release_breakpoint.
9332 (uninsert_breakpoint): Rename to ...
9333 (uninsert_raw_breakpoint): ... this.
9334 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9335 (reinsert_raw_breakpoint): Change parameter type to
9337 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9339 (check_breakpoints): Adjust. Use release_breakpoint.
9340 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9341 (breakpoint_inserted_here): Ditto.
9342 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9343 Don't trust the breakpoint's shadow if it is not inserted.
9344 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9345 (delete_all_breakpoints): Adjust.
9346 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9347 use delete_breakpoint_1.
9349 * mem-break.h (breakpoints_supported): Delete declaration.
9350 (set_gdb_breakpoint_at): Declare.
9351 (gdb_breakpoint_here): Declare.
9352 (delete_breakpoint_at): Delete.
9353 (delete_gdb_breakpoint_at): Declare.
9355 * server.h (struct raw_breakpoint): Forward declare.
9356 (struct process_info): New field `raw_breakpoints'.
9358 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9361 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9363 * linux-low.c (status_pending_p_callback): Fix comment.
9364 (linux_wait_for_event_1): Move most of the internal breakpoint
9365 handling from here...
9366 (linux_wait_1): ... to here.
9367 (count_events_callback): New.
9368 (select_singlestep_lwp_callback): New.
9369 (select_event_lwp_callback): New.
9370 (cancel_breakpoints_callback): New.
9371 (select_event_lwp): New.
9372 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9373 priority to all LWPs that have had events that should be reported
9374 to the client. Cancel breakpoints when about to reporting the
9375 event to the client, not while stopping lwps. No longer cancel
9376 finished single-steps here.
9377 (cancel_finished_single_step): Delete.
9378 (cancel_finished_single_steps): Delete.
9380 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9382 * mem-break.c (enum bkpt_type): New.
9383 (struct breakpoint): New field `type'.
9384 (set_breakpoint_at): Change return type to struct breakpoint
9385 pointer. Set type to `other_breakpoint' by default.
9386 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9387 in the breakpoint list.
9388 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9389 (reinsert_breakpoint): Rename to ...
9390 (reinsert_raw_breakpoint): ... this.
9391 (reinsert_breakpoints_at): Adjust.
9392 * mem-break.h (struct breakpoint): Declare.
9393 (set_breakpoint_at): Change return type to struct breakpoint
9396 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9398 * server.c (handle_query): Assign, not compare.
9400 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9402 Teach linux gdbserver to step-over-breakpoints.
9404 * linux-low.c (can_hardware_single_step): New.
9405 (supports_breakpoints): New.
9406 (handle_extended_wait): If stopping threads, read the stop pc of
9409 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9410 low target doesn't support retrieving the PC.
9411 (add_lwp): Set last_resume_kind to resume_continue.
9412 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9413 (linux_attach): Don't clear stop_expected. Set the lwp's
9414 last_resume_kind to resume_stop.
9415 (linux_detach_one_lwp): Don't check for removed breakpoints.
9416 (check_removed_breakpoint): Delete.
9417 (status_pending_p): Rename to ...
9418 (status_pending_p_callback): ... this. Don't check for removed
9419 breakpoints. Don't consider threads that are stopped from GDB's
9421 (linux_wait_for_lwp): Always read the stop_pc here.
9422 (cancel_breakpoint): New.
9423 (step_over_bkpt): New global.
9424 (linux_wait_for_event_1): Implement stepping over breakpoints.
9425 (gdb_wants_lwp_stopped): New.
9426 (gdb_wants_all_stopped): New.
9427 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9428 single-step traps here. Store the thread's last reported target
9430 (send_sigstop): Don't clear stop_expected. Always set it,
9432 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9433 (cancel_finished_single_step): New.
9434 (cancel_finished_single_steps): New.
9435 (wait_for_sigstop): Don't cancel finished single-step traps here.
9436 (linux_resume_one_lwp): Don't check for removed breakpoints.
9437 Don't set `step' on non-hardware step archs.
9438 (linux_set_resume_request): Ignore resume_stop requests if already
9439 stopping or stopped. Set the lwp's last_resume_kind.
9440 (resume_status_pending_p): Don't check for removed breakpoints.
9441 (need_step_over_p): New.
9442 (start_step_over): New.
9443 (finish_step_over): New.
9444 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9445 requests. Clear the thread's last reported target waitstatus.
9446 Don't use the `suspended' flag. Don't consider pending breakpoints.
9447 (linux_resume): Start a step-over if necessary.
9448 (proceed_one_lwp): New.
9449 (proceed_all_lwps): New.
9450 (unstop_all_lwps): New.
9451 * linux-low.h (struct lwp_info): Rewrite comment for the
9452 `suspended' flag. Add the `stop_pc' field. Delete the
9453 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9454 Add `'last_resume_kind' and `need_step_over' fields.
9455 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9456 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9457 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9458 (set_raw_breakpoint_at): New.
9459 (set_breakpoint_at): Rewrite to use it.
9460 (reinsert_breakpoint_handler): Delete.
9461 (set_reinsert_breakpoint): New.
9462 (reinsert_breakpoint_by_bp): Delete.
9463 (delete_reinsert_breakpoints): New.
9464 (uninsert_breakpoint): Rewrite.
9465 (uninsert_breakpoints_at): New.
9466 (reinsert_breakpoint): Rewrite.
9467 (reinsert_breakpoints_at): New.
9468 (check_breakpoints): Rewrite.
9469 (breakpoint_here): New.
9470 (breakpoint_inserted_here): New.
9471 (check_mem_read): Adjust.
9472 * mem-break.h (breakpoints_supported, breakpoint_here)
9473 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9474 (reinsert_breakpoint_by_bp): Delete declaration.
9475 (delete_reinsert_breakpoints): Declare.
9476 (reinsert_breakpoint): Delete declaration.
9477 (reinsert_breakpoints_at): Declare.
9478 (uninsert_breakpoint): Delete declaration.
9479 (uninsert_breakpoints_at): Declare.
9480 (check_breakpoints): Adjust prototype.
9481 * server.h: Adjust include order.
9482 (struct thread_info): Declare here. Add a `last_status' field.
9484 2010-03-23 Michael Snyder <msnyder@vmware.com>
9486 * server.c (crc32): New function.
9487 (handle_query): Add handling for 'qCRC:' request.
9489 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9491 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9492 lwp had been stopped by a watchpoint.
9494 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9496 * server.h (internal_error): Declare.
9497 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9498 * utils.c (internal_error): New function.
9500 2010-03-15 Andreas Schwab <schwab@redhat.com>
9502 * configure.srv: Fix typo setting srv_regobj.
9504 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9506 * linux-low.c (fetch_register): Avoid passing a non string literal
9508 (usr_store_inferior_registers): Ditto.
9510 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9512 * linux-low.c (linux_write_memory): Bail out early if peeking
9515 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9517 * linux-low.h (struct lwp_info): New fields
9518 `stopped_by_watchpoint' and `stopped_data_address'.
9519 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9520 here, and cache them in the lwp object.
9521 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9523 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9525 (linux_stopped_by_watchpoint): Rewrite.
9526 (linux_stopped_data_address): Rewrite.
9528 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9530 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9531 switching the current inferior, not before.
9533 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9535 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9536 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9537 i386-linux.c and amd64-linux.c.
9538 (reg-i386.o): Removed.
9539 (reg-i386.c): Likewise.
9540 (reg-i386-linux.o): Likewise.
9541 (reg-i386-linux.c): Likewise.
9542 (reg-x86-64.o): Likewise.
9543 (reg-x86-64.c): Likewise.
9544 (reg-x86-64-linux.o): Likewise.
9545 (reg-x86-64-linux.c): Likewise.
9548 (i386-linux.o): Likewise.
9549 (i386-linux.c): Likewise.
9550 (amd64.o): Likewise.
9551 (amd64.c): Likewise.
9552 (amd64-linux.o): Likewise.
9553 (amd64-linux.c): Likewise.
9555 * configure.srv (srv_i386_regobj): New.
9556 (srv_i386_linux_regobj): Likewise.
9557 (srv_amd64_regobj): Likewise.
9558 (srv_amd64_linux_regobj): Likewise.
9559 (srv_i386_32bit_xmlfiles): Likewise.
9560 (srv_i386_64bit_xmlfiles): Likewise.
9561 (srv_i386_xmlfiles): Likewise.
9562 (srv_amd64_xmlfiles): Likewise.
9563 (srv_i386_linux_xmlfiles): Likewise.
9564 (srv_amd64_linux_xmlfiles): Likewise.
9565 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9566 srv_xmlfiles to $srv_i386_xmlfiles.
9567 (i[34567]86-*-mingw32ce*): Likewise.
9568 (i[34567]86-*-mingw*): Likewise.
9569 (i[34567]86-*-nto*): Likewise.
9570 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9571 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9572 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9573 (x86_64-*-linux*): Likewise.
9575 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9576 (init_registers_amd64_linux): New.
9577 (x86_arch_setup): Replace init_registers_x86_64_linux with
9578 init_registers_amd64_linux.
9580 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9582 * configure.ac: Check for libdl. If it is not available link against
9583 static libthread_db.
9584 * configure: Regenerate.
9586 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9590 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9591 handing a read watchpoint.
9592 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9594 2010-02-12 Doug Evans <dje@google.com>
9596 * linux-low.c (linux_supports_tracefork_flag): Document.
9597 (linux_look_up_symbols): Add comment.
9599 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9601 * regcache.c (supply_register): Clear regcache if buf is NULL.
9603 2010-02-02 Nicolas Roche <roche@sourceware.org>
9604 Joel Brobecker <brobecker@adacore.com>
9606 * inferiors.c (find_inferior): Add function documentation.
9607 (unloaded_dll): Handle the case where the unloaded dll has not
9608 been previously registered in the dll list.
9610 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9612 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9613 (thumb2_breakpoint): New.
9614 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9616 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9618 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9619 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9622 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9624 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9626 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9628 * linux-s390-low.c (s390_collect_ptrace_register)
9629 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9631 2010-01-21 Doug Evans <dje@google.com>
9633 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9634 (PTRACE_ARG4_TYPE): New macro.
9635 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9636 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9637 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9638 (usr_store_inferior_registers): Ditto.
9639 (linux_read_memory, linux_write_memory): Ditto.
9640 (linux_test_for_tracefork): Ditto.
9642 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9643 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9645 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9647 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9650 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9652 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9653 prototype to take a regcache. Adjust.
9655 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9657 * regcache.h (struct thread_info): Forward declare.
9658 (struct regcache): New.
9659 (new_register_cache): Adjust prototype.
9660 (get_thread_regcache): Declare.
9661 (free_register_cache): Adjust prototype.
9662 (registers_to_string, registers_from_string): Ditto.
9663 (supply_register, supply_register_by_name, collect_register)
9664 (collect_register_as_string, collect_register_by_name): Ditto.
9665 * regcache.c (struct inferior_regcache_data): Delete.
9666 (get_regcache): Rename to ...
9667 (get_thread_regcache): ... this. Adjust. Switch inferior before
9669 (regcache_invalidate_one): Adjust.
9670 (regcache_invalidate): Fix prototype.
9671 (new_register_cache): Return the new register cache.
9672 (free_register_cache): Change prototype.
9673 (realloc_register_cache): Adjust.
9674 (registers_to_string): Change prototype to take a regcache. Adjust.
9675 (registers_from_string): Ditto.
9676 (register_data): Ditto.
9677 (supply_register): Ditto.
9678 (supply_register_by_name): Ditto.
9679 (collect_register): Ditto.
9680 (collect_register_as_string): Ditto.
9681 (collect_register_by_name): Ditto.
9682 * server.c (process_serial_event): Adjust.
9683 * linux-low.h (regset_fill_func, regset_store_func): Change
9685 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9687 * linux-low.c (get_stop_pc): Adjust.
9688 (check_removed_breakpoint): Adjust.
9689 (linux_wait_for_event): Adjust.
9690 (linux_resume_one_lwp): Adjust.
9691 (fetch_register): Add regcache parameter. Adjust.
9692 (usr_store_inferior_registers): Ditto.
9693 (regsets_fetch_inferior_registers): Ditto.
9694 (regsets_store_inferior_registers): Ditto.
9695 (linux_fetch_registers, linux_store_registers): Ditto.
9696 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9698 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9700 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9701 prototype to take a regcache.
9702 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9703 * remote-utils.c (convert_ascii_to_int, outreg)
9704 (prepare_resume_reply): Change prototype to take a regcache.
9706 * target.h (struct target_ops) <fetch_registers, store_registers>:
9707 Change prototype to take a regcache.
9708 (fetch_inferior_registers, store_inferior_registers): Change
9709 prototype to take a regcache. Adjust.
9710 * proc-service.c (ps_lgetregs): Adjust.
9711 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9712 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9713 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9714 take a regcache. Adjust.
9715 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9716 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9717 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9718 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9719 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9720 (cris_cannot_fetch_register):
9721 (cris_breakpoint_at): Change prototype to take a regcache.
9723 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9724 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9725 to take a regcache. Adjust.
9726 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9728 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9729 take a regcache. Adjust.
9730 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9731 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9732 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9733 * linux-mips-low.c (mips_get_pc):
9734 (mips_set_pc): Change prototype to take a regcache. Adjust.
9735 (mips_reinsert_addr): Adjust.
9736 (mips_collect_register): Change prototype to take a regcache.
9738 (mips_supply_register):
9739 (mips_collect_register_32bit, mips_supply_register_32bit)
9740 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9741 (mips_store_fpregset): Ditto.
9742 * linux-ppc-low.c (ppc_supply_ptrace_register)
9743 (ppc_supply_ptrace_register): Ditto.
9744 (parse_spufs_run): Adjust.
9745 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9746 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9747 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9748 take a regcache. Adjust.
9749 * linux-s390-low.c (s390_collect_ptrace_register)
9750 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9751 (s390_set_pc): Change prototype to take a regcache. Adjust.
9752 (s390_arch_setup): Adjust.
9753 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9754 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9755 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9756 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9757 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9759 (sparc_breakpoint_at): Adjust.
9760 * linux-xtensa-low.c (xtensa_fill_gregset):
9761 (xtensa_store_gregset):
9762 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9763 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9764 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9765 prototype to take a regcache. Adjust.
9766 * win32-arm-low.c (arm_fetch_inferior_register)
9767 (arm_store_inferior_register): Change prototype to take a
9769 * win32-i386-low.c (i386_fetch_inferior_register)
9770 (i386_store_inferior_register): Change prototype to take a
9772 * win32-low.c (child_fetch_inferior_registers)
9773 (child_store_inferior_registers): Change prototype to take a
9775 (win32_wait): Adjust.
9776 (win32_fetch_inferior_registers): Change prototype to take a
9778 (win32_store_inferior_registers): Adjust.
9779 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9780 store_inferior_register>: Change prototype to take a regcache.
9782 2010-01-20 Doug Evans <dje@google.com>
9784 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9786 (linux_wait_for_event1, linux_init_signals): Ditto.
9787 (W_STOPCODE): Provide definition if missing.
9789 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9791 * linux-low.c (linux_core_of_thread): New.
9792 (compare_ints, show_process, list_threads): New.
9793 (linux_qxfer_osdata): Report threads and cores.
9794 (linux_target_op): Register linux_core_of_thread.
9795 * remote-utils.c (prepare_resume_reply): Report the core.
9796 (buffer_xml_printf): Support %d specifier.
9797 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9799 (handle_query): Handle qXfer:threads. Announce availability
9801 * target.h (struct target_ops): New field core_of_thread.
9803 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9805 * Makefile.in (clean): Remove new generated files.
9806 (reg-s390.o, reg-s390.c): Remove rules.
9807 (reg-s390x.o, reg-s390x.c): Likewise.
9808 (s390-linux32.o, s390-linux32.c): Add rules.
9809 (s390-linux64.o, s390-linux64.c): Likewise.
9810 (s390x-linux64.o, s390x-linux64.c): Likewise.
9811 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9812 * linux-s390-low.c: Include <elf.h>.
9813 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9814 (init_registers_s390): Remove prototype.
9815 (init_registers_s390x): Likewise.
9816 (init_registers_s390_linux32): Add prototype.
9817 (init_registers_s390_linux64): Likewise.
9818 (init_registers_s390x_linux64): Likewise.
9819 (s390_num_regs_3264): New define.
9820 (s390_regmap_3264): New global variable.
9821 (s390_cannot_fetch_register): Remove obsolete check.
9822 (s390_cannot_store_register): Likewise.
9823 (s390_collect_ptrace_register): Handle upper/lower register halves.
9824 (s390_supply_ptrace_register): Likewise.
9825 (s390_fill_gregset): Update to register number changes.
9826 (s390_get_hwcap): New routine.
9827 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9828 Install appropriate regmap and register set.
9830 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9832 * server.c (gdbserver_version): Update copyright year to 2010.
9833 * gdbreplay.c (gdbreplay_version): Likewise.
9835 2009-12-28 Doug Evans <dje@google.com>
9837 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9838 elf/external.h. Include <elf.h> instead but only if necessary.
9840 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9842 * linux-low.c (linux_remove_process): Remove `detaching'
9843 parameter. Don't release/detach from thread_db here.
9844 (linux_kill): Release/detach from thread_db here, ...
9845 (linux_detach): ... and here, before actually detaching.
9846 (linux_wait_1): ... and here, when a process exits.
9847 * thread-db.c (any_thread_of): New.
9848 (thread_db_free): Switch the current inferior to a thread of the
9851 2009-12-21 Doug Evans <dje@google.com>
9853 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9855 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9856 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9857 warning ifndef __NR_tkill. Move setting of errno there too.
9858 Delete unnecessary resetting of errno after syscall.
9859 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9861 * configure.ac: Check for dladdr.
9862 * config.in: Regenerate.
9863 * configure: Regenerate.
9864 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9865 (try_thread_db_load): Update.
9867 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9869 2009-12-18 Doug Evans <dje@google.com>
9871 * event-loop.c: Include unistd.h if it exists.
9873 * linux-low.c (my_waitpid): Move definition away from being in
9874 between linux_tracefork_child/linux_test_for_tracefork.
9876 * gdb_proc_service.h (psaddr_t): Fix type.
9877 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9878 signature to match glibc.
9880 2009-12-16 Doug Evans <dje@google.com>
9882 * linux-low.c (linux_read_memory): Fix argument to read.
9884 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9886 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9887 events, don't leave current_inferior pointing at null.
9889 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9891 * win32-low.c (LOG): Delete.
9892 (OUTMSG): Output to stderr.
9893 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9894 on compile time LOG macro.
9895 (win32_wait): Fix debug output.
9897 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9899 * win32-low.c (win32_add_one_solib): If the dll name is
9900 "ntdll.dll", prepend the system directory to the dll path.
9902 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9904 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9906 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9907 Vladimir Prus <vladimir@codesourcery.com>
9909 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9910 * configure.ac: Check for __mcoldfire__ and set
9911 gdb_cv_m68k_is_coldfire.
9912 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9913 reg-cf.o and reg-m68k.o.
9914 * configure: Regenerated.
9916 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9918 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9919 Pass it to thread_db_free.
9920 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9921 proper `detaching' argument to linux_remove_process.
9922 * linux-low.h (thread_db_free): Add `detaching' parameter.
9923 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9925 (thread_db_free): Add `detaching' parameter. Only
9926 call td_ta_clear_event if detaching from process.
9928 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9930 * thread-db.c (thread_db_free): Fix typo.
9932 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9935 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9937 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9939 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9940 with an i686 compiler.
9941 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9943 * configure: Rebuilt.
9945 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9949 * server.c (handle_search_memory_1): Correct read_addr initialization
9950 in loop for searching subsequent chunks.
9952 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9954 * configure.ac: New --with-libthread-db option.
9955 * thread-db.c: Allow direct dependence on libthread_db.
9956 (thread_db_free): Adjust.
9957 * config.in: Regenerate.
9958 * configure: Likewise.
9960 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9963 * thread-db.c (attach_thread): New function.
9964 (maybe_attach_thread): Return success/failure.
9965 (find_new_threads_callback): Adjust.
9966 (thread_db_find_new_threads): Loop until no new threads.
9968 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9970 * proc-service.c (ps_lgetregs): Formatting.
9972 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9974 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9975 * configure.ac: Adjust.
9976 * linux-low.h (struct process_info_private): Move members to struct
9978 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9979 * linux-low.c (linux_remove_process): Adjust.
9980 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9981 * server.c (handle_query): Move code ...
9982 (handle_monitor_command): ... here. New function.
9983 * target.h (struct target_ops): New member.
9984 * thread-db.c (struct thread_db): New.
9985 (libthread_db_search_path): New variable.
9986 (thread_db_create_event, thread_db_enable_reporting)
9987 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9988 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9989 (try_thread_db_load_1, dladdr_to_soname): New functions.
9990 (try_thread_db_load, thread_db_load_search): New functions.
9991 (thread_db_init): Search for libthread_db.
9992 (thread_db_free): New function.
9993 (thread_db_handle_monitor_command): Likewise.
9994 * config.in: Regenerate.
9995 * configure: Regenerate.
9997 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9999 * spu-low.c (spu_kill): Wait for inferior to terminate.
10000 Call clear_inferiors.
10001 (spu_detach): Call clear_inferiors.
10003 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10005 * aclocal.m4: Regenerate.
10006 * config.in: Likewise.
10007 * configure: Likewise.
10009 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10011 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10012 (parse_spufs_run): New function.
10013 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10014 (ppc_breakpoint_at): Handle SPU breakpoints.
10016 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10018 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10019 (SPUFS_MAGIC): Define.
10020 (spu_enumerate_spu_ids): New function.
10021 (linux_qxfer_spu): New function.
10022 (linux_target_ops): Install linux_qxfer_spu.
10024 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10026 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10027 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10028 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10029 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10030 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10031 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10032 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10033 (init_registers_powerpc_cell32l): Add prototype.
10034 (init_registers_powerpc_cell64l): Likewise.
10035 (ppc_arch_setup): Detect Cell/B.E. architecture.
10037 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10039 * Makefile.in (datarootdir): New variable.
10041 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10043 * linux-low.c (linux_write_memory): Update debugging output.
10044 * Makefile.in (clean): Add new descriptions.
10045 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10046 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10047 * configure.srv: Add new files for arm*-*-linux*.
10048 * linux-arm-low.c: Add new declarations.
10049 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10050 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10051 (HWCAP_VFPv3D16): New.
10052 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10053 instead of __IWMMXT__.
10054 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10055 (arm_arch_setup): New.
10056 (target_regsets): Remove #ifdef. Add VFP regset.
10057 (the_low_target): Use arm_arch_setup.
10059 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10061 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10062 the main thread again.
10064 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10066 Adding Neutrino gdbserver.
10067 * configure: Regenerated.
10068 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10069 * configure.srv (i[34567]86-*-nto*): New target.
10070 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10071 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10072 (nto_comctrl) [__QNX__]: New function.
10073 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10075 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10077 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10080 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10081 Pedro Alves <pedro@codesourcery.com>
10083 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10084 don't support CONTEXT_EXTENDED_REGISTERS.
10085 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10086 (the_low_target): Install them.
10087 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10088 failing with ERROR_PIPE_NOT_CONNECTED.
10090 2009-06-30 Doug Evans <dje@google.com>
10091 Pierre Muller <muller@ics.u-strasbg.fr>
10093 Add h/w watchpoint support to x86-linux, win32-i386.
10094 * Makefile.in (SFILES): Add i386-low.c
10095 (i386_low_h): Define.
10096 (i386-low.o): Add dependencies.
10097 (linux-x86-low.o): Add i386-low.h dependency.
10098 (win32-i386-low.o): Ditto.
10099 * i386-low.c: New file.
10100 * i386-low.h: New file.
10101 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10102 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10103 * linux-low.c (linux_add_process): Initialize arch_private.
10104 (linux_remove_process): Free arch_private.
10105 (add_lwp): Initialize arch_private.
10106 (delete_lwp): Free arch_private.
10107 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10109 * linux-low.h (process_info_private): New member arch_private.
10110 (lwp_info): New member arch_private.
10111 (linux_target_ops): New members new_process, new_thread,
10113 (ptid_of): New macro.
10114 * linux-x86-low.c: Include stddef.h, i386-low.h.
10115 (arch_process_info): New struct.
10116 (arch_lwp_info): New struct.
10117 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10118 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10119 (i386_dr_low_get_status): New function.
10120 (x86_insert_point, x86_remove_point): New functions.
10121 (x86_stopped_by_watchpoint): New function.
10122 (x86_stopped_data_address): New function.
10123 (x86_linux_new_process, x86_linux_new_thread): New functions.
10124 (x86_linux_prepare_to_resume): New function.
10125 (the_low_target): Add entries for insert_point, remove_point,
10126 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10128 * server.c (debug_hw_points): New global.
10129 (monitor_show_help): Document set debug-hw-points.
10130 (handle_query): Process "set debug-hw-points".
10131 * server.h (debug_hw_points): Declare.
10132 (paddress): Declare.
10133 * utils.c (NUMCELLS, CELLSIZE): New macros.
10134 (get_sell, xsnprintf, paddress): New functions.
10135 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10136 remove_point, stopped_by_watchpoint, stopped_data_address.
10137 * win32-i386-low.c: Include i386-low.h.
10138 (debug_reg_state): Replaces dr.
10139 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10140 (i386_dr_low_get_status): New function.
10141 (i386_insert_point, i386_remove_point): New functions.
10142 (i386_stopped_by_watchpoint): New function.
10143 (i386_stopped_data_address): New function.
10144 (i386_initial_stuff): Update.
10145 (get_thread_context,set_thread_context,i386_thread_added): Update.
10146 (the_low_target): Add entries for insert_point,
10147 remove_point, stopped_by_watchpoint, stopped_data_address.
10148 * win32-low.c (win32_insert_watchpoint): New function.
10149 (win32_remove_watchpoint): New function.
10150 (win32_stopped_by_watchpoint): New function.
10151 (win32_stopped_data_address): New function.
10152 (win32_target_ops): Add entries for insert_watchpoint,
10153 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10154 * win32-low.h (win32_target_ops): New members insert_point,
10155 remove_point, stopped_by_watchpoint, stopped_data_address.
10157 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10159 * server.c (process_serial_event): Re-return unsupported, not
10160 error, if the type isn't recognized. Re-allow supporting only
10161 insert or remove packets. Also call require_running for
10162 breakpoints. Add missing break statement to default case. Tidy.
10163 * target.h (struct target_ops): Rename insert_watchpoint to
10164 insert_point, and remove_watchpoint to remove_point.
10166 * linux-low.h (struct linux_target_ops): Likewise.
10167 * linux-low.c (linux_insert_watchpoint): Rename to ...
10168 (linux_insert_point): ... this. Adjust.
10169 (linux_remove_watchpoint): Rename to ...
10170 (linux_remove_point): ... this. Adjust.
10171 (linux_target_ops): Adjust.
10172 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10173 (cris_insert_point): ... this.
10174 (cris_remove_watchpoint): Rename to ...
10175 (cris_remove_point): ... this.
10176 (the_low_target): Adjust.
10178 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10180 * server.c (handle_v_kill): Pass signal_pid to
10181 kill_inferior if multi_process is zero.
10183 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10185 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10186 * target.h (target_ops): Comment for *_watchpoint to make it clear
10187 the functions can get types '0' and '1'.
10189 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10191 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10192 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10193 * regcache.c (get_regcache): Likewise.
10194 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10195 * win32-low.c (child_fetch_inferior_registers): Remove check for
10198 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10199 Pedro Alves <pedro@codesourcery.com>
10201 * target.h (struct target_ops) <supports_multi_process>: New
10203 (target_supports_multi_process): New.
10204 * server.c (handle_query): Even if GDB reports support, only
10205 enable multi-process if the target also supports it. Report
10206 multi-process support only if the target backend supports it.
10207 * linux-low.c (linux_supports_multi_process): New function.
10208 (linux_target_ops): Install it as target_supports_multi_process
10211 2009-05-24 Doug Evans <dje@google.com>
10213 Global renaming of find_thread_pid to find_thread_ptid.
10214 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10215 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10216 All callers updated.
10218 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10219 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10222 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10223 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10224 (linux_resume_one_lwp): Ditto.
10226 2009-05-23 Doug Evans <dje@google.com>
10228 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10229 from struct inferior_list_entry * to struct lwp_info *.
10230 All callers updated.
10232 2009-05-13 Doug Evans <dje@google.com>
10234 * linux-x86-low.c: Don't include assert.h.
10235 (x86_siginfo_fixup): Use fatal, not assert.
10236 (x86_arch_setup): Fix comment.
10238 2009-05-12 Doug Evans <dje@google.com>
10240 Biarch support for i386/amd64 gdbserver.
10241 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10242 Add linux-x86-low.c.
10243 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10244 (linux-x86-low.o): Add.
10245 * linux-x86-64-low.c: Delete.
10246 * linux-i386-low.c: Delete.
10247 * linux-x86-low.c: New file.
10248 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10250 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10252 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10253 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10254 (linux_child_pid_to_exec_file): New function.
10255 (elf_64_header_p, elf_64_file_p): New functions.
10256 (siginfo_fixup): New function.
10257 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10258 give target a chance to convert layout.
10259 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10260 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10262 2009-05-07 Doug Evans <dje@google.com>
10264 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10265 (regsets_store_inferior_registers): Ditto.
10267 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10271 * linux-low.c (must_set_ptrace_flags): Delete.
10272 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10274 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10275 `lwp->must_set_ptrace_flags' instead.
10276 (linux_wait_for_event_1): Set ptrace options here.
10277 (linux_wait_1): ... not here.
10279 2009-04-30 Doug Evans <dje@google.com>
10281 * inferiors.c (started_inferior_callback): New function.
10282 (attached_inferior_callback): New function.
10283 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10284 * server.c (print_started_pid, print_attached_pid): New functions.
10285 (detach_or_kill_for_exit): New function.
10286 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10287 * server.h (have_started_inferiors_p): Declare.
10288 (have_attached_inferiors_p): Declare.
10290 * inferiors.c (remove_process): Fix memory leak, free process.
10291 * linux-low.c (linux_remove_process): New function.
10292 (linux_kill): Call it instead of remove_process.
10293 (linux_detach, linux_wait_1): Ditto.
10295 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10297 * configure.srv: Add x86 Windows CE target.
10299 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10301 * inferiors.c (get_thread_process): Make global.
10302 * server.h (get_thread_process): Add prototype.
10303 * thread-db.c (find_one_thread): Use get_thread_process
10304 instead of current_process.
10305 (thread_db_get_tls_address): Do not crash if called when
10306 thread layer is not yet initialized.
10308 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10310 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10311 * spu-low.c (current_tid): Rename to ...
10312 (current_ptid): ... this.
10313 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10314 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10315 ptid_get_lwp (current_ptid) instead of current_tid.
10316 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10317 instead of current_tid. Use find_process_pid to verify pid
10318 argument is valid. Pass proper argument to remove_process.
10319 (spu_thread_alive): Compare current_ptid instead of current_tid.
10320 (spu_resume): Likewise.
10322 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10324 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10327 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10329 Implement the multiprocess extensions, and add linux multiprocess
10332 * server.h (ULONGEST): Declare.
10333 (struct ptid, ptid_t): New.
10334 (minus_one_ptid, null_ptid): Declare.
10335 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10336 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10337 (struct inferior_list_entry): Change `id' type from unsigned from
10339 (struct sym_cache, struct breakpoint, struct
10340 process_info_private): Forward declare.
10341 (struct process_info): Declare.
10342 (current_process): Declare.
10343 (all_processes): Declare.
10344 (initialize_inferiors): Declare.
10345 (add_thread): Adjust to use ptid_t.
10346 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10347 (add_process, remove_process, find_thread_pid): Declare.
10348 (find_inferior_id): Adjust to use ptid_t.
10349 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10350 (multi_process): Declare.
10351 (push_event): Adjust to use ptid_t.
10352 (read_ptid, write_ptid): Declare.
10353 (prepare_resume_reply): Adjust to use ptid_t.
10354 (clear_symbol_cache): Declare.
10355 * inferiors.c (all_processes): New.
10356 (null_ptid, minus_one_ptid): New.
10357 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10358 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10359 (add_thread): Change unsigned long to ptid. Remove gdb_id
10361 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10362 (gdb_id_to_thread): Rename to ...
10363 (find_thread_pid): ... this. Change unsigned long to ptid.
10364 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10365 (loaded_dll, pull_pid_from_list): Adjust.
10366 (add_process, remove_process, find_process_pid)
10367 (get_thread_process, current_process, initialize_inferiors): New.
10368 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10369 (struct target_waitstatus) <related_pid>: Ditto.
10370 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10371 return type to int.
10372 (struct target_ops) <join>: Add `pid' argument.
10373 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10374 (struct target_ops) <wait>: Add `ptid' field. Change return type
10376 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10377 (mywait): Add `ptid' argument. Change return type to ptid_t.
10378 (target_pid_to_str): Declare.
10379 * target.c (set_desired_inferior): Adjust to use ptids.
10380 (mywait): Add new `ptid' argument. Adjust.
10381 (target_pid_to_str): New.
10382 * mem-break.h (free_all_breakpoints): Declare.
10383 * mem-break.c (breakpoints): Delelete.
10384 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10385 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10386 to use per-process breakpoint list.
10387 (free_all_breakpoints): New.
10388 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10389 (symbol_cache, all_symbols_looked_up): Delete.
10391 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10393 (prepare_resume_reply): Change ptid argument's type from unsigned
10394 long to ptid_t. Adjust. Implement W;process and X;process.
10395 (free_sym_cache, clear_symbol_cache): New.
10396 (look_up_one_symbol): Adjust to per-process symbol cache. *
10397 * server.c (cont_thread, general_thread, step_thread): Change type
10399 (attached): Delete.
10400 (multi_process): New.
10401 (last_ptid): Change type to ptid_t.
10402 (struct vstop_notif) <ptid>: Change type to ptid_t.
10403 (queue_stop_reply, push_event): Change `ptid' argument's type to
10405 (discard_queued_stop_replies): Add `pid' argument.
10406 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10407 changes. Don't reference the `attached' global.
10408 (attach_inferior): Adjust to mywait interface changes.
10409 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10410 features. Handle and report "multiprocess+". Handle
10412 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10414 (handle_v_kill): New.
10415 (handle_v_stopped): Adjust to use target_pid_to_str.
10416 (handle_v_requests): Allow multiple attaches and runs when
10417 multiprocess extensions are in effect. Handle "vKill".
10418 (myresume): Adjust to use ptids.
10419 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10420 (handle_status): Adjust to discard_queued_stop_replies interface
10422 (first_thread_of, kill_inferior_callback)
10423 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10424 (main): Call initialize_inferiors. Adjust to use ptids, killing
10425 and detaching from all inferiors. Handle multiprocess packet
10427 * linux-low.h: Include gdb_proc_service.h.
10428 (struct process_info_private): New.
10429 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10430 <lwpid_of>: Use ptid_get_lwp.
10431 (get_lwp_thread): Adjust.
10432 (struct lwp_info): Add `dead' member.
10433 (find_lwp_pid): Declare.
10434 * linux-low.c (thread_db_active): Delete.
10435 (new_inferior): Adjust comment.
10436 (inferior_pid): Delete.
10437 (linux_add_process): New.
10438 (handle_extended_wait): Adjust.
10439 (add_lwp): Change unsigned long to ptid.
10440 (linux_create_inferior): Add process to processes table. Adjust
10441 to use ptids. Don't set new_inferior here.
10442 (linux_attach_lwp): Rename to ...
10443 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10444 it. Adjust to use ptids.
10445 (linux_attach_lwp): New.
10446 (linux_attach): Add process to processes table. Don't set
10448 (struct counter): New.
10449 (second_thread_of_pid_p, last_thread_of_process_p): New.
10450 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10451 multiple processes.
10452 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10453 processes. Remove process from process table.
10454 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10455 to multiple processes.
10456 (any_thread_of): New.
10457 (linux_detach): Add `pid' argument, and handle it. Remove process
10458 from processes table.
10459 (linux_join): Add `pid' argument. Handle it.
10460 (linux_thread_alive): Change unsighed long argument to ptid_t.
10461 Consider dead lwps as not being alive.
10462 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10463 threads we're not interested in.
10464 (same_lwp, find_lwp_pid): New.
10465 (linux_wait_for_lwp): Change `pid' argument's type from int to
10467 (linux_wait_for_event): Rename to ...
10468 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10469 from int to ptid_t. Adjust.
10470 (linux_wait_for_event): New.
10471 (linux_wait_1): Add `ptid' argument. Change return type to
10472 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10473 that exit from the process table.
10474 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10476 (mark_lwp_dead): New.
10477 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10478 stopping all threads, mark its main lwp as dead.
10479 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10481 (fetch_register, usr_store_inferior_registers)
10482 (regsets_fetch_inferior_registers)
10483 (regsets_store_inferior_registers, linux_read_memory)
10484 (linux_write_memory): Inline `inferior_pid'.
10485 (linux_look_up_symbols): Adjust to use per-process
10486 `thread_db_active'.
10487 (linux_request_interrupt): Adjust to use ptids.
10488 (linux_read_auxv): Inline `inferior_pid'.
10489 (initialize_low): Don't reference thread_db_active.
10490 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10491 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10492 (ps_getpid): Return the pid of the current inferior.
10493 * thread-db.c (proc_handle, thread_agent): Delete.
10494 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10496 (find_one_thread): Change argument type to ptid_t. Adjust to
10498 (maybe_attach_thread): Adjust to per-process data and ptids.
10499 (thread_db_find_new_threads): Ditto.
10500 (thread_db_init): Ditto.
10501 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10502 processes table. Adjust to use ptids.
10503 (spu_kill, spu_detach): Adjust interface. Remove process from
10505 (spu_join, spu_thread_alive): Adjust interface.
10506 (spu_wait): Adjust interface. Remove process from processes
10507 table. Adjust to use ptids.
10508 * win32-low.c (current_inferior_tid): Delete.
10509 (current_inferior_ptid): New.
10510 (debug_event_ptid): New.
10511 (thread_rec): Take a ptid. Adjust.
10512 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10513 (child_delete_thread): Ditto.
10514 (do_initial_child_stuff): Add `attached' argument. Add process to
10516 (child_fetch_inferior_registers, child_store_inferior_registers):
10518 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10519 (win32_attach): Pass 1 to do_initial_child_stuff.
10520 (win32_kill): Adjust interface. Remove process from processes
10522 (win32_detach): Ditto.
10523 (win32_join): Adjust interface.
10524 (win32_thread_alive): Take a ptid.
10525 (win32_resume): Adjust to use ptids.
10526 (get_child_debug_event): Ditto.
10527 (win32_wait): Adjust interface. Remove exiting process from
10530 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10532 Non-stop mode support.
10534 * server.h (non_stop): Declare.
10535 (gdb_client_data, handler_func): Declare.
10536 (delete_file_handler, add_file_handler, start_event_loop):
10538 (handle_serial_event, handle_target_event, push_event)
10539 (putpkt_notif): Declare.
10540 * target.h (enum resume_kind): New.
10541 (struct thread_resume): Replace `step' field by `kind' field.
10542 (TARGET_WNOHANG): Define.
10543 (struct target_ops) <wait>: Add `options' argument.
10544 <supports_non_stop, async, start_non_stop>: New fields.
10545 (target_supports_non_stop, target_async): New.
10546 (start_non_stop): Declare.
10547 (mywait): Add `options' argument.
10548 * target.c (mywait): Add `options' argument. Print child exit
10549 notifications here.
10550 (start_non_stop): New.
10551 * server.c (non_stop, own_buf, mem_buf): New globals.
10552 (struct vstop_notif): New.
10553 (notif_queue): New global.
10554 (queue_stop_reply, push_event, discard_queued_stop_replies)
10555 (send_next_stop_reply): New.
10556 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10558 (attach_inferior): In non-stop mode, don't wait for the target
10560 (handle_general_set): Handle QNonStop.
10561 (handle_query): When handling qC, return the current general
10562 thread, instead of the first thread of the list.
10563 (handle_query): If the backend supports non-stop mode, include
10564 QNonStop+ in the qSupported query response.
10565 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10567 (handle_v_attach, handle_v_run): Handle non-stop mode.
10568 (handle_v_stopped): New.
10569 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10570 (myresume): Adjust to use resume_kind. Handle non-stop.
10571 (queue_stop_reply_callback): New.
10572 (handle_status): Handle non-stop mode.
10573 (main): Clear non_stop flag on reconnection. Use the event-loop.
10574 Refactor serial protocol handling from here ...
10575 (process_serial_event): ... to this new function. When GDB
10576 selects any thread, select one here. In non-stop mode, wait until
10577 GDB acks all pending events before exiting.
10578 (handle_serial_event, handle_target_event): New.
10579 * remote-utils.c (remote_open): Install remote_desc in the event
10581 (remote_close): Remove remote_desc from the event loop.
10582 (putpkt_binary): Rename to...
10583 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10584 (putpkt_binary): New as wrapper around putpkt_binary_1.
10585 (putpkt_notif): New.
10586 (prepare_resume_reply): In non-stop mode, don't change the
10588 * event-loop.c: New.
10589 * Makefile.in (OBJ): Add event-loop.o.
10590 (event-loop.o): New rule.
10592 * linux-low.h (pid_of): Moved here.
10594 (get_lwp_thread): Use lwpid_of.
10595 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10596 * linux-low.c (pid_of): Delete.
10597 (inferior_pid): Use lwpid_of.
10598 (linux_event_pipe): New.
10599 (target_is_async_p): New.
10601 (handle_extended_wait): Use lwpid_of.
10602 (add_lwp): Don't set lwpid field.
10603 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10604 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10605 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10606 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10607 first. Adjust to linux_wait_for_event interface changes. Use
10609 (linux_detach): Don't delete the main lwp here.
10610 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10611 (status_pending_p): Don't consider explicitly suspended lwps.
10612 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10613 pointer. Add OPTIONS argument. Change return type to int. Use
10614 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10615 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10616 pointer. Add status pointer argument. Return a pid instead of a
10617 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10618 changes. In non-stop mode, don't switch to a random thread.
10619 (linux_wait): Rename to...
10620 (linux_wait_1): ... this. Add target_options argument, and handle
10621 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10622 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10623 clean exit and signal exit code. Don't stop all threads in
10624 non-stop mode. In all-stop mode, only stop all threads when
10625 reporting a stop to GDB. Handle explicit thread stop requests.
10626 (async_file_flush, async_file_mark): New.
10628 (send_sigstop): Use lwpid_of.
10629 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10630 interface changes. In non-stop mode, don't switch to a random
10632 (linux_resume_one_lwp): Use lwpid_of.
10633 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10634 (linux_resume_one_thread): ... this. Handle resume_stop. In
10635 non-stop mode, don't look for pending flag in all threads.
10636 (resume_status_pending_p): Don't consider explicitly suspended
10638 (my_waitpid): Reimplement. Emulate __WALL.
10639 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10641 (sigchld_handler, linux_supports_non_stop, linux_async)
10642 (linux_start_non_stop): New.
10643 (linux_target_ops): Register linux_supports_non_stop, linux_async
10644 and linux_start_non_stop.
10645 (initialize_low): Install SIGCHLD handler.
10646 * thread-db.c (thread_db_create_event, find_one_thread)
10647 (thread_db_get_tls_address): Use lwpid_of.
10648 * win32-low.c (win32_detach): Adjust to use resume_kind.
10649 (win32_wait): Add `options' argument.
10650 * spu-low.c (spu_resume): Adjust to use resume_kind.
10651 (spu_wait): Add `options' argument.
10653 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10655 Decouple target code from remote protocol.
10657 * target.h (enum target_waitkind): New.
10658 (struct target_waitstatus): New.
10659 (struct target_ops) <wait>: Return an unsigned long. Take a
10660 target_waitstatus pointer instead of a char pointer.
10661 (mywait): Likewise.
10662 * target.c (mywait): Change prototype to return an unsigned long.
10663 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10664 * server.h (thread_from_wait, old_thread_from_wait): Delete
10666 (prepare_resume_reply): Change prototype to take a
10668 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10669 (last_status, last_ptid): New.
10670 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10671 pid instead of a signal.
10672 (attach_inferior): Remove "status" and "signal" parameters.
10674 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10676 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10677 (handle_v_requests, myresume): Remove "status" and "signal"
10678 parameters. Adjust.
10679 (handle_status): New.
10680 (main): Delete local `status'. Adjust.
10681 * remote-utils.c: Include target.h.
10682 (prepare_resume_reply): Change prototype to take a
10683 target_waitstatus. Adjust.
10685 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10687 * spu-low.c (spu_wait): Adjust.
10688 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10690 (win32_wait): Adjust.
10692 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10694 * target.h (struct thread_resume): Delete leave_stopped member.
10695 (struct target_ops): Add a `n' argument to the `resume' callback.
10696 * server.c (start_inferior): Adjust.
10697 (handle_v_cont, myresume): Adjust.
10698 * linux-low.c (check_removed_breakpoint): Adjust to resume
10699 interface change, and to removed leave_stopped field.
10700 (resume_ptr): Delete.
10701 (struct thread_resume_array): New.
10702 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10703 resume interface change.
10704 (linux_continue_one_thread, linux_queue_one_thread)
10705 (resume_status_pending_p): Check if the resume field is NULL
10706 instead of checking the leave_stopped member.
10707 (linux_resume): Adjust to the target resume interface change.
10708 * spu-low.c (spu_resume): Adjust to the target resume interface
10710 * win32-low.c (win32_detach, win32_resume): Ditto.
10712 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10714 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10716 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10718 (linux_continue_one_thread): Only preserve the stepping flag if
10719 there's a pending breakpoint.
10721 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10723 * server.c (main): After the inferior having exited, call
10724 remote_close before exiting gdbserver.
10726 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10728 Fix size of FPSCR in Power 7 processors.
10729 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10730 (PPC_FEATURE_HAS_DFP): New #define.
10731 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10734 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10736 * server.c (handle_query) Whitespace and formatting.
10738 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10740 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10741 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10742 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10743 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10744 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10745 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10746 Makefile.in, configure.ac: Fix whitespace throughout.
10747 * configure: Regenerate.
10749 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10751 * inferiors.c (find_inferior): Make it safe for the callback
10752 function to delete the currently iterated inferior.
10754 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10756 * Makefile.in (linuw_low_h): Move higher.
10757 (thread-db.o): Depend on $(linux_low_h).
10759 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10761 Rename "process" to "lwp" throughout.
10763 * linux-low.c (all_processes): Rename to...
10764 (all_lwps): ... this.
10765 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10766 (add_process): Rename to ...
10767 (add_lwp): ... this. Adjust.
10768 (linux_create_inferior): Adjust.
10769 (linux_attach_lwp): Adjust.
10770 (linux_attach): Adjust.
10771 (linux_kill_one_process): Rename to ...
10772 (linux_kill_one_lwp): ... this. Adjust.
10773 (linux_kill): Adjust.
10774 (linux_detach_one_process): Rename to ...
10775 (linux_detach_one_lwp): ... this. Adjust.
10776 (linux_detach): Adjust.
10777 (check_removed_breakpoint): Adjust.
10778 (status_pending_p): Adjust.
10779 (linux_wait_for_process): Rename to ...
10780 (linux_wait_for_lwp): ... this. Adjust.
10781 (linux_wait_for_event): Adjust.
10782 (send_sigstop): Adjust.
10783 (wait_for_sigstop): Adjust.
10784 (stop_all_processes): Rename to ...
10785 (stop_all_lwps): ... this.
10786 (linux_resume_one_process): Rename to ...
10787 (linux_resume_one_lwp): ... this. Adjust.
10788 (linux_set_resume_request, linux_continue_one_thread)
10789 (linux_queue_one_thread, resume_status_pending_p)
10790 (usr_store_inferior_registers, regsets_store_inferior_registers)
10791 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10793 * linux-low.h (get_process): Rename to ...
10794 (get_lwp): ... this. Adjust.
10795 (get_thread_process): Rename to ...
10796 (get_thread_lwp): ... this. Adjust.
10797 (get_process_thread): Rename to ...
10798 (get_lwp_thread): ... this. Adjust.
10799 (struct process_info): Rename to ...
10800 (struct lwp_info): ... this.
10801 (all_processes): Rename to ...
10802 (all_lwps): ... this.
10803 * proc-service.c (ps_lgetregs): Adjust.
10804 * thread-db.c (thread_db_create_event, find_one_thread)
10805 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10807 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10809 * server.c (handle_query): Handle "qAttached".
10811 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10813 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10814 GPLv3, update license URL.
10816 2009-03-01 Doug Evans <dje@google.com>
10818 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10819 (server_h): Add gdb_signals.h.
10820 (signals.o): Update.
10821 * server.h (target_signal_from_host,target_signal_to_host_p)
10822 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10824 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10826 * remote-utils.c (getpkt): Also generate remote-debug
10827 information if noack_mode is set.
10829 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10831 * server.c (handle_query): Report qXfer:siginfo:read and
10832 qXfer:siginfo:write as supported and handle them.
10833 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10834 * linux-low.c (linux_xfer_siginfo): New.
10835 (linux_target_ops): Set it.
10837 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10839 * server.c (gdbserver_usage): Mention --remote-debug.
10840 (main): Accept '--remote-debug' switch.
10842 2009-01-18 Doug Evans <dje@google.com>
10844 * regcache.c (new_register_cache): No need to check result of xcalloc.
10845 * server.c (handle_search_memory): Back out calls to xmalloc,
10846 result is checked and error is returned to user upon failure.
10847 (handle_query): Ditto. Add more checks for result of malloc.
10848 (handle_v_cont): Check result of malloc, report error back to
10850 (handle_v_run): Ditto. Call freeargv.
10851 * server.h (freeargv): Declare.
10852 * utils.c (freeargv): New fn.
10854 2009-01-15 Doug Evans <dje@google.com>
10856 * gdbreplay.c (perror_with_name): Make arg const char *.
10857 * server.h (target_signal_to_name): Make return type const char *.
10858 * thread-db.c (thread_db_err_str): Make return type const char *.
10859 * utils.c (perror_with_name): Make arg const char *.
10861 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10863 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10864 when handling a EXIT_PROCESS_DEBUG_EVENT.
10866 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10868 * gdbreplay.c (gdbreplay_version): Update copyright year.
10869 * server.c (gdbserver_version): Likewise.
10871 2009-01-05 Doug Evans <dje@google.com>
10873 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10874 (handle_extended_wait): Improve comment.
10876 2008-12-13 Doug Evans <dje@google.com>
10878 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10879 * server.h (ATTR_MALLOC): New macro.
10880 (xmalloc,xcalloc,xstrdup): Declare.
10881 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10882 * inferiors.c: Ditto.
10883 * linux-low.c: Ditto.
10884 * mem-break.c: Ditto.
10885 * regcache.c: Ditto.
10886 * remote-utils.c: Ditto.
10889 * win32-low.c: Ditto.
10891 2008-12-12 Doug Evans <dje@google.com>
10893 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10894 in debugging printf.
10896 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10898 2008-12-09 Doug Evans <dje@google.com>
10900 * linux-low.h (struct process_info): Delete member tid, unused.
10901 * thread-db.c (find_one_thread): Update.
10902 (maybe_attach_thread): Update.
10904 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10906 * target.h (struct target_ops): Add qxfer_osdata member.
10907 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10909 (linux_qxfer_osdata): New functions.
10910 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10912 * server.c (handle_query): Handle "qXfer:osdata:read:".
10913 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10914 (buffer_xml_printf): New functions.
10915 * server.h (struct buffer): New.
10916 (buffer_grow_str, buffer_grow_str0): New macros.
10917 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10918 (buffer_xml_printf): Declare.
10920 2008-11-24 Doug Evans <dje@google.com>
10922 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10924 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10926 * server.c (handle_v_run): Always use the supplied argument list.
10928 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10930 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10931 (xtensa_regmap_table): Add entry for scompare1.
10933 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10935 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10936 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10937 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10938 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10939 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10940 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10941 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10942 XML target descriptions.
10943 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10944 when inferior is running on an ISA 2.05 or later processor. Add
10945 special case to return offset for full 64-bit slot of FPSCR when
10948 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10950 * Makefile.in (SFILES, clean): Added sparc64 files.
10951 (reg-sparc64.o, reg-sparc64.c): New.
10952 * configure.srv (sparc*-*-linux*): New configuration.
10953 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10954 syscall arguments for SPARC.
10955 (regsets_store_inferior_registers): Likewise.
10956 * linux-sparc-low.c: New file.
10958 2008-10-21 Doug Evans <dje@google.com>
10960 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10961 (READLINE_DIR,READLINE_DEP): Delete.
10962 (INTERNAL_CFLAGS): Update.
10963 (LINTFLAGS): Update.
10965 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10967 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10968 whole argv from the last run, not just argv[0].
10970 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10972 * regcache.c (new_register_cache): Return NULL if the register
10973 cache size isn't known yet.
10974 (free_register_cache): Avoid dereferencing a NULL regcache.
10976 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10978 * configure.srv: Merge MIPS and MIPS64.
10980 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10982 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10984 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10986 * Makefile.in: Add required vsx dependencies.
10988 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10989 Declare init_registers_powerpc_vsx32l.
10990 Declare init_registers_powerpc_vsx64l.
10991 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10992 (ppc_arch_setup): Check for VSX in hwcap.
10993 (ppc_fill_vsxregset): New function.
10994 (ppc_store_vsxregset): New function.
10995 Add new VSX entry in regset_info target_regsets.
10997 * configure.srv: Add new VSX dependencies.
10999 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11001 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11002 (remote_open): Set or clear transport_is_reliable.
11003 (putpkt_binary): Don't expect acks in noack mode.
11004 (getpkt): Don't send ack/nac in noack mode.
11005 * server.c (handle_general_set): Handle QStartNoAckMode.
11006 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11008 (main): Reset noack_mode on every connection.
11009 * server.h (noack_mode): Declare.
11011 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11013 * Makefile.in (GDBREPLAY_OBS): New variable.
11014 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11016 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11017 Daniel Jacobowitz <dan@codesourcery.com>
11019 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11020 (usr_store_inferior_registers): Likewise.
11021 (regsets_store_inferior_registers): Likewise.
11023 2008-07-31 Rolf Jansen <rj@surtec.com>
11024 Pedro Alves <pedro@codesourcery.com>
11026 * configure.ac: Check for memmem declaration.
11027 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11028 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11029 (disable_packet_qfThreadInfo): Unconditionally compile.
11030 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11031 * configure, config.in: Regenerate.
11033 2008-07-28 Doug Kwan <dougkwan@google.com>
11035 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11036 (linux_write_memory): Remove declaration of errno.
11038 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11040 * linux-low.c (handle_extended_wait): Do not use "status"
11041 variable uninitialized.
11043 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11045 * server.c (handle_v_attach): Inhibit reporting dll changes.
11047 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11049 * remote-utils.c (prepare_resume_reply): If requested, don't
11050 output "thread:TID" in the T stop reply.
11052 * server.c (disable_packet_vCont, disable_packet_Tthread)
11053 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11054 (handle_query): If requested, disable support for qC, qfThreadInfo
11056 (handle_v_requests): If requested, disable support for vCont.
11057 (gdbserver_show_disableable): New.
11058 (main): Handle --disable-packet and --disable-packet=LIST.
11060 * server.h (disable_packet_vCont, disable_packet_Tthread)
11061 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11063 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11065 * server.c (gdbserver_usage): Mention --version.
11067 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11069 * Makefile.in (gdbreplay.o): New rule.
11071 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11073 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11074 message, not gdbserver.
11076 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11077 Nathan Sidwell <nathan@codesourcery.com>
11078 Joseph Myers <joseph@codesourcery.com>
11080 * acinclude.m4: Include ../../config/acx.m4.
11081 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11082 * configure, config.in: Regenerate.
11083 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11084 * server.c (gdbserver_version): Print PKGVERSION.
11085 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11086 (main): Adjust gdbserver_usage calls.
11087 * gdbreplay.c (version, host_name): Add declarations.
11088 (gdbreplay_version, gdbreplay_usage): New.
11089 (main): Accept --version and --help options.
11091 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11093 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11094 (arm_breakpoint_at): Handle Thumb.
11095 (the_low_target): Add comment.
11097 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11099 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11101 2008-05-09 Doug Evans <dje@google.com>
11103 * server.h (decode_search_memory_packet): Declare.
11104 * remote-utils.c (decode_search_memory_packet): New fn.
11105 * server.c (handle_search_memory_1): New fn.
11106 (handle_search_memory): New fn.
11107 (handle_query): Process qSearch:memory packets.
11109 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11111 * regcache.c (registers_length): Remove.
11112 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11113 full register packet.
11114 * regcache.h (registers_length): Remove prototype.
11115 * server.h (PBUFSIZ): Define to 16384.
11117 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11119 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11120 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11121 powerpc-64l.o, and powerpc-altivec64l.o.
11122 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11123 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11124 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11125 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11126 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11129 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11130 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11131 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11132 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11133 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11134 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11135 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11136 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11137 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11138 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11141 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11142 (init_registers_powerpc_32l): ... this new prototype.
11143 (init_registers_powerpc_32): Remove, replace by ...
11144 (init_registers_powerpc_altivec32l): ... this new prototype.
11145 (init_registers_powerpc_e500): Remove, replace by ...
11146 (init_registers_powerpc_e500l): ... this new prototype.
11147 (init_registers_ppc64): Remove, replace by ...
11148 (init_registers_powerpc_64l): ... this new prototype.
11149 (init_registers_powerpc_64): Remove, replace by ...
11150 (init_registers_powerpc_altivec64l): ... this new prototype.
11151 (ppc_num_regs): Set to 73.
11152 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11153 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11154 (ppc_cannot_store_register): Handle orig_r3 and trap.
11155 (ppc_arch_setup): Update init_registers_... calls.
11156 (ppc_fill_gregset): Handle orig_r3 and trap.
11158 * inferiors.c (clear_inferiors): Reset current_inferior.
11160 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11162 * acinclude.m4: Add override.m4.
11163 * configure: Regenerate.
11165 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11167 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11168 initial call to init_register_ppc64.
11170 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11172 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11173 single powerpc*-*-linux* case.
11174 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11176 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11178 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11179 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11181 * linux-ppc-low.c: Include <elf.h>.
11182 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11183 (ppc_hwcap): New global variable.
11184 (ppc_regmap): Remove __SPE__ #ifdef sections.
11185 (ppc_regmap_e500): New global variable.
11186 (ppc_cannot_store_register): Update __SPE__ special case.
11187 (ppc_get_hwcap): New function.
11188 (ppc_arch_setup): Use it to determine whether inferior supports
11189 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11190 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11191 Do not access registers if target does not support AltiVec.
11192 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11193 Do not access registers if target does not support SPE.
11194 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11196 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11198 * linux-low.c (disabled_regsets, num_regsets): New.
11199 (use_regsets_p): Delete.
11200 (linux_wait_for_process): Clear disabled_regsets.
11201 (regsets_fetch_inferior_registers): Check and set it.
11202 (regsets_store_inferior_registers): Likewise.
11203 (linux_fetch_registers, linux_store_registers): Do not use
11205 (initialize_low): Allocate disabled_regsets.
11207 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11209 * Makefile.in (LIBOBJS): New.
11210 (OBS): Use LIBOBJS.
11211 (memmem.o): New rule.
11212 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11213 * configure: Regenerated.
11215 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11217 * server.c (handle_query): Never return "unsupported" for
11218 qXfer:features:read queries.
11220 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11222 * server.c (get_features_xml): Fix inverted condition.
11223 (handle_query): Always support qXfer:feature:read.
11225 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11227 * server.c (wrapper_argv): New.
11228 (start_inferior): Handle wrapper_argv. If set, expect an extra
11230 (gdbserver_usage): Document --wrapper.
11231 (main): Parse --wrapper.
11233 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11235 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11236 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11237 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11238 (ppc_set_pc): Likewise.
11239 (ppc_arch_setup): New function.
11240 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11241 of collect_register.
11242 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11244 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11246 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11247 instead of linux-ppc64-low.o.
11248 * linux-ppc64-low.c: Remove file.
11249 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11250 (linux-ppc64-low.o): Remove rule.
11252 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11253 (init_registers_powerpc_64): Likewise.
11254 (ppc_regmap): Conditionally define depending on __powerpc64__.
11255 (ppc_cannot_store_register): Do not special-case "fpscr" when
11256 compiled on __powerpc64__.
11257 (ppc_collect_ptrace_register): New function.
11258 (ppc_supply_ptrace_register): New function.
11259 (ppc_breakpoint): Change type to "unsigned int".
11260 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11261 (the_low_target): Conditionally provide initializers for the
11262 arch_setup member depending on __powerpc64__. Install
11263 collect_ptrace_register and supply_ptrace_register members.
11265 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11267 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11268 * server.c (gdbserver_xmltarget): Define.
11269 (get_features_xml): Use it to replace "target.xml" and arch_string.
11271 * configure.srv: Remove srv_xmltarget. Add XML files that were
11272 mentioned there to srv_xmlfiles instead. Remove conditional tests
11273 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11274 srv_xmlfiles and srv_regobj to include all possible choices.
11275 * configure.ac (srv_xmltarget): Remove.
11276 (srv_xmlfiles): Do not add "target.xml".
11277 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11278 checks for supplementary target information.
11279 * configure: Regenerate.
11280 * Makefile.in (XML_TARGET): Remove.
11281 (target.xml): Remove rule.
11282 (clean): Do not clean up target.xml.
11283 (.PRECIOUS): Do not mention target.xml.
11285 * target.h (struct target_ops): Remove arch_string member.
11286 * linux-low.c (linux_arch_string): Remove.
11287 (linux_target_ops): Remove arch_string initializer.
11288 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11289 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11290 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11291 * spu-low.c (spu_arch_string): Remove.
11292 (spu_target_ops): Remove arch_string initializer.
11293 * win32-low.c (win32_arch_string): Remove.
11294 (win32_target_ops): Remove arch_string initializer.
11295 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11296 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11297 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11299 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11301 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11302 by collect_ptrace_register and supply_ptrace_register hooks.
11303 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11304 instead of checking for the_low_target.left_pad_xfer.
11305 (usr_store_inferior_registers): Use collect_ptrace_register callback
11306 instead of checking for the_low_target.left_pad_xfer.
11308 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11309 (s390_supply_ptrace_register): Likewise.
11310 (s390_fill_gregset): Call s390_collect_ptrace_register.
11311 (the_low_target): Update.
11313 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11314 (ppc_supply_ptrace_register): Likewise.
11315 (the_low_target): Update.
11317 * linux-i386-low.c (the_low_target): Update.
11318 * linux-x86-64-low.c (the_low_target): Update.
11320 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11322 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11323 reg-s390.o and reg-s390x.o.
11325 * linux-low.c (new_inferior): New global variable.
11326 (linux_create_inferior, linux_attach): Set it.
11327 (linux_wait_for_process): Call the_low_target.arch_setup after the
11328 target has stopped for the first time.
11329 (initialize_low): Do not call the_low_target.arch_setup.
11331 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11332 (s390_set_pc): Likewise.
11333 (s390_arch_setup): New function.
11334 (the_low_target): Use s390_arch_setup as arch_setup routine.
11336 * regcache.c (realloc_register_cache): New function.
11337 (set_register_cache): Call it for each existing regcache.
11339 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11341 * server.h (init_registers): Remove prototype.
11343 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11344 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11345 instead of init_registers ().
11346 * linux-arm-low.c (init_registers_arm): Add prototype.
11347 (init_registers_arm_with_iwmmxt): Likewise.
11348 (the_low_target): Add initializer for arch_setup field.
11349 * linux-cris-low.c (init_registers_cris): Add prototype.
11350 (the_low_target): Add initializer for arch_setup field.
11351 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11352 (the_low_target): Add initializer for arch_setup field.
11353 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11354 (the_low_target): Add initializer for arch_setup field.
11355 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11356 (the_low_target): Add initializer for arch_setup field.
11357 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11358 (the_low_target): Add initializer for arch_setup field.
11359 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11360 (the_low_target): Add initializer for arch_setup field.
11361 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11362 (init_registers_mips64_linux): Likewise.
11363 (the_low_target): Add initializer for arch_setup field.
11364 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11365 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11366 (the_low_target): Add initializer for arch_setup field.
11367 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11368 (init_registers_powerpc_64): Likewise.
11369 (the_low_target): Add initializer for arch_setup field.
11370 * linux-s390-low.c (init_registers_s390): Add prototype.
11371 (init_registers_s390x): Likewise.
11372 (the_low_target): Add initializer for arch_setup field.
11373 * linux-sh-low.c (init_registers_sh): Add prototype.
11374 (the_low_target): Add initializer for arch_setup field.
11375 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11376 (the_low_target): Add initializer for arch_setup field.
11377 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11378 (the_low_target): Add initializer for arch_setup field.
11380 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11381 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11382 instead of init_registers ().
11383 * win32-arm-low.c (init_registers_arm): Add prototype.
11384 (the_low_target): Add initializer for arch_setup field.
11385 * win32-i386-low.c (init_registers_i386): Add prototype.
11386 (the_low_target): Add initializer for arch_setup field.
11388 * spu-low.c (init_registers_spu): Add prototype.
11389 (initialize_low): Call initialie_registers_spu () instead of
11390 initialize_registers ().
11392 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11394 * server.c (handle_v_requests): When handling the vRun and vAttach
11395 packets, if already debugging a process, don't kill it. Return an
11398 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11400 * server.c (handle_query): Correct length check.
11402 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11404 * win32-low.c (do_initial_child_stuff): Add process handle
11405 parameter. Set current_process_handle and current_process_id from the
11406 parameters. Clear globals.
11407 (win32_create_inferior): Don't set current_process_handle and
11408 current_process_id here. Instead pass them on the call to
11409 do_initial_child_stuff.
11410 (win32_attach): Likewise.
11411 (win32_clear_inferiors): New.
11412 (win32_kill): Don't close the current process handle or the
11413 current thread handle here. Instead call win32_clear_inferiors.
11414 (win32_detach): Don't open a new handle to the process. Call
11415 win32_clear_inferiors.
11416 (win32_join): Don't rely on current_process_handle; open a new
11417 handle using the process id.
11418 (win32_wait): Call win32_clear_inferiors when the inferior process
11421 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11423 * server.c (monitor_show_help): Add "exit".
11425 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11427 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11428 (clean): Add reg-xtensa.c.
11429 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11430 * configure.srv (xtensa*-*-linux*) New target.
11431 * linux-xtensa-low.c: New.
11432 * xtensa-xtregs.c: New.
11434 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11436 * hostio.c: Don't include errno.h.
11437 (errno_to_fileio_errno): Move to hostio-errno.
11438 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11439 error number outputting to the target->hostio_last_error callback.
11440 (hostio_packet_error): Use FILEIO_EINVAL directly.
11441 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11442 calls to hostio_error.
11443 * hostio-errno.c: New.
11444 * server.h (hostio_last_error_from_errno): Declare.
11445 * target.h (target_ops): Add hostio_last_error member.
11446 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11447 as hostio_last_error handler.
11448 * spu-low.c (spu_target_ops): Likewise.
11449 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11450 (wince_hostio_last_error): New functions.
11451 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11452 as hostio_last_error handler.
11453 (win32_target_ops) [!_WIN32_WCE]: Register
11454 hostio_last_error_from_errno as hostio_last_error handler.
11455 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11456 (hostio-errno.o): New rule.
11457 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11458 * configure.srv (srv_hostio_err_objs): New variable. Default to
11460 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11461 * configure: Regenerate.
11463 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11465 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11466 (linux_kill, linux_detach): Clean up the process list.
11467 * remote-utils.c (remote_open): Improve port number parsing.
11468 (putpkt_binary, input_interrupt): Only send interrupts if the target
11470 * server.c (extended_protocol): Make static.
11471 (attached): Define earlier.
11472 (exit_requested, response_needed, program_argv): New variables.
11473 (target_running): New.
11474 (start_inferior): Clear attached here.
11475 (attach_inferior): Set attached here.
11476 (require_running): Define.
11477 (handle_query): Use require_running and target_running. Implement
11479 (handle_v_attach, handle_v_run): New.
11480 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11481 (gdbserver_usage): Update.
11482 (main): Redo argument parsing. Handle --debug and --multi. Handle
11483 --attach along with other options or after the port. Save
11484 program_argv. Support no initial program. Resynchronize
11485 communication with GDB after an error. Handle "monitor exit".
11486 Use require_running and target_running. Always allow the extended
11487 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11488 restart in extended mode.
11489 * README: Refer to the GDB manual. Update --attach usage.
11491 2007-12-20 Andreas Schwab <schwab@suse.de>
11493 * linux-low.c (STACK_SIZE): Define.
11494 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11495 (linux_test_for_tracefork): Likewise.
11497 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11499 * linux-low.c (linux_wait_for_event): Update messages. Do not
11500 reinsert auto-delete breakpoints.
11501 * mem-break.c (struct breakpoint): Change return type of handler to
11503 (set_breakpoint_at): Update handler type.
11504 (reinsert_breakpoint_handler): Return 1 instead of calling
11506 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11508 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11509 * mem-break.h (set_breakpoint_at): Update handler type.
11510 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11511 * win32-low.c (auto_delete_breakpoint): New.
11512 (get_child_debug_event): Use it.
11514 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11516 * configure.ac: Check for pread and pwrite.
11517 * hostio.c (handle_pread): Fall back to lseek and read.
11518 (handle_pwrite): Fall back to lseek and write.
11519 * config.in, configure: Regenerated.
11521 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11523 * server.c (myresume): Add own_buf argument.
11524 (main): Update calls.
11526 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11528 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11529 * remote-utils.c (remote_open): Do not call disable_async_io.
11530 (block_async_io): Delete.
11531 (unblock_async_io): Make static.
11532 (initialize_async_io): New.
11533 * server.c (handle_v_cont): Handle async I/O here.
11534 (myresume): Likewise. Move other common resume tasks here...
11535 (main): ... from here. Call initialize_async_io. Disable async
11536 I/O before the main loop.
11537 * server.h (initialize_async_io): Declare.
11538 (block_async_io, unblock_async_io): Delete prototypes.
11539 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11541 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11543 * remote-utils.c (readchar): Allow binary data in received messages.
11545 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11547 * win32-low.c (attaching): New global.
11548 (win32_create_inferior): Clear the `attaching' global.
11549 (win32_attach): Set the `attaching' global.
11550 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11551 attaching. Only set a breakpoint at the entry point if not
11554 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11556 * server.c (main): Don't report dll events on the initial
11557 connection on attaches.
11559 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11561 * server.c (main): Relax numerical bases supported for the pid of
11562 the --attach command line argument.
11564 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11566 * win32-low.c (win32_attach): Call OpenProcess before
11567 DebugActiveProcess, not after. Add last error output to error
11570 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11572 * win32-low.c (win32_get_thread_context)
11573 (win32_set_thread_context): New functions.
11574 (thread_rec): Use win32_get_thread_context.
11575 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11576 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11579 2007-12-03 Leo Zayas
11580 Pedro Alves <pedro_alves@portugalmail.pt>
11582 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11584 (child_add_thread): Minor cleanup.
11585 (child_continue): Resume artificially suspended threads before
11586 calling ContinueDebugEvent.
11587 (suspend_one_thread): New.
11588 (fake_breakpoint_event): New.
11589 (get_child_debug_event): Change return type to int. Check here if
11590 gdb sent an interrupt request. If a soft interrupt was requested,
11591 fake a breakpoint event. Return 0 if there is no event to handle,
11593 (win32_wait): Don't check here if gdb sent an interrupt request.
11594 Ensure there is a valid event to handle.
11595 (win32_request_interrupt): Add soft interruption method as last
11598 2007-12-03 Leo Zayas
11599 Pedro Alves <pedro_alves@portugalmail.pt>
11601 * win32-low.h (win32_thread_info): Add descriptions to the
11602 structure members. Replace `suspend_count' counter by a
11604 * win32-low.c (thread_rec): Update condition of when to get the
11605 context from the inferior. Rely on ContextFlags being set if it
11606 has already been retrieved. Only suspend the inferior thread if
11607 we haven't already. Warn if that fails.
11608 (continue_one_thread): s/suspend_count/suspended/. Only call
11609 ResumeThread once. Warn if that fails.
11611 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11613 * win32-low.c (win32_wait): Don't read from the inferior when it
11614 has already exited.
11616 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11618 * Makefile.in (win32_low_h): New variable.
11619 (win32-low.o): Add dependency on $(win32_low_h).
11620 (win32-arm-low.o, win32-i386-low.o): New rules.
11622 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11624 * hostio.c: Correct copyright year.
11626 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11628 * Makefile.in (OBS): Add hostio.o.
11629 (hostio.o): New rule.
11630 * server.h (handle_vFile): Declare.
11631 * hostio.c: New file.
11632 * server.c (handle_v_requests): Take packet_len and new_packet_len
11633 for binary packets. Call handle_vFile.
11634 (main): Update call to handle_v_requests.
11636 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11638 * linux-low.c: Include <sched.h>.
11640 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11642 * linux-low.c (linux_tracefork_grandchild): New.
11643 (linux_tracefork_child): Use clone.
11644 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11646 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11648 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11650 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11652 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11654 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11656 * inferiors.c (change_inferior_id): Delete.
11657 (add_pid_to_list, pull_pid_from_list): New.
11658 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11659 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11660 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11661 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11662 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11663 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11664 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11665 (using_threads): Always set to 1.
11666 (handle_extended_wait): New.
11667 (add_process): Do not set TID.
11668 (linux_create_inferior): Set must_set_ptrace_flags.
11669 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11670 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11671 (linux_thread_alive): Rename TID argument to LWPID.
11672 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11673 (linux_wait_for_event): Do not use TID or check using_threads. Update
11674 call to dead_thread_notify. Call handle_extended_wait.
11675 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11676 (send_sigstop): Delete sigstop_sent.
11677 (wait_for_sigstop): Avoid TID.
11678 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11679 (linux_test_for_tracefork): New.
11680 (linux_lookup_signals): Use thread_db_active and
11681 linux_supports_tracefork_flag.
11682 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11683 * linux-low.h (get_process_thread): Avoid TID.
11684 (struct process_ifo): Move thread_known and tid to the end. Remove
11686 (linux_attach_lwp, thread_db_init): Update prototypes.
11687 * server.h (change_inferior_id): Delete prototype.
11688 (add_pid_to_list, pull_pid_from_list): New prototypes.
11689 * thread-db.c (thread_db_use_events): New.
11690 (find_first_thread): Rename to...
11691 (find_one_thread): ...this. Update callers and messages. Do not
11692 call fatal. Check thread_db_use_events. Do not call
11693 change_inferior_id or new_thread_notify.
11694 (maybe_attach_thread): Update. Do not call new_thread_notify.
11695 (thread_db_init): Set thread_db_use_events. Check use_events.
11696 * utils.c (fatal, warning): Correct message prefix.
11698 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11700 * Makefile.in (clean): Remove new files.
11701 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11702 (powerpc-64.o, powerpc-64.c): New rules.
11703 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11704 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11706 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11708 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11709 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11710 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11711 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11712 (target_regsets): Add AltiVec and SPE register sets.
11713 * configure.ac: Check for AltiVec and SPE.
11714 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11715 (ppc_fill_vrregset, ppc_store_vrregset): New.
11716 (target_regsets): Add AltiVec register set.
11717 * configure: Regenerated.
11719 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11721 * linux-low.c (O_LARGEFILE): Define.
11722 (linux_read_memory): Use /proc/PID/mem.
11723 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11724 * configure, config.in: Regenerated.
11726 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11728 * linux-low.c (linux_wait_for_event): Do not pass signals while
11731 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11733 * win32-low.c (create_process): New.
11734 (win32_create_inferior): Use create_process instead of
11735 CreateProcess. If create_process failed retry appending an ".exe"
11736 suffix. Store the GetLastError result immediatelly after
11737 create_process calls and use it on the call to error.
11739 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11741 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11743 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11745 * configure.ac: Switch license to GPLv3.
11747 2007-08-01 Michael Snyder <msnyder@access-company.com>
11749 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11751 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11753 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11755 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11756 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11757 CloseToolhelp32Snapshot.
11758 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11759 CloseToolhelp32Snapshot.
11761 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11763 * server.c (main): Check for inferior exit before main loop.
11765 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11767 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11768 instead of on tmp_desc.
11770 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11771 Daniel Jacobowitz <dan@codesourcery.com>
11773 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11774 (add_thread): Minor cleanups.
11775 (clear_inferiors): Move lower in the file. Clear the DLL
11777 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11778 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11779 (xml_escape_text): New.
11780 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11782 (handle_v_cont): Report errors.
11783 (gdbserver_version): Update.
11784 (main): Correct size of own_buf. Do not report initial DLL events.
11785 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11786 (unloaded_dll, xml_escape_text): New.
11787 * win32-low.c (enum target_waitkind): Update comments.
11788 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11789 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11790 (win32_EnumProcessModules, win32_GetModuleInformation)
11791 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11792 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11793 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11794 (win32_Module32First, win32_Module32Next, load_toolhelp)
11795 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11796 (get_child_debug_event): Handle DLL events.
11797 (win32_wait): Likewise.
11799 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11801 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11802 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11804 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11806 * win32-low.c (handle_output_debug_string): Ignore event if not
11809 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11811 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11813 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11815 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11817 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11819 * inferiors.c (change_inferior_id): Add comment.
11820 * linux-low.c (check_removed_breakpoint): Add an early
11821 prototype. Improve debug output.
11822 (linux_attach): Doc update.
11823 (linux_detach_one_process, linux_detach): Clean up before releasing
11825 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11826 * linux-low.h (struct process_info): Doc improvement.
11827 * mem-break.c (delete_all_breakpoints): New.
11828 * mem-break.h (delete_all_breakpoints): New prototype.
11829 * thread-db.c (find_first_thread): New.
11830 (thread_db_create_event): Call it instead of
11831 thread_db_find_new_threads. Clean up unused variables.
11832 (maybe_attach_thread): Remove first thread handling.
11833 (thread_db_find_new_threads): Use find_first_thread.
11834 (thread_db_get_tls_address): Likewise.
11836 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11838 * thread-db.c (thread_db_find_new_threads): Add prototype.
11839 (thread_db_create_event): Check for the main thread before adding
11841 (maybe_attach_thread): Only enable event reporting if TID == 0.
11842 (thread_db_get_tls_address): Check for new threads.
11844 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11846 * linux-low.c (linux_create_inferior): Try execv before execvp.
11847 * spu-low.c (spu_create_inferior): Likewise.
11849 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11851 * linux-low.c (linux_create_inferior): Change execv to execvp.
11852 * spu-low.c (spu_create_inferior): Likewies.
11854 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11856 * Makefile.in (clean): Clean new files instead of deleted ones.
11857 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11858 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11860 * configure.srv: Specify XML files and new regformats for MIPS and
11862 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11863 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11864 an entry for the restart register.
11865 (mips_cannot_fetch_register, mips_cannot_store_register)
11866 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11867 register names to match the XML descriptions.
11868 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11869 restart register instead of $0.
11871 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11872 Markus Deuling <deuling@de.ibm.com>
11874 * remote-utils.c (decode_xfer_write): New function.
11875 * server.h (decode_xfer_write): Add prototype.
11876 * server.c (handle_query): Add PACKET_LEN argument. Support
11877 qXfer:spu:read and qXfer:spu:write packets.
11878 (main): Pass packet_len to handle_query.
11879 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11880 * target.h (target_ops): Add qxfer_spu.
11882 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11884 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11885 accessing non-seekable spufs files.
11887 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11889 * server.c (handle_query): Add reply for qC packet.
11891 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11892 Leo Zayas <lerele@champenstudios@com>
11894 * server.h (check_remote_input_interrupt_request): New function.
11895 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11896 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11897 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11898 (check_remote_input_interrupt_request): New function.
11899 * server.h (check_remote_input_interrupt_request): Declare.
11900 * win32-low.c (winapi_DebugBreakProcess,
11901 winapi_GenerateConsoleCtrlEvent): New typedefs.
11902 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11904 (win32_wait): Check for remote interrupt request
11905 with check_remote_input_interrupt_request.
11906 (win32_request_interrupt): New function.
11907 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11909 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11911 * win32-low.c (debug_registers_changed,
11912 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11913 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11914 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11915 (thread_rec): Get context using the low target.
11916 (child_add_thread): Call thread_added on the low target,
11917 which does the same thing.
11919 (do_initial_child_stuff): Remove debug registers references.
11920 Set context using the low target. Resume threads after
11921 setting the contexts.
11922 (child_continue): Remove dead variable. Remove debug
11923 registers references.
11924 (child_fetch_inferior_registers): Go through the low target.
11925 (do_child_store_inferior_registers): Remove.
11926 (child_store_inferior_registers): Go through the low target.
11927 (win32_resume): Remove debug registers references.
11928 Set context using the low target.
11929 (handle_exception): Change return type to void. Don't record
11930 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11931 first chance exception.
11932 (get_child_debug_event): Change return type to void. Remove
11933 goto loop. Always return after waiting for debug event.
11934 (win32_wait): Convert to switch statement. Handle spurious
11937 * win32-i386-low.c (debug_registers_changed,
11938 debug_registers_used): New.
11939 (initial_stuff): Rename to ...
11940 (i386_initial_stuff): ... this. Clear debug registers
11942 (store_debug_registers): Delete.
11943 (i386_get_thread_context): New.
11944 (load_debug_registers): Delete.
11945 (i386_set_thread_context): New.
11946 (i386_thread_added): New.
11947 (single_step): Rename to ...
11948 (i386_single_step): ... this.
11949 (do_fetch_inferior_registers): Rename to ...
11950 (i386_fetch_inferior_register): ... this.
11951 (i386_store_inferior_register): New.
11952 (the_low_target): Adapt to new interface.
11954 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11955 (arm_get_thread_context): New.
11956 (arm_set_thread_context): New.
11958 (do_fetch_inferior_registers): Rename to ...
11959 (arm_fetch_inferior_register): ... this.
11960 (arm_store_inferior_register): New.
11961 (arm_wince_breakpoint): Reimplement as unsigned long.
11962 (arm_wince_breakpoint_len): Define.
11963 (the_low_target): Adapt to new interface.
11965 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11966 load_debug_registers. Add get_thread_context, set_thread_context,
11967 thread_added and store_inferior_register. Rename
11968 fetch_inferior_registers to fetch_inferior_register.
11969 (regptr): Remove declaration.
11971 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11973 * linux-low.c (linux_detach): Change return type to int. Return 0.
11974 * spu-low.c (spu_detach): Likewise.
11976 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11978 * target.h (target_ops): Change return type of detach to int.
11980 (join_inferior): New.
11981 * server.c (main): Don't skip detach support on mingw32.
11982 If the inferior doesn't support detaching return error.
11983 Call join_inferior instead of using waitpid.
11984 * linux-low.c (linux_join): New.
11985 (linux_target_op): Add linux_join.
11986 * spu-low.c (spu_join): New.
11987 (spu_target_ops): Add spu_join.
11988 * win32-low.c (win32_detach): Adapt to new interface.
11989 Reopen current_process_handle before detaching. Issue a child
11990 resume before detaching.
11992 (win32_target_op): Add win32_join.
11994 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11996 * win32-low.c (win32-attach): Fix return value.
11997 * target.h (target_ops): Describe ATTACH return values.
11999 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12001 * win32-low.c (GETPROCADDRESS): Define.
12002 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12003 (winapi_DebugSetProcessKillOnExit): Likewise.
12004 (win32_create_inferior): Force usage of ansi CreateProcessA.
12005 (win32_attach): Use GETPROCADDRESS.
12006 (win32_detach): Likewise.
12008 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12010 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12012 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12014 * win32-low.c: Commit leftover changes from 2007-03-29.
12016 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12018 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12019 fields short instead of int. Add explicit padding.
12020 (i387_cache_to_fsave): Remove unnecessary casts.
12021 (i387_fsave_to_cache): Doc fix.
12022 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12024 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12026 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12027 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12029 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12031 * configure.srv (arm*-*-mingw32ce*): Move near the other
12034 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12036 * configure.ac: Add errno checking.
12037 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12038 sys/file.h and malloc.h.
12039 (AC_CHECK_DECLS): Add perror.
12040 (srv_mingwce): Handle.
12041 * configure.srv (i[34567]86-*-cygwin*): Add
12042 win32-i386-low.o to srv_tgtobj.
12043 (i[34567]86-*-mingw*): Likewise.
12044 (arm*-*-mingw32ce*): Add case.
12045 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12046 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12047 [__MINGW32CE__] (strerror): New function.
12048 [__MINGW32CE__] (errno): Define to GetLastError.
12049 [__MINGW32CE__] (COUNTOF): New macro.
12050 (remote_open): Remove extra close call.
12051 * mem-break.c (delete_breakpoint_at): New function.
12052 * mem-break.h (delete_breakpoint_at): Declare.
12053 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12054 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12055 [USE_WIN32API] (read, write): Add char* casts.
12056 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12057 * server.h: Include wincecompat.h on Windows CE.
12058 [HAVE_ERRNO_H]: Check.
12059 (perror): Declare if not declared.
12060 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12061 (perror_with_name): Remove errno declaration.
12062 * wincecompat.h: New.
12063 * wincecompat.c: New.
12064 * win32-low.h: New.
12065 * win32-arm-low.c: New.
12066 * win32-i386-low.c: New.
12067 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12068 (OUTMSG2): Make it safe.
12070 (COUNTOF): New macro.
12071 (NUM_REGS): Get it from the low target.
12072 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12073 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12074 (thread_rec): Let low target handle debug registers.
12075 (child_add_thread): Likewise.
12076 (child_init_thread_list): Likewise.
12077 (continue_one_thread): Likewise.
12079 (do_child_fetch_inferior_registers): Move to ...
12080 * win32-i386-low.c: ... here, and rename to ...
12081 (do_fetch_inferior_registers): ... this.
12082 * win32-low.c (child_fetch_inferior_registers):
12083 Go through the low target.
12084 (do_child_store_inferior_registers): Use regptr.
12085 (strwinerror): New function.
12086 (win32_create_inferior): Handle Windows CE.
12087 Use strwinerror instead of strerror on Windows error
12088 codes. Add program to the error output.
12089 Don't close the main thread handle on Windows CE.
12090 (win32_attach): Use coredll.dll on Windows CE.
12091 (win32_kill): Close current process and current
12093 (win32_detach): Use coredll.dll on Windows CE.
12094 (win32_resume): Let low target handle debug registers, and
12096 (handle_exception): Add/Remove initial breakpoint. Avoid
12097 non-existant WSTOPSIG on Windows CE.
12098 (win32_read_inferior_memory): Cast to remove warning.
12099 (win32_arch_string): Go through the low target.
12100 (initialize_low): Call set_breakpoint_data with the low
12101 target's breakpoint.
12102 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12103 FOP_REGNUM, mappings): Move to ...
12104 * win32-i386-low.c: ... here.
12105 * win32-low.c (win32_thread_info): Move to ...
12106 * win32-low.h: ... here.
12107 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12108 win32-arm-low.c and wincecompat.c.
12109 (all:): Add $EXEEXT.
12110 (install-only:): Likewise.
12111 (gdbserver:): Likewise.
12112 (gdbreplay:): Likewise.
12113 * config.in: Regenerate.
12114 * configure: Regenerate.
12116 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12118 * win32-low.c: Rename typedef thread_info to
12119 win32_thread_info throughout.
12121 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12123 * win32-i386-low.c: Rename to ...
12124 * win32-low.c: ... this.
12125 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12126 * Makefile.in: Likewise.
12128 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12130 * remote-utils.c (monitor_output): Constify msg parameter.
12131 * server.h (monitor_output): Likewise.
12132 * win32-i386-low.c (handle_output_debug_string): New.
12133 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12134 handle_output_debug_string.
12135 (get_child_debug_event): Likewise.
12137 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12139 * server.c (main): Correct strtoul check.
12141 2007-03-27 Jon Ringle <jon@ringle.org>
12143 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12145 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12147 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12149 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12151 * terminal.h: Check HAVE_SGTTY_H.
12153 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12155 * remote-utils.c (remote_open): Print out the assigned port number.
12157 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12159 * remote-utils.c (monitor_output): New function.
12160 * server.c (debug_threads): Define here.
12161 (monitor_show_help): New function.
12162 (handle_query): Handle qRcmd.
12163 (main): Do not handle 'd' packet.
12164 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12165 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12168 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12170 * Makefile.in (EXEEXT): New.
12171 (clean): Use $(EXEEXT).
12173 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12175 * target.h (target_ops): Rename send_signal to request_interrupt,
12176 and remove enum target_signal parameter.
12177 * linux-low.c (linux_request_interrupt): Rename from
12178 linux_send_signal, and always send SIGINT.
12179 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12180 and always send SIGINT.
12181 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12183 (input_interrupt): Likewise.
12185 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12187 * server.c (get_features_xml): Check if target implemented
12189 * win32-i386-low.c (win32_arch_string): New.
12190 (win32_target_ops): Add win32_arch_string as arch_string member.
12192 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12194 * spu-low.c (spu_arch_string): New.
12195 (spu_target_ops): Add spu_arch_string.
12197 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12199 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12200 * configure.ac: Do not check for terminal.h.
12201 * configure, config.in: Regenerated.
12203 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12205 * Makefile.in (OBS): Add $(XML_BUILTIN).
12206 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12208 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12209 (arm-with-iwmmxt.c): New.
12210 * config.in, configure: Regenerate.
12211 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12212 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12213 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12214 (arm*-*-linux*): Add iWMMXt and regset support.
12215 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12216 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12217 (arm_store_wmmxregset, target_regsets): New.
12218 * server.c (get_features_xml): Take annex argument. Check builtin
12220 (handle_query): Handle multiple annexes.
12222 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12224 * remote-utils.c [USE_WIN32API] (read, write): Define.
12225 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12228 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12230 * linux-i386-low.c (the_low_target): Set arch_string.
12231 * linux-x86-64-low.c (the_low_target): Likewise.
12232 * linux-low.c (linux_arch_string): New.
12233 (linux_target_ops): Add it.
12234 * linux-low.h (struct linux_target_ops): Add arch_string.
12235 * server.c (write_qxfer_response): Use const void * for DATA.
12236 (get_features_xml): New.
12237 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12238 * target.h (struct target_ops): Add arch_string method.
12240 2007-01-03 Denis Pilat <denis.pilat@st.com>
12241 Daniel Jacobowitz <dan@codesourcery.com>
12243 * linux-low.c (linux_kill): Handle being called with no threads.
12244 * win32-i386-low.c (win32_kill): Likewise.
12245 (get_child_debug_event): Clear current_process_handle.
12247 2006-12-30 Denis PILAT <denis.pilat@st.com>
12248 Daniel Jacobowitz <dan@codesourcery.com>
12250 * remote-utils.c (remote_open): Check the type of specified
12251 serial port devices before opening them.
12252 * server.c (main): Kill the inferior if an error occurs during
12253 the first remote_open.
12255 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12257 * README: Update supported targets.
12259 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12261 * Makefile.in (clean): Remove reg-mips64.c.
12262 (reg-mips64.c, reg-mips64.o): New rules.
12263 * configure.srv: Handle mips64. Include regset support for mips.
12264 * linux-mips-low.c (union mips_register): New.
12265 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12266 (mips_breakpoint, mips_breakpoint_at): Use int.
12267 (mips_collect_register, mips_supply_register)
12268 (mips_collect_register_32bit, mips_supply_register_32bit)
12269 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12270 (mips_store_fpregset, target_regsets): New.
12271 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12273 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12275 * configure.srv: Add target "spu*-*-*".
12276 * Makefile.in (clean): Remove reg-spu.c.
12277 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12278 * spu-low.c: New file.
12280 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12282 * configure.ac: Correct td_thr_tls_get_addr test.
12283 * configure: Regenerated.
12285 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12287 * linux-low.c (linux_wait_for_event): Reformat. Use the
12288 pass_signals array.
12289 * remote-utils.c (decode_address_to_semicolon): New.
12290 * server.c (pass_signals, handle_general_set): New.
12291 (handle_query): Mention QPassSignals for qSupported.
12292 (main): Call handle_general_set.
12293 * server.h (pass_signals, decode_address_to_semicolon): New.
12295 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12297 * server.c (handle_query): Correct error handling for read_auxv.
12299 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12301 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12302 and srv_linux_thread_db to yes.
12303 * linux-s390-low.c (s390_fill_gregset): New function.
12304 (target_regsets): Define data structure.
12306 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12308 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12309 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12310 * config.in, configure: Regenerated.
12311 * inferiors.c (gdb_id_to_thread): New function.
12312 (gdb_id_to_thread_id): Use it.
12313 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12314 * linux-low.h (struct process_info): Add th member.
12315 (thread_db_get_tls_address): New prototype.
12316 * remote-utils.c (decode_address): Make non-static.
12317 * server.c (handle_query): Handle qGetTLSAddr.
12318 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12319 * target.h (struct target_ops): Add get_tls_address.
12320 * thread-db.c (maybe_attach_thread): Save the thread handle.
12321 (thread_db_get_tls_address): New.
12323 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12325 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12326 (linux_resume_one_process): Take a siginfo_t *. Update all
12327 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12328 (struct pending_signals): Add a siginfo_t.
12329 (linux_wait_for_process): Always set last_status.
12330 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12331 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12332 * linux-low.h (struct process_info): Add last_status.
12334 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12336 * remote-utils.c (try_rle): New function.
12337 (putpkt_binary): Use it.
12339 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12341 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12342 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12343 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12344 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12345 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12348 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12350 * server.c (terminal_fd): New variable.
12351 (old_foreground_pgrp): Likewise.
12352 (restore_old_foreground_pgrp): New function.
12353 (start_inferior): Record the terminal file descriptor in terminal_fd
12354 and its original foreground group in old_foreground_pgrp. Register
12355 restore_old_foreground_pgrp with atexit().
12357 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12359 * server.c (handle_query): Correct qPart to qXfer.
12361 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12363 * configure.ac: Check for more headers which are missing on
12364 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12365 * configure.srv: Add Cygwin and mingw32.
12366 * remote-utils.c: Don't include headers unconditionally which
12367 are missing on mingw32. Include <winsock.h> for mingw32.
12368 (remote_open): Adjust for mingw32 support. Flush
12369 standard error after writing to it.
12370 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12371 (unblock_async_io, enable_async_io, disable_async_io)
12372 (readchar, getpkt): Update for Winsock support.
12373 (prepare_resume_reply): Expect a protocol signal number.
12374 * server.c: Disable <sys/wait.h> on mingw32.
12375 (start_inferior): Adjust for mingw32 support. Flush
12376 standard error after writing to it.
12377 (attach_inferior): Likewise. Use protocol signal
12379 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12381 * win32-i386-low.c: New file.
12382 * Makefile.in (XM_CLIBS): Set.
12383 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12384 (win32-i386-low.o): New dependency rule.
12385 * linux-low.c (linux_wait): Use target signal numbers.
12386 * target.h (struct target_ops): Doc fix.
12387 * server.h (target_signal_to_name): New prototype.
12388 * gdbreplay.c: Don't include headers unconditionally which
12389 are missing on mingw32. Include <winsock.h> for mingw32.
12390 (remote_close, remote_open): Adjust for Winsock support.
12391 * configure, config.in: Regenerated.
12393 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12395 * server.c (decode_xfer_read, write_qxfer_response): New.
12396 (handle_query): Take a packet length argument. Handle
12397 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12398 the qSupported response.
12399 (main): Update call to handle_query.
12401 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12403 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12404 (putpkt_binary): Renamed from putpkt and adjusted for binary
12406 (putpkt): New wrapper for putpkt_binary.
12407 (readchar): Don't mask off the high bit.
12408 (decode_X_packet): New function.
12409 * server.c (main): Call putpkt_binary if a handler sets the packet
12410 length. Save the length of the incoming packet. Handle 'X'.
12411 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12413 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12415 * server.c (handle_query): Handle qSupported.
12417 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12419 * remote-utils.c (all_symbols_looked_up): New variable.
12420 (look_up_one_symbol): Check it.
12421 * server.h (look_up_one_symbol): New declaration.
12422 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12424 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12426 * Makefile.in (linux-arm-low.o): Update dependencies.
12427 * linux-arm-low.c: Include "gdb_proc_service.h".
12428 (PTRACE_GET_THREAD_AREA): Define.
12429 (ps_get_thread_area): New function.
12431 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12433 * configure.srv (m68k*-*-uclinux*): New target.
12434 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12435 (linux_resume_one_process): Remove extraneous cast.
12436 (linux_read_offsets): New.
12437 (linux_target_op): Add linux_read_offsets on mmuless systems.
12438 * server.c (handle_query): Add qOffsets logic.
12439 * target.h (struct target_ops): Add read_offsets.
12441 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12443 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12444 (PTRACE_GET_THREAD_AREA): Define.
12445 (ps_get_thread_area): New function.
12446 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12447 (linux-x86-64-low.o): Update.
12449 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12451 * configure.ac: Remove checks for prfpregset_t.
12452 * gdb_proc_service.h: New file.
12453 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12454 new "gdb_proc_service.h".
12455 * proc-service.c: Likewise.
12456 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12457 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12458 * Makefile.in (gdb_proc_service_h): Updated.
12459 * configure, config.in: Regenerated.
12461 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12463 * remote-utils.c (prepare_resume_reply): Move declaration
12464 of gdb_id_from_wait to the top of the block.
12466 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12468 * linux-low.c (regsets_store_inferior_registers): Read the regset
12469 from the target before filling it.
12471 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12473 * server.c (attach_inferior): Return SIGTRAP for a successful
12476 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12478 * Makefile.in (OBS): Add version.o.
12479 (STAGESTUFF): Delete.
12480 (version.o): Add dependencies.
12481 (version.c): Replace rule.
12482 (clean): Remove version.c.
12483 * server.c (gdbserver_version): New.
12484 (gdbserver_usage): Use printf.
12485 (main): Handle --version and --help.
12486 * server.h (version, host_name): Add declarations.
12488 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12500 * linux-x86-64-low.c:
12502 * linux-s390-low.c:
12503 * linux-ppc64-low.c:
12505 * linux-mips-low.c:
12506 * linux-m68k-low.c:
12507 * linux-m32r-low.c:
12510 * linux-ia64-low.c:
12511 * linux-i386-low.c:
12512 * linux-crisv32-low.c:
12524 * gdbserver.1: Add (C) after Copyright. Update the FSF
12527 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12529 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12530 (arm_breakpoint_at): Recognize both breakpoints.
12531 (the_low_target): Use the correct breakpoint instruction.
12533 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12535 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12536 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12537 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12538 (the_low_target): Update.
12540 2005-10-25 Andreas Schwab <schwab@suse.de>
12542 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12544 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12545 (ia64_num_regs): Reduce to 462.
12547 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12549 * acinclude.m4: Correct quoting.
12550 * aclocal.m4: Regenerated.
12552 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12553 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12554 (thread_db_init): Call thread_db_err_str.
12555 * configure.ac: Check for TD_VERSION.
12556 * config.in, configure: Regenerated.
12558 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12560 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12562 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12564 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12565 is not available. Define HAVE_PTRACE_GETREGS if it is.
12566 * config.in, configure: Regenerated.
12567 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12568 * linux-i386-low.c, linux-m68k-low.c: Update to use
12569 HAVE_PTRACE_GETREGS.
12570 * linux-low.c (regsets_fetch_inferior_registers)
12571 (regsets_store_inferior_registers): Only return 0 if we processed
12573 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12574 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12576 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12578 * inferiors.c (struct thread_info): Add gdb_id.
12579 (add_thread): Add gdb_id argument.
12580 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12581 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12582 calls to add_thread.
12583 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12584 * server.c (handle_query): Use thread_to_gdb_id.
12585 (handle_v_cont, main): Use gdb_id_to_thread_id.
12586 * server.h (add_thread): Update prototype.
12587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12590 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12592 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12593 left-padded registers.
12594 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12595 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12597 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12599 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12600 * configure: Regenerate.
12601 * config.in: Regenerate.
12602 * server.h (NEED_DECLARATION_STRERROR):
12603 Replace with !HAVE_DECL_STRERROR.
12605 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12607 * linux-low.c (linux_wait, linux_send_signal): Don't test
12608 an unsigned long variable for > 0 if it could be MAX_ULONG.
12609 * server.c (myresume): Likewise.
12610 * target.c (set_desired_inferior): Likewise.
12612 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12614 * configure.ac: Simplify and improve check for socklen_t.
12615 * configure, config.in: Regenerate.
12617 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12619 * acconfig.h: Remove.
12620 * configure.ac: Add a test for socklen_t. Use three-argument
12621 AC_DEFINE throughout.
12622 * config.in: Regenerated using autoheader 2.59.
12623 * configure: Regenerated.
12625 * gdbreplay.c (socklen_t): Provide a default.
12626 (remote_open): Use socklen_t.
12627 * remote-utils.c (socklen_t): Provide a default.
12628 (remote_open): Use socklen_t.
12629 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12632 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12634 * linux-low.c (linux_read_memory, linux_write_memory)
12635 (linux_read_auxv): Likewise.
12636 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12637 (check_mem_write): Likewise.
12638 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12640 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12641 (registers_from_string, register_data): Likewise.
12642 * server.c (handle_query, main): Likewise.
12643 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12644 (decode_M_packet): Likewise.
12645 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12646 * target.h (struct target_ops): Update read_memory, write_memory,
12648 (read_inferior_memory, write_inferior_memory): Update.
12649 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12650 to unsigned char *.
12651 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12652 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12653 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12654 linux-s390-low.c, linux-sh-low.c: Update for changes in
12655 read_inferior_memory and the_low_target->breakpoint.
12657 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12659 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12660 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12661 * configure.srv: Add powerpc64-*-linux*.
12662 * linux-ppc64-low.c: New file.
12664 2005-05-23 Orjan Friberg <orjanf@axis.com>
12666 * linux-cris-low.c: New file with support for CRIS.
12667 * linux-crisv32-low.c: Ditto for CRISv32.
12668 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12669 (clean): Add reg-cris.c and reg-crisv32.c.
12670 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12671 reg-crisv32.o, and reg-crisv32.c to make rules.
12672 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12673 recognized targets.
12675 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12677 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12678 of sizeof (PTRACE_XFER_TYPE).
12679 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12681 2005-05-12 Orjan Friberg <orjanf@axis.com>
12683 * target.h (struct target_ops): Add insert_watchpoint,
12684 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12685 pointers for hardware watchpoint support.
12686 * linux-low.h (struct linux_target_ops): Ditto.
12687 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12688 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12689 to linux_target_ops.
12690 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12692 * server.c (main): Recognize 'Z' and 'z' packets.
12694 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12696 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12697 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12698 (the_low_target): Add new members.
12700 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12702 * proc-service.c (ps_lgetregs): Search all_processes instead of
12705 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12707 * server.c (start_inferior): Change return type to int.
12708 (attach_inferior): Change sigptr to int *.
12709 (handle_v_cont, handle_v_requests): Change signal to int *.
12710 (main): Change signal to int.
12712 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12714 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12715 * configure.srv: Add m32r*-*-linux*.
12716 * linux-m32r-low.c: New file.
12718 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12720 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12722 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12724 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12725 Take unsigned long arguments for PIDs.
12726 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12727 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12728 (wait_for_sigstop, linux_resume_one_process)
12729 (regsets_fetch_inferior_registers, linux_send_signal)
12730 (linux_read_auxv): Likewise. Update the types of variables holding
12731 PIDs. Update format string specifiers.
12732 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12733 * remote-utils.c (prepare_resume_reply): Likewise.
12734 * server.c (cont_thread, general_thread, step_thread)
12735 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12737 (handle_query): Update format specifiers.
12738 (handle_v_cont, main): Use strtoul for thread IDs.
12739 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12740 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12741 (general_thread, step_thread, thread_from_wait)
12742 (old_thread_from_wait): Update.
12743 * target.h (struct thread_resume): Use unsigned long for THREAD.
12744 (struct target_ops): Use unsigned long for arguments to attach and
12747 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12749 * acinclude.m4: Include bfd/bfd.m4 directly.
12750 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12751 <agriffis@toolchain.org>.
12752 * aclocal.m4, configure: Regenerated.
12754 2005-01-07 Andrew Cagney <cagney@gnu.org>
12756 * configure.ac: Rename configure.in, require autoconf 2.59.
12757 * configure: Re-generate.
12759 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12761 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12762 LIBS when finished.
12763 * aclocal.m4: Regenerated.
12764 * configure: Regenerated.
12766 2004-11-21 Andreas Schwab <schwab@suse.de>
12768 * linux-m68k-low.c (m68k_num_gregs): Define.
12769 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12770 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12771 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12772 (m68k_breakpoint_at): New. Add to the_low_target.
12774 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12775 srv_linux_thread_db to yes.
12777 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12779 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12780 (ARCH_SET_FS): Likewise.
12781 (ARCH_GET_FS): Likewise.
12782 (ARCH_GET_GS): Likewise.
12784 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12786 * linux-i386-low.c (ps_get_thread_area): New.
12787 * linux-x86-64-low.c (ps_get_thread_area): New.
12788 * linux-low.c: Include <sys/syscall.h>.
12789 (linux_kill_one_process): Don't kill the first thread here.
12790 (linux_kill): Kill the first thread here.
12791 (kill_lwp): New function.
12792 (send_sigstop, linux_send_signal): Use it.
12793 * proc-service.c: Clean up #ifdefs.
12794 (fpregset_info): Delete.
12795 (ps_lgetregs): Update and enable implementation.
12796 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12798 * remote-utils.c (struct sym_cache, symbol_cache): New.
12799 (input_interrupt): Print a clearer message.
12800 (async_io_enabled): New variable.
12801 (enable_async_io, disable_async_io): Use it. Update comments.
12802 (look_up_one_symbol): Use the symbol cache.
12803 * thread-db.c (thread_db_look_up_symbols): New function.
12804 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12806 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12808 * configure.in: Test for -rdynamic.
12809 * configure: Regenerated.
12810 * Makefile (INTERNAL_LDFLAGS): New.
12811 (gdbserver, gdbreplay): Use it.
12813 2004-09-02 Andrew Cagney <cagney@gnu.org>
12815 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12817 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12819 * linux-low.c (linux_wait): Clear all_processes list also.
12821 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12823 * linux-low.c: Include <errno.h>. Remove extern declaration of
12826 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12828 * gdbreplay.c, server.h, utils.c: Update copyright years.
12830 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12832 * server.c (main): Print child status or termination signal from
12833 variable 'signal', not 'sig'.
12835 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12837 * linux-low.c (linux_read_memory): Change return type to
12838 int. Check for and return error from ptrace().
12839 * target.c (read_inferior_memory): Change return type to int. Pass
12840 back return status from the_target->read_memory().
12841 * target.h (struct target_ops): Adapt *read_memory() prototype.
12843 (read_inferior_memory): Adapt prototype.
12844 * server.c (main): Return an error packet if
12845 read_inferior_memory() returns an error.
12847 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12849 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12850 Unify with other clean targets.
12852 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12854 * server.c (handle_v_cont): Call set_desired_inferior.
12856 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12858 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12860 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12862 * linux-low.c (linux_wait): Unblock async I/O.
12863 (linux_resume): Block and enable async I/O.
12864 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12865 * server.h (block_async_io, unblock_async_io): Add prototypes.
12867 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12869 * remote-utils.c (remote_open): Print a status notice after
12870 opening a TCP port.
12871 * server.c (attach_inferior): Print a status notice after
12874 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12876 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12878 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12880 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12882 * server.c, target.h: Update copyright years.
12884 2004-02-25 Roland McGrath <roland@redhat.com>
12886 * target.h (struct target_ops): New member `read_auxv'.
12887 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12888 * linux-low.c (linux_read_auxv): New function.
12889 (linux_target_ops): Initialize `read_auxv' member to that.
12891 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12893 Committed by Jim Blandy <jimb@redhat.com>.
12895 * linux-s390-low.c (s390_num_regs): Update.
12896 (s390_regmap): Remove control registers. Use __s390x__ predefine
12897 instead of GPR_SIZE to distiguish s390 and s390x targets.
12899 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12901 * linux-low.c: Update copyright year.
12902 (check_removed_breakpoint): Clear pending_is_breakpoint.
12903 (linux_set_resume_request, linux_queue_one_thread)
12904 (resume_status_pending_p): New functions.
12905 (linux_continue_one_thread): Use process->resume.
12906 (linux_resume): Only resume threads if there are no pending events.
12907 * linux-low.h (struct process_info): Add resume request
12910 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12912 * regcache.c (new_register_cache): Clear the allocated register
12913 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12915 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12917 * linux-low.c (linux_resume): Take a struct thread_resume *
12919 (linux_wait): Update call.
12920 (resume_ptr): New static variable.
12921 (linux_continue_one_thread): Renamed from
12922 linux_continue_one_process. Use resume_ptr.
12923 (linux_resume): Use linux_continue_one_thread.
12924 * server.c (handle_v_cont, handle_v_requests): New functions.
12925 (myresume): New function.
12926 (main): Handle 'v' case.
12927 * target.h (struct thread_resume): New type.
12928 (struct target_ops): Change argument of "resume" to struct
12930 (myresume): Delete macro.
12932 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12934 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12935 (uninstall): Support DESTDIR.
12937 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12939 * configure.srv: Add xscale*linux copy of arm*linux entry.
12941 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12943 * linux-arm-low.c (arm_reinsert_addr): New function.
12944 (the_low_target): Add arm_reinsert_addr.
12946 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12948 * mem-break.c: Remove whitespace at end of file.
12950 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12952 * configure.in: Check whether we need to prototype strerror.
12953 * server.h: Optionally prototype strerror.
12954 * gdbreplay.c (perror_with_name): Use strerror.
12955 * linux-low.c (linux_attach_lwp): Use strerror.
12956 * utils.c (perror_with_name): Use strerror.
12957 * config.in, configure: Regenerated.
12959 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12961 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12962 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12964 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12966 * Makefile.in (SFILES): Update.
12967 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12968 low-sun3.c: Remove files.
12970 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12972 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12973 (linux_detach_one_process, linux_detach): New functions.
12974 (linux_target_ops): Add linux_detach.
12975 * server.c (main): Handle 'D' packet.
12976 * target.h (struct target_ops): Add "detach" member.
12977 (detach_inferior): Define.
12979 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12981 From Kelley Cook <kelleycook@wideopenwest.com>:
12982 * configure.srv: Accept i[34567]86 variants.
12984 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12986 * linux-low.c (linux_wait_for_event): Correct comment typos.
12987 (linux_resume_one_process): Call check_removed_breakpoint.
12988 (linux_send_signal): New function.
12989 (linux_target_ops): Add linux_send_signal.
12990 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12992 * target.h (struct target_ops): Add send_signal.
12994 2003-05-29 Jim Blandy <jimb@redhat.com>
12996 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12997 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12998 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12999 away part of the register's value.
13001 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13003 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13004 (linux_wait_for_event, linux_init_signals): Likewise.
13006 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13008 * configure.in: Check for stdlib.h.
13009 * configure: Regenerated.
13010 * config.in: Regenerated.
13012 2003-01-04 Andreas Schwab <schwab@suse.de>
13014 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13016 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13018 * Makefile.in: Remove obsolete code.
13020 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13022 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13023 defined(PT_FPR0_HI).
13025 2002-11-17 Stuart Hughes <seh@zee2.com>
13027 * linux-arm-low.c (arm_num_regs): Increase.
13028 (arm_regmap): Include status register.
13030 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13032 * linux-low.c (register_addr): Remove incorrect -1 check.
13034 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13036 * linux-low.c (linux_create_inferior): Call setpgid. Return
13038 (unstopped_p, linux_signal_pid): Remove.
13039 (linux_target_ops): Remove linux_signal_pid.
13040 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13041 global instead of target method.
13042 * target.h (struct target_ops): Remove signal_pid. Update comment
13043 for create_inferior.
13044 * server.c (signal_pid): New variable.
13045 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13046 gdbserver. Set the child to be the foreground process group.
13047 (attach_inferior): Set signal_pid.
13049 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13051 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13053 2002-08-20 Jim Blandy <jimb@redhat.com>
13055 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13058 2002-08-01 Andrew Cagney <cagney@redhat.com>
13060 * Makefile.in: Make chill references obsolete.
13062 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13064 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13065 * configure: Regenerate.
13066 * config.in: Regenerate.
13068 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13070 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13071 (perror_with_name, remote_close, remote_open, expect, play): Static.
13073 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13075 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13076 byte offsets instead of an array of indexes.
13077 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13079 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13081 * regcache.c: Add comment.
13083 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13085 * thread-db.c: New file.
13086 * proc-service.c: New file.
13087 * acinclude.m4: New file.
13088 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13089 proc-service.o, and thread-db.o.
13090 (linux-low.o): Add USE_THREAD_DB.
13091 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13092 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13093 * aclocal.m4: Regenerated.
13094 * config.in: Regenerated.
13095 * configure: Regenerated.
13096 * configure.in: Check for proc_service.h, sys/procfs.h,
13097 thread_db.h, and linux/elf.h headrs.
13098 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13099 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13100 Check for -lthread_db and thread support.
13101 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13102 PowerPC, and SuperH.
13103 * i387-fp.c: Constify arguments.
13104 * i387-fp.h: Likewise.
13105 * inferiors.c: (struct thread_info): Renamed from
13106 `struct inferior_info'. Remove PID member. Use generic inferior
13107 list header. All uses updated.
13108 (inferiors, signal_pid): Removed.
13109 (all_threads): New variable.
13110 (get_thread): Define.
13111 (add_inferior_to_list): New function.
13112 (for_each_inferior): New function.
13113 (change_inferior_id): New function.
13114 (add_inferior): Removed.
13115 (remove_inferior): New function.
13116 (add_thread): New function.
13117 (free_one_thread): New function.
13118 (remove_thread): New function.
13119 (clear_inferiors): Use for_each_inferior and free_one_thread.
13120 (find_inferior): New function.
13121 (find_inferior_id): New function.
13122 (inferior_target_data): Update argument type.
13123 (set_inferior_target_data): Likewise.
13124 (inferior_regcache_data): Likewise.
13125 (set_inferior_regcache_data): Likewise.
13126 * linux-low.c (linux_bp_reinsert): Remove.
13127 (all_processes, stopping_threads, using_thrads)
13128 (struct pending_signals, debug_threads, pid_of): New.
13129 (inferior_pid): Replace with macro.
13130 (struct inferior_linux_data): Remove.
13131 (get_stop_pc, add_process): New functions.
13132 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13133 Use add_process and add_thread.
13134 (linux_attach_lwp): New function, based on old linux_attach. Use
13135 add_process and add_thread. Set stop_expected for new threads.
13136 (linux_attach): New function.
13137 (linux_kill_one_process): New function.
13138 (linux_kill): Kill all LWPs.
13139 (linux_thread_alive): Use find_inferior_id.
13140 (check_removed_breakpoints, status_pending_p): New functions.
13141 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13142 Update. Use WNOHANG. Wait for cloned processes also. Update process
13143 struct for the found process.
13144 (linux_wait_for_event): New function.
13145 (linux_wait): Use it. Support LWPs.
13146 (send_sigstop, wait_for_sigstop, stop_all_processes)
13147 (linux_resume_one_process, linux_continue_one_process): New functions.
13148 (linux_resume): Support LWPs.
13149 (REGISTER_RAW_SIZE): Remove.
13150 (fetch_register): Use register_size instead. Call supply_register.
13151 (usr_store_inferior_registers): Likewise. Call collect_register.
13152 Fix recursive case.
13153 (regsets_fetch_inferior_registers): Improve error message.
13154 (regsets_store_inferior_registers): Add debugging.
13155 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13156 (unstopped_p, linux_signal_pid): New functions.
13157 (linux_target_ops): Add linux_signal_pid.
13158 (linux_init_signals): New function.
13159 (initialize_low): Call it. Initialize using_threads.
13160 * regcache.c (inferior_regcache_data): Add valid
13162 (get_regcache): Fetch registers lazily. Add fetch argument
13163 and update all callers.
13164 (regcache_invalidate_one, regcache_invalidate): New
13166 (new_register_cache): Renamed from create_register_cache.
13167 Return the new regcache.
13168 (free_register_cache): Change argument to a void *.
13169 (registers_to_string, registers_from_string): Call get_regcache
13170 with fetch flag set.
13171 (register_data): Make static. Pass fetch flag to get_regcache.
13172 (supply_register): Call get_regcache with fetch flag clear.
13173 (collect_register): Call get_regcache with fetch flag set.
13174 (collect_register_as_string): New function.
13175 * regcache.h: Update.
13176 * remote-utils.c (putpkt): Flush after debug output and use
13178 Handle input interrupts while waiting for an ACK.
13179 (input_interrupt): Use signal_pid method.
13180 (getpkt): Flush after debug output and use stderr.
13181 (outreg): Use collect_register_as_string.
13182 (new_thread_notify, dead_thread_notify): New functions.
13183 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13184 and general_thread.
13185 (look_up_one_symbol): Flush after debug output.
13186 * server.c (step_thread, server_waiting): New variables.
13187 (start_inferior): Don't use signal_pid. Update call to mywait.
13188 (attach_inferior): Update call to mywait.
13189 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13190 (main): Don't fetch/store registers explicitly. Use
13191 set_desired_inferior. Support proposed ``Hs'' packet. Update
13193 * server.h: Update.
13194 (struct inferior_list, struct_inferior_list_entry): New.
13195 * target.c (set_desired_inferior): New.
13196 (write_inferior_memory): Constify.
13197 (mywait): New function.
13198 * target.h: Update.
13199 (struct target_ops): New signal_pid method.
13200 (mywait): Removed macro, added prototype.
13202 * linux-low.h (regset_func): Removed.
13203 (regset_fill_func, regset_store_func): New.
13204 (enum regset_type): New.
13205 (struct regset_info): Add type field. Use new operation types.
13206 (struct linux_target_ops): stop_pc renamed to get_pc.
13207 Add decr_pc_after_break and breakpoint_at.
13208 (get_process, get_thread_proess, get_process_thread)
13209 (strut process_info, all_processes, linux_attach_lwp)
13210 (thread_db_init): New.
13212 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13213 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13214 (the_low_target): Add new members.
13215 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13216 (i386_store_fpxregset): Constify.
13217 (target_regsets): Add new kind identifier.
13218 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13219 (i386_set_pc): Add debugging.
13220 (i386_breakpoint_at): New function.
13221 (the_low_target): Add new members.
13222 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13223 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13224 (mips_breakpoint_at): New.
13225 (the_low_target): Add new members.
13226 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13227 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13228 (the_low_target): Add new members.
13229 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13230 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13231 (the_low_target): Add new members.
13232 * linux-x86-64-low.c (target_regsets): Add new kind
13235 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13237 From Martin Pool <mbp@samba.org>:
13238 * server.c (gdbserver_usage): New function.
13241 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13243 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13244 stop_at -> stop_pc.
13246 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13248 * Makefile.in: Remove obsolete code.
13250 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13252 * linux-low.c (regsets_fetch_inferior_registers),
13253 (regsets_store_inferior_registers): Removed cast to int from
13255 * regcache.h: Added declaration of struct inferior_info.
13257 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13259 * inferiors.c (struct inferior_info): Add regcache_data.
13260 (add_inferior): Call create_register_cache.
13261 (clear_inferiors): Call free_register_cache.
13262 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13263 * regcache.c (struct inferior_regcache_data): New.
13264 (registers): Remove.
13265 (get_regcache): New function.
13266 (create_register_cache, free_register_cache): New functions.
13267 (set_register_cache): Don't initialize the register cache here.
13268 (registers_to_string, registers_from_string, register_data): Call
13270 * regcache.h: Add prototypes.
13271 * server.h: Likewise.
13273 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13275 * mem-break.c: New file.
13276 * mem-break.h: New file.
13277 * Makefile.in: Add mem-break.o rule; update server.h
13279 * inferiors.c (struct inferior_info): Add target_data
13281 (clear_inferiors): Free target_data member if set.
13282 (inferior_target_data, set_inferior_target_data): New functions.
13283 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13284 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13285 * linux-low.c (linux_bp_reinsert): New variable.
13286 (struct inferior_linux_data): New.
13287 (linux_create_inferior): Use set_inferior_target_data.
13288 (linux_attach): Likewise. Call add_inferior.
13289 (linux_wait_for_one_inferior): New function.
13290 (linux_wait): Call it.
13291 (linux_write_memory): Add const.
13292 (initialize_low): Call set_breakpoint_data.
13293 * linux-low.h (struct linux_target_ops): Add breakpoint
13295 * server.c (attach_inferior): Remove extra add_inferior
13297 * server.h: Include mem-break.h. Update inferior.c
13299 * target.c (read_inferior_memory)
13300 (write_inferior_memory): New functions.
13301 * target.h (read_inferior_memory)
13302 (write_inferior_memory): Change macros to prototypes.
13303 (struct target_ops): Update comments. Add const to write_memory
13306 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13308 * linux-low.c (usr_store_inferior_registers): Support
13309 registers which are allowed to fail to store.
13310 * linux-low.h (linux_target_ops): Likewise.
13311 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13312 (ppc_cannot_store_register): FPSCR may not be storable.
13314 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13316 * server.h: Include <string.h> if HAVE_STRING_H.
13317 * ChangeLog: Correct paths in last ChangeLog entry.
13319 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13321 * linux-low.h: Remove obsolete prototypes.
13322 (struct linux_target_ops): New.
13323 (extern the_low_target): New.
13324 * linux-low.c (num_regs, regmap): Remove declarations.
13325 (register_addr): Use the_low_target explicitly.
13326 (fetch_register): Likewise.
13327 (usr_fetch_inferior_registers): Likewise.
13328 (usr_store_inferior_registers): Likewise.
13329 * linux-arm-low.c (num_regs): Remove.
13330 (arm_num_regs): Define.
13331 (arm_regmap): Renamed from regmap, made static.
13332 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13334 (arm_cannot_store_register): Renamed from cannot_store_register,
13336 (the_low_target): New.
13337 * linux-i386-low.c (num_regs): Remove.
13338 (i386_num_regs): Define.
13339 (i386_regmap): Renamed from regmap, made static.
13340 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13342 (i386_cannot_store_register): Renamed from cannot_store_register,
13344 (the_low_target): New.
13345 * linux-ia64-low.c (num_regs): Remove.
13346 (ia64_num_regs): Define.
13347 (ia64_regmap): Renamed from regmap, made static.
13348 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13350 (ia64_cannot_store_register): Renamed from cannot_store_register,
13352 (the_low_target): New.
13353 * linux-m68k-low.c (num_regs): Remove.
13354 (m68k_num_regs): Define.
13355 (m68k_regmap): Renamed from regmap, made static.
13356 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13358 (m68k_cannot_store_register): Renamed from cannot_store_register,
13360 (the_low_target): New.
13361 * linux-mips-low.c (num_regs): Remove.
13362 (mips_num_regs): Define.
13363 (mips_regmap): Renamed from regmap, made static.
13364 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13366 (mips_cannot_store_register): Renamed from cannot_store_register,
13368 (the_low_target): New.
13369 * linux-ppc-low.c (num_regs): Remove.
13370 (ppc_num_regs): Define.
13371 (ppc_regmap): Renamed from regmap, made static.
13372 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13374 (ppc_cannot_store_register): Renamed from cannot_store_register,
13376 (the_low_target): New.
13377 * linux-s390-low.c (num_regs): Remove.
13378 (s390_num_regs): Define.
13379 (s390_regmap): Renamed from regmap, made static.
13380 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13382 (s390_cannot_store_register): Renamed from cannot_store_register,
13384 (the_low_target): New.
13385 * linux-sh-low.c (num_regs): Remove.
13386 (sh_num_regs): Define.
13387 (sh_regmap): Renamed from regmap, made static.
13388 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13390 (sh_cannot_store_register): Renamed from cannot_store_register,
13392 (the_low_target): New.
13393 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13394 (the_low_target): New.
13396 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13398 * Makefile.in: Add stamp-h target.
13399 * configure.in: Create stamp-h.
13400 * configure: Regenerated.
13402 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13404 * inferiors.c: New file.
13405 * target.c: New file.
13406 * target.h: New file.
13407 * Makefile.in: Add target.o and inferiors.o. Update
13409 * linux-low.c (inferior_pid): New static variable,
13410 moved from server.c.
13411 (linux_create_inferior): Renamed from create_inferior.
13412 Call add_inferior. Return 0 on success instead of a PID.
13413 (linux_attach): Renamed from myattach.
13414 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13415 (linux_thread_alive): Renamed from mythread_alive.
13416 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13418 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13419 (regsets_store_inferior_registers): Correct error message.
13420 Add missing ``return 0''.
13421 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13422 (linux_store_registers): Renamed from store_inferior_registers.
13423 (linux_read_memory): Renamed from read_inferior_memory.
13424 (linux_write_memory): Renamed from write_inferior_memory.
13425 (linux_target_ops): New structure.
13426 (initialize_low): Call set_target_ops ().
13427 * remote-utils.c (unhexify): New function.
13428 (hexify): New function.
13429 (input_interrupt): Send signals to ``signal_pid''.
13430 * server.c (inferior_pid): Remove.
13431 (start_inferior): Update create_inferior call.
13432 (attach_inferior): Call add_inferior.
13433 (handle_query): New function.
13434 (main): Call handle_query for `q' packets.
13435 * server.h: Include "target.h". Remove obsolete prototypes.
13436 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13438 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13440 * Makefile.in: Add WARN_CFLAGS. Update configury
13442 * configure.in: Check for <string.h>
13443 * configure: Regenerate.
13444 * config.in: Regenerate.
13445 * gdbreplay.c: Include needed system headers.
13446 (remote_open): Remove strchr prototype.
13447 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13448 * regcache.c (supply_register): Change buf argument to const void *.
13449 (supply_register_by_name): Likewise.
13450 (collect_register): Change buf argument to void *.
13451 (collect_register_by_name): Likewise.
13452 * regcache.h: Add missing prototypes.
13453 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13454 * server.c (handle_query): New function.
13455 (attached): New static variable, moved out of main.
13456 (main): Quiet longjmp clobber warnings.
13457 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13458 * utils.c (error): Remove NORETURN.