1 2016-02-09 Walfred Tedeschi <walfred.tedeschi@intel.com>
3 * linux-x86-low.c (x86_siginfo_fixup): Add cast to gdb_byte*.
5 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
11 * linux-x86-low.c [__x86_64__]: Include
12 "nat/amd64-linux-siginfo.h".
13 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
14 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
15 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
16 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
17 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
18 (cpt_si_fd, si_timerid, si_overrun): Move from
19 nat/amd64-linux-siginfo.c.
20 * Makefile.in (amd64-linux-siginfo.o:): New rule.
22 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
24 * server.c (skip_to_semicolon): Remove.
25 (process_point_options): Use strchrnul instead of
28 2016-01-26 Yao Qi <yao.qi@linaro.org>
30 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
31 * linux-low.c (install_software_single_step_breakpoints): Don't
32 call regcache_read_pc.
33 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
36 2016-01-26 Yao Qi <yao.qi@linaro.org>
38 * linux-low.c (install_software_single_step_breakpoints): Call
39 regcache_read_pc instead of get_pc.
41 2016-01-26 Yao Qi <yao.qi@linaro.org>
43 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
44 (unblock_async_io): Rename to ...
45 (block_unblock_async_io): ... it. New function.
46 (enable_async_io): Don't install SIGIO handler. Unblock it
48 (disable_async_io): Don't ignore SIGIO. Block it instead.
49 (initialize_async_io): Install SIGIO handler. Don't call
52 2016-01-26 Yao Qi <yao.qi@linaro.org>
54 * remote-utils.c (getpkt): If the buffer isn't empty, and the
55 first character is '\003', call *the_target->request_interrupt.
57 2016-01-25 Yao Qi <yao.qi@linaro.org>
59 * remote-utils.c (new_thread_notify): Remove.
60 (dead_thread_notify): Likewise.
61 * remote-utils.h (new_thread_notify): Remove declaration.
62 (dead_thread_notify): Likewise.
64 2016-01-23 Marcin KoĆcielnicki <koriakin@0x04.net>
66 * gdb.trace/pending.exp: Fix expected message on continue.
68 2016-01-22 Marcin KoĆcielnicki <koriakin@0x04.net>
70 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
71 it works properly on big-endian machines where sizeof (CORE_ADDR)
74 2016-01-21 Pedro Alves <palves@redhat.com>
76 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
77 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
78 * configure: Regenerate.
80 2016-01-21 Yao Qi <yao.qi@linaro.org>
82 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
83 is_thumb and set it according to CPSR saved on the stack.
84 (get_next_pcs_syscall_next_pc): Pass is_thumb to
85 arm_sigreturn_next_pc.
87 2016-01-18 Yao Qi <yao.qi@linaro.org>
89 * linux-low.c (linux_set_pc_64bit): New function.
90 (linux_get_pc_64bit): New function.
91 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
93 * linux-sparc-low.c (debug_threads): Remove declaration.
94 (sparc_get_pc): Remove.
95 (the_low_target): Use linux_get_pc_64bit instead of
97 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
98 (the_low_target): Use linux_get_pc_64bit and
101 2016-01-18 Yao Qi <yao.qi@linaro.org>
103 * linux-arm-low.c (debug_threads): Remove declaration.
104 (arm_get_pc, arm_set_pc): Remove.
105 (the_low_target): Use linux_get_pc_32bit and
107 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
108 (the_low_target): Use linux_get_pc_32bit and
110 * linux-cris-low.c (debug_threads): Remove declaration.
111 (cris_get_pc, cris_set_pc,): Remove.
112 (the_low_target): Use linux_get_pc_32bit and
114 * linux-crisv32-low.c (debug_threads): Remove declaration.
115 (cris_get_pc, cris_set_pc): Remove.
116 (the_low_target): Use linux_get_pc_32bit and
118 * linux-low.c: Include inttypes.h.
119 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
120 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
121 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
122 (the_low_target): Use linux_get_pc_32bit and
124 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
125 (the_low_target): Use linux_get_pc_32bit and
127 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
128 (the_low_target): Use linux_get_pc_32bit and
130 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
131 (the_low_target): Use linux_get_pc_32bit and
133 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
134 (the_low_target): Use linux_get_pc_32bit and
137 2016-01-18 Gary Benson <gbenson@redhat.com>
139 * configure.ac (AC_FUNC_FORK): New check.
140 * config.in: Regenerate.
141 * configure: Likewise.
143 2016-01-14 Yao Qi <yao.qi@linaro.org>
145 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
146 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
147 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
148 arm_get_next_pcs_ctor.
150 2016-01-12 Josh Stone <jistone@redhat.com>
151 Philippe Waroquiers <philippe.waroquiers@skynet.be>
153 * inferiors.h: Include "gdb_vecs.h".
154 (struct process_info): Add syscalls_to_catch.
155 * inferiors.c (remove_process): Free syscalls_to_catch.
156 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
157 syscall_return stops.
158 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
159 * server.c (handle_general_set): Handle QCatchSyscalls.
160 (handle_query): Report support for QCatchSyscalls.
161 * target.h (struct target_ops): Add supports_catch_syscall.
162 (target_supports_catch_syscall): New macro.
163 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
164 (struct lwp_info): Add syscall_state.
165 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
166 Maintain syscall_state and syscalls_to_catch across exec.
167 (get_syscall_trapinfo): New function, proxy to the_low_target.
168 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
169 (linux_low_filter_event): Toggle syscall_state entry/return for
170 syscall traps, and set it ignored for all others.
171 (gdb_catching_syscalls_p): New function.
172 (gdb_catch_this_syscall_p): New function.
173 (linux_wait_1): Handle SYSCALL_SIGTRAP.
174 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
175 (linux_supports_catch_syscall): New function.
176 (linux_target_ops): Install it.
177 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
178 (the_low_target): Install it.
180 2016-01-12 Mike Frysinger <vapier@gentoo.org>
182 * acinclude.m4: Include new ../warning.m4 file.
183 * configure: Regenerated.
184 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
186 2016-01-12 Mike Frysinger <vapier@gentoo.org>
188 * ax.c (is_goto_target): Mark static.
189 * linux-low.c (register_addr): Likewise.
190 (linux_fetch_registers, linux_store_registers): Likewise.
191 * mem-break.c (any_persistent_commands): Fix old prototype.
192 (add_commands_to_breakpoint): Mark static.
193 * regcache.c (find_register_by_name): Delete unused func.
194 * remote-utils.c (hex_or_minus_one): Mark static.
195 * server.c (monitor_show_help): Mark static.
196 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
197 handle_v_requests): Likewise.
199 2016-01-12 Pedro Alves <palves@redhat.com>
201 Remove use of the registered trademark symbol throughout.
203 2016-01-08 Yao Qi <yao.qi@linaro.org>
205 * remote-utils.c (getpkt): If c is '\003', call target hook
208 2016-01-06 Yao Qi <yao.qi@linaro.org>
210 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
212 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
213 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
214 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
215 (thumb2_breakpoint): Declare.
216 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
218 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
219 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
220 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
222 2016-01-01 Joel Brobecker <brobecker@adacore.com>
224 * gdbreplay.c (gdbreplay_version): Change copyright year in
226 * server.c (gdbserver_version): Likewise.
228 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
230 * server.c (crc32_table): Delete.
231 (crc32): Use libiberty's xcrc32 function.
233 2015-12-22 Joel Brobecker <brobecker@adacore.com>
235 * lynx-low.c (lynx_delete_thread_callback): New function.
236 (lynx_mourn): Properly delete our process and all of its
237 threads. Remove call to clear_inferiors.
239 2015-12-22 Joel Brobecker <brobecker@adacore.com>
241 * target.c (thread_search_callback): Add check that
242 the thread_stopped target callback is not NULL before
245 2015-12-21 Yao Qi <yao.qi@linaro.org>
247 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
250 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
252 * server.c (handle_query): Call target_supports_software_single_step.
254 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
256 * linux-low.c (single_step): New function.
257 (linux_resume_one_lwp_throw): Call single_step.
258 (start_step_over): Likewise.
260 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
262 * Makefile.in (SFILES): Append arch/arm-linux.c,
263 arch/arm-get-next-pcs.c.
264 (arm-linux.o): New rule.
265 (arm-get-next-pcs.o): New rule.
266 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
268 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
269 to linux-aarch32-low.c.
270 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
271 (arm_breakpoint_len, thumb_breakpoint): Likewise.
272 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
273 (thumb2_breakpoint_len): Likewise.
274 (arm_is_thumb_mode): Make non-static.
275 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
276 from linux-aarch32-low.c.
277 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
278 (arm_breakpoint_len, thumb_breakpoint): Likewise.
279 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
280 (thumb2_breakpoint_len): Likewise.
281 (arm_is_thumb_mode): New declaration.
282 * linux-arm-low.c: Include arch/arm-linux.h
283 aarch/arm-get-next-pcs.h, sys/syscall.h.
284 (get_next_pcs_ops): New struct.
285 (get_next_pcs_addr_bits_remove): New function.
286 (get_next_pcs_is_thumb): New function.
287 (get_next_pcs_read_memory_unsigned_integer): Likewise.
288 (arm_sigreturn_next_pc): Likewise.
289 (get_next_pcs_syscall_next_pc): Likewise.
290 (arm_gdbserver_get_next_pcs): Likewise.
291 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
293 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
294 * server.h: Include gdb_vecs.h.
296 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
298 * Makefile.in (SFILES): Append common/common-regcache.c.
299 (OBS): Append common-regcache.o.
300 (common-regcache.o): New rule.
301 * regcache.c (init_register_cache): Initialize cache to
303 (regcache_raw_read_unsigned): New function.
304 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
305 register_status enum.
307 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
309 * linux-aarch64-low.c (the_low_targets): Rename
310 breakpoint_reinsert_addr to get_next_pcs.
311 * linux-arm-low.c (the_low_targets): Likewise.
312 * linux-bfin-low.c (the_low_targets): Likewise.
313 * linux-cris-low.c (the_low_targets): Likewise.
314 * linux-crisv32-low.c (the_low_targets): Likewise.
315 * linux-low.c (can_software_single_step): Likewise.
316 (install_software_single_step_breakpoints): New function.
317 (start_step_over): Use install_software_single_step_breakpoints.
318 * linux-low.h: New CORE_ADDR vector.
319 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
321 * linux-mips-low.c (the_low_targets): Likewise.
322 * linux-nios2-low.c (the_low_targets): Likewise.
323 * linux-sparc-low.c (the_low_targets): Likewise.
325 2015-12-17 Pedro Alves <palves@redhat.com>
327 * linux-low.c (linux_kill_one_lwp): Remove references to
329 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
331 (linux_init_signals): Delete.
332 (initialize_low): Adjust.
333 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
335 2015-12-16 Pedro Alves <palves@redhat.com>
337 * configure.ac (compiler warning flags): When testing a
338 -Wno-foo option, check whether -Wfoo works instead.
339 * configure: Regenerate.
341 2015-12-11 Don Breazeal <donb@codesourcery.com>
343 * server.c (process_serial_event): Don't exit from gdbserver
344 in remote mode if there are still active inferiors.
346 2015-12-11 Yao Qi <yao.qi@linaro.org>
348 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
349 arm_breakpoint_at if the process is 32-bit.
351 2015-12-11 Yao Qi <yao.qi@linaro.org>
353 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
356 2015-12-07 Yao Qi <yao.qi@linaro.org>
358 * configure.srv: Append arm.o to srv_tgtobj for
359 aarch64*-*-linux* target.
360 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
361 from linux-arm-low.c.
362 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
363 (arm_breakpoint_len, thumb_breakpoint): Likewise.
364 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
365 (thumb2_breakpoint_len): Likewise.
366 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
367 (arm_breakpoint_kinds): Likewise.
368 (arm_breakpoint_kind_from_pc): Likewise.
369 (arm_sw_breakpoint_from_kind): Likewise.
370 (arm_breakpoint_kind_from_current_state): Likewise.
371 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
372 (arm_sw_breakpoint_from_kind): Declare.
373 (arm_breakpoint_kind_from_current_state): Declare.
374 (arm_breakpoint_at): Declare.
375 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
376 arm_sw_breakpoint_from_kind if process is 32-bit.
377 (aarch64_breakpoint_kind_from_pc): New function.
378 (aarch64_breakpoint_kind_from_current_state): New function.
379 (the_low_target): Initialize fields breakpoint_kind_from_pc
380 and breakpoint_kind_from_current_state.
381 * linux-arm-low.c (arm_breakpoint_kinds): Move to
383 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
384 (arm_breakpoint, arm_breakpoint_len): Likewise.
385 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
386 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
387 (arm_is_thumb_mode): Likewise.
388 (arm_breakpoint_at): Likewise.
389 (arm_breakpoint_kind_from_pc): Likewise.
390 (arm_sw_breakpoint_from_kind): Likewise.
391 (arm_breakpoint_kind_from_current_state): Likewise.
394 2015-08-04 Yao Qi <yao.qi@linaro.org>
396 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
397 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
398 * server.c (extended_protocol): Remove "static".
399 * server.h (extended_protocol): Declare it.
401 2015-12-04 Josh Stone <jistone@redhat.com>
403 * target.h (struct target_ops) <arch_setup>: Rename to ...
404 (struct target_ops) <post_create_inferior>: ... this.
405 (target_arch_setup): Rename to ...
406 (target_post_create_inferior): ... this, calling post_create_inferior.
407 * server.c (start_inferior): Update target_arch_setup calls to
408 target_post_create_inferior.
409 * linux-low.c (linux_low_ptrace_options): Forward declare.
410 (linux_arch_setup): Update its comment for general use.
411 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
412 (struct linux_target_ops): Use linux_post_create_inferior.
413 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
414 to post_create_inferior.
415 * nto-low.c (struct nto_target_ops): Likewise.
416 * spu-low.c (struct spu_target_ops): Likewise.
417 * win32-low.c (struct win32_target_ops): Likewise.
419 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
421 * linux-arm-low.c: Remove duplicate arch/arm.h include.
423 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
425 * linux-arm-low.c (arm_reinsert_addr): Remove function.
426 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
427 * linux-cris-low.c (cris_reinsert_addr> Remove function.
428 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
429 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
430 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
431 * linux-mips-low.c (mips_reinsert_addr): Remove function.
432 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
433 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
434 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
435 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
436 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
438 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
440 * linux-low.c (linux_look_up_symbols): Don't call
441 linux_supports_traceclone.
442 * linux-low.h (thread_db_init): Remove use_events argument.
443 * thread-db.c (thread_db_use_event): Remove global variable.
444 (struct thread_db) <td_thr_event_enable_p>: Remove field.
445 (struct thread_db) <td_create_bp>: Remove field.
446 (thread_db_create_event): Remove function.
447 (thread_db_enable_reporting): Likewise.
448 (find_one_thread): Don't check for thread_db_use_events.
449 (attach_thread): Likewise.
450 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
451 (try_thread_db_load_1): Don't check for thread_db_use_events.
452 (thread_db_init): Remove use_events argument and thread events
454 (remove_thread_event_breakpoints): Remove function.
455 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
457 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
459 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
462 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
464 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
465 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
467 * linux-crisv32-low.c (cris_supports_hardware_single_step):
469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
470 * linux-low.c (can_hardware_single_step): Use
471 supports_hardware_single_step.
472 (can_software_single_step): New function.
473 (start_step_over): Call can_software_single_step.
474 (linux_supports_hardware_single_step): New function.
475 (struct target_ops) <supports_software_single_step>: Initialize.
476 * linux-low.h (struct linux_target_ops)
477 <supports_hardware_single_step>: Initialize.
478 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
479 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
480 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
481 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
482 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
483 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
484 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
485 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
486 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
487 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
489 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
490 (struct linux_target_ops) <tile_supports_hardware_single_step>:
492 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
493 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
494 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
496 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
497 * target.h (struct target_ops): <supports_software_single_step>:
499 (target_supports_software_single_step): New macro.
501 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
503 * linux-low.c (linux_wait_1): Fix pc advance condition.
504 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
505 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
507 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
509 * linux-arm-low.c (arm_is_thumb_mode): New function.
510 (arm_breakpoint_at): Use arm_is_thumb_mode.
511 (arm_breakpoint_kind_from_current_state): New function.
512 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
514 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
515 (linux_breakpoint_kind_from_current_state): New function.
516 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
517 * linux-low.h (struct linux_target_ops)
518 <breakpoint_kind_from_current_state>: New field.
519 * target.h (struct target_ops): Likewise.
520 (target_breakpoint_kind_from_current_state): New macro.
522 2015-11-30 Pedro Alves <palves@redhat.com>
524 * linux-low.c (linux_resume): Wake up the event loop before
527 2015-11-30 Pedro Alves <palves@redhat.com>
529 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
531 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
533 * target.c (struct thread_search): New structure.
534 (thread_search_callback): New function.
535 (prev_general_thread): New global.
536 (prepare_to_access_memory, done_accessing_memory): New functions.
537 * target.h (prepare_to_access_memory, done_accessing_memory):
538 Replace macros with function declarations.
540 2015-11-30 Pedro Alves <palves@redhat.com>
543 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
544 report TARGET_WAITKIND_NO_RESUMED.
545 * remote-utils.c (prepare_resume_reply): Handle
546 TARGET_WAITKIND_NO_RESUMED.
547 * server.c (report_no_resumed): New global.
548 (handle_query) <qSupported>: Handle "no-resumed+". Report
549 "no-resumed+" support.
550 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
551 return error if the client doesn't support no-resumed events.
552 (push_stop_notification): New function.
553 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
554 events if the client supports them.
556 2015-11-30 Pedro Alves <palves@redhat.com>
558 * linux-low.c (thread_still_has_status_pending_p): Don't check
560 (lwp_resumed): New function.
561 (status_pending_p_callback): Return early if the LWP is not
562 supposed to be resumed.
564 2015-11-30 Pedro Alves <palves@redhat.com>
566 * linux-low.c (handle_extended_wait): Assert that the LWP's
567 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
568 thread create events, leave the new child's status pending.
569 (linux_low_filter_event): If GDB wants to hear about thread exit
570 events, leave the LWP marked dead and don't delete it.
571 (linux_wait_for_event_filtered): Don't check for thread exit.
572 (filter_exit_event): New function.
573 (linux_wait_1): Use it, when returning an exit event.
574 (linux_resume_one_lwp_throw): Assert that the LWP's
575 waitstatus is TARGET_WAITKIND_IGNORE.
576 * remote-utils.c (prepare_resume_reply): Handle
577 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
578 * server.c (report_thread_events): New global.
579 (handle_general_set): Handle QThreadEvents.
580 (handle_query) <qSupported>: Handle and report QThreadEvents+;
581 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
582 TARGET_WAITKIND_THREAD_EXITED.
583 * server.h (report_thread_events): Declare.
585 2015-11-30 Pedro Alves <palves@redhat.com>
587 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
588 the thread's last_resume_kind was resume_stop.
590 2015-11-30 Pedro Alves <palves@redhat.com>
592 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
595 2015-11-30 Pedro Alves <palves@redhat.com>
597 * server.c (handle_v_requests): Handle vCtrlC.
599 2015-11-30 Pedro Alves <palves@redhat.com>
601 * gdbthread.h (find_any_thread_of_pid): Declare.
602 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
604 * server.c (handle_query): If current_thread is NULL, look for
605 another thread of the selected process.
607 2015-11-26 Daniel Colascione <dancol@dancol.org>
608 Simon Marchi <simon.marchi@ericsson.com>
610 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
611 * server.c (handle_qxfer_threads_worker): Refactor to include thread
613 * target.h (struct target_ops) <thread_name>: New field.
614 (target_thread_name): New macro.
616 2015-11-23 Joel Brobecker <brobecker@adacore.com>
618 * regcache.h (regcache_invalidate_pid): Add declaration.
619 * regcache.c (regcache_invalidate_pid): New function, extracted
620 from regcache_invalidate.
621 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
622 Add trivial documentation comment.
623 * lynx-low.c: Use regcache_invalidate_pid instead of
626 2015-11-23 Joel Brobecker <brobecker@adacore.com>
628 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
629 and Elf64_auxv_t if the target is Android.
631 2015-11-22 Doug Evans <xdje42@gmail.com>
633 * target.h: #include <sys/types.h>.
635 2015-11-19 Pedro Alves <palves@redhat.com>
637 * linux-low.c (linux_process_qsupported): Change prototype.
639 * linux-low.h (struct linux_target_ops) <process_qsupported>:
641 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
642 and adjust to loop over all features.
643 * server.c (handle_query) <qSupported>: Adjust to call
644 target_process_qsupported once, passing it a vector of unprocessed
646 * target.h (struct target_ops) <process_qsupported>: Change
648 (target_process_qsupported): Adjust.
650 2015-11-19 Pedro Alves <palves@redhat.com>
652 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
654 * configure: Regenerate.
656 2015-11-19 Pedro Alves <palves@redhat.com>
658 * configure: Regenerate.
660 2015-11-19 Yao Qi <yao.qi@linaro.org>
662 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
665 2015-11-19 Yao Qi <yao.qi@linaro.org>
667 * linux-aarch64-low.c (enum aarch64_operand_type): New.
668 (struct aarch64_operand): Move enum out.
670 2015-11-19 Yao Qi <yao.qi@linaro.org>
672 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
673 struct user_fpsimd_state *.
674 (aarch64_store_fpregset): Likewise.
676 2015-11-19 Yao Qi <yao.qi@linaro.org>
678 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
679 struct user_pt_regs *.
680 (aarch64_store_gregset): Likewise.
682 2015-11-18 Pedro Alves <palves@redhat.com>
684 * Makefile.in (all_object_files): Add $IPA_OBJS.
686 2015-11-17 Pedro Alves <palves@redhat.com>
688 * win32-low.c (win32_resume): Use gdb_signal_from_host,
689 GDB_SIGNAL_0 and gdb_signal_to_string.
691 2015-11-17 Pedro Alves <palves@redhat.com>
693 * win32-low.c (handle_output_debug_string): Remove parameter.
694 (win32_kill): Remove our_status local and adjust call to
695 handle_output_debug_string.
696 (get_child_debug_event): Adjust call to
697 handle_output_debug_string.
699 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
701 * linux-mips-low.c (mips_fill_gregset): Add cast.
702 (mips_store_gregset): Likewise.
703 (mips_fill_fpregset): Likewise.
704 (mips_store_fpregset): Likewise.
706 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
708 * linux-mips-low.c (mips_add_watchpoint): Rename private to
711 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
713 * linux-mips-low.c (mips_linux_new_thread): Change type of
714 watch_type to enum target_hw_bp_type.
716 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
718 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
719 Change return type to arm_hwbp_type.
721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
723 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
724 (arm_store_gregset): Likewise.
725 * linux-arm-low.c (arm_get_hwcap): Likewise.
726 (arm_read_description): Likewise.
728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
730 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
732 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
734 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
735 (ppc_fill_vsxregset): Likewise.
736 (ppc_store_vsxregset): Likewise.
737 (ppc_fill_vrregset): Likewise.
738 (ppc_store_vrregset): Likewise.
739 (ppc_fill_evrregset): Likewise.
740 (ppc_store_evrregset): Likewise.
742 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
744 * linux-ppc-low.c (ppc_usrregs_info): Remove
746 (ppc_arch_setup): Move lower in file.
748 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
750 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
751 (ps_pdwrite): Likewise.
753 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
755 * linux-arm-low.c (arm_new_thread): Move pointer dereference
756 to after assert checks.
758 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
760 * proc-service.c (ps_pdread): Add/adjust casts.
761 (ps_pdwrite): Add/adjust casts.
763 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
765 * server.c (handle_search_memory_1): Cast return value of
768 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
770 * server.c (write_qxfer_response): Change type of data to
773 2015-10-29 Pedro Alves <palves@redhat.com>
775 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
777 2015-10-29 Pedro Alves <palves@redhat.com>
779 * tracepoint.c (clear_installed_tracepoints): Add casts.
781 2015-10-29 Pedro Alves <palves@redhat.com>
783 * server.c (handle_v_cont, process_serial_event): Add enum
784 gdb_signal casts to signal parsing code.
786 2015-10-29 Pedro Alves <palves@redhat.com>
788 * linux-low.h (NULL_REGSET): Define.
789 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
790 * linux-arm-low.c (arm_regsets): Likewise.
791 * linux-crisv32-low.c (cris_regsets): Likewise.
792 * linux-m68k-low.c (m68k_regsets): Likewise.
793 * linux-mips-low.c (mips_regsets): Likewise.
794 * linux-nios2-low.c (nios2_regsets): Likewise.
795 * linux-ppc-low.c (ppc_regsets): Likewise.
796 * linux-s390-low.c (s390_regsets): Likewise.
797 * linux-sh-low.c (sh_regsets): Likewise.
798 * linux-sparc-low.c (sparc_regsets): Likewise.
799 * linux-tic6x-low.c (tic6x_regsets): Likewise.
800 * linux-tile-low.c (tile_regsets): Likewise.
801 * linux-x86-low.c (x86_regsets): Likewise.
802 * linux-xtensa-low.c (xtensa_regsets): Likewise.
804 2015-10-29 Pedro Alves <palves@redhat.com>
806 * linux-low.h (NULL_REGSET): Define.
807 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
808 * linux-arm-low.c (arm_regsets): Likewise.
809 * linux-crisv32-low.c (cris_regsets): Likewise.
810 * linux-m68k-low.c (m68k_regsets): Likewise.
811 * linux-mips-low.c (mips_regsets): Likewise.
812 * linux-nios2-low.c (nios2_regsets): Likewise.
813 * linux-ppc-low.c (ppc_regsets): Likewise.
814 * linux-s390-low.c (s390_regsets): Likewise.
815 * linux-sh-low.c (sh_regsets): Likewise.
816 * linux-sparc-low.c (sparc_regsets): Likewise.
817 * linux-tic6x-low.c (tic6x_regsets): Likewise.
818 * linux-tile-low.c (tile_regsets): Likewise.
819 * linux-x86-low.c (x86_regsets): Likewise.
820 * linux-xtensa-low.c (xtensa_regsets): Likewise.
822 2015-10-26 Doug Evans <dje@google.com>
824 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
826 2015-10-26 Doug Evans <dje@google.com>
828 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
830 2015-10-26 Doug Evans <dje@google.com>
832 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
834 (attach_thread, find_new_threads_callback): Ditto.
836 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
838 * mem-break.h (set_breakpoint_data): Remove.
840 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
842 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
843 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
844 (initialize_low): Remove set_breakpoint_data call.
845 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
846 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
847 (initialize_low): Remove set_breakpoint_data call.
848 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
849 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
850 (initialize_low): Remove set_breakpoint_data call.
852 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
854 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
855 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
856 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
857 * target.h (target_breakpoint_kind_from_pc): New macro.
859 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
861 * linux-low.c (default_breakpoint_kind_from_pc): New function.
862 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
863 the default breakpoint kind.
865 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
867 * linux-arm-low.c (arm_supports_z_point_type): Add software
870 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
872 * linux-arm-low.c: Refactor breakpoint definitions.
873 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
874 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
876 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
878 * Makefile.in: Add arm.c/o.
879 * configure.srv: Likewise.
880 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
881 (arm_breakpoint_kind_from_pc): New function.
882 (arm_sw_breakpoint_from_kind): Return proper kind.
883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
885 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
887 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
889 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
890 (struct raw_breakpoint) <size>: Remove.
891 (struct raw_breakpoint) <kind>: Add.
892 (bp_size): New function.
893 (bp_opcode): Likewise.
894 (find_raw_breakpoint_at): Adjust for kind.
895 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
896 (remove_memory_breakpoint): Adjust for kind call bp_size.
897 (set_raw_breakpoint_at): Adjust for kind.
898 (set_breakpoint): Likewise.
899 (set_breakpoint_at): Call breakpoint_kind_from_pc.
900 (delete_raw_breakpoint): Adjust for kind.
901 (delete_breakpoint): Likewise.
902 (find_gdb_breakpoint): Likewise.
903 (set_gdb_breakpoint_1): Likewise.
904 (set_gdb_breakpoint): Likewise.
905 (delete_gdb_breakpoint_1): Likewise.
906 (delete_gdb_breakpoint): Likewise.
907 (uninsert_raw_breakpoint): Likewise.
908 (reinsert_raw_breakpoint): Likewise.
909 (set_breakpoint_data): Remove.
910 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
911 (check_mem_read): Adjust for kind call bp_size.
912 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
913 (clone_one_breakpoint): Adjust for kind.
914 * mem-break.h (set_gdb_breakpoint): Likewise.
915 (delete_gdb_breakpoint): Likewise.
916 * server.c (process_serial_event): Likewise.
918 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
920 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
921 (struct linux_target_ops) <breakpoint>: Remove.
922 (struct linux_target_ops) <breakpoint_len>: Remove.
923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
925 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
926 (arm_sw_breakpoint_from_kind): New function.
927 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
928 (struct linux_target_ops) <breakpoint>: Remove.
929 (struct linux_target_ops) <breakpoint_len>: Remove.
930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
932 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
933 (struct linux_target_ops) <breakpoint>: Remove.
934 (struct linux_target_ops) <breakpoint_len>: Remove.
935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
937 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
938 (struct linux_target_ops) <breakpoint>: Remove.
939 (struct linux_target_ops) <breakpoint_len>: Remove.
940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
942 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
943 and sw_breakpoint_from_kind to increment the pc.
944 (linux_breakpoint_kind_from_pc): New function.
945 (linux_sw_breakpoint_from_kind): New function.
946 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
947 (initialize_low): Call breakpoint_kind_from_pc and
948 sw_breakpoint_from_kind to replace breakpoint_data/len.
949 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
952 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
953 (struct linux_target_ops) <breakpoint>: Remove.
954 (struct linux_target_ops) <breakpoint_len>: Remove.
955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
957 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
958 (struct linux_target_ops) <breakpoint>: Remove.
959 (struct linux_target_ops) <breakpoint_len>: Remove.
960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
962 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
963 (struct linux_target_ops) <breakpoint>: Remove.
964 (struct linux_target_ops) <breakpoint_len>: Remove.
965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
967 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
968 (struct linux_target_ops) <breakpoint>: Remove.
969 (struct linux_target_ops) <breakpoint_len>: Remove.
970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
972 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
973 (struct linux_target_ops) <breakpoint>: Remove.
974 (struct linux_target_ops) <breakpoint_len>: Remove.
975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
976 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
977 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
978 (struct linux_target_ops) <breakpoint>: Remove.
979 (struct linux_target_ops) <breakpoint_len>: Remove.
980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
982 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
983 (struct linux_target_ops) <breakpoint>: Remove.
984 (struct linux_target_ops) <breakpoint_len>: Remove.
985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
987 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
988 (struct linux_target_ops) <breakpoint>: Remove.
989 (struct linux_target_ops) <breakpoint_len>: Remove.
990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
992 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
993 (struct linux_target_ops) <breakpoint>: Remove.
994 (struct linux_target_ops) <breakpoint_len>: Remove.
995 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
996 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
997 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
998 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
999 (struct linux_target_ops) <breakpoint>: Remove.
1000 (struct linux_target_ops) <breakpoint_len>: Remove.
1001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1003 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1004 (struct linux_target_ops) <breakpoint>: Remove.
1005 (struct linux_target_ops) <breakpoint_len>: Remove.
1006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1009 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1011 * linux-cris-low.c (cris_get_pc): Remove void arg.
1013 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1015 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1018 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1020 * inferiors.c (thread_pid_matches_callback): New function.
1021 (find_thread_process): New function.
1022 (remove_thread): Reset current_thread.
1023 (remove_process): Assert threads have been removed first.
1025 2015-10-15 Yao Qi <yao.qi@linaro.org>
1027 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1029 (aarch64_remove_point): Likewise.
1030 * regcache.c (regcache_register_size): New function.
1032 2015-10-12 Yao Qi <yao.qi@linaro.org>
1034 * linux-aarch64-low.c: Update all callers as emit_load_store
1035 is renamed to aarch64_emit_load_store.
1037 2015-10-12 Yao Qi <yao.qi@linaro.org>
1039 * linux-aarch64-low.c: Update all callers of function renaming
1040 from emit_insn to aarch64_emit_insn.
1042 2015-10-12 Yao Qi <yao.qi@linaro.org>
1044 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1045 arch/aarch64-insn.h.
1046 (struct aarch64_memory_operand): Likewise.
1048 (emit_insn): Move to arch/aarch64-insn.c.
1049 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1050 (emit_load_store): Move to arch/aarch64-insn.c.
1051 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1052 (can_encode_int32): Remove.
1054 2015-10-12 Yao Qi <yao.qi@linaro.org>
1056 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1057 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1058 (aarch64_relocate_instruction): Likewise.
1059 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1060 (struct aarch64_insn_visitor): Likewise.
1062 2015-10-12 Yao Qi <yao.qi@linaro.org>
1064 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1065 (struct aarch64_insn_visitor): New.
1066 (struct aarch64_insn_relocation_data): New.
1067 (aarch64_ftrace_insn_reloc_b): New function.
1068 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1069 (aarch64_ftrace_insn_reloc_cb): Likewise.
1070 (aarch64_ftrace_insn_reloc_tb): Likewise.
1071 (aarch64_ftrace_insn_reloc_adr): Likewise.
1072 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1073 (aarch64_ftrace_insn_reloc_others): Likewise.
1075 (aarch64_relocate_instruction): Use visitor.
1077 2015-10-12 Yao Qi <yao.qi@linaro.org>
1079 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1080 int. Add argument buf.
1081 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1082 aarch64_relocate_instruction.
1084 2015-10-12 Yao Qi <yao.qi@linaro.org>
1086 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1087 argument insn. Remove local variable insn. Don't call
1089 (aarch64_install_fast_tracepoint_jump_pad): Call
1092 2015-09-30 Yao Qi <yao.qi@linaro.org>
1094 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1095 (emit_load_store_pair): Likewise.
1097 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1099 * dll.c (match_dll): Add cast(s).
1100 (unloaded_dll): Likewise.
1101 * linux-low.c (second_thread_of_pid_p): Likewise.
1102 (delete_lwp_callback): Likewise.
1103 (count_events_callback): Likewise.
1104 (select_event_lwp_callback): Likewise.
1105 (linux_set_resume_request): Likewise.
1106 * server.c (accumulate_file_name_length): Likewise.
1107 (emit_dll_description): Likewise.
1108 (handle_qxfer_threads_worker): Likewise.
1109 (visit_actioned_threads): Likewise.
1110 * thread-db.c (any_thread_of): Likewise.
1111 * tracepoint.c (same_process_p): Likewise.
1112 (match_blocktype): Likewise.
1113 (build_traceframe_info_xml): Likewise.
1115 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1117 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1119 (gdb_unparse_agent_expr): Likewise.
1120 * hostio.c (require_data): Likewise.
1121 (handle_pread): Likewise.
1122 * linux-low.c (disable_regset): Likewise.
1123 (fetch_register): Likewise.
1124 (store_register): Likewise.
1125 (get_dynamic): Likewise.
1126 (linux_qxfer_libraries_svr4): Likewise.
1127 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1128 (set_fast_tracepoint_jump): Likewise.
1129 (uninsert_fast_tracepoint_jumps_at): Likewise.
1130 (reinsert_fast_tracepoint_jumps_at): Likewise.
1131 (validate_inserted_breakpoint): Likewise.
1132 (clone_agent_expr): Likewise.
1133 * regcache.c (init_register_cache): Likewise.
1134 * remote-utils.c (putpkt_binary_1): Likewise.
1135 (decode_M_packet): Likewise.
1136 (decode_X_packet): Likewise.
1137 (look_up_one_symbol): Likewise.
1138 (relocate_instruction): Likewise.
1139 (monitor_output): Likewise.
1140 * server.c (handle_search_memory): Likewise.
1141 (handle_qxfer_exec_file): Likewise.
1142 (handle_qxfer_libraries): Likewise.
1143 (handle_qxfer): Likewise.
1144 (handle_query): Likewise.
1145 (handle_v_cont): Likewise.
1146 (handle_v_run): Likewise.
1147 (captured_main): Likewise.
1148 * target.c (write_inferior_memory): Likewise.
1149 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1150 * tracepoint.c (init_trace_buffer): Likewise.
1151 (add_tracepoint_action): Likewise.
1152 (add_traceframe): Likewise.
1153 (add_traceframe_block): Likewise.
1154 (cmd_qtdpsrc): Likewise.
1155 (cmd_qtdv): Likewise.
1156 (cmd_qtstatus): Likewise.
1157 (response_source): Likewise.
1158 (response_tsv): Likewise.
1159 (cmd_qtnotes): Likewise.
1160 (gdb_collect): Likewise.
1161 (initialize_tracepoint): Likewise.
1163 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1165 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1166 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1167 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1169 (enum aarch64_condition_codes): New enum.
1170 (w0): New static global.
1173 (struct aarch64_memory_operand) <type>: New
1174 MEMORY_OPERAND_POSTINDEX type.
1175 (postindex_memory_operand): New helper function.
1176 (emit_ret): New function.
1177 (emit_load_store_pair): New function, factored out of emit_stp
1178 with support for MEMORY_OPERAND_POSTINDEX.
1179 (emit_stp): Rewrite using emit_load_store_pair.
1180 (emit_ldp): New function.
1181 (emit_load_store): Likewise.
1182 (emit_ldr): Mention post-index instruction in comment.
1183 (emit_ldrh): New function.
1184 (emit_ldrb): New function.
1185 (emit_ldrsw): Mention post-index instruction in comment.
1186 (emit_str): Likewise.
1187 (emit_subs): New function.
1188 (emit_cmp): Likewise.
1189 (emit_and): Likewise.
1190 (emit_orr): Likewise.
1191 (emit_orn): Likewise.
1192 (emit_eor): Likewise.
1193 (emit_mvn): Likewise.
1194 (emit_lslv): Likewise.
1195 (emit_lsrv): Likewise.
1196 (emit_asrv): Likewise.
1197 (emit_mul): Likewise.
1198 (emit_sbfm): Likewise.
1199 (emit_sbfx): Likewise.
1200 (emit_ubfm): Likewise.
1201 (emit_ubfx): Likewise.
1202 (emit_csinc): Likewise.
1203 (emit_cset): Likewise.
1204 (emit_nop): Likewise.
1205 (emit_ops_insns): New helper function.
1206 (emit_pop): Likewise.
1207 (emit_push): Likewise.
1208 (aarch64_emit_prologue): New function.
1209 (aarch64_emit_epilogue): Likewise.
1210 (aarch64_emit_add): Likewise.
1211 (aarch64_emit_sub): Likewise.
1212 (aarch64_emit_mul): Likewise.
1213 (aarch64_emit_lsh): Likewise.
1214 (aarch64_emit_rsh_signed): Likewise.
1215 (aarch64_emit_rsh_unsigned): Likewise.
1216 (aarch64_emit_ext): Likewise.
1217 (aarch64_emit_log_not): Likewise.
1218 (aarch64_emit_bit_and): Likewise.
1219 (aarch64_emit_bit_or): Likewise.
1220 (aarch64_emit_bit_xor): Likewise.
1221 (aarch64_emit_bit_not): Likewise.
1222 (aarch64_emit_equal): Likewise.
1223 (aarch64_emit_less_signed): Likewise.
1224 (aarch64_emit_less_unsigned): Likewise.
1225 (aarch64_emit_ref): Likewise.
1226 (aarch64_emit_if_goto): Likewise.
1227 (aarch64_emit_goto): Likewise.
1228 (aarch64_write_goto_address): Likewise.
1229 (aarch64_emit_const): Likewise.
1230 (aarch64_emit_call): Likewise.
1231 (aarch64_emit_reg): Likewise.
1232 (aarch64_emit_pop): Likewise.
1233 (aarch64_emit_stack_flush): Likewise.
1234 (aarch64_emit_zero_ext): Likewise.
1235 (aarch64_emit_swap): Likewise.
1236 (aarch64_emit_stack_adjust): Likewise.
1237 (aarch64_emit_int_call_1): Likewise.
1238 (aarch64_emit_void_call_2): Likewise.
1239 (aarch64_emit_eq_goto): Likewise.
1240 (aarch64_emit_ne_goto): Likewise.
1241 (aarch64_emit_lt_goto): Likewise.
1242 (aarch64_emit_le_goto): Likewise.
1243 (aarch64_emit_gt_goto): Likewise.
1244 (aarch64_emit_ge_got): Likewise.
1245 (aarch64_emit_ops_impl): New static global variable.
1246 (aarch64_emit_ops): New target function, return
1247 &aarch64_emit_ops_impl.
1248 (struct linux_target_ops): Install it.
1250 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1252 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1253 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1255 * linux-aarch64-ipa.c: New file.
1256 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1258 (aarch64_get_thread_area): New target method.
1259 (extract_signed_bitfield): New helper function.
1260 (aarch64_decode_ldr_literal): New function.
1261 (enum aarch64_opcodes): New enum.
1262 (struct aarch64_register): New struct.
1263 (struct aarch64_operand): New struct.
1264 (x0): New static global.
1273 (aarch64_register): New helper function.
1274 (register_operand): Likewise.
1275 (immediate_operand): Likewise.
1276 (struct aarch64_memory_operand): New struct.
1277 (offset_memory_operand): New helper function.
1278 (preindex_memory_operand): Likewise.
1279 (enum aarch64_system_control_registers): New enum.
1280 (ENCODE): New macro.
1281 (emit_insn): New helper function.
1282 (emit_b): New function.
1283 (emit_bcond): Likewise.
1284 (emit_cb): Likewise.
1285 (emit_tb): Likewise.
1286 (emit_blr): Likewise.
1287 (emit_stp): Likewise.
1288 (emit_ldp_q_offset): Likewise.
1289 (emit_stp_q_offset): Likewise.
1290 (emit_load_store): Likewise.
1291 (emit_ldr): Likewise.
1292 (emit_ldrsw): Likewise.
1293 (emit_str): Likewise.
1294 (emit_ldaxr): Likewise.
1295 (emit_stxr): Likewise.
1296 (emit_stlr): Likewise.
1297 (emit_data_processing_reg): Likewise.
1298 (emit_data_processing): Likewise.
1299 (emit_add): Likewise.
1300 (emit_sub): Likewise.
1301 (emit_mov): Likewise.
1302 (emit_movk): Likewise.
1303 (emit_mov_addr): Likewise.
1304 (emit_mrs): Likewise.
1305 (emit_msr): Likewise.
1306 (emit_sevl): Likewise.
1307 (emit_wfe): Likewise.
1308 (append_insns): Likewise.
1309 (can_encode_int32_in): New helper function.
1310 (aarch64_relocate_instruction): New function.
1311 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1312 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1313 (struct linux_target_ops): Install aarch64_get_thread_area,
1314 aarch64_install_fast_tracepoint_jump_pad and
1315 aarch64_get_min_fast_tracepoint_insn_len.
1317 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1319 * Makefile.in (aarch64-insn.o): New rule.
1320 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1322 2015-09-21 Yao Qi <yao.qi@linaro.org>
1324 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1326 2015-09-21 Yao Qi <yao.qi@linaro.org>
1328 * tracepoint.c (max_jump_pad_size): Remove.
1330 2015-09-18 Yao Qi <yao.qi@linaro.org>
1332 * linux-aarch64-low.c: Don't include sys/uio.h.
1333 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1335 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1337 * tracepoint.c (eval_result_type): Change prototype.
1338 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1340 2015-09-15 Pedro Alves <palves@redhat.com>
1342 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1343 Check whether to report exec events instead of checking whether
1344 multiprocess is enabled.
1346 2015-09-15 Pedro Alves <palves@redhat.com>
1349 * remote-utils.c (prepare_resume_reply): Merge
1350 TARGET_WAITKIND_VFORK_DONE switch case with the
1351 TARGET_WAITKIND_FORKED case.
1353 2015-09-15 Yao Qi <yao.qi@linaro.org>
1355 * server.c (handle_query): Check string comparison using
1356 "else if" instead of "if".
1358 2015-09-15 Yao Qi <yao.qi@linaro.org>
1360 * server.c (vCont_supported): New global variable.
1361 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1362 matches. Append ";vContSupported+" to own_buf.
1363 (handle_v_requests): Append ";s;S" to own_buf if target supports
1364 hardware single step or vCont_supported is false.
1365 (capture_main): Set vCont_supported to zero.
1367 2015-09-15 Yao Qi <yao.qi@linaro.org>
1369 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1371 (linux_supports_hardware_single_step): ... New function.
1372 (linux_target_ops): Update.
1373 * lynx-low.c (lynx_target_ops): Set field
1374 supports_hardware_single_step to target_can_do_hardware_single_step.
1375 * nto-low.c (nto_target_ops): Likewise.
1376 * spu-low.c (spu_target_ops): Likewise.
1377 * win32-low.c (win32_target_ops): Likewise.
1378 * target.c (target_can_do_hardware_single_step): New function.
1379 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1380 Remove. <supports_hardware_single_step>: New field.
1381 (target_supports_conditional_breakpoints): Remove.
1382 (target_supports_hardware_single_step): New macro.
1383 (target_can_do_hardware_single_step): Declare.
1384 * server.c (handle_query): Use target_supports_hardware_single_step
1385 instead of target_supports_conditional_breakpoints.
1387 2015-09-15 Yao Qi <yao.qi@linaro.org>
1389 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1391 (struct linux_target_ops the_low_target): Install
1392 aarch64_linux_siginfo_fixup.
1394 2015-09-11 Don Breazeal <donb@codesourcery.com>
1395 Luis Machado <lgustavo@codesourcery.com>
1397 * linux-low.c (linux_mourn): Static declaration.
1398 (linux_arch_setup): Move in front of
1399 handle_extended_wait.
1400 (linux_arch_setup_thread): New function.
1401 (handle_extended_wait): Handle exec events. Call
1402 linux_arch_setup_thread. Make event_lwp argument a
1403 pointer-to-a-pointer.
1404 (check_zombie_leaders): Do not check stopped threads.
1405 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1406 (linux_low_filter_event): Add lwp and thread for exec'ing
1407 non-leader thread if leader thread has been deleted.
1408 Refactor code into linux_arch_setup_thread and call it.
1409 Pass child lwp pointer by reference to handle_extended_wait.
1410 (linux_wait_for_event_filtered): Update comment.
1411 (linux_wait_1): Prevent clobbering exec event status.
1412 (linux_supports_exec_events): New function.
1413 (linux_target_ops) <supports_exec_events>: Initialize new member.
1414 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1416 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1417 * server.c (report_exec_events): New global variable.
1418 (handle_query): Handle qSupported query for exec-events feature.
1419 (captured_main): Initialize report_exec_events.
1420 * server.h (report_exec_events): Declare new global variable.
1421 * target.h (struct target_ops) <supports_exec_events>: New
1423 (target_supports_exec_events): New macro.
1424 * win32-low.c (win32_target_ops) <supports_exec_events>:
1425 Initialize new member.
1427 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1429 * linux-low.c (linux_low_enable_btrace): Remove.
1430 (linux_target_ops): Replace linux_low_enable_btrace with
1431 linux_enable_btrace.
1433 2015-09-03 Yao Qi <yao.qi@linaro.org>
1435 * linux-aarch64-low.c (aarch64_insert_point): Call
1436 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1439 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1441 * linux-low.c (check_stopped_by_breakpoint): Use
1442 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1444 2015-08-27 Pedro Alves <palves@redhat.com>
1446 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1448 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1450 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1451 the XNEW-family equivalent.
1452 (compile_bytecodes): Likewise.
1453 * dll.c (loaded_dll): Likewise.
1454 * event-loop.c (append_callback_event): Likewise.
1455 (create_file_handler): Likewise.
1456 (create_file_event): Likewise.
1457 * hostio.c (handle_open): Likewise.
1458 * inferiors.c (add_thread): Likewise.
1459 (add_process): Likewise.
1460 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1461 * linux-arm-low.c (arm_new_process): Likewise.
1462 (arm_new_thread): Likewise.
1463 * linux-low.c (add_to_pid_list): Likewise.
1464 (linux_add_process): Likewise.
1465 (handle_extended_wait): Likewise.
1466 (add_lwp): Likewise.
1467 (enqueue_one_deferred_signal): Likewise.
1468 (enqueue_pending_signal): Likewise.
1469 (linux_resume_one_lwp_throw): Likewise.
1470 (linux_resume_one_thread): Likewise.
1471 (linux_read_memory): Likewise.
1472 (linux_write_memory): Likewise.
1473 * linux-mips-low.c (mips_linux_new_process): Likewise.
1474 (mips_linux_new_thread): Likewise.
1475 (mips_add_watchpoint): Likewise.
1476 * linux-x86-low.c (initialize_low_arch): Likewise.
1477 * lynx-low.c (lynx_add_process): Likewise.
1478 * mem-break.c (set_raw_breakpoint_at): Likewise.
1479 (set_breakpoint): Likewise.
1480 (add_condition_to_breakpoint): Likewise.
1481 (add_commands_to_breakpoint): Likewise.
1482 (clone_agent_expr): Likewise.
1483 (clone_one_breakpoint): Likewise.
1484 * regcache.c (new_register_cache): Likewise.
1485 * remote-utils.c (look_up_one_symbol): Likewise.
1486 * server.c (queue_stop_reply): Likewise.
1487 (start_inferior): Likewise.
1488 (queue_stop_reply_callback): Likewise.
1489 (handle_target_event): Likewise.
1490 * spu-low.c (fetch_ppc_memory): Likewise.
1491 (store_ppc_memory): Likewise.
1492 * target.c (set_target_ops): Likewise.
1493 * thread-db.c (thread_db_load_search): Likewise.
1494 (try_thread_db_load_1): Likewise.
1495 * tracepoint.c (add_tracepoint): Likewise.
1496 (add_tracepoint_action): Likewise.
1497 (create_trace_state_variable): Likewise.
1498 (cmd_qtdpsrc): Likewise.
1499 (cmd_qtro): Likewise.
1500 (add_while_stepping_state): Likewise.
1501 * win32-low.c (child_add_thread): Likewise.
1502 (get_image_name): Likewise.
1504 2015-08-25 Yao Qi <yao.qi@linaro.org>
1506 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1508 2015-08-25 Yao Qi <yao.qi@linaro.org>
1510 * Makefile.in (aarch64-linux.o): New rule.
1511 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1513 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1514 (aarch64_init_debug_reg_state): Make it extern.
1515 (aarch64_linux_prepare_to_resume): Remove.
1517 2015-08-25 Yao Qi <yao.qi@linaro.org>
1519 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1520 lwp_arch_private_info and ptid_of_lwp.
1522 2015-08-25 Yao Qi <yao.qi@linaro.org>
1524 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1525 Find proc_info by find_process_pid. All callers updated.
1527 2015-08-25 Yao Qi <yao.qi@linaro.org>
1529 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1531 (debug_reg_change_callback): Remove.
1532 (aarch64_notify_debug_reg_change): Remove.
1534 2015-08-25 Yao Qi <yao.qi@linaro.org>
1536 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1537 Call current_lwp_ptid.
1539 2015-08-25 Yao Qi <yao.qi@linaro.org>
1541 * linux-aarch64-low.c (debug_reg_change_callback): Use
1544 2015-08-25 Yao Qi <yao.qi@linaro.org>
1546 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1548 2015-08-25 Yao Qi <yao.qi@linaro.org>
1550 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1552 2015-08-25 Yao Qi <yao.qi@linaro.org>
1554 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1557 2015-08-25 Yao Qi <yao.qi@linaro.org>
1559 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1561 (debug_reg_change_callback): Remove argument entry and add argument
1562 lwp. Remove local variable thread. Don't print thread id in the
1563 debugging output. Don't check whether pid of thread equals to pid.
1564 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1565 iterate_over_lwps instead find_inferior.
1567 2015-08-24 Pedro Alves <palves@redhat.com>
1569 * inferiors.c (get_first_process): New function.
1570 * inferiors.h (get_first_process): New declaration.
1571 * remote-utils.c (read_ptid): Default to the first process in the
1572 list, instead of to the current thread's process.
1574 2015-08-24 Pedro Alves <palves@redhat.com>
1576 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1577 * event-loop.c: Likewise.
1578 * remote-utils.c: Likewise.
1579 * tracepoint.c: Likewise.
1581 2015-08-24 Pedro Alves <palves@redhat.com>
1583 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1586 2015-08-21 Pedro Alves <palves@redhat.com>
1588 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1589 instead of literal 1.
1591 2015-08-21 Pedro Alves <palves@redhat.com>
1593 * tdesc.c (default_description): Explicitly zero-initialize.
1595 2015-08-21 Pedro Alves <palves@redhat.com>
1598 * inferiors.c (remove_thread): Discard any pending stop reply for
1600 * server.c (remove_all_on_match_pid): Rename to ...
1601 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1603 (discard_queued_stop_replies): Change parameter to a ptid. Now
1605 (handle_v_kill, kill_inferior_callback, captured_main)
1606 (process_serial_event): Adjust.
1607 * server.h (discard_queued_stop_replies): Declare.
1609 2015-08-21 Pedro Alves <palves@redhat.com>
1611 * linux-low.c (wait_for_sigstop): Always switch to no thread
1612 selected if the previously current thread dies.
1613 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1614 process instead of the current thread's.
1615 * remote-utils.c (input_interrupt): Don't check if there's no
1617 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1618 current thread to the general thread fails, error out.
1619 (handle_qxfer_auxv, handle_qxfer_libraries)
1620 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1621 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1622 (handle_query): Check if there's a thread selected instead of
1623 checking whether there's any thread in the thread list.
1624 (handle_qxfer_threads, handle_qxfer_btrace)
1625 (handle_qxfer_btrace_conf): Don't error out early if there's no
1626 thread in the thread list.
1627 (handle_v_cont, myresume): Don't set the current thread to the
1629 (process_serial_event) <Hg handling>: Also set thread_id if the
1630 previous general thread is still alive.
1631 (process_serial_event) <g/G handling>: If setting the current
1632 thread to the general thread fails, error out.
1633 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1634 thread's lwp instead of the current thread's.
1635 * target.c (set_desired_thread): If the desired thread was not
1636 found, leave the current thread pointing to NULL. Return an int
1637 (boolean) indicating success.
1638 * target.h (set_desired_thread): Change return type to int.
1640 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1642 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1643 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1645 (ps_get_thread_area): New function.
1647 2015-08-19 Gary Benson <gbenson@redhat.com>
1649 * hostio.c (handle_pread): Do not attempt to read more data
1650 than hostio_reply_with_data can fit in a packet.
1652 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1654 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1656 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1658 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1660 2015-08-06 Pedro Alves <palves@redhat.com>
1662 * tracepoint.c (expr_eval_result): Now an int.
1664 2015-08-06 Pedro Alves <palves@redhat.com>
1666 * gdbthread.h (struct regcache): Forward declare.
1667 (struct thread_info) <regcache_data>: Now a struct regcache
1669 * inferiors.c (inferior_regcache_data)
1670 (set_inferior_regcache_data): Now work with struct regcache
1672 * inferiors.h (struct regcache): Forward declare.
1673 (inferior_regcache_data, set_inferior_regcache_data): Now work
1674 with struct regcache pointers.
1675 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1676 (free_register_cache_thread): Remove struct regcache pointer
1679 2015-08-06 Pedro Alves <palves@redhat.com>
1681 * server.c (captured_main): On error, print the exception message
1682 to stderr, and if run_once is set, throw a quit.
1684 2015-08-06 Pedro Alves <palves@redhat.com>
1686 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1689 2015-08-06 Pedro Alves <palves@redhat.com>
1691 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1692 reading beyond the passed in buffer length.
1694 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1696 * tracepoint.c (symbol_list) <required>: Remove.
1698 2015-08-06 Pedro Alves <palves@redhat.com>
1700 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1701 count if stopping and suspending threads.
1702 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1703 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1704 (linux_detach): Complete an ongoing step-over.
1705 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1707 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1708 (linux_wait_1): If passing a signal to the inferior after
1709 finishing a step-over, unsuspend and re-resume all lwps. If we
1710 see a single-step event but the thread should be continuing, don't
1711 pass the trap to gdb.
1712 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1713 internal_error instead of gdb_assert.
1714 (enqueue_pending_signal): New function.
1715 (check_ptrace_stopped_lwp_gone): Add debug output.
1716 (start_step_over): Use internal_error instead of gdb_assert.
1717 (complete_ongoing_step_over): New function.
1718 (linux_resume_one_thread): Don't resume a suspended thread.
1719 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1722 2015-08-06 Pedro Alves <palves@redhat.com>
1724 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1725 (linux_thread_alive): Use lwp_is_marked_dead.
1726 (extended_event_reported): Delete.
1727 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1728 instead of extended_event_reported.
1729 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1731 (lwp_is_marked_dead): New function.
1732 (lwp_running): Use lwp_is_marked_dead.
1733 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1736 2015-08-06 Pedro Alves <palves@redhat.com>
1738 * linux-low.c (linux_wait_1): Move fork event output out of the
1739 !report_to_gdb check. Pass event_child->waitstatus to
1740 target_waitstatus_to_string instead of ourstatus.
1742 2015-08-04 Yao Qi <yao.qi@linaro.org>
1744 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1745 if current_thread is 32 bit.
1747 2015-08-04 Yao Qi <yao.qi@linaro.org>
1749 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1750 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1751 * server.c (extended_protocol): Remove "static".
1752 * server.h (extended_protocol): Declare it.
1754 2015-08-04 Yao Qi <yao.qi@linaro.org>
1756 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1757 both aarch64 and aarch32.
1758 (aarch64_set_pc): Likewise.
1760 2015-08-04 Yao Qi <yao.qi@linaro.org>
1762 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1763 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1764 arm-with-neon.xml to srv_xmlfiles.
1765 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1766 (is_64bit_tdesc): New function.
1767 (aarch64_linux_read_description): New function.
1768 (aarch64_arch_setup): Call aarch64_linux_read_description.
1769 (regs_info): Rename to regs_info_aarch64.
1770 (aarch64_regs_info): Return right regs_info.
1771 (initialize_low_arch): Call initialize_low_arch_aarch32.
1773 2015-08-04 Yao Qi <yao.qi@linaro.org>
1775 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1776 * linux-aarch32-low.c: New file.
1777 * linux-aarch32-low.h: New file.
1778 * linux-arm-low.c (arm_fill_gregset): Move it to
1779 linux-aarch32-low.c.
1780 (arm_store_gregset): Likewise.
1781 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1782 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1783 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1784 (regs_info): Rename to regs_info_arm.
1785 (arm_regs_info): Return regs_info_aarch32 if
1786 have_ptrace_getregset is 1 and target description is
1787 arm_with_neon or arm_with_vfpv3.
1788 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1789 Call initialize_low_arch_aarch32 instead.
1791 2015-08-04 Yao Qi <yao.qi@linaro.org>
1793 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1794 * linux-low.c: ... here.
1795 * linux-low.h (have_ptrace_getregset): Declare it.
1797 2015-08-04 Pedro Alves <palves@redhat.com>
1799 * thread-db.c (struct thread_db): Use new typedefs.
1800 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1802 (disable_thread_event_reporting): Cast result of dlsym to
1803 destination function pointer type.
1804 (thread_db_mourn): Use td_ta_delete_ftype.
1806 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1808 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1810 (CDX_BREAKPOINT): Define for R2.
1811 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1812 (the_low_target): Add comments.
1814 2015-07-30 Yao Qi <yao.qi@linaro.org>
1816 * linux-arm-low.c (arm_hwcap): Remove it.
1817 (arm_read_description): New local variable arm_hwcap. Don't
1818 set arm_hwcap to zero.
1820 2015-07-30 Yao Qi <yao.qi@linaro.org>
1822 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1823 Use regcache->tdesc instead.
1824 (arm_store_wmmxregset): Likewise.
1825 (arm_fill_vfpregset): Likewise.
1826 (arm_store_vfpregset): Likewise.
1828 2015-07-30 Yao Qi <yao.qi@linaro.org>
1830 * linux-arm-low.c: Include arch/arm.h.
1831 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1832 (arm_store_gregset): Likewise.
1834 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1836 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1837 ptrace's 4th parameter.
1839 2015-07-27 Yao Qi <yao.qi@linaro.org>
1841 * configure.srv (case aarch64*-*-linux*): Don't set
1844 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1846 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1848 * linux-arm-low.c: Likewise.
1849 * linux-cris-low.c: Likewise.
1850 * linux-crisv32-low.c: Likewise.
1851 * linux-low.c: Likewise.
1852 * linux-m68k-low.c: Likewise.
1853 * linux-mips-low.c: Likewise.
1854 * linux-nios2-low.c: Likewise.
1855 * linux-s390-low.c: Likewise.
1856 * linux-sparc-low.c: Likewise.
1857 * linux-tic6x-low.c: Likewise.
1858 * linux-tile-low.c: Likewise.
1859 * linux-x86-low.c: Likewise.
1861 2015-07-24 Pedro Alves <palves@redhat.com>
1863 * config.in: Regenerate.
1864 * configure: Regenerate.
1866 2015-07-24 Pedro Alves <palves@redhat.com>
1868 * acinclude.m4: Include ../ptrace.m4.
1869 * configure.ac: Call GDB_AC_PTRACE.
1870 * config.in, configure: Regenerate.
1872 2015-07-24 Yao Qi <yao.qi@linaro.org>
1874 * linux-low.c (linux_create_inferior): Remove setting to
1875 proc->priv->new_inferior.
1876 (linux_attach): Likewise.
1877 (linux_low_filter_event): Likewise.
1878 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1880 2015-07-24 Yao Qi <yao.qi@linaro.org>
1882 * linux-low.c (linux_arch_setup): New function.
1883 (linux_low_filter_event): If proc->tdesc is NULL and
1884 proc->attached is true, call the_low_target.arch_setup.
1885 Otherwise, keep status pending, and return.
1886 (linux_resume_one_lwp_throw): Don't call get_pc if
1887 thread->while_stepping isn't NULL. Don't call
1888 get_thread_regcache if proc->tdesc is NULL.
1889 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1890 (linux_target_ops): Install arch_setup.
1891 * server.c (start_inferior): Call the_target->arch_setup.
1892 * target.h (struct target_ops) <arch_setup>: New field.
1893 (target_arch_setup): New marco.
1894 * lynx-low.c (lynx_target_ops): Update.
1895 * nto-low.c (nto_target_ops): Update.
1896 * spu-low.c (spu_target_ops): Update.
1897 * win32-low.c (win32_target_ops): Update.
1899 2015-07-24 Yao Qi <yao.qi@linaro.org>
1901 * linux-low.c (linux_add_process): Don't set
1902 proc->priv->new_inferior.
1903 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1904 (linux_attach): Likewise.
1906 2015-07-24 Yao Qi <yao.qi@linaro.org>
1908 * server.c (start_inferior): Code refactor.
1910 2015-07-24 Yao Qi <yao.qi@linaro.org>
1912 * server.c (process_serial_event): Set general_thread.
1914 2015-07-21 Yao Qi <yao.qi@linaro.org>
1916 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1917 aarch64_linux_get_debug_reg_capacity.
1919 2015-07-17 Yao Qi <yao.qi@linaro.org>
1921 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1922 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1923 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1924 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1925 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1926 (AARCH64_HWP_ALIGNMENT): Likewise.
1927 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1928 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1929 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1930 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1931 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1932 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1933 (struct aarch64_debug_reg_state): Likewise.
1934 (struct arch_lwp_info): Likewise.
1935 (aarch64_align_watchpoint): Likewise.
1936 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1937 (aarch64_watchpoint_length): Likewise.
1938 (aarch64_point_encode_ctrl_reg): Likewise
1939 (aarch64_point_is_aligned): Likewise.
1940 (aarch64_align_watchpoint): Likewise.
1941 (aarch64_linux_set_debug_regs):
1942 (aarch64_dr_state_insert_one_point): Likewise.
1943 (aarch64_dr_state_remove_one_point): Likewise.
1944 (aarch64_handle_breakpoint): Likewise.
1945 (aarch64_handle_aligned_watchpoint): Likewise.
1946 (aarch64_handle_unaligned_watchpoint): Likewise.
1947 (aarch64_handle_watchpoint): Likewise.
1949 2015-07-17 Yao Qi <yao.qi@linaro.org>
1951 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1952 and don't aarch64_get_debug_reg_state. All callers update.
1953 (aarch64_handle_aligned_watchpoint): Likewise.
1954 (aarch64_handle_unaligned_watchpoint): Likewise.
1955 (aarch64_handle_watchpoint): Likewise.
1956 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1957 (aarch64_remove_point): Likewise.
1959 2015-07-17 Yao Qi <yao.qi@linaro.org>
1961 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1963 (aarch64_handle_unaligned_watchpoint): Likewise.
1965 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1967 Revert the previous 3 commits:
1968 Move gdb_regex* to common/
1969 Move linux_find_memory_regions_full & co.
1970 gdbserver build-id attribute generator
1972 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1973 Jan Kratochvil <jan.kratochvil@redhat.com>
1975 gdbserver build-id attribute generator.
1976 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1977 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1978 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1980 (get_dynamic): Use find_pdhr to traverse program headers.
1981 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1982 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1983 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1984 (get_hex_build_id): New.
1985 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1986 to reply XML document.
1988 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1989 Jan Kratochvil <jan.kratochvil@redhat.com>
1991 * target.c: Include target/target-utils.h and fcntl.h.
1992 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1993 (target_fileio_read_stralloc): New functions.
1995 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1997 * Makefile.in (OBS): Add gdb_regex.o.
1999 * config.in: Rebuilt.
2000 * configure: Rebuilt.
2002 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2003 Jan Kratochvil <jan.kratochvil@redhat.com>
2005 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2006 * Makefile.in (OBS): Add target-utils.o.
2007 (linux-maps.o, target-utils.o): New.
2008 * configure.srv (srv_linux_obj): Add linux-maps.o.
2010 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2012 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2014 (the_low_target): Install it.
2016 2015-07-14 Pedro Alves <palves@redhat.com>
2018 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2019 Instead, ignore ECHILD, and throw an error for other errnos.
2021 2015-07-10 Pedro Alves <palves@redhat.com>
2023 * event-loop.c (struct callback_event) <data>: Change type to
2024 gdb_client_data instance instead of gdb_client_data pointer.
2025 (append_callback_event): Adjust.
2027 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2029 * linux-aarch64-low.c: Add comments for each linux_target_ops
2030 method. Remove comments already covered in target_ops and
2031 linux_target_ops definitions.
2032 (the_low_target): Add comments for each unimplemented method.
2034 2015-07-09 Yao Qi <yao.qi@linaro.org>
2036 * linux-aarch64-low.c (aarch64_regmap): Remove.
2037 (aarch64_usrregs_info): Remove.
2038 (regs_info): Set field usrregs to NULL.
2040 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2042 * linux-low.c: Include "rsp-low.h"
2043 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2044 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2045 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2046 (handle_btrace_enable_pt): New.
2047 (handle_btrace_general_set): Support "pt".
2048 (handle_btrace_conf_general_set): Support "pt:size".
2050 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2052 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2055 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2057 * linux-aarch64-low.c: Remove comment about endianness.
2058 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2059 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2062 2015-06-24 Gary Benson <gbenson@redhat.com>
2064 * linux-i386-ipa.c (stdint.h): Do not include.
2065 * lynx-i386-low.c (stdint.h): Likewise.
2066 * lynx-ppc-low.c (stdint.h): Likewise.
2067 * mem-break.c (stdint.h): Likewise.
2068 * thread-db.c (stdint.h): Likewise.
2069 * tracepoint.c (stdint.h): Likewise.
2070 * win32-low.c (stdint.h): Likewise.
2072 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2074 * server.c (write_qxfer_response): Update call to
2075 remote_escape_output.
2077 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2078 Jan Kratochvil <jan.kratochvil@redhat.com>
2080 Merge multiple hex conversions.
2081 * gdbreplay.c (tohex): Rename to 'fromhex'.
2082 (logchar): Use fromhex.
2084 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2086 * server.c (handle_qxfer_libraries): Set `version' attribute for
2089 2015-06-10 Gary Benson <gbenson@redhat.com>
2091 * target.h (struct target_ops) <multifs_open>: New field.
2092 <multifs_unlink>: Likewise.
2093 <multifs_readlink>: Likewise.
2094 * linux-low.c (nat/linux-namespaces.h): New include.
2095 (linux_target_ops): Initialize the_target->multifs_open,
2096 the_target->multifs_unlink and the_target->multifs_readlink.
2097 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2098 * hostio.c (hostio_fs_pid): New static variable.
2099 (hostio_handle_new_gdb_connection): New function.
2100 (handle_setfs): Likewise.
2101 (handle_open): Use the_target->multifs_open as appropriate.
2102 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2103 (handle_readlink): Use the_target->multifs_readlink as
2105 (handle_vFile): Handle vFile:setfs packets.
2106 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2107 after target_handle_new_gdb_connection.
2109 2015-06-10 Gary Benson <gbenson@redhat.com>
2111 * configure.ac (AC_CHECK_FUNCS): Add setns.
2112 * config.in: Regenerate.
2113 * configure: Likewise.
2114 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2115 (linux-namespaces.o): New rule.
2116 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2118 2015-06-09 Gary Benson <gbenson@redhat.com>
2120 * hostio.c (handle_open): Process mode argument with
2121 fileio_to_host_mode.
2123 2015-06-01 Yao Qi <yao.qi@linaro.org>
2125 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2126 * linux-x86-low.c: Likewise.
2128 2015-05-28 Don Breazeal <donb@codesourcery.com>
2130 * linux-low.c (handle_extended_wait): Initialize
2131 thread_info.last_resume_kind for new fork children.
2133 2015-05-15 Pedro Alves <palves@redhat.com>
2135 * target.h (target_handle_new_gdb_connection): Rewrite using if
2136 wrapped in do/while.
2138 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2140 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2141 * configure, config.in: Regenerate.
2142 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2145 2015-05-12 Don Breazeal <donb@codesourcery.com>
2147 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2148 PTRACE_EVENT_VFORK_DONE.
2149 (linux_low_ptrace_options, extended_event_reported): Add vfork
2151 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2152 and "vforkdone" for RSP 'T' Stop Reply Packet.
2153 * server.h (report_vfork_events): Declare
2156 2015-05-12 Don Breazeal <donb@codesourcery.com>
2158 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2159 (the_low_target) <new_fork>: Initialize new member.
2160 * linux-arm-low.c (arm_new_fork): New function.
2161 (the_low_target) <new_fork>: Initialize new member.
2162 * linux-low.c (handle_extended_wait): Call new target function
2164 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2165 * linux-mips-low.c (mips_add_watchpoint): New function
2166 extracted from mips_insert_point.
2167 (the_low_target) <new_fork>: Initialize new member.
2168 (mips_linux_new_fork): New function.
2169 (mips_insert_point): Call mips_add_watchpoint.
2170 * linux-x86-low.c (x86_linux_new_fork): New function.
2171 (the_low_target) <new_fork>: Initialize new member.
2173 2015-05-12 Don Breazeal <donb@codesourcery.com>
2175 * linux-low.c (handle_extended_wait): Implement return value,
2176 rename argument 'event_child' to 'event_lwp', handle
2177 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2178 (linux_low_ptrace_options): New function.
2179 (linux_low_filter_event): Call linux_low_ptrace_options,
2180 use different argument fo linux_enable_event_reporting,
2181 use return value from handle_extended_wait.
2182 (extended_event_reported): New function.
2183 (linux_wait_1): Call extended_event_reported and set
2184 status to report fork events.
2185 (linux_write_memory): Add pid to debug message.
2186 (reset_lwp_ptrace_options_callback): New function.
2187 (linux_handle_new_gdb_connection): New function.
2188 (linux_target_ops): Initialize new structure member.
2189 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2190 * lynx-low.c: Initialize new structure member.
2191 * remote-utils.c (prepare_resume_reply): Implement stop reason
2192 "fork" for "T" stop message.
2193 * server.c (handle_query): Call handle_new_gdb_connection.
2194 * server.h (report_fork_events): Declare global flag.
2195 * target.h (struct target_ops) <handle_new_gdb_connection>:
2197 (target_handle_new_gdb_connection): New macro.
2198 * win32-low.c: Initialize new structure member.
2200 2015-05-12 Don Breazeal <donb@codesourcery.com>
2202 * mem-break.c (APPEND_TO_LIST): Define macro.
2203 (clone_agent_expr): New function.
2204 (clone_one_breakpoint): New function.
2205 (clone_all_breakpoints): New function.
2206 * mem-break.h: Declare new functions.
2208 2015-05-12 Don Breazeal <donb@codesourcery.com>
2210 * linux-low.c (linux_supports_fork_events): New function.
2211 (linux_supports_vfork_events): New function.
2212 (linux_target_ops): Initialize new structure members.
2213 (initialize_low): Call linux_check_ptrace_features.
2214 * lynx-low.c (lynx_target_ops): Initialize new structure
2216 * server.c (report_fork_events, report_vfork_events):
2218 (handle_query): Add new features to qSupported packet and
2220 (captured_main): Initialize new global variables.
2221 * target.h (struct target_ops) <supports_fork_events>:
2223 <supports_vfork_events>: New member.
2224 (target_supports_fork_events): New macro.
2225 (target_supports_vfork_events): New macro.
2226 * win32-low.c (win32_target_ops): Initialize new structure
2229 2015-05-12 Gary Benson <gbenson@redhat.com>
2231 * server.c (handle_qxfer_exec_file): Use current process
2234 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2236 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2237 Remove HAVE_PTRACE_GETREGS conditionals.
2238 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2239 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2241 2015-05-08 Yao Qi <yao.qi@linaro.org>
2243 * linux-low.c (linux_supports_conditional_breakpoints): New
2245 (linux_target_ops): Install new target method.
2246 * lynx-low.c (lynx_target_ops): Install NULL hook for
2247 supports_conditional_breakpoints.
2248 * nto-low.c (nto_target_ops): Likewise.
2249 * spu-low.c (spu_target_ops): Likewise.
2250 * win32-low.c (win32_target_ops): Likewise.
2251 * server.c (handle_query): Check
2252 target_supports_conditional_breakpoints.
2253 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2255 (target_supports_conditional_breakpoints): New macro.
2257 2015-05-06 Pedro Alves <palves@redhat.com>
2260 * server.c (start_inferior): If the process exits, mourn it.
2262 2015-04-21 Gary Benson <gbenson@redhat.com>
2264 * hostio.c (fileio_open_flags_to_host): Factored out to
2265 fileio_to_host_openflags in common/fileio.c. Single use
2268 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2270 * linux-xtensa-low.c (xtensa_fill_gregset)
2271 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2274 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2276 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2277 (regs_info): Replace usrregs pointer with NULL.
2279 2015-04-17 Gary Benson <gbenson@redhat.com>
2281 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2282 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2283 * server.c (handle_qxfer_exec_file): New function.
2284 (qxfer_packets): Add exec-file entry.
2285 (handle_query): Report qXfer:exec-file:read as supported packet.
2287 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2289 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2291 2015-04-09 Gary Benson <gbenson@redhat.com>
2293 * hostio-errno.c (errno_to_fileio_error): Remove function.
2294 Update caller to use remote_fileio_to_fio_error.
2296 2015-04-09 Yao Qi <yao.qi@linaro.org>
2298 * linux-low.c (linux_insert_point): Call
2299 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2300 (linux_remove_point): Call remove_memory_breakpoint if type is
2302 * linux-x86-low.c (x86_insert_point): Don't call
2303 insert_memory_breakpoint.
2304 (x86_remove_point): Don't call remove_memory_breakpoint.
2306 2015-04-01 Pedro Alves <palves@redhat.com>
2307 Cleber Rosa <crosa@redhat.com>
2309 * server.c (gdbserver_usage): Reorganize and extend the usage
2312 2015-03-24 Pedro Alves <palves@redhat.com>
2314 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2315 output. Also dump TRAP_TRACE.
2316 (linux_low_filter_event): In debug output, distinguish a
2317 resume_stop SIGSTOP from a delayed SIGSTOP.
2319 2015-03-24 Gary Benson <gbenson@redhat.com>
2321 * linux-x86-low.c (x86_linux_new_thread): Moved to
2323 (x86_linux_prepare_to_resume): Likewise.
2325 2015-03-24 Gary Benson <gbenson@redhat.com>
2327 * Makefile.in (x86-linux-dregs.o): New rule.
2328 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2329 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2330 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2331 (x86_linux_dr_get): Likewise.
2332 (x86_linux_dr_set): Likewise.
2333 (update_debug_registers_callback): Likewise.
2334 (x86_linux_dr_set_addr): Likewise.
2335 (x86_linux_dr_get_addr): Likewise.
2336 (x86_linux_dr_set_control): Likewise.
2337 (x86_linux_dr_get_control): Likewise.
2338 (x86_linux_dr_get_status): Likewise.
2339 (x86_linux_update_debug_registers): Likewise.
2341 2015-03-24 Gary Benson <gbenson@redhat.com>
2343 * linux-x86-low.c (x86_linux_update_debug_registers):
2344 New function, factored out from...
2345 (x86_linux_prepare_to_resume): ...this.
2347 2015-03-24 Gary Benson <gbenson@redhat.com>
2349 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2350 (x86_linux_dr_set): Likewise.
2351 (update_debug_registers_callback): Likewise.
2352 (x86_linux_dr_set_addr): Likewise.
2353 (x86_linux_dr_get_addr): Likewise.
2354 (x86_linux_dr_set_control): Likewise.
2355 (x86_linux_dr_get_control): Likewise.
2356 (x86_linux_dr_get_status): Likewise.
2357 (x86_linux_prepare_to_resume): Likewise.
2359 2015-03-24 Gary Benson <gbenson@redhat.com>
2361 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2362 Use perror_with_name. Pass string through gettext.
2363 (x86_linux_dr_set): Likewise.
2365 2015-03-24 Gary Benson <gbenson@redhat.com>
2367 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2368 (x86_linux_dr_set_addr): ...this.
2369 (x86_dr_low_get_addr): Rename to...
2370 (x86_linux_dr_get_addr): ...this.
2371 (x86_dr_low_set_control): Rename to...
2372 (x86_linux_dr_set_control): ...this.
2373 (x86_dr_low_get_control): Rename to...
2374 (x86_linux_dr_get_control): ...this.
2375 (x86_dr_low_get_status): Rename to...
2376 (x86_linux_dr_get_status): ...this.
2377 (x86_dr_low): Update with new function names.
2379 2015-03-24 Gary Benson <gbenson@redhat.com>
2381 * Makefile.in (x86-linux.o): New rule.
2382 * configure.srv: Add x86-linux.o to relevant targets.
2383 * linux-low.c (lwp_set_arch_private_info): New function.
2384 (lwp_arch_private_info): Likewise.
2385 * linux-x86-low.c: Include nat/x86-linux.h.
2386 (arch_lwp_info): Removed structure.
2387 (update_debug_registers_callback):
2388 Use lwp_set_debug_registers_changed.
2389 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2390 and lwp_set_debug_registers_changed.
2391 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2393 2015-03-24 Gary Benson <gbenson@redhat.com>
2395 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2396 * linux-arm-low.c (arm_new_thread): Likewise.
2397 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2398 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2399 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2400 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2402 2015-03-24 Gary Benson <gbenson@redhat.com>
2404 * linux-low.c (ptid_of_lwp): New function.
2405 (lwp_is_stopped): Likewise.
2406 (lwp_stop_reason): Likewise.
2407 * linux-x86-low.c (update_debug_registers_callback):
2409 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2412 2015-03-24 Gary Benson <gbenson@redhat.com>
2414 * linux-low.h (linux_stop_lwp): Remove declaration.
2416 2015-03-24 Gary Benson <gbenson@redhat.com>
2418 * linux-low.h: Include nat/linux-nat.h.
2419 * linux-low.c (iterate_over_lwps_args): New structure.
2420 (iterate_over_lwps_filter): New function.
2421 (iterate_over_lwps): Likewise.
2422 * linux-x86-low.c (update_debug_registers_callback):
2423 Update signature to what iterate_over_lwps expects.
2424 Remove PID check that iterate_over_lwps now performs.
2425 (x86_dr_low_set_addr): Use iterate_over_lwps.
2426 (x86_dr_low_set_control): Likewise.
2428 2015-03-24 Gary Benson <gbenson@redhat.com>
2430 * linux-x86-low.c (x86_debug_reg_state): New function.
2431 (x86_linux_prepare_to_resume): Use the above.
2433 2015-03-24 Gary Benson <gbenson@redhat.com>
2435 * linux-low.c (current_lwp_ptid): New function.
2436 * linux-x86-low.c: Include nat/linux-nat.h.
2437 (x86_dr_low_get_addr): Use current_lwp_ptid.
2438 (x86_dr_low_get_control): Likewise.
2439 (x86_dr_low_get_status): Likewise.
2441 2015-03-20 Pedro Alves <palves@redhat.com>
2443 * tracepoint.c (cmd_qtstatus): Make "str" const.
2445 2015-03-20 Pedro Alves <palves@redhat.com>
2447 * server.c (handle_general_set): Make "req_str" const.
2449 2015-03-19 Pedro Alves <palves@redhat.com>
2451 * linux-low.c (linux_resume_one_lwp): Rename to ...
2452 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2453 instead call perror_with_name.
2454 (check_ptrace_stopped_lwp_gone): New function.
2455 (linux_resume_one_lwp): Reimplement as wrapper around
2456 linux_resume_one_lwp_throw that swallows errors if the LWP is
2459 2015-03-19 Pedro Alves <palves@redhat.com>
2461 * linux-low.c (count_events_callback, select_event_lwp_callback):
2462 No longer check whether the thread has resume_stop as last resume
2465 2015-03-19 Pedro Alves <palves@redhat.com>
2467 * linux-low.c (count_events_callback, select_event_lwp_callback):
2468 Use the lwp's status_pending_p field, not the thread's.
2470 2015-03-19 Pedro Alves <palves@redhat.com>
2472 * linux-low.c (select_event_lwp_callback): Update comments to
2473 no longer mention SIGTRAP.
2475 2015-03-18 Gary Benson <gbenson@redhat.com>
2477 * server.c (handle_query): Do not report vFile:fstat as supported.
2479 2015-03-11 Gary Benson <gbenson@redhat.com>
2481 * hostio.c (sys/types.h): New include.
2482 (sys/stat.h): Likewise.
2483 (common-remote-fileio.h): Likewise.
2484 (handle_fstat): New function.
2485 (handle_vFile): Handle vFile:fstat packets.
2487 2015-03-11 Gary Benson <gbenson@redhat.com>
2489 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2490 struct stat.st_blocks and struct stat.st_blksize.
2491 * configure: Regenerate.
2492 * config.in: Likewise.
2493 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2494 (OBS): Add common-remote-fileio.o.
2495 (common-remote-fileio.o): New rule.
2497 2015-03-09 Pedro Alves <palves@redhat.com>
2499 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2500 'struct sockaddr' pointer in 'accept' call.
2502 2015-03-09 Pedro Alves <palves@redhat.com>
2505 2015-03-07 Pedro Alves <palves@redhat.com>
2506 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2507 or <winsock2.h> here. Instead include "gdb_socket.h".
2508 (remote_open): Use union gdb_sockaddr_u.
2509 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2510 or <winsock2.h> here. Instead include "gdb_socket.h".
2511 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2512 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2514 (init_named_socket, gdb_agent_helper_thread): Use union
2517 2015-03-07 Pedro Alves <palves@redhat.com>
2519 * configure.ac (build_warnings): Move
2520 -Wdeclaration-after-statement to the C-specific set.
2521 * configure: Regenerate.
2523 2015-03-07 Pedro Alves <palves@redhat.com>
2525 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2526 or <winsock2.h> here. Instead include "gdb_socket.h".
2527 (remote_open): Use union gdb_sockaddr_u.
2528 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2529 or <winsock2.h> here. Instead include "gdb_socket.h".
2530 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2531 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2533 (init_named_socket, gdb_agent_helper_thread): Use union
2536 2015-03-07 Pedro Alves <palves@redhat.com>
2538 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2541 2015-03-06 Yao Qi <yao.qi@linaro.org>
2543 * linux-aarch64-low.c (aarch64_insert_point): Use
2544 show_debug_regs as a boolean.
2545 (aarch64_remove_point): Likewise.
2547 2015-03-05 Pedro Alves <palves@redhat.com>
2549 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2550 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2551 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2552 * nto-low.c (nto_target_ops): Likewise.
2553 * spu-low.c (spu_target_ops): Likewise.
2554 * win32-low.c (win32_target_ops): Likewise.
2556 2015-03-04 Pedro Alves <palves@redhat.com>
2558 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2559 Decide whether a breakpoint triggered based on the SIGTRAP's
2561 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2562 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2563 (linux_low_filter_event): Check for breakpoints before checking
2565 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2567 (linux_stopped_by_sw_breakpoint)
2568 (linux_supports_stopped_by_sw_breakpoint)
2569 (linux_stopped_by_hw_breakpoint)
2570 (linux_supports_stopped_by_hw_breakpoint): New functions.
2571 (linux_target_ops): Install new target methods.
2573 2015-03-04 Pedro Alves <palves@redhat.com>
2575 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2576 * server.c (swbreak_feature, hwbreak_feature): New globals.
2577 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2578 (captured_main): Clear swbreak_feature and hwbreak_feature.
2579 * server.h (swbreak_feature, hwbreak_feature): Declare.
2580 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2581 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2582 supports_stopped_by_hw_breakpoint>: New fields.
2583 (target_supports_stopped_by_sw_breakpoint)
2584 (target_stopped_by_sw_breakpoint)
2585 (target_supports_stopped_by_hw_breakpoint)
2586 (target_stopped_by_hw_breakpoint): Declare.
2588 2015-03-04 Pedro Alves <palves@redhat.com>
2590 enum lwp_stop_reason -> enum target_stop_reason
2591 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2592 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2593 (linux_wait_1, stuck_in_jump_pad_callback)
2594 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2595 (linux_stopped_by_watchpoint):
2596 * linux-low.h (enum lwp_stop_reason): Delete.
2597 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2598 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2600 2015-03-04 Yao Qi <yao.qi@linaro.org>
2602 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2604 2015-03-03 Gary Benson <gbenson@redhat.com>
2606 * hostio.c (handle_vFile): Fix prefix lengths.
2608 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2610 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2613 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2615 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2616 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2617 (clean): Add "rm -f" for above C files.
2618 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2619 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2620 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2621 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2622 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2623 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2624 (init_registers_s390x_vx_linux64)
2625 (init_registers_s390x_tevx_linux64)
2626 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2627 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2629 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2630 (s390_store_vxrs_high): New functions.
2631 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2633 (s390_arch_setup): Add logic for selecting one of the new target
2634 descriptions. Activate the new vector regsets if applicable.
2635 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2636 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2637 and init_registers_s390x_tevx_linux64.
2639 2015-03-01 Pedro Alves <palves@redhat.com>
2641 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2644 2015-02-27 Pedro Alves <palves@redhat.com>
2646 * linux-x86-low.c (u_debugreg_offset): New function.
2647 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2649 2015-02-27 Pedro Alves <palves@redhat.com>
2651 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2652 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2653 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2654 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2655 (ps_lsetfpregs, ps_getpid)
2656 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2657 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2658 (ps_lsetxregs, ps_plog): Declare.
2660 2015-02-27 Pedro Alves <palves@redhat.com>
2662 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2663 IP_AGENT_EXPORT_FUNC.
2664 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2665 IP_AGENT_EXPORT_FUNC.
2666 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2667 (IP_AGENT_EXPORT): Delete.
2668 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2669 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2670 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2671 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2672 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2673 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2674 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2675 (traceframe_read_count, traceframe_write_count)
2676 (traceframes_created, trace_state_variables, get_raw_reg)
2677 (get_trace_state_variable_value, set_trace_state_variable_value)
2678 (ust_loaded, helper_thread_id, cmd_buf): Use
2679 IPA_SYM_EXPORTED_NAME.
2680 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2681 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2682 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2683 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2684 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2685 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2686 EXTERN_C_PUSH/EXTERN_C_POP.
2687 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2688 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2689 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2690 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2691 (traceframe_write_count, traceframe_read_count)
2692 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2693 (about_to_request_buffer_space, get_trace_state_variable_value)
2694 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2695 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2696 EXTERN_C_PUSH/EXTERN_C_POP.
2697 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2698 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2699 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2700 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2701 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2702 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2703 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2704 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2706 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2707 (IP_AGENT_EXPORT_VAR_DECL): Define.
2709 (gdb_agent_get_raw_reg): Declare.
2711 2015-02-27 Tom Tromey <tromey@redhat.com>
2712 Pedro Alves <palves@redhat.com>
2714 Rename symbols whose names are reserved C++ keywords throughout.
2716 2015-02-27 Pedro Alves <palves@redhat.com>
2718 * Makefile.in (COMPILER): New, get it from autoconf.
2719 (CXX): Get from autoconf instead.
2720 (COMPILE.pre): Use COMPILER.
2721 (CC-LD): Rename to ...
2722 (CC_LD): ... this. Use COMPILER.
2723 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2724 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2725 * acinclude.m4: Include build-with-cxx.m4.
2726 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2727 Disable -Werror by default if building in C++ mode.
2728 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2729 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2730 the C++ compiler. Save/restore CXXFLAGS too.
2731 * configure: Regenerate.
2733 2015-02-27 Pedro Alves <palves@redhat.com>
2735 * acinclude.m4: Include libiberty.m4.
2736 * configure.ac: Call libiberty_INIT.
2737 * config.in, configure: Regenerate.
2739 2015-02-26 Pedro Alves <palves@redhat.com>
2741 * linux-low.c (linux_wait_1): When incrementing the PC past a
2742 program breakpoint always use the_low_target.breakpoint_len as
2743 increment, rather than the maximum between that and
2744 the_low_target.decr_pc_after_break.
2746 2015-02-23 Pedro Alves <palves@redhat.com>
2748 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2749 thread was doing a step-over; always adjust the PC if
2750 we stepped over a permanent breakpoint.
2751 (linux_wait_1): If we stepped over breakpoint that was on top of a
2752 permanent breakpoint, manually advance the PC past it.
2754 2015-02-23 Pedro Alves <palves@redhat.com>
2756 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2758 (x86_fill_gregset, x86_store_gregset): Use it when handling
2761 2015-02-20 Pedro Alves <palves@redhat.com>
2763 * thread-db.c: Include "nat/linux-procfs.h".
2764 (thread_db_init): Skip listing new threads if the kernel supports
2765 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2767 2015-02-20 Pedro Alves <palves@redhat.com>
2769 * linux-low.c (status_pending_p_callback): Use ptid_match.
2771 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773 PR breakpoints/16812
2774 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2775 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2776 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2778 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2780 PR breakpoints/15956
2781 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2783 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2785 * linux-low.c (linux_low_btrace_conf): Print size.
2786 * server.c (handle_btrace_conf_general_set): New.
2787 (hanle_general_set): Call handle_btrace_conf_general_set.
2788 (handle_query): Report Qbtrace-conf:bts:size as supported.
2790 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2792 * linux-low.c (linux_low_enable_btrace): Update parameters.
2793 (linux_low_btrace_conf): New.
2794 (linux_target_ops)<to_btrace_conf>: Initialize.
2795 * server.c (current_btrace_conf): New.
2796 (handle_btrace_enable): Rename to ...
2797 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2798 to target_enable_btrace. Update comment. Update users.
2799 (handle_qxfer_btrace_conf): New.
2800 (qxfer_packets): Add btrace-conf entry.
2801 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2802 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2803 (target_ops)<read_btrace_conf>: New.
2804 (target_enable_btrace): Update parameters.
2805 (target_read_btrace_conf): New.
2807 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2809 * server.c (handle_btrace_general_set): Remove call to
2810 target_supports_btrace.
2811 (supported_btrace_packets): New.
2812 (handle_query): Call supported_btrace_packets.
2813 * target.h: include btrace-common.h.
2814 (btrace_target_info): Removed.
2815 (supports_btrace, target_supports_btrace): Update parameters.
2817 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2819 * Makefile.in (SFILES): Add common/btrace-common.c.
2820 (OBS): Add common/btrace-common.o.
2821 (btrace-common.o): Add build rules.
2822 * linux-low: Include btrace-common.h.
2823 (linux_low_read_btrace): Use struct btrace_data. Call
2824 btrace_data_init and btrace_data_fini.
2826 2015-02-06 Pedro Alves <palves@redhat.com>
2828 * thread-db.c (find_new_threads_callback): Add debug output.
2830 2015-02-04 Pedro Alves <palves@redhat.com>
2832 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2833 (resume_stopped_resumed_lwps): New function.
2834 (linux_wait_for_event_filtered): Use it.
2836 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2838 * Makefile.in (SFILES): Add linux-personality.c.
2839 (linux-personality.o): New rule.
2840 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2841 list of objects to be built.
2842 * linux-low.c: Include nat/linux-personality.h.
2843 (linux_create_inferior): Remove code to disable address space
2844 randomization (moved to ../nat/linux-personality.c). Create
2845 cleanup to disable address space randomization.
2847 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2849 * Makefile.in (posix-strerror.o): New rule.
2850 (mingw-strerror.o): Likewise.
2851 * configure: Regenerated.
2852 * configure.ac: Source file ../common/common.host. Initialize new
2853 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2855 2015-01-14 Yao Qi <yao@codesourcery.com>
2857 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2858 (ppc-linux.o): New rule.
2859 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2860 * configure.ac: AC_CHECK_FUNCS(getauxval).
2861 * config.in: Re-generated.
2862 * configure: Re-generated.
2863 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2864 ppc64_64bit_inferior_p
2866 2015-01-14 Yao Qi <yao@codesourcery.com>
2868 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2869 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2870 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2871 (PT_ORIG_R3, PT_TRAP): Likewise.
2872 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2873 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2874 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2876 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2878 * i387-fp.c (i387_cache_to_xsave): In look over
2879 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2880 zmmh_low_space field by use of zmmh_high_space.
2882 2015-01-09 Pedro Alves <palves@redhat.com>
2884 * linux-low.c (step_over_bkpt): Move higher up in the file.
2885 (handle_extended_wait): Don't store the stop_pc here.
2886 (get_stop_pc): Adjust comments and rename to ...
2887 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2888 stopped for a software breakpoint or hardware breakpoint.
2889 (thread_still_has_status_pending_p): New function.
2890 (status_pending_p_callback): Use
2891 thread_still_has_status_pending_p. If the event is no longer
2892 interesting, resume the LWP.
2893 (handle_tracepoints): Add assert.
2894 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2895 (wstatus_maybe_breakpoint): New function.
2896 (cancel_breakpoint): Delete function.
2897 (check_stopped_by_watchpoint): New function, factored out from
2898 linux_low_filter_event.
2899 (lp_status_maybe_breakpoint): Delete function.
2900 (linux_low_filter_event): Remove filter_ptid argument.
2901 Leave thread group exits pending here. Store the LWP's stop PC.
2902 Always leave events pending.
2903 (linux_wait_for_event_filtered): Pull all events out of the
2904 kernel, and leave them all pending.
2905 (count_events_callback, select_event_lwp_callback): Consider all
2907 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2908 (select_event_lwp): Only give preference to the stepping LWP in
2909 all-stop mode. Adjust comments.
2910 (ignore_event): New function.
2911 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2912 references to cancel_breakpoints. Adjust to renames. Also give
2913 equal priority to all LWPs that have had events in non-stop mode.
2914 If reporting a software breakpoint event, unadjust the LWP's PC.
2915 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2916 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2918 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2919 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2920 (linux_stopped_by_watchpoint): Adjust.
2921 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2922 * linux-low.h (enum lwp_stop_reason): New.
2923 (struct lwp_info) <stop_pc>: Adjust comment.
2924 <stopped_by_watchpoint>: Delete field.
2925 <stop_reason>: New field.
2926 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2927 * mem-break.c (software_breakpoint_inserted_here)
2928 (hardware_breakpoint_inserted_here): New function.
2929 * mem-break.h (software_breakpoint_inserted_here)
2930 (hardware_breakpoint_inserted_here): Declare.
2931 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2932 (cancel_breakpoints): Delete.
2933 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2934 (upload_fast_traceframes): Remove references to
2937 2015-01-09 Pedro Alves <palves@redhat.com>
2939 * thread-db.c (find_new_threads_callback): Ignore thread if the
2940 kernel thread ID is -1.
2942 2015-01-09 Pedro Alves <palves@redhat.com>
2944 * linux-low.c (linux_attach_fail_reason_string): Move to
2945 nat/linux-ptrace.c, and rename.
2946 (linux_attach_lwp): Update comment.
2947 (attach_proc_task_lwp_callback): New function.
2948 (linux_attach): Adjust to rename and use
2949 linux_proc_attach_tgid_threads.
2950 (linux_attach_fail_reason_string): Delete declaration.
2952 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2954 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2955 * server.c (gdbserver_version): Likewise.
2957 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2959 * remote-utils.c: Include ctype.h.
2960 (input_interrupt): Explicitly handle the case when the char
2961 received is the NUL byte. Improve the printing of non-ASCII
2964 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2966 * linux-low.c (linux_low_filter_event): Update call to
2967 linux_enable_event_reporting following the addition of
2968 a new parameter to that function.
2970 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2973 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2974 (AARCH64_FPCR_REGNO): Likewise.
2975 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2976 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2977 (aarch64_store_fpregset): Likewise.
2979 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2981 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2982 Remove FIXME comment about assumption about N.
2984 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2986 * configure.ac: If large-file support is disabled in GDBserver,
2987 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2988 * configure: Regenerate.
2990 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2992 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2993 warning upon ENODATA from ptrace.
2994 * linux-s390-low.c (s390_store_tdb): New.
2995 (s390_regsets): Add regset for NT_S390_TDB.
2997 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2999 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3000 without a fill_function.
3001 * linux-s390-low.c (s390_fill_last_break): Remove.
3002 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3003 (s390_arch_setup): Use regset's size instead of fill_function for
3006 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3008 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3009 the regset's store function when ptrace returned an error.
3010 * regcache.c (get_thread_regcache): Invalidate register cache
3011 before fetching inferior's registers.
3013 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3015 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3016 while-loop as for-loop.
3017 (regsets_store_inferior_registers): Likewise.
3019 2014-11-28 Yao Qi <yao@codesourcery.com>
3021 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3022 * config.in, configure: Re-generate.
3023 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3026 2014-11-21 Yao Qi <yao@codesourcery.com>
3028 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3029 (AC_CHECK_HEADERS): Remove malloc.h.
3030 * configure: Re-generated.
3031 * config.in: Re-generated.
3032 * server.h: Don't include alloca.h and malloc.h.
3033 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3034 Don't include malloc.h.
3036 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3038 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3039 corresponding ERRNO check in same block.
3041 2014-11-12 Pedro Alves <palves@redhat.com>
3043 * server.c (cont_thread): Update comment.
3044 (start_inferior, attach_inferior): No longer clear cont_thread.
3045 (handle_v_cont): No longer set cont_thread.
3046 (captured_main): Clear cont_thread each time a GDB connects.
3048 2014-11-12 Pedro Alves <palves@redhat.com>
3050 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3051 thread, and don't resume all threads if the Hc thread has exited.
3053 2014-11-12 Pedro Alves <palves@redhat.com>
3055 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3056 the process group instead of to a specific LWP.
3058 2014-10-15 Pedro Alves <palves@redhat.com>
3061 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3063 (arm_set_thread_context): Delete.
3064 (the_low_target): Adjust.
3065 * win32-i386-low.c (debug_registers_changed)
3066 (debug_registers_used): Delete.
3067 (update_debug_registers_callback): New function.
3068 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3069 needing to update their debug registers.
3070 (win32_get_current_dr): New function.
3071 (x86_dr_low_get_addr, x86_dr_low_get_control)
3072 (x86_dr_low_get_status): Fetch the debug register from the thread
3074 (i386_initial_stuff): Adjust.
3075 (i386_get_thread_context): Remove current_event parameter. Don't
3076 clear debug_registers_changed nor copy DR values to
3078 (i386_set_thread_context): Delete.
3079 (i386_prepare_to_resume): New function.
3080 (i386_thread_added): Mark the thread as needing to update irs
3082 (the_low_target): Remove i386_set_thread_context and install
3083 i386_prepare_to_resume.
3084 * win32-low.c (win32_get_thread_context): Adjust.
3085 (win32_set_thread_context): Use SetThreadContext
3087 (win32_prepare_to_resume): New function.
3088 (win32_require_context): New function, factored out from ...
3089 (thread_rec): ... this.
3090 (continue_one_thread): Call win32_prepare_to_resume on each thread
3091 we're about to continue.
3092 (win32_resume): Call win32_prepare_to_resume on the event thread.
3093 * win32-low.h (struct win32_thread_info)
3094 <debug_registers_changed>: New field.
3095 (struct win32_target_ops): Change prototype of set_thread_context,
3096 delete set_thread_context and add prepare_to_resume.
3097 (win32_require_context): New declaration.
3099 2014-10-08 Gary Benson <gbenson@redhat.com>
3101 * server.h: Do not include common-exceptions.h.
3103 2014-10-08 Gary Benson <gbenson@redhat.com>
3105 * server.h: Do not include cleanups.h.
3107 2014-09-30 James Hogan <james.hogan@imgtec.com>
3109 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3112 2014-09-23 Yao Qi <yao@codesourcery.com>
3114 * linux-low.c (lp_status_maybe_breakpoint): New function.
3115 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3116 (count_events_callback): Likewise.
3117 (select_event_lwp_callback): Likewise.
3118 (cancel_breakpoints_callback): Likewise.
3120 2014-09-19 Don Breazeal <donb@codesourcery.com>
3122 * linux-low.c (handle_extended_wait): Call
3123 linux_ptrace_get_extended_event.
3124 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3125 linux_is_extended_waitstatus.
3127 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3129 * Makefile.in (CPPFLAGS): Define.
3130 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3131 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3133 2014-09-16 Gary Benson <gbenson@redhat.com>
3135 * inferiors.h (current_inferior): Renamed as...
3136 (current_thread): New variable. All uses updated.
3137 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3138 (maybe_move_out_of_jump_pad): Likewise.
3139 (cancel_breakpoint): Likewise.
3140 (linux_low_filter_event): Likewise.
3141 (wait_for_sigstop): Likewise.
3142 (linux_resume_one_lwp): Likewise.
3143 (need_step_over_p): Likewise.
3144 (start_step_over): Likewise.
3145 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3146 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3147 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3148 and save_inferior as saved_thread.
3149 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3151 (regcache_invalidate_thread): Likewise.
3152 * remote-utils.c (prepare_resume_reply): Likewise.
3153 * thread-db.c (thread_db_get_tls_address): Likewise.
3154 (disable_thread_event_reporting): Likewise.
3155 (remove_thread_event_breakpoints): Likewise.
3156 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3158 * target.h (set_desired_inferior): Renamed as...
3159 (set_desired_thread): New declaration. All uses updated.
3160 * server.c (myresume): Updated comment to reference thread instead
3162 (handle_serial_event): Likewise.
3163 (handle_target_event): Likewise.
3165 2014-09-12 Tom Tromey <tromey@redhat.com>
3166 Gary Benson <gbenson@redhat.com>
3168 * regcache.h: Include common-regcache.h.
3169 (regcache_read_pc): Don't declare.
3170 * regcache.c (get_thread_regcache_for_ptid): New function.
3172 2014-09-11 Tom Tromey <tromey@redhat.com>
3173 Gary Benson <gbenson@redhat.com>
3175 * symbol.c: New file.
3176 * Makefile.in (SFILES): Add symbol.c.
3177 (OBS): Add symbol.o.
3179 2014-09-11 Gary Benson <gbenson@redhat.com>
3181 * target.c (target_stop_ptid, target_continue_ptid): New
3184 2014-09-11 Tom Tromey <tromey@redhat.com>
3185 Gary Benson <gbenson@redhat.com>
3187 * target.h: Include target/target.h.
3188 * target.c (target_read_memory, target_read_uint32)
3189 (target_write_memory): New functions.
3191 2014-09-11 Gary Benson <gbenson@redhat.com>
3193 * server.h (debug_hw_points): Don't declare.
3194 * server.c (debug_hw_points): Don't define. Replace all uses
3195 with show_debug_regs.
3196 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3197 all uses with show_debug_regs.
3199 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3201 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3202 endianness into account.
3203 (ppc_supply_ptrace_register): Likewise.
3205 2014-09-03 James Hogan <james.hogan@imgtec.com>
3207 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3208 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3210 2014-09-03 Gary Benson <gbenson@redhat.com>
3212 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3213 ALL_DEBUG_ADDRESS_REGISTERS.
3215 2014-09-02 Gary Benson <gbenson@redhat.com>
3217 * i386-low.h: Renamed as...
3218 * x86-low.h: New file. All type, function and variable name
3219 prefixes changed from "i386_" to "x86_". All references updated.
3220 * i386-low.c: Renamed as...
3221 * x86-low.c: New file. All type, function and variable name
3222 prefixes changed from "i386_" to "x86_". All references updated.
3224 2014-09-02 Gary Benson <gbenson@redhat.com>
3226 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3227 (x86_linux_new_thread): Likewise.
3229 2014-08-29 Gary Benson <gbenson@redhat.com>
3231 * server.h (setjmp.h): Do not include.
3232 (toplevel): Do not declare.
3233 (common-exceptions.h): Include.
3234 (cleanups.h): Likewise.
3235 * server.c (toplevel): Do not define.
3236 (exit_code): New static global.
3237 (detach_or_kill_for_exit_cleanup): New function.
3238 (main): New function. Original main renamed to...
3239 (captured_main): New function.
3240 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3242 2014-08-29 Gary Benson <gbenson@redhat.com>
3244 * Makefile.in (SFILES): Add common/common-exceptions.c.
3245 (OBS): Add common-exceptions.o.
3246 (common-exceptions.o): New rule.
3247 * utils.c (prepare_to_throw_exception): New function.
3249 2014-08-29 Gary Benson <gbenson@redhat.com>
3251 * config.in: Regenerate.
3252 * configure: Likewise.
3254 2014-08-29 Gary Benson <gbenson@redhat.com>
3256 * Makefile.in (SFILES): Add common/cleanups.c.
3258 (cleanups.o): New rule.
3260 2014-08-29 Gary Benson <gbenson@redhat.com>
3262 * utils.c (internal_vwarning): New function.
3264 2014-08-28 Gary Benson <gbenson@redhat.com>
3266 * utils.h (fatal): Remove declaration.
3267 * utils.c (fatal): Remove function.
3269 2014-08-28 Gary Benson <gbenson@redhat.com>
3271 * tracepoint.c (gdb_agent_init): Replace fatal with
3273 (initialize_tracepoint): Likewise.
3275 2014-08-28 Gary Benson <gbenson@redhat.com>
3277 * remote-utils.c (remote_prepare): Replace fatal with error.
3279 2014-08-28 Gary Benson <gbenson@redhat.com>
3281 * linux-low.c (linux_async): Replace fatal with warning.
3283 (linux_start_non_stop): Return -1 if linux_async failed.
3285 2014-08-28 Gary Benson <gbenson@redhat.com>
3287 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3289 (i386_dr_low_get_addr): Remove vague comment.
3290 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3293 2014-08-28 Gary Benson <gbenson@redhat.com>
3295 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3296 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3298 (linux_resume_one_lwp): Likewise.
3299 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3301 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3302 with internal_error.
3303 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3304 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3305 (find_register_by_name): Replace fatal with internal_error.
3306 (find_regno): Likewise.
3307 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3308 * thread-db.c (thread_db_create_event): Likewise.
3309 (thread_db_load_search): Likewise.
3310 (try_thread_db_load_1): Likewise.
3311 * tracepoint.c (get_jump_space_head): Replace fatal with
3313 (claim_trampoline_space): Likewise.
3314 (have_fast_tracepoint_trampoline_buffer): Likewise.
3315 (cmd_qtstart): Likewise.
3316 (stop_tracing): Likewise.
3317 (fast_tracepoint_collecting): Likewise.
3318 (target_malloc): Likewise.
3319 (download_tracepoint): Likewise.
3320 (download_trace_state_variables): Replace check with gdb_assert.
3321 (upload_fast_traceframes): Replace fatal with internal_error.
3323 2014-08-19 Tom Tromey <tromey@redhat.com>
3324 Gary Benson <gbenson@redhat.com>
3326 * Makefile.in (SFILES): Add common/common-debug.c.
3327 (OBS): Add common-debug.o.
3328 (common-debug.o): New rule.
3329 * debug.h (debug_printf): Don't declare.
3330 * debug.c (debug_printf): Renamed and rewritten as...
3331 (debug_vprintf): New function.
3333 2014-08-19 Gary Benson <gbenson@redhat.com>
3335 * utils.h: Do not include print-utils.h.
3337 2014-08-19 Tom Tromey <tromey@redhat.com>
3338 Gary Benson <gbenson@redhat.com>
3340 * server.h: Add static assertion.
3341 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3343 2014-08-19 Tom Tromey <tromey@redhat.com>
3344 Gary Benson <gbenson@redhat.com>
3346 * Makefile.in (SFILES): Add common/errors.c.
3347 (OBS): Add errors.o.
3348 (IPA_OBS): Add errors-ipa.o.
3349 (errors.o): New rule.
3350 (errors-ipa.o): Likewise.
3351 * utils.h (perror_with_name, error, warning): Don't declare.
3352 * utils.c (warning): Renamed and rewritten as...
3353 (vwarning): New function.
3354 (error): Renamed and rewritten as...
3355 (verror): New function.
3356 (internal_error): Renamed and rewritten as...
3357 (internal_verror): New function.
3359 2014-08-07 Gary Benson <gbenson@redhat.com>
3361 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3362 * configure: Regenerate.
3363 * config.in: Likewise.
3364 * server.h: Do not include errno.h.
3365 * event-loop.c: Likewise.
3366 * hostio-errno.c: Likewise.
3367 * linux-low.c: Likewise.
3368 * remote-utils.c: Likewise.
3369 * spu-low.c: Likewise.
3370 * utils.c: Likewise.
3371 * gdbreplay.c: Unconditionally include errno.h.
3373 2014-08-07 Gary Benson <gbenson@redhat.com>
3375 * server.h: Do not include string.h.
3376 * event-loop.c: Likewise.
3377 * linux-low.c: Likewise.
3378 * regcache.c: Likewise.
3379 * remote-utils.c: Likewise.
3380 * spu-low.c: Likewise.
3381 * utils.c: Likewise.
3383 2014-08-07 Gary Benson <gbenson@redhat.com>
3385 * server.h: Do not include gdb_assert.h.
3387 2014-08-07 Gary Benson <gbenson@redhat.com>
3389 * server.h: Do not include common-utils.h.
3391 2014-08-07 Gary Benson <gbenson@redhat.com>
3393 * server.h: Do not include ptid.h.
3394 * notif.h: Likewise.
3396 2014-08-07 Gary Benson <gbenson@redhat.com>
3398 * server.h: Do not include gdb_locale.h.
3400 2014-08-07 Gary Benson <gbenson@redhat.com>
3402 * server.h: Do not include gdb/signals.h.
3403 * win32-low.c: Likewise.
3405 2014-08-07 Gary Benson <gbenson@redhat.com>
3407 * server.h: Do not include pathmax.h.
3409 2014-08-07 Gary Benson <gbenson@redhat.com>
3411 * server.h: Do not include libiberty.h.
3412 * linux-bfin-low.c: Likewise.
3414 2014-08-07 Gary Benson <gbenson@redhat.com>
3416 * server.h: Do not include ansidecl.h.
3418 2014-08-07 Gary Benson <gbenson@redhat.com>
3420 * linux-x86-low.c: Do not include stddef.h.
3421 * lynx-ppc-low.c: Likewise.
3422 * tracepoint.c: Likewise.
3424 2014-08-07 Gary Benson <gbenson@redhat.com>
3426 * server.h: Do not include stdarg.h.
3427 * nto-low.c: Likewise.
3429 2014-08-07 Gary Benson <gbenson@redhat.com>
3431 * server.h: Do not include stdlib.h.
3432 * inferiors.c: Likewise.
3433 * linux-low.c: Likewise.
3434 * regcache.c: Likewise.
3435 * spu-low.c: Likewise.
3436 * tracepoint.c: Likewise.
3437 * utils.c: Likewise.
3439 2014-08-07 Gary Benson <gbenson@redhat.com>
3441 * server.h: Do not include stdio.h.
3442 * linux-low.c: Likewise.
3443 * remote-utils.c: Likewise.
3444 * spu-low.c: Likewise.
3445 * utils.c: Likewise.
3446 * wincecompat.c: Likewise.
3448 2014-08-06 Gary Benson <gbenson@redhat.com>
3450 * regcache.c (init_register_cache): Move conditionals inside if.
3452 2014-08-06 Gary Benson <gbenson@redhat.com>
3454 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3456 2014-07-31 Gary Benson <gbenson@redhat.com>
3458 * ax.h: Do not include server.h.
3459 * gdbthread.h: Likewise.
3460 * lynx-low.h: Likewise.
3461 * notif.h: Likewise.
3463 2014-07-30 Gary Benson <gbenson@redhat.com>
3465 * server.h: Include common-defs.h.
3466 Do not include config.h or build-gnulib-gdbserver/config.h.
3468 2014-07-30 Gary Benson <gbenson@redhat.com>
3470 * hostio-errno.c: Move server.h to top of includes list.
3471 * inferiors.c: Likewise.
3472 * linux-x86-low.c: Likewise.
3473 * notif.c: Include server.h.
3475 2014-07-24 Tom Tromey <tromey@redhat.com>
3476 Gary Benson <gbenson@redhat.com>
3478 * server.h (CORE_ADDR): Now unsigned.
3480 2014-07-16 Pedro Alves <palves@redhat.com>
3482 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3484 2014-07-15 Pedro Alves <palves@redhat.com>
3486 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3489 2014-07-11 Pedro Alves <palves@redhat.com>
3491 * linux-low.c (kill_wait_lwp): New function, based on
3492 kill_one_lwp_callback, but use my_waitpid directly.
3493 (kill_one_lwp_callback, linux_kill): Use it.
3495 2014-06-23 Pedro Alves <palves@redhat.com>
3497 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3498 before setting DR0..DR3.
3500 2014-06-20 Gary Benson <gbenson@redhat.com>
3502 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3503 * configure: Regenerated.
3504 * config.in: Likewise.
3506 2014-06-20 Gary Benson <gbenson@redhat.com>
3508 * Makefile.in (SFILES): Update locations for files moved
3510 (object file files): Reordered.
3512 2014-06-20 Gary Benson <gbenson@redhat.com>
3514 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3515 (i386_dr_low_set_addr): Likewise.
3516 (i386_dr_low_get_addr): Likewise.
3517 (i386_dr_low_can_set_control): Likewise.
3518 (i386_dr_low_set_control): Likewise.
3519 (i386_dr_low_get_control): Likewise.
3520 (i386_dr_low_get_status): Likewise.
3521 (i386_get_debug_register_length): Likewise.
3522 * linux-x86-low.c (i386_dr_low_set_addr):
3523 Changed signature. Made static.
3524 (i386_dr_low_get_addr): Likewise.
3525 (i386_dr_low_set_control): Likewise.
3526 (i386_dr_low_get_control): Likewise.
3527 (i386_dr_low_get_status): Likewise.
3528 (i386_dr_low): New global variable.
3529 * win32-i386-low.c (i386_dr_low_set_addr):
3530 Changed signature. Made static.
3531 (i386_dr_low_get_addr): Likewise.
3532 (i386_dr_low_set_control): Likewise.
3533 (i386_dr_low_get_control): Likewise.
3534 (i386_dr_low_get_status): Likewise.
3535 (i386_dr_low): New global variable.
3537 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3539 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3540 * Makefile.in (AR, AR_FLAGS): Define.
3541 * configure: Regenerate.
3543 2014-06-19 Gary Benson <gbenson@redhat.com>
3545 * Makefile.in (i386-dregs.o): New rule.
3546 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3547 * i386-low.c (target.h): Remove include.
3548 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3549 (DR_CONTROL_SHIFT): Likewise.
3550 (DR_CONTROL_SIZE): Likewise.
3551 (DR_RW_EXECUTE): Likewise.
3552 (DR_RW_WRITE): Likewise.
3553 (DR_RW_READ): Likewise.
3554 (DR_RW_IORW): Likewise.
3555 (DR_LEN_1): Likewise.
3556 (DR_LEN_2): Likewise.
3557 (DR_LEN_4): Likewise.
3558 (DR_LEN_8): Likewise.
3559 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3560 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3561 (DR_ENABLE_SIZE): Likewise.
3562 (DR_LOCAL_SLOWDOWN): Likewise.
3563 (DR_GLOBAL_SLOWDOWN): Likewise.
3564 (DR_CONTROL_RESERVED): Likewise.
3565 (I386_DR_CONTROL_MASK): Likewise.
3566 (I386_DR_VACANT): Likewise.
3567 (I386_DR_LOCAL_ENABLE): Likewise.
3568 (I386_DR_GLOBAL_ENABLE): Likewise.
3569 (I386_DR_DISABLE): Likewise.
3570 (I386_DR_SET_RW_LEN): Likewise.
3571 (I386_DR_GET_RW_LEN): Likewise.
3572 (I386_DR_WATCH_HIT): Likewise.
3573 (i386_wp_op_t): Likewise.
3574 (i386_show_dr): Likewise.
3575 (i386_length_and_rw_bits): Likewise.
3576 (i386_insert_aligned_watchpoint): Likewise.
3577 (i386_remove_aligned_watchpoint): Likewise.
3578 (i386_handle_nonaligned_watchpoint): Likewise.
3579 i386_update_inferior_debug_regs(): Likewise.
3580 (i386_dr_insert_watchpoint): Likewise.
3581 (i386_dr_remove_watchpoint): Likewise.
3582 (i386_dr_region_ok_for_watchpoint): Likewise.
3583 (i386_dr_stopped_data_address): Likewise.
3584 (i386_dr_stopped_by_watchpoint): Likewise.
3586 2014-06-19 Gary Benson <gbenson@redhat.com>
3588 * i386-low.c (i386_dr_show): Renamed to
3589 i386_show_dr and made static. All uses updated.
3590 (i386_dr_length_and_rw_bits): Renamed to
3591 i386_length_and_rw_bits and made static.
3593 (i386_dr_insert_aligned_watchpoint): Renamed to
3594 i386_insert_aligned_watchpoint and made static.
3596 (i386_dr_remove_aligned_watchpoint): Renamed to
3597 i386_remove_aligned_watchpoint and made static.
3599 (i386_dr_update_inferior_debug_regs): Renamed to
3600 i386_update_inferior_debug_regs and made static.
3603 2014-06-18 Gary Benson <gbenson@redhat.com>
3605 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3606 (i386_dr_low_can_set_control): Likewise.
3607 (i386_get_debug_register_length): Likewise.
3608 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3609 (i386_dr_low_can_set_control): Likewise.
3610 (i386_get_debug_register_length): Likewise.
3612 2014-06-17 Gary Benson <gbenson@redhat.com>
3614 * i386-low.h (i386-dregs.h): New include.
3615 (DR_FIRSTADDR): Now in i386-dregs.h.
3616 (DR_LASTADDR): Likewise.
3617 (DR_NADDR): Likewise.
3618 (DR_STATUS): Likewise.
3619 (DR_CONTROL): Likewise.
3620 (i386_debug_reg_state): Likewise.
3621 (i386_dr_insert_watchpoint): Likewise.
3622 (i386_dr_remove_watchpoint): Likewise.
3623 (i386_dr_region_ok_for_watchpoint): Likewise.
3624 (i386_dr_stopped_data_address): Likewise.
3625 (i386_dr_stopped_by_watchpoint): Likewise.
3626 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3628 2014-06-18 Gary Benson <gbenson@redhat.com>
3630 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3631 i386_dr_insert_watchpoint.
3632 (i386_low_remove_watchpoint): Renamed to
3633 i386_dr_remove_watchpoint.
3634 (i386_low_region_ok_for_watchpoint): Renamed to
3635 i386_dr_region_ok_for_watchpoint.
3636 (i386_low_stopped_data_address): Renamed to
3637 i386_dr_stopped_data_address.
3638 (i386_low_stopped_by_watchpoint): Renamed to
3639 i386_dr_stopped_by_watchpoint.
3640 * i386-low.c (i386_show_dr): Renamed to
3641 i386_dr_show and made nonstatic. All uses updated.
3642 (i386_length_and_rw_bits): Renamed to
3643 i386_dr_length_and_rw_bits and made nonstatic.
3645 (i386_insert_aligned_watchpoint): Renamed to
3646 i386_dr_insert_aligned_watchpoint and made nonstatic.
3648 (i386_remove_aligned_watchpoint): Renamed to
3649 i386_dr_remove_aligned_watchpoint and made nonstatic.
3651 (i386_update_inferior_debug_regs): Renamed to
3652 i386_dr_update_inferior_debug_regs and made nonstatic.
3654 (i386_low_insert_watchpoint): Renamed to
3655 i386_dr_insert_watchpoint. All uses updated.
3656 (i386_low_remove_watchpoint): Renamed to
3657 i386_dr_remove_watchpoint. All uses updated.
3658 (i386_low_region_ok_for_watchpoint): Renamed to
3659 i386_dr_region_ok_for_watchpoint. All uses updated.
3660 (i386_low_stopped_data_address): Renamed to
3661 i386_dr_stopped_data_address. All uses updated.
3662 (i386_low_stopped_by_watchpoint): Renamed to
3663 i386_dr_stopped_by_watchpoint. All uses updated.
3665 2014-06-18 Gary Benson <gbenson@redhat.com>
3667 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3668 (i386_dr_low_can_set_control): Likewise.
3669 (i386_insert_aligned_watchpoint): New check.
3671 2014-06-18 Gary Benson <gbenson@redhat.com>
3673 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3676 2014-06-18 Gary Benson <gbenson@redhat.com>
3678 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3679 instead of fatal and error.
3680 (i386_handle_nonaligned_watchpoint): Likewise.
3682 2014-06-18 Gary Benson <gbenson@redhat.com>
3684 * i386-low.c (i386_get_debug_register_length): New macro.
3685 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3686 (i386_show_dr): Use debug_printf instead of fprintf. Use
3687 phex to format values.
3689 2014-06-18 Gary Benson <gbenson@redhat.com>
3691 * i386-low.h: Comment changes.
3692 * i386-low.c: Likewise.
3694 2014-06-18 Gary Benson <gbenson@redhat.com>
3696 * i386-low.c: Whitespace changes.
3698 2014-06-12 Tom Tromey <tromey@redhat.com>
3700 * utils.c (freeargv): Remove.
3702 2014-06-12 Tom Tromey <tromey@redhat.com>
3704 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3705 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3706 (parse_debug_format_options): Likewise.
3707 (gdbserver_usage): Likewise.
3708 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3709 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3710 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3712 ($(LIBGNU)): Depend on libiberty.
3713 (all-lib): Recurse into all subdirs.
3714 (install-only): Invoke "install" target in subdirs.
3715 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3717 * configure: Rebuild.
3718 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3719 for vasprintf, vsnprintf, or gettimeofday.
3720 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3723 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3725 * development.sh: Delete.
3726 * Makefile.in (config.status): Adjust dependency on development.sh.
3727 * configure.ac: Adjust development.sh source call.
3728 * configure: Regenerate.
3730 2014-06-02 Pedro Alves <palves@redhat.com>
3732 * ax.c (gdb_free_agent_expr): New function.
3733 * ax.h (gdb_free_agent_expr): New declaration.
3734 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3736 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3738 (clear_breakpoint_conditions_and_commands): New function.
3739 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3740 (clear_breakpoint_conditions_and_commands): New declaration.
3742 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3744 * linux-aarch64-low.c (asm/ptrace.h): Include.
3746 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3748 Fix TLS access for -static -pthread.
3749 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3750 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3751 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3753 2014-05-20 Pedro Alves <palves@redhat.com>
3755 * linux-aarch64-low.c (aarch64_insert_point)
3756 (aarch64_remove_point): No longer check whether the type is
3757 supported here. Adjust to new interface.
3758 (the_low_target): Install aarch64_supports_z_point_type as
3759 supports_z_point_type method.
3760 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3761 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3762 instead of a Z packet char. Adjust.
3763 (arm_supports_z_point_type): New function.
3764 (arm_insert_point, arm_remove_point): Adjust to new interface.
3765 (the_low_target): Install arm_supports_z_point_type.
3766 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3767 (cris_insert_point, cris_remove_point): Adjust to new interface.
3768 Don't check whether the type is supported here.
3769 (the_low_target): Install cris_supports_z_point_type.
3770 * linux-low.c (linux_supports_z_point_type): New function.
3771 (linux_insert_point, linux_remove_point): Adjust to new interface.
3772 * linux-low.h (struct linux_target_ops) <insert_point,
3773 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3774 raw_breakpoint pointer parameter.
3775 <supports_z_point_type>: New method.
3776 * linux-mips-low.c (mips_supports_z_point_type): New function.
3777 (mips_insert_point, mips_remove_point): Adjust to new interface.
3778 Use mips_supports_z_point_type.
3779 (the_low_target): Install mips_supports_z_point_type.
3780 * linux-ppc-low.c (the_low_target): Install NULL as
3781 supports_z_point_type method.
3782 * linux-s390-low.c (the_low_target): Install NULL as
3783 supports_z_point_type method.
3784 * linux-sparc-low.c (the_low_target): Install NULL as
3785 supports_z_point_type method.
3786 * linux-x86-low.c (x86_supports_z_point_type): New function.
3787 (x86_insert_point): Adjust to new insert_point interface. Use
3788 insert_memory_breakpoint. Adjust to new
3789 i386_low_insert_watchpoint interface.
3790 (x86_remove_point): Adjust to remove_point interface. Use
3791 remove_memory_breakpoint. Adjust to new
3792 i386_low_remove_watchpoint interface.
3793 (the_low_target): Install x86_supports_z_point_type.
3794 * lynx-low.c (lynx_target_ops): Install NULL as
3795 supports_z_point_type callback.
3796 * nto-low.c (nto_supports_z_point_type): New.
3797 (nto_insert_point, nto_remove_point): Adjust to new interface.
3798 (nto_target_ops): Install nto_supports_z_point_type.
3799 * mem-break.c: Adjust intro comment.
3800 (struct raw_breakpoint) <raw_type, size>: New fields.
3801 <inserted>: Update comment.
3802 <shlib_disabled>: Delete field.
3803 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3804 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3805 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3806 (raw_bkpt_type_to_target_hw_bp_type): New function.
3807 (find_enabled_raw_code_breakpoint_at): New function.
3808 (find_raw_breakpoint_at): New type and size parameters. Use them.
3809 (insert_memory_breakpoint): New function, based off
3810 set_raw_breakpoint_at.
3811 (remove_memory_breakpoint): New function.
3812 (set_raw_breakpoint_at): Reimplement.
3813 (set_breakpoint): New, based on set_breakpoint_at.
3814 (set_breakpoint_at): Reimplement.
3815 (delete_raw_breakpoint): Go through the_target->remove_point
3816 instead of assuming memory breakpoints.
3817 (find_gdb_breakpoint_at): Delete.
3818 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3819 (find_gdb_breakpoint): New function.
3820 (set_gdb_breakpoint_at): Delete.
3821 (z_type_supported): New function.
3822 (set_gdb_breakpoint_1): New function, loosely based off
3823 set_gdb_breakpoint_at.
3824 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3825 (delete_gdb_breakpoint_at): Delete.
3826 (delete_gdb_breakpoint_1): New function, loosely based off
3827 delete_gdb_breakpoint_at.
3828 (delete_gdb_breakpoint): New function.
3829 (clear_gdb_breakpoint_conditions): Rename to ...
3830 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3832 (add_condition_to_breakpoint): Make static.
3833 (add_breakpoint_condition): Take a struct breakpoint pointer
3834 instead of an address. Adjust.
3835 (gdb_condition_true_at_breakpoint): Rename to ...
3836 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3838 (gdb_condition_true_at_breakpoint): Reimplement.
3839 (add_breakpoint_commands): Take a struct breakpoint pointer
3840 instead of an address. Adjust.
3841 (gdb_no_commands_at_breakpoint): Rename to ...
3842 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3843 parameter. Return true if no breakpoint was found. Change debug
3845 (gdb_no_commands_at_breakpoint): Reimplement.
3846 (run_breakpoint_commands): Rename to ...
3847 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3848 and change return type to boolean.
3849 (run_breakpoint_commands): New function.
3850 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3851 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3852 breakpoint. Go through the_target->remove_point instead of
3853 assuming memory breakpoint.
3854 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3855 software and hardware breakpoints.
3856 (reinsert_raw_breakpoint): Go through the_target->insert_point
3857 instead of assuming memory breakpoint.
3858 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3859 software and hardware breakpoints.
3860 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3861 Check both software and hardware breakpoints.
3862 (validate_inserted_breakpoint): Assert the breakpoint is a
3863 software breakpoint. Set the inserted flag to -1 instead of
3864 setting shlib_disabled.
3865 (delete_disabled_breakpoints): Adjust.
3866 (validate_breakpoints): Only validate software breakpoints.
3867 Adjust to inserted flag change.
3868 (check_mem_read, check_mem_write): Skip breakpoint types other
3869 than software breakpoints. Adjust to inserted flag change.
3870 * mem-break.h (enum raw_bkpt_type): New enum.
3871 (raw_breakpoint, struct process_info): Forward declare.
3872 (Z_packet_to_target_hw_bp_type): Delete declaration.
3873 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3874 (set_gdb_breakpoint, delete_gdb_breakpoint)
3875 (clear_breakpoint_conditions): New declarations.
3876 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3877 (breakpoint_inserted_here): Update comment.
3878 (add_breakpoint_condition, add_breakpoint_commands): Replace
3879 address parameter with a breakpoint pointer parameter.
3880 (gdb_breakpoint_here): Update comment.
3881 (delete_gdb_breakpoint_at): Delete.
3882 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3883 * server.c (process_point_options): Take a struct breakpoint
3884 pointer instead of an address. Adjust.
3885 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3886 delete_gdb_breakpoint.
3887 * spu-low.c (spu_target_ops): Install NULL as
3888 supports_z_point_type method.
3889 * target.h: Include mem-break.h.
3890 (struct target_ops) <prepare_to_access_memory>: Update comment.
3891 <supports_z_point_type>: New field.
3892 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3893 instead of a char. Also take a raw breakpoint pointer.
3894 * win32-arm-low.c (the_low_target): Install NULL as
3895 supports_z_point_type.
3896 * win32-i386-low.c (i386_supports_z_point_type): New function.
3897 (i386_insert_point, i386_remove_point): Adjust to new interface.
3898 (the_low_target): Install i386_supports_z_point_type.
3899 * win32-low.c (win32_supports_z_point_type): New function.
3900 (win32_insert_point, win32_remove_point): Adjust to new interface.
3901 (win32_target_ops): Install win32_supports_z_point_type.
3902 * win32-low.h (struct win32_target_ops):
3903 <supports_z_point_type>: New method.
3904 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3905 instead of a char. Also take a raw breakpoint pointer.
3907 2014-05-20 Pedro Alves <palves@redhat.com>
3909 * mem-break.h: Include break-common.h.
3910 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3911 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3912 (Z_packet_to_target_hw_bp_type): New declaration.
3913 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3914 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3915 (Z_PACKET_ACCESS_WP): Delete macros.
3916 (Z_packet_to_hw_type): Delete function.
3917 * i386-low.h: Don't include break-common.h here.
3918 (Z_packet_to_hw_type): Delete declaration.
3919 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3920 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3921 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3922 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3923 * linux-aarch64-low.c: Don't include break-common.h here.
3924 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3925 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3926 (Z_packet_to_target_hw_bp_type): Delete function.
3927 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3929 (mips_insert_point, mips_remove_point): Use
3930 Z_packet_to_target_hw_bp_type.
3932 2014-05-20 Pedro Alves <palves@redhat.com>
3934 * linux-aarch64-low.c: Include break-common.h.
3935 (enum target_point_type): Delete.
3936 (Z_packet_to_point_type): Rename to ...
3937 (Z_packet_to_target_hw_bp_type): ... this, and return a
3938 target_hw_bp_type instead.
3939 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3940 instead of an enum target_point_type.
3941 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3943 (aarch64_dr_state_insert_one_point)
3944 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3945 (aarch64_handle_aligned_watchpoint)
3946 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3947 Take an enum target_hw_bp_type instead of an enum
3949 (aarch64_supports_z_point_type): New function.
3950 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3951 use Z_packet_to_target_hw_bp_type.
3953 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3955 * configure.ac: Only use -Werror by default when DEVELOPMENT
3957 * configure: Regenerate.
3959 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3961 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3962 * linux-x86-low.c (X86_64_USER_REGS): New.
3963 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3965 2014-04-28 Yao Qi <yao@codesourcery.com>
3967 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3970 2014-04-25 Pedro Alves <palves@redhat.com>
3973 * linux-low.c (linux_attach_fail_reason_string): New function.
3974 (linux_attach_lwp): Delete.
3975 (linux_attach_lwp_1): Rename to ...
3976 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3977 argument. Remove "initial" parameter. Return int instead of
3978 void. Don't error or warn here.
3979 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3980 failure to attach to the tgid. Call warning when failing to
3982 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3983 argument. Remove "initial" parameter. Return int instead of
3984 void. Don't error or warn here.
3985 (linux_attach_fail_reason_string): New declaration.
3986 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3987 interface change. Use linux_attach_fail_reason_string.
3989 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3990 Walfred Tedeschi <walfred.tedeschi@intel.com>
3992 * Makefile.in: Added rules to handle new files
3993 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3994 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3995 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3996 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3997 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3998 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4000 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4001 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4002 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4003 i386/x32-avx512.xml.
4004 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4005 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4006 i386/x32-avx512-linux.xml.
4007 * i387-fp.c (num_avx512_k_registers): New constant for number
4009 (num_avx512_zmmh_low_registers): New constant for number of
4010 lower ZMM registers (0-15).
4011 (num_avx512_zmmh_high_registers): New constant for number of
4012 higher ZMM registers (16-31).
4013 (num_avx512_ymmh_registers): New contant for number of higher
4014 YMM registers (ymm16-31 added by avx521 on x86_64).
4015 (num_avx512_xmm_registers): New constant for number of higher
4016 XMM registers (xmm16-31 added by AVX512 on x86_64).
4017 (struct i387_xsave): Add space for AVX512 registers.
4018 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4019 Add code to handle AVX512 registers.
4020 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4021 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4022 prototypei from generated file.
4023 (tdesc_amd64_avx512_linux): Likewise.
4024 (init_registers_x32_avx512_linux): Likewise.
4025 (tdesc_x32_avx512_linux): Likewise.
4026 (init_registers_i386_avx512_linux): Likewise.
4027 (tdesc_i386_avx512_linux): Likewise.
4028 (x86_64_regmap): Add AVX512 registers.
4029 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4031 (initialize_low_arch): Add code to initialize AVX512 registers.
4033 2014-04-23 Pedro Alves <palves@redhat.com>
4035 * mem-break.c (find_gdb_breakpoint_at): Make static.
4036 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4038 2014-04-23 Pedro Alves <palves@redhat.com>
4040 * i386-low.c: Don't include break-common.h here.
4041 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4042 prototype to take target_hw_bp_type as argument instead of a Z
4044 * i386-low.h: Include break-common.h here.
4045 (Z_packet_to_hw_type): Declare.
4046 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4048 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4049 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4050 (x86_remove_point): Convert the packet number to a
4051 target_hw_bp_type before calling i386_low_remove_watchpoint.
4052 * win32-i386-low.c (i386_insert_point): Convert the packet number
4053 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4054 (i386_remove_point): Convert the packet number to a
4055 target_hw_bp_type before calling i386_low_remove_watchpoint.
4057 2014-04-23 Pedro Alves <palves@redhat.com>
4059 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4061 2014-04-10 Pedro Alves <palves@redhat.com>
4063 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4064 Check if the condition or command is NULL before checking if the
4065 breakpoint is known. On success, return true.
4066 * mem-break.h (add_breakpoint_condition): Document return.
4067 (add_breakpoint_commands): Add describing comment.
4068 * server.c (skip_to_semicolon): New function.
4069 (process_point_options): Use it.
4071 2014-04-09 Pedro Alves <palves@redhat.com>
4073 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4076 2014-02-27 Pedro Alves <palves@redhat.com>
4079 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4081 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4083 (last_thread_of_process_p): Take a PID argument instead of a
4085 (linux_wait_for_lwp): Delete.
4086 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4088 (linux_low_filter_event): New function, party factored out from
4089 linux_wait_for_event.
4090 (linux_wait_for_event): Rename to ...
4091 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4092 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4093 sigsuspend. Check for zombie leaders.
4094 (linux_wait_for_event): Reimplement as wrapper around
4095 linux_wait_for_event_filtered.
4096 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4097 a normal or signal exit is seen, it's the whole process exiting.
4098 (wait_for_sigstop): No longer a for_each_inferior callback.
4099 Rewrite on top of linux_wait_for_event_filtered.
4100 (stop_all_lwps): Call wait_for_sigstop directly.
4101 * server.c (resume, handle_target_event): Handle
4102 TARGET_WAITKIND_NO_RESUMED.
4104 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4106 * win32-low.c (psapi_get_dll_name,
4107 * win32_CreateToolhelp32Snapshot): Delete.
4108 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4109 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4111 (handle_load_dll): Add function description.
4112 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4114 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4116 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4118 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4119 base address when calling win32_add_one_solib.
4120 (handle_load_dll): Delete local variable load_addr.
4121 Remove 0x1000 offset applied to DLL base address when calling
4122 win32_add_one_solib.
4123 (handle_unload_dll): Add comment.
4125 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4127 * win32-low.c (win32_add_all_dlls): Renames
4128 win32_ensure_ntdll_loaded. Rewrite function documentation.
4129 Adjust implementation to always load all DLLs.
4130 Add 0x1000 offset to DLL base address when calling
4131 win32_add_one_solib.
4132 (child_initialization_done): New static global.
4133 (do_initial_child_stuff): Set child_initialization_done to
4134 zero during child initialization, and 1 after. Replace call
4135 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4137 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4138 (handle_unload_dll): Add function documentation.
4139 (get_child_debug_event): Ignore load and unload DLL events
4140 during child initialization.
4142 2014-02-20 Doug Evans <dje@google.com>
4144 Remove global all_lwps.
4145 * inferiors.h (ptid_of): Move here from linux-low.h.
4146 (pid_of, lwpid_of): Ditto.
4147 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4148 parameter is a struct thread_info * now.
4149 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4150 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4151 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4153 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4154 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4155 * linux-arm-low.c (update_registers_callback): Update, "entry"
4156 parameter is a struct thread_info * now.
4157 Fetch lwpid from current_inferior directly.
4158 (arm_insert_point): Pass &all_threads to find_inferior instead of
4160 (arm_remove_point): Ditto.
4161 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4162 (arm_prepare_to_resume): Fetch pid from thread.
4163 (arm_read_description): Fetch lwpid from current_inferior directly.
4164 * linux-low.c (all_lwps): Delete.
4165 (delete_lwp): Delete call to remove_inferior.
4166 (handle_extended_wait): Fetch lwpid from thread.
4167 (add_lwp): Don't set lwp->entry.id. Remove call to
4168 add_inferior_to_list.
4169 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4170 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4171 (kill_one_lwp_callback): Ditto.
4172 (linux_kill): Don't dereference NULL pointer.
4173 Fetch ptid,lwpid from thread.
4174 (get_detach_signal): Fetch ptid from thread.
4175 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4176 Simplify call to regcache_invalidate_thread.
4177 (delete_lwp_callback): Update, "entry" parameter is a
4178 struct thread_info * now. Fetch pid from thread.
4179 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4180 (status_pending_p_callback): Update, "entry" parameter is a
4181 struct thread_info * now. Fetch ptid from thread.
4182 (find_lwp_pid): Update, "entry" parameter is a
4183 struct thread_info * now.
4184 (linux_wait_for_lwp): Fetch pid from thread.
4185 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4186 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4187 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4188 (dequeue_one_deferred_signal): Ditto.
4189 (cancel_breakpoint): Fetch ptid from current_inferior.
4190 (linux_wait_for_event): Pass &all_threads to find_inferior,
4191 not &all_lwps. Fetch ptid, lwpid from thread.
4192 (count_events_callback): Update, "entry" parameter is a
4193 struct thread_info * now.
4194 (select_singlestep_lwp_callback): Ditto.
4195 (select_event_lwp_callback): Ditto.
4196 (cancel_breakpoints_callback): Ditto.
4197 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4199 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4200 (unsuspend_one_lwp): Update, "entry" parameter is a
4201 struct thread_info * now.
4202 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4204 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4205 Fetch lwpid from thread, not lwp.
4206 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4207 Pass &all_threads to find_inferior, not &all_lwps.
4208 (send_sigstop): Fetch lwpid from thread, not lwp.
4209 (send_sigstop_callback): Update, "entry" parameter is a
4210 struct thread_info * now.
4211 (suspend_and_send_sigstop_callback): Ditto.
4212 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4213 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4214 struct thread_info * now.
4215 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4217 (lwp_running): Update, "entry" parameter is a
4218 struct thread_info * now.
4219 (stop_all_lwps): Fetch ptid from thread.
4220 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4221 (linux_resume_one_lwp): Fetch lwpid from thread.
4222 (linux_set_resume_request): Update, "entry" parameter is a
4223 struct thread_info * now. Fetch pid, lwpid from thread.
4224 (resume_status_pending_p): Update, "entry" parameter is a
4225 struct thread_info * now.
4226 (need_step_over_p): Ditto. Fetch lwpid from thread.
4227 (start_step_over): Fetch lwpid from thread.
4228 (linux_resume_one_thread): Update, "entry" parameter is a
4229 struct thread_info * now. Fetch lwpid from thread.
4230 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4231 (proceed_one_lwp): Update, "entry" parameter is a
4232 struct thread_info * now. Fetch lwpid from thread.
4233 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4234 struct thread_info * now.
4235 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4236 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4237 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4239 (regsets_store_inferior_registers): Ditto.
4240 (fetch_register, store_register): Ditto.
4241 (linux_read_memory, linux_write_memory): Ditto.
4242 (linux_request_interrupt): Ditto.
4243 (linux_read_auxv): Ditto.
4244 (linux_xfer_siginfo): Ditto.
4245 (linux_qxfer_spu): Ditto.
4246 (linux_qxfer_libraries_svr4): Ditto.
4247 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4248 moved to inferiors.h.
4250 (get_thread_lwp): Update.
4251 (struct lwp_info): Delete member "entry". Simplify comment for
4254 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4255 current_inferior directly.
4256 (update_watch_registers_callback): Update, "entry" parameter is a
4257 struct thread_info * now. Fetch pid from thread.
4258 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4259 (mips_insert_point): Fetch lwpid from current_inferior.
4260 Pass &all_threads to find_inferior, not &all_lwps.
4261 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4262 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4264 (mips_stopped_data_address): Ditto.
4265 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4267 * linux-tile-low.c (tile_arch_setup): Ditto.
4268 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4269 (update_debug_registers_callback): Update, "entry" parameter is a
4270 struct thread_info * now. Fetch pid from thread.
4271 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4272 Pass &all_threads to find_inferior, not &all_lwps.
4273 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4274 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4275 Pass &all_threads to find_inferior, not &all_lwps.
4276 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4277 (i386_dr_low_get_status): Ditto.
4278 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4279 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4280 (x86_linux_read_description): Ditto.
4281 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4283 2014-02-20 Doug Evans <dje@google.com>
4285 * inferiors.c (get_first_inferior): Fix buglet.
4287 2014-02-19 Doug Evans <dje@google.com>
4289 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4290 * inferiors.c (add_thread): Change result type to struct thread_info *.
4291 All callers updated.
4292 (add_lwp): Call add_thread here instead of in callers.
4293 All callers updated.
4294 * linux-low.h (get_lwp_thread): Rewrite.
4295 (struct lwp_info): New member "thread".
4297 2014-02-19 Doug Evans <dje@google.com>
4299 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4300 All callers updated.
4302 2014-02-19 Doug Evans <dje@google.com>
4304 * inferiors.c (add_thread): Fix whitespace.
4306 2014-02-19 Doug Evans <dje@google.com>
4308 * dll.c (clear_dlls): Replace accessing list implemention details
4310 * gdbthread.h (get_first_thread): Declare.
4311 * inferiors.c (for_each_inferior_with_data): New function.
4312 (get_first_thread): New function.
4313 (find_thread_ptid): Simplify.
4314 (get_first_inferior): New function.
4315 (clear_list): Delete.
4316 (one_inferior_p): New function.
4317 (clear_inferior_list): New function.
4318 (clear_inferiors): Update.
4319 * inferiors.h (for_each_inferior_with_data): Declare.
4320 (clear_inferior_list): Declare.
4321 (one_inferior_p): Declare.
4322 (get_first_inferior): Declare.
4323 * linux-low.c (linux_wait_for_event): Replace accessing list
4324 implemention details with API function.
4325 * server.c (target_running): Ditto.
4326 (accumulate_file_name_length): New function.
4327 (emit_dll_description): New function.
4328 (handle_qxfer_libraries): Replace accessing list implemention
4329 details with API function.
4330 (handle_qxfer_threads_worker): New function.
4331 (handle_qxfer_threads_proper): Replace accessing list implemention
4332 details with API function.
4333 (handle_query): Ditto.
4334 (visit_actioned_threads_callback_ftype): New typedef.
4335 (visit_actioned_threads_data): New struct.
4336 (visit_actioned_threads): Rewrite to be find_inferior callback.
4337 (resume): Call find_inferior.
4338 (handle_status): Replace accessing list implemention
4339 details with API function.
4340 (process_serial_event): Replace accessing list implemention details
4342 * target.c (set_desired_inferior): Replace accessing list implemention
4343 details with API function.
4344 * tracepoint.c (same_process_p): New function.
4345 (gdb_agent_about_to_close): Replace accessing list implemention
4346 details with API function.
4347 * win32-low.c (child_delete_thread): Replace accessing list
4348 implemention details with API function.
4349 (match_dll_by_basename): New function.
4350 (dll_is_loaded_by_basename): New function.
4351 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4352 details call to dll_is_loaded_by_basename.
4354 2014-02-19 Doug Evans <dje@google.com>
4356 * dll.h (struct dll_info): Add comment.
4357 * gdbthread.h (struct thread_info): Add comment.
4358 (current_ptid): Simplify.
4359 * inferiors.c (add_process): Update.
4360 (remove_process): Update.
4361 * inferiors.h (struct process_info): Rename member "head" to "entry".
4362 * linux-low.c (delete_lwp): Update.
4364 (last_thread_of_process_p): Update.
4365 (kill_one_lwp_callback, linux_kill): Update.
4366 (status_pending_p_callback): Update.
4367 (wait_for_sigstop): Update. Simplify read of ptid.
4368 (start_step_over): Update.
4369 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4370 (get_lwp_thread): Update.
4371 (struct lwp_info): Rename member "head" to "entry".
4372 * regcache.h (inferior_list_entry): Delete.
4373 * server.c (kill_inferior_callback): Update.
4374 (detach_or_kill_inferior_callback): Update.
4375 (print_started_pid): Update.
4376 (print_attached_pid): Update.
4377 (process_serial_event): Simplify read of ptid.
4378 * thread-db.c (thread_db_create_event): Update.
4379 (thread_db_get_tls_address): Update.
4380 * win32-low.c (current_inferior_ptid): Simplify.
4382 2014-02-19 Tom Tromey <tromey@redhat.com>
4384 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4386 (target_supports_btrace): Update.
4388 2014-02-14 Yao Qi <yao@codesourcery.com>
4390 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4391 (rsp-low-ipa.o): New target.
4393 2014-02-12 Tom Tromey <tromey@redhat.com>
4395 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4396 convert_ascii_to_int.
4397 * regcache.c (registers_to_string): Likewise.
4398 * remote-utils.c (decode_M_packet): Likewise.
4399 * server.c (process_serial_event): Likewise.
4401 2014-02-12 Tom Tromey <tromey@redhat.com>
4403 * server.c (handle_query, handle_v_run): Use hex2bin, not
4405 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4407 2014-02-12 Tom Tromey <tromey@redhat.com>
4409 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4410 convert_int_to_ascii.
4411 * regcache.c (registers_to_string, collect_register_as_string):
4413 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4415 * server.c (process_serial_event): Likewise.
4416 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4417 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4419 2014-02-12 Tom Tromey <tromey@redhat.com>
4421 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4422 bin2hex, not hexify.
4423 * tracepoint.c (cmd_qtstatus): Likewise.
4425 2014-02-12 Tom Tromey <tromey@redhat.com>
4427 * remote-utils.c (monitor_output): Pass explicit length to
4430 2014-02-12 Tom Tromey <tromey@redhat.com>
4432 * tracepoint.c: Include rsp-low.h.
4433 * server.c: Include rsp-low.h.
4434 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4435 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4437 * remote-utils.c: Include rsp-low.h.
4438 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4439 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4440 (convert_int_to_ascii, convert_ascii_to_int): Move to
4442 * regcache.c: Include rsp-low.h.
4443 * ax.c: Include rsp-low.h.
4444 * Makefile.in (SFILES): Add common/rsp-low.c.
4445 (OBS): Add rsp-low.o.
4446 (rsp-low.o): New target.
4448 2014-02-12 Tom Tromey <tromey@redhat.com>
4450 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4451 Include print-utils.h.
4452 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4453 (plongest, thirty_two, phex_nz): Remove.
4454 * Makefile.in (SFILES): Add common/print-utils.c.
4455 (OBS): Add print-utils.o.
4456 (print-utils-ipa.o): New target.
4457 (print-utils.o): New target.
4458 (IPA_OBJS): Add print-utils-ipa.o.
4460 2014-02-06 Tom Tromey <tromey@redhat.com>
4462 * Makefile.in (SFILES): Fix indentation.
4464 2014-02-05 Doug Evans <dje@google.com>
4466 * linux-low.c (linux_wait_for_event): Improve comment.
4467 (linux_wait_1): Keep current_inferior in sync with event_child.
4469 2014-01-22 Doug Evans <dje@google.com>
4471 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4473 2014-01-22 Doug Evans <dje@google.com>
4475 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4476 * configure: Regenerate.
4477 * config.in: Regenerate.
4478 * Makefile.in (SFILES): Add debug.c.
4480 * debug.c: New file.
4481 * debug.h: New file.
4482 * linux-aarch64-low.c (*): Update all debugging printfs to use
4483 debug_printf instead of fprintf.
4484 * linux-arm-low.c (*): Ditto.
4485 * linux-cris-low.c (*): Ditto.
4486 * linux-crisv32-low.c (*): Ditto.
4487 * linux-m32r-low.c (*): Ditto.
4488 * linux-sparc-low.c (*): Ditto.
4489 * linux-x86.c (*): Ditto.
4490 * linux-low.c (*): Ditto.
4491 (linux_wait_1): Add calls to debug_enter, debug_exit.
4492 (linux_wait): Remove redundant debugging printf.
4493 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4494 (linux_resume, unstop_all_lwps): Ditto.
4495 * mem-break.c (*): Update all debugging printfs to use
4496 debug_printf instead of fprintf.
4497 * remote-utils.c (*): Ditto.
4498 * thread-db.c (*): Ditto.
4499 * server.c #include <ctype.h>, "gdb_vecs.h".
4500 (debug_threads): Moved to debug.c.
4501 (*): Update all debugging printfs to use debug_printf instead of
4503 (start_inferior): Replace call to fflush with call to debug_flush.
4504 (monitor_show_help): Mention set debug-format.
4505 (parse_debug_format_options): New function.
4506 (handle_monitor_command): Handle "monitor set debug-format".
4507 (gdbserver_usage): Mention --debug-format.
4508 (main): Parse --debug-format.
4509 * server.h (debug_threads): Declaration moved to debug.h.
4511 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4512 trace_debug_1 that uses debug_printf.
4513 (tracepoint_look_up_symbols): Update all debugging printfs to use
4514 debug_printf instead of fprintf.
4516 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4518 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4521 2014-01-17 Pedro Alves <palves@redhat.com>
4524 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4525 defined after including gdb_proc_service.h.
4527 2014-01-16 Doug Evans <dje@google.com>
4529 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4530 (match_dll): Use it.
4532 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4534 * target.h (target_ops) <read_btrace>: Change parameters and
4535 return type to allow error reporting.
4536 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4537 trace reading errors on.
4538 * linux-low.c (linux_low_read_btrace): Pass trace reading
4540 (linux_low_disable_btrace): New.
4542 2014-01-15 Doug Evans <dje@google.com>
4544 * inferiors.c (thread_id_to_gdb_id): Delete.
4545 * inferiors.h (thread_id_to_gdb_id): Delete.
4547 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4549 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4550 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4553 2014-01-08 Pedro Alves <palves@redhat.com>
4555 * server.c (handle_status): Don't discard previous queued stop
4556 replies or thread's pending status here.
4557 (main) <disconnection>: Do it here instead.
4559 2014-01-08 Pedro Alves <palves@redhat.com>
4561 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4562 * server.c (visit_actioned_threads, handle_pending_status): New
4564 (handle_v_cont): Factor out parts to ...
4565 (resume): ... this new function. If in all-stop, and a thread
4566 being resumed has a pending status, report it without actually
4568 (myresume): Adjust to use the new 'resume' function.
4569 (clear_pending_status_callback, set_pending_status_callback)
4570 (find_status_pending_thread_callback): New functions.
4571 (handle_status): Handle the case of multiple threads having
4572 interesting statuses to report. Report threads' real last signal
4573 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4574 with an interesting thread to report the status for, instead of
4575 always reporting the status of the first thread.
4577 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4579 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4580 * gdbreplay.c (gdbreplay_version): Likewise.
4582 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4584 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4585 iov.iov_len with the real length in use.
4587 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4589 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4590 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4591 for all targets that use win32-low.c.
4592 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4593 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4595 2013-12-13 Pedro Alves <palves@redhat.com>
4597 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4598 if equal to TARGET_WAITKIND_LOADED.
4599 * win32-low.c (cached_status): New static global.
4600 (win32_wait): Add declaration.
4601 (do_initial_child_stuff): Flush all initial pending debug events
4602 up to the initial breakpoint.
4603 (win32_wait): If CACHED_STATUS was set, return that instead
4604 of doing a real wait. Remove the code resuming the execution
4605 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4606 during the initial phase. Also remove the code changing
4607 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4608 TARGET_WAITKIND_STOPPED.
4610 2013-12-11 Yao Qi <yao@codesourcery.com>
4612 * notif.c (handle_notif_ack): Return 0 if no notification
4615 2013-11-20 Doug Evans <dje@google.com>
4617 * linux-low.c (linux_set_resume_request): Fix comment.
4619 2013-11-20 Doug Evans <dje@google.com>
4621 * linux-low.c (resume_status_pending_p): Tweak comment.
4623 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4625 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4626 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4627 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4628 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4629 (srv_amd64_regobj): Add amd64-mpx.o.
4630 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4631 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4632 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4633 * i387-fp.c (num_pl_bnd_register) Added constant.
4634 (num_pl_bnd_cfg_registers) Added constant.
4635 (struct i387_xsave) Added reserved area and MPX fields.
4636 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4637 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4639 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4640 (init_registers_amd64_mpx_linux): Declare new function.
4641 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4642 (x86_64_regmap): Add MPX registers.
4643 (x86_linux_read_description): Add MPX case.
4644 (initialize_low_arch): Initialize MPX targets.
4646 2013-11-18 Tom Tromey <tromey@redhat.com>
4648 * configure: Rebuild.
4649 * configure.ac: Don't check for stdlib.h.
4650 * gdbreplay.c: Unconditionally include stdlib.h.
4652 2013-11-18 Tom Tromey <tromey@redhat.com>
4654 * config.in: Rebuild.
4655 * configure: Rebuild.
4656 * configure.ac: Don't use AC_HEADER_DIRENT.
4658 2013-11-18 Tom Tromey <tromey@redhat.com>
4660 * server.h: Don't check HAVE_STRING_H.
4661 * gdbreplay.c: Don't check HAVE_STRING_H.
4662 * configure: Rebuild.
4664 2013-11-18 Tom Tromey <tromey@redhat.com>
4666 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4669 2013-11-08 Tom Tromey <tromey@redhat.com>
4671 * configure, config.in: Rebuild.
4672 * configure.ac: Remove unused configury.
4674 2013-11-08 Tom Tromey <tromey@redhat.com>
4676 * acinclude.m4: Include common.m4, codeset.m4.
4677 * configure, config.in: Rebuild.
4678 * configure.ac: Use GDB_AC_COMMON.
4680 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4682 * linux-s390-low.c (HWCAP_S390_TE): New define.
4683 (s390_arch_setup): Consider the TE field in the HWCAP for
4684 determining 'have_regset_tdb'.
4686 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4689 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4692 2013-10-02 Pedro Alves <palves@redhat.com>
4694 * server.c (process_serial_event): Don't output "GDBserver
4695 exiting" if GDB is connected through stdio.
4696 * target.c (mywait): Likewise, be silent if GDB is connected
4699 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4701 * lynx-low.c (lynx_add_threads_after_attach): New function.
4702 (lynx_attach): Remove call to add_thread. Add call to
4703 lynx_add_threads_after_attach instead.
4705 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4707 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4708 * config.in, configure: Regenerated.
4710 2013-09-18 Yao Qi <yao@codesourcery.com>
4713 * server.c (start_inferior): Clear 'resume_info'.
4715 2013-09-16 Jiong Wang <jiwang@tilera.com>
4717 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4720 2013-09-16 Jiong Wang <jiwang@tilera.com>
4722 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4723 linux-tile-low.o to srv_tgtobj.
4725 2013-09-16 Will Newton <will.newton@linaro.org>
4727 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4730 2013-09-06 Pedro Alves <palves@redhat.com>
4732 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4733 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4734 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4735 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4736 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4737 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4739 2013-09-06 Pedro Alves <palves@redhat.com>
4741 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4742 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4744 2013-09-06 Pedro Alves <palves@redhat.com>
4746 * linux-amd64-ipa.c: Include tracepoint.h.
4747 * linux-i386-ipa.c: Include tracepoint.h.
4749 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4751 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4752 (ps_get_thread_area): New function.
4754 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4756 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4757 (initialize_low_arch): Call init_registers_crisv32 rather than
4758 init_register_crisv32.
4760 2013-09-05 Pedro Alves <palves@redhat.com>
4762 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4764 * hostio.h: ... this new file.
4765 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4766 win32-low.c: Include hostio.h.
4768 2013-09-05 Pedro Alves <palves@redhat.com>
4770 * server.h (gdb_client_data, handler_func, callback_handler_func)
4771 (delete_file_handler, add_file_handler, append_callback_event)
4772 (delete_callback_event, start_event_loop, initialize_event_loop):
4773 Move to event-loop.h and include it.
4774 * event-loop.h: New file.
4776 2013-09-05 Pedro Alves <palves@redhat.com>
4778 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4779 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4780 (loaded_dll, unloaded_dll): Move to ...
4781 * dll.h: ... this new file.
4782 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4784 2013-09-05 Pedro Alves <palves@redhat.com>
4786 * server.h (current_process, get_thread_process, all_processes)
4787 (add_inferior_to_list, for_each_inferior, current_inferior)
4788 (remove_inferior, add_process, remove_process, find_process_pid)
4789 (have_started_inferiors_p, have_attached_inferiors_p)
4790 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4791 (clear_inferiors, find_inferior, find_inferior_id)
4792 (inferior_target_data, set_inferior_target_data)
4793 (inferior_regcache_data, set_inferior_regcache_data): Move to
4794 inferiors.h, and include it.
4795 * inferiors.h: New file.
4797 2013-09-05 Pedro Alves <palves@redhat.com>
4799 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4803 2013-09-05 Pedro Alves <palves@redhat.com>
4805 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4807 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4808 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4809 (handle_tracepoint_general_set, handle_tracepoint_query)
4810 (tracepoint_finished_step, tracepoint_was_hit)
4811 (release_while_stepping_state_list, current_traceframe)
4812 (in_readonly_region, traceframe_read_mem)
4813 (fetch_traceframe_registers, traceframe_read_sdata)
4814 (traceframe_read_info, struct fast_tpoint_collect_status)
4815 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4816 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4817 (supply_fast_tracepoint_registers)
4818 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4819 (ipa_tdesc, claim_trampoline_space)
4820 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4821 (agent_mem_read, agent_get_trace_state_variable_value)
4822 (agent_set_trace_state_variable_value, agent_tsv_read)
4823 (agent_mem_read_string, get_raw_reg_func_addr)
4824 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4825 * tracepoint.h: ... this new file.
4827 2013-09-05 Pedro Alves <palves@redhat.com>
4829 * server.h (perror_with_name, error, fatal, warning, paddress)
4830 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4832 * utils.h: New file.
4834 2013-09-05 Pedro Alves <palves@redhat.com>
4836 * server.h (remote_debug, noack_mode, transport_is_reliable)
4837 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4838 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4839 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4840 (write_enn, initialize_async_io, enable_async_io)
4841 (disable_async_io, check_remote_input_interrupt_request)
4842 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4843 (dead_thread_notify, prepare_resume_reply)
4844 (decode_address_to_semicolon, decode_address, decode_m_packet)
4845 (decode_M_packet, decode_X_packet, decode_xfer_write)
4846 (decode_search_memory_packet, unhexify, hexify)
4847 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4848 (look_up_one_symbol, relocate_instruction)
4849 (monitor_output): Move to remote-utils.h, and include it.
4850 * remote-utils.h: New file.
4852 2013-09-05 Pedro Alves <palves@redhat.com>
4854 * server.h (_): Delete.
4856 2013-09-02 Pedro Alves <palves@redhat.com>
4858 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4859 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4861 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4863 2013-09-02 Pierre Muller <muller@sourceware.org>
4865 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4866 or WriteProcessMemory complete successfully and handle
4867 ERROR_PARTIAL_COPY error.
4869 2013-09-02 Pedro Alves <palves@redhat.com>
4871 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4872 error instead of EIO.
4874 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4877 * linux-low.c: Include filestuff.h.
4878 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4879 * lynx-low.c: Include filestuff.h.
4880 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4881 * server.c: Include filestuff.h.
4882 (main): Call notice_open_fds.
4883 * spu-low.c: Include filestuff.h.
4884 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4886 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4888 * Makefile.in: Explain why ../target and ../nat are not
4889 listed as include file search paths.
4890 (linux-waitpid.o): New object file rule.
4891 * configure.srv (srv_native_linux_obj): New variable.
4892 Replace all occurrences of linux native object files with
4893 $srv_native_linux_obj.
4894 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4895 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4896 (linux_enable_event_reporting): Remove declaration.
4897 (my_waitpid): Moved to common/linux-waitpid.c.
4898 (linux_wait_for_event): Pass ptid when calling
4899 linux_enable_event_reporting.
4900 (linux_supports_tracefork_flag): Remove.
4901 (linux_enable_event_reporting): Likewise.
4902 (linux_tracefork_grandchild): Remove.
4903 (STACK_SIZE): Moved to common/linux-ptrace.c.
4904 (linux_tracefork_child): Remove.
4905 (linux_test_for_tracefork): Remove.
4906 (linux_look_up_symbols): Call linux_supports_traceclone.
4907 (initialize_low): Remove call to linux_test_for_tracefork.
4908 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4909 common/linux-ptrace.h.
4910 (PTRACE_TYPE_ARG4): Likewise.
4911 Include linux-ptrace.h.
4913 2013-08-21 Pedro Alves <palves@redhat.com>
4915 * config.in: Renegerate.
4917 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4919 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4920 (SFILES): Remove $(srcdir)/common/target-common.c and
4921 add $(srcdir)/target/waitstatus.c.
4922 (OBS): Remove target-common.o and add waitstatus.o.
4923 (server_h): Remove $(srcdir)/../common/target-common.h and
4924 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4925 and $(srcdir)/../target/waitstatus.h.
4926 (target-common.o): Remove.
4927 (waitstatus.o): New target object file.
4928 * target.h: Do not include target-common.h and
4929 include target/resume.h, target/wait.h and
4930 target/waitstatus.h.
4932 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4934 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4935 to PTRACE_TYPE_ARG3.
4936 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4937 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4939 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4940 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4942 2013-07-27 Jie Zhang <jie@codesourcery.com>
4943 Daniel Jacobowitz <dan@codesourcery.com>
4944 Yao Qi <yao@codesourcery.com>
4946 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4947 (mips-linux-watch.o): New rule.
4948 (mips_linux_watch_h): New variable.
4949 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4951 * linux-mips-low.c: Include mips-linux-watch.h.
4952 (struct arch_process_info, struct arch_lwp_info): New.
4953 (update_watch_registers_callback): New function.
4954 (mips_linux_new_process, mips_linux_new_thread) New functions.
4955 (mips_linux_prepare_to_resume, mips_insert_point): New
4957 (mips_remove_point, mips_stopped_by_watchpoint): New
4959 (rsp_bp_type_to_target_hw_bp_type): New function.
4960 (mips_stopped_data_address): New function.
4961 (the_low_target): Add watchpoint support functions.
4963 2013-07-27 Yao Qi <yao@codesourcery.com>
4965 * i386-low.c: Include break-common.h.
4966 (enum target_hw_bp_type): Remove.
4968 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4970 * Makefile.in (SFILES): /common/target-common.c.
4971 (OBS): Add target-common.o.
4972 (server_h): Add $(srcdir)/../common/target-common.h.
4973 (target-common.o): New target.
4974 * server.c (queue_stop_reply_callback): Free
4975 status string after use.
4976 * target.c (target_waitstatus_to_string): Remove.
4977 * target.h: Include target-common.h.
4978 (resume_kind): Likewise.
4979 (target_waitkind): Likewise.
4980 (target_waitstatus): Likewise.
4981 (TARGET_WNOHANG): Likewise.
4983 2013-07-04 Yao Qi <yao@codesourcery.com>
4985 * Makefile.in (host_alias): Use @host_noncanonical@.
4986 (target_alias): Use @target_noncanonical@.
4987 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4988 ACX_NONCANONICAL_HOST.
4989 * configure: Regenerated.
4992 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4994 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4995 * configure: Rebuild.
4996 * Makefile.in (version_host, version_target): Get from configure.
4997 (version.c): Use $(version_host) and $(version_target).
4999 2013-07-03 Pedro Alves <palves@redhat.com>
5001 * Makefile.in (config.status): Depend on development.sh.
5002 * acinclude.m4: Include libmcheck.m4.
5003 * configure: Regenerate.
5005 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5007 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5008 attribute inside the parentheses.
5009 (winapi_DebugSetProcessKillOnExit): Ditto.
5010 (winapi_DebugBreakProcess): Ditto.
5011 (winapi_GenerateConsoleCtrlEvent): Ditto.
5013 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5015 * notif.h (notif_event): Add a dummy member to avoid compiler
5018 2013-07-01 Pedro Alves <palves@redhat.com>
5020 * hostio.c (HOSTIO_PATH_MAX): Define.
5021 (require_filename, handle_open, handle_unlink, handle_readlink):
5024 2013-07-01 Pedro Alves <palves@redhat.com>
5026 * server.h: Include "pathmax.h".
5027 * linux-low.c: Don't include sys/param.h.
5028 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5030 * win32-low.c: Don't include sys/param.h.
5031 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5033 2013-07-01 Pedro Alves <palves@redhat.com>
5035 * event-loop.c: Don't check HAVE_UNISTD_H before including
5037 * gdbreplay.c: Likewise.
5038 * remote-utils.c: Likewise.
5039 * server.c: Likewise.
5040 * configure.ac: Don't check for unistd.h.
5041 * configure: Regenerate.
5043 2013-06-28 Tom Tromey <tromey@redhat.com>
5045 * Makefile.in (version.c): Use version.in, not
5048 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5050 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5051 * configure: Rebuild.
5052 * Makefile.in (version_host, version_target): Get from configure.
5053 (version.c): Use $(version_host) and $(version_target).
5055 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5057 Fix trace-status to output user name without trailing colon.
5058 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5060 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5062 Fix trace-status to output proper start-time and stop-time.
5063 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5064 output start time and stop time in hex as gdb expects.
5066 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5068 * tracepoint.c (build_traceframe_info_xml): Output trace state
5069 variables present in the trace buffer.
5071 2013-06-24 Tom Tromey <tromey@redhat.com>
5073 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5075 (version.o): Remove.
5076 * gdbreplay.c: Include version.h.
5077 (version, host_name): Don't declare.
5078 * server.h: Include version.h.
5079 (version, host_name): Don't declare.
5081 2013-06-12 Pedro Alves <palves@redhat.com>
5083 * linux-x86-low.c (linux_is_elf64): Delete global.
5084 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5085 with local linux_pid_exe_is_elf_64_file use.
5087 2013-06-11 Pedro Alves <palves@redhat.com>
5089 * linux-low.c (regset_disabled, disable_regset): New functions.
5090 (regsets_fetch_inferior_registers)
5091 (regsets_store_inferior_registers): Use them.
5092 (initialize_regsets_info); Don't allocate the disabled_regsets
5094 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5097 2013-06-11 Pedro Alves <palves@redhat.com>
5099 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5102 2013-06-11 Pedro Alves <palves@redhat.com>
5104 * linux-x86-low.c (initialize_low_arch): Call
5105 init_registers_x32_avx_linux.
5107 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5109 Fix compatibility with Android Bionic.
5110 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5113 2013-06-07 Pedro Alves <palves@redhat.com>
5116 * Makefile.in (OBS): Add tdesc.o.
5117 (IPA_OBJS): Add tdesc-ipa.o.
5118 (tdesc-ipa.o): New rule.
5119 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5121 * linux-low.c (new_inferior): Delete.
5122 (disabled_regsets, num_regsets): Delete.
5123 (linux_add_process): Adjust to set the new per-process
5125 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5126 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5127 was a stop. When calling arch_setup, switch the current inferior
5128 to the thread that got an event.
5129 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5130 (regsets_fetch_inferior_registers)
5131 (regsets_store_inferior_registers): New regsets_info parameter.
5133 (linux_register_in_regsets): New regs_info parameter. Adjust to
5135 (register_addr, fetch_register, store_register): New usrregs_info
5136 parameter. Adjust to use it.
5137 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5138 parameter regs_info. Adjust to use it.
5139 (linux_fetch_registers): Get the current inferior's regs_info, and
5141 (linux_store_registers): Ditto.
5142 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5143 (initialize_low): Don't initialize the target_regsets here. Call
5144 initialize_low_arch.
5145 * linux-low.h (target_regsets): Delete declaration.
5146 (struct regsets_info): New.
5147 (struct usrregs_info): New.
5148 (struct regs_info): New.
5149 (struct process_info_private) <new_inferior>: New field.
5150 (struct linux_target_ops): Delete the num_regs, regmap, and
5151 regset_bitmap fields. New field regs_info.
5152 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5153 * i387-fp.c (num_xmm_registers): Delete.
5154 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5155 calls to new interface.
5156 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5157 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5158 Infer the number of xmm registers from the regcache's target
5160 * i387-fp.h (num_xmm_registers): Delete.
5161 * inferiors.c (add_thread): Don't install the thread's regcache
5163 * proc-service.c (gregset_info): Fetch the current inferior's
5164 regs_info. Adjust to use it.
5165 * regcache.c: Include tdesc.h.
5166 (register_bytes, reg_defs, num_registers)
5167 (gdbserver_expedite_regs): Delete.
5168 (get_thread_regcache): If the thread doesn't have a regcache yet,
5169 create one, instead of aborting gdbserver.
5170 (regcache_invalidate_one): Rename to ...
5171 (regcache_invalidate_thread): ... this.
5172 (regcache_invalidate_one): New.
5173 (regcache_invalidate): Only invalidate registers of the current
5175 (init_register_cache): Add target_desc parameter, and use it.
5176 (new_register_cache): Ditto. Assert the target description has a
5177 non zero registers_size.
5178 (regcache_cpy): Add assertions. Adjust.
5179 (realloc_register_cache, set_register_cache): Delete.
5180 (registers_to_string, registers_from_string): Adjust.
5181 (find_register_by_name, find_regno, find_register_by_number)
5182 (register_cache_size): Add target_desc parameter, and use it.
5183 (free_register_cache_thread, free_register_cache_thread_one)
5184 (regcache_release, register_cache_size): New.
5185 (register_size): Add target_desc parameter, and use it.
5186 (register_data, supply_register, supply_register_zeroed)
5187 (supply_regblock, supply_register_by_name, collect_register)
5188 (collect_register_as_string, collect_register_by_name): Adjust.
5189 * regcache.h (struct target_desc): Forward declare.
5190 (struct regcache) <tdesc>: New field.
5191 (init_register_cache, new_register_cache): Add target_desc
5193 (regcache_invalidate_thread): Declare.
5194 (regcache_invalidate_one): Delete declaration.
5195 (regcache_release): Declare.
5196 (find_register_by_number, register_cache_size, register_size)
5197 (find_regno): Add target_desc parameter.
5198 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5200 * remote-utils.c: Include tdesc.h.
5201 (outreg, prepare_resume_reply): Adjust.
5202 * server.c: Include tdesc.h.
5203 (gdbserver_xmltarget): Delete declaration.
5204 (get_features_xml, process_serial_event): Adjust.
5205 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5207 (struct process_info) <tdesc>: New field.
5208 (ipa_tdesc): Declare.
5209 * tdesc.c: New file.
5210 * tdesc.h: New file.
5211 * tracepoint.c: Include tdesc.h.
5212 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5213 (get_context_regcache): Adjust to pass ipa_tdesc down.
5214 (do_action_at_tracepoint): Adjust to get the register cache size
5215 from the context regcache's description.
5216 (traceframe_walk_blocks): Adjust to get the register cache size
5217 from the current trace frame's description.
5218 (traceframe_get_pc): Adjust to get current trace frame's
5219 description and pass it down.
5220 (gdb_collect): Adjust to get the register cache size from the
5222 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5223 (gdbserver_xmltarget): Delete.
5224 (initialize_low_tracepoint): Set the ipa's target description.
5225 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5226 (initialize_low_tracepoint): Set the ipa's target description.
5227 * linux-x86-low.c: Include tdesc.h.
5228 [__x86_64__] (is_64bit_tdesc): New.
5229 (ps_get_thread_area, x86_get_thread_area): Use it.
5230 (i386_cannot_store_register): Rename to ...
5231 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5232 (i386_cannot_fetch_register): Rename to ...
5233 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5234 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5236 (target_regsets): Rename to ...
5237 (x86_regsets): ... this.
5238 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5240 (x86_siginfo_fixup): Use is_64bit_tdesc.
5241 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5242 (tdesc_x32_avx_linux, tdesc_x32_linux)
5243 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5245 (x86_linux_update_xmltarget): Delete.
5246 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5247 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5248 (AMD64_LINUX_USER64_CS): New.
5249 (x86_linux_read_description): New, based on
5250 x86_linux_update_xmltarget.
5251 (same_process_callback): New.
5252 (x86_arch_setup_process_callback): New.
5253 (x86_linux_update_xmltarget): New.
5254 (x86_regsets_info): New.
5255 (amd64_linux_regs_info): New.
5256 (i386_linux_usrregs_info): New.
5257 (i386_linux_regs_info): New.
5258 (x86_linux_regs_info): New.
5259 (x86_arch_setup): Reimplement.
5260 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5261 (x86_emit_ops): Ditto.
5262 (the_low_target): Adjust. Install x86_linux_regs_info,
5263 x86_cannot_fetch_register, and x86_cannot_store_register.
5264 (initialize_low_arch): New.
5265 * linux-ia64-low.c (tdesc_ia64): Declare.
5266 (ia64_fetch_register): Adjust.
5267 (ia64_usrregs_info, regs_info): New globals.
5268 (ia64_regs_info): New function.
5269 (the_low_target): Adjust.
5270 (initialize_low_arch): New function.
5271 * linux-sparc-low.c (tdesc_sparc64): Declare.
5272 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5274 (sparc_arch_setup): New function.
5275 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5276 (the_low_target): Adjust.
5277 (initialize_low_arch): New function.
5278 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5279 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5280 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5281 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5282 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5283 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5284 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5285 (tdesc_powerpc_isa205_vsx64l): Declare.
5286 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5287 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5288 (ppc_set_pc, ppc_get_hwcap): Adjust.
5289 (ppc_usrregs_info): Forward declare.
5290 (!__powerpc64__) ppc_regmap_adjusted: New global.
5291 (ppc_arch_setup): Adjust to the current process'es target
5293 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5294 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5295 (ppc_store_evrregset): Adjust.
5296 (target_regsets): Rename to ...
5297 (ppc_regsets): ... this, and make static.
5298 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5299 (ppc_regs_info): New function.
5300 (the_low_target): Adjust.
5301 (initialize_low_arch): New function.
5302 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5303 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5304 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5305 (tdesc_s390x_linux64v2): Declare.
5306 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5307 (s390_fill_gregset, s390_store_last_break): Adjust.
5308 (target_regsets): Rename to ...
5309 (s390_regsets): ... this, and make static.
5310 (s390_get_pc, s390_set_pc): Adjust.
5311 (s390_get_hwcap): New target_desc parameter, and use it.
5312 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5313 (s390_arch_setup): Adjust to set the current process'es target
5314 description. Don't adjust the regmap.
5315 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5316 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5317 (regs_info_3264): New globals.
5318 (s390_regs_info): New function.
5319 (the_low_target): Adjust.
5320 (initialize_low_arch): New function.
5321 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5322 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5323 [__mips64] (init_registers_mips_linux)
5324 (init_registers_mips_dsp_linux): Delete defines.
5325 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5326 (have_dsp): New global.
5327 (mips_read_description): New, based on mips_arch_setup.
5328 (mips_arch_setup): Reimplement.
5329 (get_usrregs_info): New function.
5330 (mips_cannot_fetch_register, mips_cannot_store_register)
5331 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5332 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5333 (target_regsets): Rename to ...
5334 (mips_regsets): ... this, and make static.
5335 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5336 (dsp_regs_info, regs_info): New globals.
5337 (mips_regs_info): New function.
5338 (the_low_target): Adjust.
5339 (initialize_low_arch): New function.
5340 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5341 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5343 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5344 (arm_read_description): New, with bits factored from
5346 (arm_arch_setup): Reimplement.
5347 (target_regsets): Rename to ...
5348 (arm_regsets): ... this, and make static.
5349 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5350 (arm_regs_info): New function.
5351 (the_low_target): Adjust.
5352 (initialize_low_arch): New function.
5353 * linux-m68k-low.c (tdesc_m68k): Declare.
5354 (target_regsets): Rename to ...
5355 (m68k_regsets): ... this, and make static.
5356 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5357 (m68k_regs_info): New function.
5358 (m68k_arch_setup): New function.
5359 (the_low_target): Adjust.
5360 (initialize_low_arch): New function.
5361 * linux-sh-low.c (tdesc_sharch): Declare.
5362 (target_regsets): Rename to ...
5363 (sh_regsets): ... this, and make static.
5364 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5365 (sh_regs_info, sh_arch_setup): New functions.
5366 (the_low_target): Adjust.
5367 (initialize_low_arch): New function.
5368 * linux-bfin-low.c (tdesc_bfin): Declare.
5369 (bfin_arch_setup): New function.
5370 (bfin_usrregs_info, regs_info): New globals.
5371 (bfin_regs_info): New function.
5372 (the_low_target): Adjust.
5373 (initialize_low_arch): New function.
5374 * linux-cris-low.c (tdesc_cris): Declare.
5375 (cris_arch_setup): New function.
5376 (cris_usrregs_info, regs_info): New globals.
5377 (cris_regs_info): New function.
5378 (the_low_target): Adjust.
5379 (initialize_low_arch): New function.
5380 * linux-cris-low.c (tdesc_crisv32): Declare.
5381 (cris_arch_setup): New function.
5382 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5383 (cris_regs_info): New function.
5384 (the_low_target): Adjust.
5385 (initialize_low_arch): New function.
5386 * linux-m32r-low.c (tdesc_m32r): Declare.
5387 (m32r_arch_setup): New function.
5388 (m32r_usrregs_info, regs_info): New globals.
5389 (m32r_regs_info): Adjust.
5390 (initialize_low_arch): New function.
5391 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5392 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5393 (tic6x_usrregs_info): Forward declare.
5394 (tic6x_read_description): New function, based on ...
5395 (tic6x_arch_setup): ... this. Reimplement.
5396 (target_regsets): Rename to ...
5397 (tic6x_regsets): ... this, and make static.
5398 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5399 (tic6x_regs_info): New function.
5400 (the_low_target): Adjust.
5401 (initialize_low_arch): New function.
5402 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5403 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5404 (target_regsets): Rename to ...
5405 (xtensa_regsets): ... this, and make static.
5406 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5408 (xtensa_arch_setup, xtensa_regs_info): New functions.
5409 (the_low_target): Adjust.
5410 (initialize_low_arch): New function.
5411 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5412 (nios2_arch_setup): Set the current process'es tdesc.
5413 (target_regsets): Rename to ...
5414 (nios2_regsets): ... this.
5415 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5416 (nios2_regs_info): New function.
5417 (the_low_target): Adjust.
5418 (initialize_low_arch): New function.
5419 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5420 (aarch64_arch_setup): Set the current process'es tdesc.
5421 (target_regsets): Rename to ...
5422 (aarch64_regsets): ... this.
5423 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5424 (aarch64_regs_info): New function.
5425 (the_low_target): Adjust.
5426 (initialize_low_arch): New function.
5427 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5429 (target_regsets): Rename to ...
5430 (tile_regsets): ... this.
5431 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5432 (tile_regs_info): New function.
5433 (tile_arch_setup): Set the current process'es tdesc.
5434 (the_low_target): Adjust.
5435 (initialize_low_arch): New function.
5436 * spu-low.c (tdesc_spu): Declare.
5437 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5438 * win32-arm-low.c (tdesc_arm): Declare.
5439 (arm_arch_setup): New function.
5440 (the_low_target): Install arm_arch_setup instead of
5442 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5443 (init_windows_x86): Rename to ...
5444 (i386_arch_setup): ... this. Set `win32_tdesc'.
5445 (the_low_target): Adjust.
5446 * win32-low.c (win32_tdesc): New global.
5447 (child_add_thread): Don't create the thread cache here.
5448 (do_initial_child_stuff): Set the new process'es tdesc.
5449 * win32-low.h (struct target_desc): Forward declare.
5450 (win32_tdesc): Declare.
5451 * lynx-i386-low.c (tdesc_i386): Declare global.
5452 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5453 * lynx-low.c (lynx_tdesc): New global.
5454 (lynx_add_process): Set the new process'es tdesc.
5455 * lynx-low.h (struct target_desc): Forward declare.
5456 (lynx_tdesc): Declare global.
5457 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5458 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5459 * nto-low.c (nto_tdesc): New global.
5460 (do_attach): Set the new process'es tdesc.
5461 * nto-low.h (struct target_desc): Forward declare.
5462 (nto_tdesc): Declare.
5463 * nto-x86-low.c (tdesc_i386): Declare.
5464 (nto_x86_arch_setup): Set `nto_tdesc'.
5466 2013-06-04 Gary Benson <gbenson@redhat.com>
5468 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5469 to qSupported response when appropriate.
5470 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5471 with nonzero-length annex.
5472 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5473 arguments supplied in annex.
5475 2013-05-31 Doug Evans <dje@google.com>
5478 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5479 64 bits in 64-cross-32 environment.
5481 2013-05-28 Pedro Alves <palves@redhat.com>
5483 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5484 (aarch64-without-fpu.c): Delete rule.
5485 * configure.srv (aarch64*-*-linux*): Remove references to
5486 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5487 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5490 2013-05-24 Pedro Alves <palves@redhat.com>
5492 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5493 instead of strchr/decode_address. Error if the range isn't split
5494 with a ','. Don't assume there's be a ':' in the action.
5496 2013-05-23 Yao Qi <yao@codesourcery.com>
5497 Pedro Alves <palves@redhat.com>
5499 * linux-low.c (lwp_in_step_range): New function.
5500 (linux_wait_1): If the thread was range stepping and stopped
5501 outside the stepping range, report the stop to GDB. Otherwise,
5502 continue stepping. Add range stepping debug output.
5503 (linux_set_resume_request): Copy the step range from the resume
5505 (linux_supports_range_stepping): New.
5506 (linux_target_ops) <supports_range_stepping>: Set to
5507 linux_supports_range_stepping.
5508 * linux-low.h (struct linux_target_ops)
5509 <supports_range_stepping>: New field.
5510 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5511 * linux-x86-low.c (x86_supports_range_stepping): New.
5512 (the_low_target) <supports_range_stepping>: Set to
5513 x86_supports_range_stepping.
5514 * server.c (handle_v_cont): Handle 'r' action.
5515 (handle_v_requests): Append ";r" if the target supports range
5517 * target.h (struct thread_resume) <step_range_start,
5518 step_range_end>: New fields.
5519 (struct target_ops) <supports_range_stepping>:
5521 (target_supports_range_stepping): New macro.
5523 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5525 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5526 confusion in comment.
5528 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5530 * lynx-low.c (struct process_info_private): New type.
5531 (lynx_add_process): New function.
5532 (lynx_create_inferior, lynx_attach): Replace calls to
5533 add_process by calls to lynx_add_process.
5534 (lynx_resume): If PTID is null, then try using
5535 current_process()->private->last_wait_event_ptid.
5537 (lynx_clear_inferiors): Delete. The contents of that function
5538 has been inlined in lynx_mourn;
5539 (lynx_wait_1): Save the ptid in the process's private data.
5540 (lynx_mourn): Free the process' private data. Replace call
5541 to lynx_clear_inferiors by call to clear_inferiors.
5543 2013-05-17 Yao Qi <yao@codesourcery.com>
5545 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5548 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5550 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5551 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5552 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5553 PT_TEXT_END_ADDR guards. Update comments.
5554 (linux_target_op) <read_offsets>: Conditionally define to
5555 linux_read_offsets if the target is UCLIBC and if it defines
5556 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5558 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5559 Andrew Jenner <andrew@codesourcery.com>
5561 * Makefile.in (SFILES): Add linux-nios2-low.c.
5562 (clean): Add action to delete nios2-linux.c.
5563 (nios2-linux.c): New rule.
5564 * configure.srv: Add nios2*-*-linux*.
5565 * linux-nios2-low.c: New.
5567 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5569 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5571 2013-04-25 Hui Zhu <hui@codesourcery.com>
5574 * ax.c (ax_printf): Add fflush.
5576 2013-04-22 Tom Tromey <tromey@redhat.com>
5578 * Makefile.in (SFILES): Add filestuff.c.
5579 (OBS): Add filestuff.o.
5580 (filestuff.o): New target.
5581 * config.in, configure: Rebuild.
5582 * configure.ac: Check for fdwalk, pipe2.
5584 2013-04-17 Pedro Alves <palves@redhat.com>
5586 * configure.ac (USE_THREAD_DB): Delete variable.
5587 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5588 Don't AC_SUBST USE_THREAD_DB.
5589 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5590 * config.in, configure: Regenerate.
5592 2013-04-16 Pedro Alves <palves@redhat.com>
5594 * linux-low.h (struct lwp_info) <thread_known>: Move under
5595 the USE_THREAD_DB #ifdef.
5597 2013-04-16 Pedro Alves <palves@redhat.com>
5599 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5600 (linux-low.o): Delete rule.
5601 * linux-low.h: Always include "gdb_thread_db.h" instead of
5602 conditionally including thread_db.h.
5603 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5606 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5608 * Makefile.in (install-only): Fix make install regression.
5610 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5612 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5613 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5615 * gdbserver.1: Remove.
5617 2013-03-22 Pedro Alves <palves@redhat.com>
5619 * linux-low.c (handle_extended_wait): Don't call
5620 linux_enable_event_reporting.
5622 2013-03-15 Tony Theodore <tonyt@logyst.com>
5625 * Makefile.in (SHELL): Use @SHELL@.
5627 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5629 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5632 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5634 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5635 Remove extraneous NULL element.
5637 2013-03-13 Yao Qi <yao@codesourcery.com>
5639 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5640 'V' block in trace frame.
5642 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5644 * target.h (struct target_ops): Add btrace ops.
5645 (target_supports_btrace): New macro.
5646 (target_enable_btrace): New macro.
5647 (target_disable_btrace): New macro.
5648 (target_read_btrace): New macro.
5649 * gdbthread.h (struct thread_info): Add btrace field.
5650 * server.c: Include btrace-common.h.
5651 (handle_btrace_general_set): New function.
5652 (handle_btrace_enable): New function.
5653 (handle_btrace_disable): New function.
5654 (handle_general_set): Call handle_btrace_general_set.
5655 (handle_qxfer_btrace): New function.
5656 (struct qxfer qxfer_packets[]): Add btrace entry.
5657 * inferiors.c (remove_thread): Disable btrace.
5658 * linux-low: Include linux-btrace.h.
5659 (linux_low_enable_btrace): New function.
5660 (linux_low_read_btrace): New function.
5661 (linux_target_ops): Add btrace ops.
5662 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5663 Add srv_linux_btrace=yes.
5664 (x86_64-*-linux*): Add linux-btrace.o.
5665 Add srv_linux_btrace=yes.
5666 * configure.ac: Define HAVE_LINUX_BTRACE.
5667 * config.in: Regenerated.
5668 * configure: Regenerated.
5670 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5672 * server.c (handle_qxfer): Preserve error message if -3 is
5674 (qxfer): Document the -3 return value.
5676 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5678 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5679 (linux_btrace_h): New variable.
5680 (linux-btrace.o): New rule.
5682 2013-03-08 Stan Shebs <stan@codesourcery.com>
5683 Hafiz Abid Qadeer <abidh@codesourcery.com>
5685 * tracepoint.c (trace_buffer_size): New global.
5686 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5687 (init_trace_buffer): Change to one-argument function. Allocate
5688 trace buffer memory.
5689 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5690 handle QTBuffer:size packet.
5691 (cmd_bigqtbuffer_size): New function.
5692 (initialize_tracepoint): Call init_trace_buffer with
5693 DEFAULT_TRACE_BUFFER_SIZE.
5694 * server.c (handle_query): Add QTBuffer:size in the
5697 2013-03-07 Yao Qi <yao@codesourcery.com>
5699 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5700 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5702 (cmd_qtsp): Adjust condition. Do post increment.
5703 Set cur_action and cur_step_action back to 0.
5705 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5708 * linux-low.c (linux_write_memory): Return early success if LEN is
5711 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5713 * configure.srv: Add x86_64-*-cygwin* as target.
5715 2013-02-28 Tom Tromey <tromey@redhat.com>
5717 * configure.ac: Invoke AC_SYS_LARGEFILE.
5718 * configure, config.in: Rebuild.
5720 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5722 * win32-low.c: Throughout, fix format strings and casts of
5723 printf-like functions to avoid type related warnings on all
5725 (get_child_debug_event): Print dwDebugEventCode as hex since
5726 that's how it's usually documented.
5728 2013-02-28 Yao Qi <yao@codesourcery.com>
5730 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5733 2013-02-27 Jiong Wang <jiwang@tilera.com>
5735 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5736 (reg-tilegx32.c): New rule.
5737 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5738 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5739 different register info initializer according to elf class.
5740 (init_registers_tilgx32): New function. The tilegx32 register info
5742 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5743 (tile_store_gregset): Likewise.
5745 2013-02-27 Yao Qi <yao@codesourcery.com>
5747 * server.c (process_point_options): Print debug message when
5748 debug_threads is true.
5750 2013-02-26 Yao Qi <yao@codesourcery.com>
5752 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5754 2013-02-19 Pedro Alves <palves@redhat.com>
5755 Kai Tietz <ktietz@redhat.com>
5759 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5760 instead of strtoul to extract address from packet.
5761 (process_serial_event) <'z'>: Likewise.
5763 2013-02-18 Yao Qi <yao@codesourcery.com>
5765 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5767 2013-02-14 Pedro Alves <palves@redhat.com>
5771 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5772 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5774 2013-02-14 Pedro Alves <palves@redhat.com>
5776 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5778 2013-02-14 Pedro Alves <palves@redhat.com>
5780 * tracepoint.c (save_string): Delete.
5781 (add_tracepoint_action): Use savestring instead of save_string.
5783 2013-02-12 Pedro Alves <palves@redhat.com>
5785 * linux-xtensa-low.c: Ditto.
5786 * xtensa-xtregs.c: Ditto.
5788 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5790 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5793 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5795 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5796 aarch64_num_wp_regs and aarch64_num_bp_regs to
5797 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5799 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5801 * linux-aarch64-low.c (ps_get_thread_area): Replace
5802 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5804 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5805 Marcus Shawcroft <marcus.shawcroft@arm.com>
5806 Nigel Stephens <nigel.stephens@arm.com>
5807 Yufeng Zhang <yufeng.zhang@arm.com>
5809 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5810 (aarch64.c, aarch64-without-fpu.c): New targets.
5811 * configure.srv (aarch64*-*-linux*): New.
5812 * linux-aarch64-low.c: New file.
5814 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5816 * linux-low.c (handle_extended_wait, linux_create_inferior)
5817 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5818 (dequeue_one_deferred_signal, linux_resume_one_thread)
5819 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5820 (linux_tracefork_grandchild, linux_test_for_tracefork)
5821 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5822 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5823 where the argument is 0.
5825 2013-01-25 Yao Qi <yao@codesourcery.com>
5827 * event-loop.c: Include "queue.h".
5828 (gdb_event_p): New typedef.
5829 (struct gdb_event) <next_event>: Remove.
5830 (event_queue): Change to QUEUE(gdb_event_p).
5831 (async_queue_event): Remove.
5832 (gdb_event_xfree): New.
5833 (initialize_event_loop): New.
5834 (process_event): Use API from QUEUE.
5835 (wait_for_event): Likewise.
5836 * server.c (main): Call initialize_event_loop.
5837 * server.h (initialize_event_loop): Declare.
5839 2013-01-18 Yao Qi <yao@codesourcery.com>
5841 * ax.h (struct eval_agent_expr_context): New.
5842 (gdb_eval_agent_expr): Update declaration.
5843 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5844 TFRAME. Add new argument CTX.
5845 * server.h (struct eval_agent_expr_context): Declare.
5846 (agent_mem_read, agent_tsv_read): Update declaration.
5847 (agent_mem_read_string): Likewise.
5848 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5849 (add_traceframe_block): Add new argument TPOINT.
5850 Increase TPOINT->traceframe_usage.
5851 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5852 eval_tracepoint_agent_expr.
5853 (condition_true_at_tracepoint): Likewise.
5854 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5855 (agent_mem_read_string, agent_tsv_read): Likewise.
5857 2013-01-16 Yao Qi <yao@codesourcery.com>
5859 * linux-low.c (linux_resume_one_lwp): Don't check
5860 'lwp->bp_reinsert != 0'.
5862 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5863 Pedro Alves <palves@redhat.com>
5865 * lynx-low.c (ptrace_request_to_str): Define a temporary
5866 macro and use it to simplify this function's implementation.
5868 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5870 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5873 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5875 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5877 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5879 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5881 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5883 * lynx-low.c (lynx_resume): Use the resume_info parameter
5884 to determine the ptid for the lynx_ptrace call, unless
5885 it is equal to minus_one_ptid, in which case we use the
5886 ptid of the current_inferior.
5887 (lynx_wait_1): After having received a thread create/exit
5888 event, resume the inferior's execution using the signaling
5889 thread's ptid, rather than the old ptid.
5891 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5893 * lynx-low.c (lynx_resume): Delete variable ret.
5895 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5897 * gdbreplay.c (gdbreplay_version): Update copyright year.
5898 * server.c (gdbserver_version): Likewise.
5900 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5902 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5905 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5907 * lynx-low.c (ptrace_request_to_str): Add handling for
5910 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5912 * lynx-low.c (lynx_attach): Delete variable new_process.
5914 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5916 * lynx-low.c (lynx_create_inferior): Delete variable
5919 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5921 * lynx-low.c (ptrace_request_to_str): Do not handle
5922 PTRACE_GETTHREADLIST if this macro does not exist.
5924 2012-12-15 Yao Qi <yao@codesourcery.com>
5926 * Makefile.in (OBS): Add notif.o.
5927 * notif.c, notif.h: New.
5928 * server.c: Include "notif.h".
5929 (struct vstop_notif) <next>: Remove.
5931 (queue_stop_reply): Update.
5932 (push_event, send_next_stop_reply): Remove.
5933 (discard_queued_stop_replies): Update.
5934 (notif_stop): New variable.
5935 (handle_v_stopped): Remove.
5936 (handle_v_requests): Don't call handle_v_stopped. Call
5937 handle_ack_notif instead.
5938 (queue_stop_reply_callback): Call notif_event_enque instead
5939 of queue_stop_reply.
5940 (handle_status): Don't call send_next_stop_reply, call
5941 notif_write_event instead.
5942 (kill_inferior_callback): Likewise.
5943 (detach_or_kill_inferior_callback): Likewise.
5944 (main): Call initialize_notif.
5945 (process_serial_event): Call QUEUE_is_empty.
5946 (handle_target_event): Call notif_push instead of push event.
5947 * server.h (push_event): Remove declaration.
5949 2012-12-10 Tom Tromey <tromey@redhat.com>
5951 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5952 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5955 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5956 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5957 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5958 (amd64-linux-ipa.o, ax.o): Rewrite.
5959 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5960 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5961 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5962 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5963 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5964 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5965 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5966 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5967 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5968 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5969 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5970 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5971 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5972 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5973 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5974 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5975 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5976 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5977 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5978 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5979 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5980 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5981 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5982 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5983 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5984 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5985 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5986 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5987 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5988 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5989 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5990 (reg-tilegx.o): Remove.
5991 (all_object_files): New macro.
5992 Include .deps files.
5993 * aclocal.m4, configure: Rebuild.
5994 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5995 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5996 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5998 2012-12-05 Tom Tromey <tromey@redhat.com>
6001 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6003 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6005 * configure.ac: Check for linux/perf_event.h.
6006 * config.in: Regenerated.
6007 * configure: Regenerated.
6009 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6011 * hostio.c (handle_readlink): Decrease buffer size
6012 parameter passed to readlink by one byte.
6014 2012-11-26 Yao Qi <yao@codesourcery.com>
6016 * configure.ac (build_warnings): Append '-Wempty-body'.
6017 * configure: Regenerated.
6018 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6021 2012-11-15 Pierre Muller <muller@sourceware.org>
6023 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6024 * config.in: Regenerate.
6025 * configure: Regenerate.
6026 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6027 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6028 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6029 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6031 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6032 instead of <sys/wait.h> header.
6033 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6035 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6037 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6038 (various make rules): Remove -DGDBSERVER
6040 2012-11-09 Yao Qi <yao@codesourcery.com>
6042 * spu-low.c (current_ptid): Move it to ..
6043 * gdbthread.h: ... here. New.
6044 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6045 * server.c (myresume, process_serial_event): Likewise.
6046 * thread-db.c (thread_db_find_new_threads): Likewise.
6047 * tracepoint.c (run_inferior_command): Likewise.
6049 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6051 * server.c (handle_search_memory_1): Include access length in
6054 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6056 * linux-crisv32-low.c: Fix compile errors.
6058 2012-09-04 Yao Qi <yao@codesourcery.com>
6060 * tracepoint.c (cmd_qtsv): Adjust debug message.
6061 Don't check CUR_TPOINT.
6063 2012-08-28 Yao Qi <yao@codesourcery.com>
6065 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6066 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6067 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6068 Remove declarations of xmalloc, xreallloc, xstrdup and
6070 * Makefile.in (libiberty_h): New.
6071 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6072 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6074 2012-08-23 Yao Qi <yao@codesourcery.com>
6076 * server.h: Remove declaration of 'xsnprintf'.
6078 2012-08-22 Keith Seitz <keiths@redhat.com>
6080 * server.h: Include build-gnulib-gbserver/config.h.
6081 * gdbreplay.c: Likewise.
6083 2012-08-08 Doug Evans <dje@google.com>
6085 * Makefile.in (SFILES): Add gdb_vecs.c.
6086 (OBS): Add gdb_vecs.o.
6087 (gdb_vecs_h, host_defs_h): New variables.
6088 (thread-db.o): Add $(gdb_vecs_h) dependency.
6089 (gdb_vecs.o): New rule.
6090 * thread-db.c: #include "gdb_vecs.h".
6091 (thread_db_load_search): Use a vector to iterate over path elements.
6092 Handle text appearing after "$pdir".
6094 * configure.ac: Add check for strstr.
6095 * config.in: Regenerate.
6096 * configure: Regenerate.
6098 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6100 * hostio.c (handle_pread): If pread fails, fall back to attempting
6102 (handle_pwrite): Likewise for pwrite.
6104 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6106 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6107 between unsupported TYPE and unimplementable ADDR/LEN combination.
6108 (arm_insert_point): Act on new return value.
6110 2012-07-31 Pedro Alves <palves@redhat.com>
6112 * server.c (process_point_options): Only skip tokens if we find
6113 one that is unrecognized. Don't treat 'X' specially while
6114 skipping unrecognized tokens.
6116 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6118 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6119 to 4-byte-align HW breakpoint addresses for Thumb.
6121 2012-07-27 Yao Qi <yao@codesourcery.com>
6125 * server.h: Declare gdb_agent_about_to_close.
6126 * target.c (kill_inferior): Include "agent.h".
6127 New. Send command 'kill'.
6128 * target.h (kill_inferior): Removed macro.
6129 * tracepoint.c (gdb_agent_about_to_close): New.
6130 (gdb_agent_helper_thread): Handle command 'close'.
6131 Wait endlessly until the inferior stops.
6132 Install gdb_agent_remove_socket to atexit hook.
6133 (agent_socket_name): New static variable.
6134 (gdb_agent_socket_init): Replace local variable 'name' with
6135 'agent_socket_name'.
6136 (gdb_agent_remove_socket): New.
6138 2012-07-27 Yao Qi <yao@codesourcery.com>
6140 * server.c (process_point_options): Stop at 'X' when parsing.
6142 2012-07-19 Michael Eager <eager@eagercon.com>
6144 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6146 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6147 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6148 hardware breakpoint.
6150 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6152 * gdbserver/linux-low.c (initialize_low): Call
6153 linux_ptrace_init_warnings.
6155 2012-07-02 Doug Evans <dje@google.com>
6157 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6160 2012-07-02 Stan Shebs <stan@codesourcery.com>
6162 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6163 (ax.o): Add it to build rule.
6165 (OBS): Add format.o.
6166 (IPA_OBS): Add format.o.
6167 * server.c (handle_query): Claim support for breakpoint commands.
6168 (process_point_options): Add command case.
6169 (process_serial_event): Leave running if there are printfs in
6171 * mem-break.h (any_persistent_commands): Declare.
6172 (add_breakpoint_commands): Declare.
6173 (gdb_no_commands_at_breakpoint): Declare.
6174 (run_breakpoint_commands): Declare.
6175 * mem-break.c (struct point_command_list): New struct.
6176 (struct breakpoint): New field command_list.
6177 (any_persistent_commands): New function.
6178 (add_commands_to_breakpoint): New function.
6179 (add_breakpoint_commands): New function.
6180 (gdb_no_commands_at_breakpoint): New function.
6181 (run_breakpoint_commands): New function.
6182 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6184 * ax.c: Include format.h.
6185 (ax_printf): New function.
6186 (gdb_eval_agent_expr): Add printf opcode.
6188 2012-06-13 Yao Qi <yao@codesourcery.com>
6190 * server.c (start_inferior): Remove duplicated writes to fields
6191 'last_resume_kind' and 'last_status' of 'current_inferior'.
6193 2012-06-12 Yao Qi <yao@codesourcery.com>
6194 Pedro Alves <palves@redhat.com>
6196 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6198 * server.c (handle_v_cont): Extend comment.
6200 2012-06-11 Yao Qi <yao@codesourcery.com>
6202 * linux-low.c (linux_attach): Add 'static'.
6204 2012-06-06 Yao Qi <yao@codesourcery.com>
6206 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6208 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6210 Fix gcc -flto compilation warning.
6211 * server.c (main): Make variable multi_mode and attach volatile.
6213 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6215 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6216 if the platform doesn't know about it.
6218 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6220 * Makefile.in (SFILES): Add linux-tile-low.c.
6221 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6222 * configure.srv: Handle tilegx-*-linux*.
6223 * linux-tile-low.c: New file.
6225 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6227 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6229 2012-05-24 Pedro Alves <palves@redhat.com>
6233 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6235 2012-05-24 Pedro Alves <palves@redhat.com>
6239 Replace target_signal with gdb_signal throughout.
6241 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6243 * linux-low.c (linux_store_registers): Avoid the copying sequence
6244 when no data has been retrieved by ptrace.
6246 2012-05-22 Will Deacon <will.deacon@arm.com>
6248 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6249 Include asm/ptrace.h.
6250 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6253 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6255 * linux-low.c (linux_store_registers): Don't re-retrieve data
6256 with ptrace that has already been obtained from /proc. Always
6257 copy any data retrieved with ptrace to the buffer supplied.
6259 2012-05-11 Yao Qi <yao@codesourcery.com>
6260 Pedro Alves <palves@redhat.com>
6262 * linux-low.c (enum stopping_threads_kind): New.
6263 (stopping_threads): Change type to `enum stopping_threads_kind'.
6264 (handle_extended_wait): If stopping and suspending threads, leave
6265 the new_lwp suspended too.
6266 (linux_wait_for_event): Adjust.
6267 (stop_all_lwps): Set `stopping_threads' to
6268 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6269 whether we're suspending threads or just stopping them. Assert no
6272 2012-04-29 Yao Qi <yao@codesourcery.com>
6274 * server.h: Move some code to ...
6275 * gdbthread.h: ... here. New.
6276 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6277 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6278 (nto-low.o, win32-low.o): Likewise.
6279 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6280 * regcache.c, remote-utils.c, server.c: Likewise.
6281 * target.c, tracepoint.c, win32-low.c: Likewise.
6283 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6285 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6286 (PTRACE_ARG4_TYPE): Likewise.
6287 (PTRACE_XFER_TYPE): Likewise.
6288 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6289 ptrace to PTRACE_ARG3_TYPE.
6290 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6291 (PTRACE_ARG4_TYPE): Likewise.
6292 (PTRACE_XFER_TYPE): Likewise.
6293 (linux_detach_one_lwp): Cast fourth argument of
6294 ptrace to long then PTRACE_ARG4_TYPE.
6295 (regsets_fetch_inferior_registers): Cast third argument of
6296 ptrace to long then PTRACE_ARG3_TYPE.
6297 (regsets_store_inferior_registers): Likewise.
6299 2012-04-20 Pedro Alves <palves@redhat.com>
6301 * configure: Regenerate.
6303 2012-04-19 Pedro Alves <palves@redhat.com>
6305 * Makefile.in (GNULIB_BUILDDIR): New.
6306 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6307 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6308 (all, install-only, uninstall, clean-info, all-lib, clean): No
6309 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6310 (maintainer-clean realclean distclean): Use subdir_do.
6312 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6313 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6314 * acinclude.m4: Include acx_configure_dir.m4.
6315 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6316 calls. Call AC_PROG_RANLIB. Configure gnulib using
6319 (GNULIB_STDINT_H): Adjust.
6320 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6321 * gdbreplay.c: Include build-gnulib/config.h.
6322 * server.h: Likewise.
6323 * aclocal.m4: Regenerate.
6324 * config.in: Regenerate.
6325 * configure: Regenerate.
6327 2012-04-19 Pedro Alves <palves@redhat.com>
6329 * Makefile.in (LIBGNU, INCGNU): Adjust.
6330 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6331 (all, install-only, uninstall, clean-info, all-lib, clean)
6332 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6333 * configure.ac: Adjust AC_OUTPUT output.
6334 * aclocal.m4: Regenerate.
6335 * configure: Regenerate.
6337 2012-04-19 Pedro Alves <palves@redhat.com>
6339 * Makefile.in (generated_files): New.
6340 (server_h): Remove the explicit dependency on config.h, and depend
6341 on $generated_files.
6343 2012-04-19 Pedro Alves <palves@redhat.com>
6345 * Makefile.in (INCGNU): Add -Ignulib.
6347 2012-04-19 Pedro Alves <palves@redhat.com>
6349 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6350 (INCGNU): ... this, and spell out -I here.
6351 (GNULIB_LIB): Rename to ...
6353 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6355 2012-04-19 Pedro Alves <palves@redhat.com>
6357 * config.in: Regenerate.
6359 2012-04-19 Pedro Alves <palves@redhat.com>
6361 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6362 * server.h (memmem): Remove declaration.
6363 * config.in: Regenerate.
6364 * configure: Regenerate.
6366 2012-04-19 Yao Qi <yao@codesourcery.com>
6368 * Makefile.in (SFILES): Add common/vec.c.
6372 2012-04-19 Yao Qi <yao@codesourcery.com>
6374 * remote-utils.c (prepare_resume_reply): Replace with macro
6375 target_core_of_thread.
6376 * server.c (handle_qxfer_threads_proper): Likewise.
6377 * target.h (traget_core_of_thread): New macro.
6379 2012-04-18 Pedro Alves <palves@redhat.com>
6381 * aclocal.m4: Regenerate.
6382 * configure: Regenerate.
6384 2012-04-16 Yao Qi <yao@codesourcery.com>
6386 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6387 duplicated on address.
6389 2012-04-16 Yao Qi <yao@codesourcery.com>
6391 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6392 (struct tracepoint_action_ops) <send>: New field.
6393 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6394 (agent_expr_send, x_tracepoint_action_send): New.
6395 (l_tracepoint_action_send): New.
6396 (cmd_qtdp): Download and install tracepoint
6397 according to `use_agent'.
6398 (run_inferior_command): Add one more parameter `len'.
6400 (tracepoint_send_agent): New.
6401 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6403 2012-04-16 Yao Qi <yao@codesourcery.com>
6405 * tracepoint.c (download_tracepoints): Moved to ...
6406 (cmd_qtstart): ... here.
6408 2012-04-14 Yao Qi <yao@codesourcery.com>
6410 * tracepoint.c: Include inttypes.h.
6411 (struct collect_memory_action): Use sized types.
6412 (struct tracepoint): Likewise.
6413 (cmd_qtdp, stop_tracing): Update print specifiers.
6414 (cmd_qtp, response_tracepoint): Likewise.
6415 (collect_data_at_tracepoint): Likewise.
6416 (collect_data_at_step): Likewise.
6418 2012-04-14 Yao Qi <yao@codesourcery.com>
6420 Import gnulib module inttypes.
6421 * aclocal.m4, config.in, configure: Regenerated.
6423 2012-04-14 Yao Qi <yao@codesourcery.com>
6425 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6426 Makefile and config.status at last.
6428 2012-04-13 Yao Qi <yao@codesourcery.com>
6430 * tracepoint.c: Include stdint.h unconditionally.
6432 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6434 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6435 on BFD_HAVE_SYS_PROCFS_TYPE.
6436 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6437 * configure: Regenerate.
6438 * config.in: Likewise.
6440 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6442 * Makefile.in (clean): Also remove x32.c x32-linux.c
6443 x32-avx.c x32-avx-linux.c.
6444 (x32.o): New target.
6446 (x32-linux.o): Likewise.
6447 (x32-linux.c): Likewise.
6448 (x32-avx.o): Likewise.
6449 (x32-avx.c): Likewise.
6450 (x32-avx-linux.o): Likewise.
6451 (x32-avx-linux.c): Likewise.
6453 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6454 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6455 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6456 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6457 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6458 i386/x32-avx-linux.xml.
6460 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6461 (init_registers_x32_avx_linux): Likwise.
6462 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6463 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6465 2012-04-13 Pedro Alves <palves@redhat.com>
6467 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6468 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6469 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6470 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6473 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6475 * linux-x86-low.c (compat_x32_clock_t): New.
6476 (compat_x32_siginfo_t): Likewise.
6477 (compat_x32_siginfo_from_siginfo): Likewise.
6478 (siginfo_from_compat_x32_siginfo): Likewise.
6479 (linux_is_elf64): Likewise.
6480 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6481 and siginfo_from_compat_x32_siginfo for x32.
6482 (x86_arch_setup): Set linux_is_elf64.
6484 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6487 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6489 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6490 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6491 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6492 compatible with process.
6494 2012-04-12 Yao Qi <yao@codesourcery.com>
6496 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6497 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6498 (install-only, install-info, clean): Handle sub dir gnulib.
6499 (all-lib, am--refresh): New targets.
6500 (memmem.o): Remove target.
6501 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6502 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6503 (AC_REPLACE_FUNCS): Remove memmem.
6504 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6505 (AC_OUTPUT): Generate Makefile in gnulib/.
6506 * aclocal.m4, config.in, configure: Regenerated.
6508 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6510 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6512 2012-04-05 Pedro Alves <palves@redhat.com>
6514 -Werror=strict-aliasing
6516 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6519 2012-04-04 Pedro Alves <palves@redhat.com>
6521 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6522 (sparc_store_gregset_from_stack, sparc_store_gregset)
6523 (sparc_breakpoint_at): Fix formatting.
6525 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6527 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6529 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6530 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6531 * config.in: Regenerate.
6532 * configure: Likewise.
6534 2012-03-29 Pedro Alves <palves@redhat.com>
6536 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6537 Correct ptrace arguments.
6539 2012-03-28 Pedro Alves <palves@redhat.com>
6541 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6542 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6543 (IA64_FR1_REGNUM): New defines.
6544 (ia64_fetch_register): New.
6545 (the_low_target): Install it.
6546 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6548 * linux-low.c (linux_fetch_registers): Try the
6549 the_low_target.fetch_register hook first.
6551 * linux-arm-low.c (the_low_target): Adjust.
6552 * linux-bfin-low.c (the_low_target): Adjust.
6553 * linux-cris-low.c (the_low_target): Adjust.
6554 * linux-crisv32-low.c (the_low_target): Adjust.
6555 * linux-m32r-low.c (the_low_target): Adjust.
6556 * linux-m68k-low.c (the_low_target): Adjust.
6557 * linux-mips-low.c (the_low_target): Adjust.
6558 * linux-ppc-low.c (the_low_target): Adjust.
6559 * linux-s390-low.c (the_low_target): Adjust.
6560 * linux-sh-low.c (the_low_target): Adjust.
6561 * linux-sparc-low.c (the_low_target): Adjust.
6562 * linux-tic6x-low.c (the_low_target): Adjust.
6563 * linux-x86-low.c (the_low_target): Adjust.
6564 * linux-xtensa-low.c (the_low_target): Adjust.
6566 2012-03-26 Pedro Alves <palves@redhat.com>
6568 * server.c (handle_qxfer_libraries): Don't bail early if
6569 the_target->qxfer_libraries_svr4 is not NULL.
6571 2012-03-26 Pedro Alves <palves@redhat.com>
6573 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6575 2012-03-23 Pedro Alves <palves@redhat.com>
6577 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6578 "library-list-svr4" element's start tag when the the DSO list is
6581 2012-03-23 Pedro Alves <palves@redhat.com>
6583 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6584 a variable whose type size is the same as the inferior's pointer
6587 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6589 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6591 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6592 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6593 * linux-low.h: Include <signal.h>.
6594 (struct siginfo): Remove forward declaration.
6595 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6598 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6600 * .gitignore: Ignore more files.
6602 2012-03-19 Pedro Alves <palves@redhat.com>
6603 Jan Kratochvil <jan.kratochvil@redhat.com>
6605 * server.c (cont_thread, general_thread): Add describing comments.
6606 (start_inferior): Clear `cont_thread'.
6607 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6610 2012-03-15 Yao Qi <yao@codesourcery.com>
6612 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6614 (cmd_qtdp): ... here.
6616 2012-03-15 Yao Qi <yao@codesourcery.com>
6618 * tracepoint.c (struct tracepoint_action_ops): New.
6619 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6620 (m_tracepoint_action_download): New.
6621 (r_tracepoint_action_download): New.
6622 (x_tracepoint_action_download): New.
6623 (l_tracepoint_action_download): New.
6624 (add_tracepoint_action): Install `action->ops' according type.
6625 (download_tracepoint_1): Move code `download' function pointer
6626 of various tracepoint_action_ops.
6628 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6630 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6631 linux_ptrace_attach_warnings.
6633 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6635 * Makefile.in (linux-ptrace.o): New.
6636 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6637 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6638 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6639 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6640 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6642 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6644 2012-03-08 Yao Qi <yao@codesourcery.com>
6645 Pedro Alves <palves@redhat.com>
6647 Fix PR server/13392.
6648 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6650 * tracepoint.c (remove_tracepoint): New.
6651 (cmd_qtdp): Call remove_tracepoint when failed to install.
6653 2012-03-07 Pedro Alves <palves@redhat.com>
6655 * linux-low.c (get_detach_signal): New.
6656 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6657 Pass on pending signals to PTRACE_DETACH. Check the result of the
6659 * server.c (program_signals, program_signals_p): New.
6660 (handle_general_set): Handle QProgramSignals.
6661 * server.h (program_signals, program_signals_p): Declare.
6663 2012-03-05 Pedro Alves <palves@redhat.com>
6664 Jan Kratochvil <jan.kratochvil@redhat.com>
6666 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6669 2012-03-03 Yao Qi <yao@codesourcery.com>
6671 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6672 agent_look_up_symbols.
6674 2012-03-03 Yao Qi <yao@codesourcery.com>
6676 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6677 (linux-x86-low.o): Likewise.
6678 * server.h: Remove in_process_agent_loaded.
6679 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6683 2012-03-03 Yao Qi <yao@codesourcery.com>
6685 * tracepoint.c (gdb_agent_capability): New global.
6686 (in_process_agent_loaded_ust): Renamed to
6687 `in_process_agent_supports_ust'.
6689 (in_process_agent_supports_ust): Call agent_capability_check.
6690 (clear_installed_tracepoints): Assert that agent supports
6693 2012-03-03 Yao Qi <yao@codesourcery.com>
6695 * linux-low.c (linux_supports_agent): New.
6696 (linux_target_ops): Initialize field `supports_agent' with
6697 linux_supports_agent.
6698 * target.h (struct target_ops) <supports_agent>: New.
6699 (target_supports_agent): New macro.
6700 * server.c (handle_general_set): Handle packet 'QAgent'.
6701 (handle_query): Send `QAgent+'.
6702 * Makefile.in (server.o): Depends on agent.h.
6704 2012-03-03 Yao Qi <yao@codesourcery.com>
6706 * Makefile.in (OBS): Add agent.o.
6707 Add new rule for agent.o.
6708 Track dependence of tracepoint.c on agent.h.
6709 * tracepoint.c (run_inferior_command_1):
6710 (run_inferior_command): Call agent_run_command.
6711 (gdb_ust_connect_sync_socket): Deleted. Move it to
6713 (resume_thread, stop_thread): Likewise.
6714 (gdb_ust_socket_init): Renamed to ...
6715 (gdb_agent_socket_init): ... New.
6716 (gdb_ust_thread): Renamed to ...
6717 (gdb_agent_helper_thread): ... New.
6718 (gdb_ust_init): Move some code to ...
6719 (gdb_agent_init): ... here. New.
6720 [HAVE_UST]: Call gdb_ust_init.
6721 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6722 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6723 * config.in, configure: Regenerated.
6725 2012-03-02 Pedro Alves <palves@redhat.com>
6727 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6728 * linux-low.c (struct simple_pid_list): New.
6729 (stopped_pids): New a struct simple_pid_list pointer.
6730 (add_to_pid_list, pull_pid_from_list): New.
6731 (handle_extended_wait): Don't assume the first signal new children
6732 report is SIGSTOP. Adjust call to pull_pid_from_list.
6733 (linux_wait_for_lwp): Adjust.
6735 2012-03-02 Yao Qi <yao@codesourcery.com>
6737 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6740 2012-03-02 Yao Qi <yao@codesourcery.com>
6742 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6743 `stop_pc' and `tpoint'. Update caller.
6745 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6747 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6748 * linux-low.c (use_linux_regsets): New macro.
6749 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6750 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6751 (linux_register_in_regsets): New function.
6752 (usr_fetch_inferior_registers): Skip registers covered by
6754 (usr_store_inferior_registers): Likewise.
6755 (usr_fetch_inferior_registers): New macro.
6756 (usr_store_inferior_registers): Likewise.
6757 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6758 (linux_store_registers): Likewise.
6759 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6761 (init_registers_mips64_dsp_linux): Likewise.
6762 (init_registers_mips_linux): New macro.
6763 (init_registers_mips_dsp_linux): Likewise.
6764 (mips_dsp_num_regs): Likewise.
6765 (DSP_BASE, DSP_CONTROL): New fallback macros.
6766 (mips_base_regs): New macro.
6767 (mips_regmap): Use it. Fix the size.
6768 (mips_dsp_regmap): New variable.
6769 (mips_dsp_regset_bitmap): Likewise.
6770 (mips_arch_setup): New function.
6771 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6773 (mips_cannot_store_register): Likewise.
6774 (the_low_target): Update .arch_setup, .num_regs and .regmap
6775 initializers. Add .regset_bitmap initializer.
6776 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6778 * linux-bfin-low.c (the_low_target): Likewise.
6779 * linux-cris-low.c (the_low_target): Likewise.
6780 * linux-crisv32-low.c (the_low_target): Likewise.
6781 * linux-ia64-low.c (the_low_target): Likewise.
6782 * linux-m32r-low.c (the_low_target): Likewise.
6783 * linux-m68k-low.c (the_low_target): Likewise.
6784 * linux-ppc-low.c (the_low_target): Likewise.
6785 * linux-s390-low.c (the_low_target): Likewise.
6786 * linux-sh-low.c (the_low_target): Likewise.
6787 * linux-sparc-low.c (the_low_target): Likewise.
6788 * linux-tic6x-low.c (the_low_target): Likewise.
6789 * linux-x86-low.c (the_low_target): Likewise.
6790 * linux-xtensa-low.c (the_low_target): Likewise.
6791 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6792 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6793 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6795 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6796 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6798 2012-02-29 Yao Qi <yao@codesourcery.com>
6799 Pedro Alves <palves@redhat.com>
6801 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6802 `step_over_finished' is true.
6804 2012-02-27 Pedro Alves <palves@redhat.com>
6806 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6807 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6809 2012-02-27 Pedro Alves <palves@redhat.com>
6812 * linux-low.c (pid_is_stopped): New.
6813 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6815 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6817 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6820 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6822 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6824 2012-02-24 Luis Machado <lgustavo@codesourcery>
6826 * server.c (handle_query): Advertise support for target-side
6827 breakpoint condition evaluation.
6828 (process_point_options): New function.
6829 (process_serial_event): When inserting a breakpoint, check for
6830 a target-side condition that should be evaluated.
6832 * mem-break.c: Include regcache.h and ax.h.
6833 (point_cond_list_t): New data structure.
6834 (breakpoint) <cond_list>: New field.
6835 (find_gdb_breakpoint_at): Make non-static.
6836 (delete_gdb_breakpoint_at): Clear any target-side
6838 (clear_gdb_breakpoint_conditions): New function.
6839 (add_condition_to_breakpoint): Likewise.
6840 (add_breakpoint_condition): Likewise.
6841 (gdb_condition_true_at_breakpoint): Likewise.
6842 (gdb_breakpoint_here): Return result directly instead
6843 of going through a local variable.
6845 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6846 (clear_gdb_breakpoint_conditions): Likewise.
6847 (add_breakpoint_condition): Likewise.
6848 (gdb_condition_true_at_breakpoint): Likewise.
6850 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6851 (need_step_over_p): Take target-side breakpoint condition into
6854 2012-02-24 Luis Machado <lgustavo@codesourcery>
6856 * server.h: Include tracepoint.h.
6857 (agent_mem_read, agent_get_trace_state_variable_value,
6858 agent_set_trace_state_variable_value,
6859 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6860 get_set_tsv_func_addr): New prototypes.
6862 * ax.h: New include file.
6863 * ax.c: New source file.
6865 * tracepoint.c: Include ax.h.
6866 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6867 agent_expr, eval_result_type): Move to ax.h.
6868 (parse_agent_expr): Rename to ...
6869 (gdb_parse_agent_expr): ... this, make it non-static and move
6871 (unparse_agent_expr) Rename to ...
6872 (gdb_unparse_agent_expr): ... this, make it non-static and move
6874 (eval_agent_expr): Rename to ...
6875 (eval_tracepoint_agent_expr): ... this.
6876 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6877 forward declarations.
6878 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6879 (agent_get_trace_state_variable_value): New function.
6880 (agent_set_trace_state_variable_value): New function.
6881 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6882 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6883 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6884 (condition_true_at_tracepoint): Likewise.
6885 (parse_agent_expr): Rename to ...
6886 (gdb_parse_agent_expr): ... this and move to ax.c.
6887 (unparse_agent_expr): Rename to ...
6888 (gdb_unparse_agent_expr): ... this and move to ax.c.
6889 (gdb_agent_op_name): Move to ax.c.
6890 (eval_agent_expr): Rename to ...
6891 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6893 (eval_tracepoint_agent_expr): New function.
6894 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6896 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6898 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6899 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6900 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6901 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6902 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6903 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6904 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6905 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6906 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6907 (compile_bytecodes): Remove forward declaration.
6908 (is_goto_target): Move to ax.c.
6909 (compile_bytecodes): Move to ax.c and call
6910 agent_get_trace_state_variable_value (...) and
6911 agent_set_trace_state_variable_value (...).
6913 * Makefile.in: Update ax.c and IPA dependencies.
6915 2012-02-24 Pedro Alves <palves@redhat.com>
6917 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6918 (cmd_bigqtbuffer_circular): ... this. Only handle
6919 'QTBuffer:circular:'.
6920 (handle_tracepoint_general_set): Adjust.
6922 2012-02-16 Yao Qi <yao@codesourcery.com>
6924 * inferiors.c: Move code to ...
6925 * dll.c: .... here. New.
6926 * server.h: Declare clear_dlls.
6927 * Makefile.in (SFILES): Add dll.c.
6931 2012-02-11 Yao Qi <yao@codesourcery.com>
6933 * server.c: (handle_monitor_command): Add a new parameter
6935 (handle_query): Update caller.
6937 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6939 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6940 * configure, config.in: Regenerate.
6941 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6944 2012-02-02 Pedro Alves <palves@redhat.com>
6946 Try SIGKILL first, then PTRACE_KILL.
6947 * linux-low.c (linux_kill_one_lwp): New.
6948 (linux_kill_one_lwp): Rename to ...
6949 (kill_one_lwp_callback): ... this. Use the new
6952 2012-02-02 Pedro Alves <palves@redhat.com>
6954 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6957 2012-01-27 Pedro Alves <palves@redhat.com>
6959 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6960 (elf_64_file_p): Make static.
6961 (linux_pid_exe_is_elf_64_file): New.
6962 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6963 Delete declarations.
6964 (linux_pid_exe_is_elf_64_file): Declare.
6965 * linux-x86-low.c (x86_arch_setup): Use
6966 linux_pid_exe_is_elf_64_file.
6968 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6970 * linux-low.c (linux_wait_for_event_1): Rename to ...
6971 (linux_wait_for_event): ... here and merge it with former
6972 linux_wait_for_event - new variable wait_ptid, use it.
6973 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6975 2012-01-23 Pedro Alves <palves@redhat.com>
6977 * server.c (main): Avoid yet another case of infinite loop while
6978 detaching/killing after a longjmp.
6980 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6983 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6985 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6987 * hostio.c (handle_readlink): New function.
6988 (handle_vFile): Call it to handle "vFile:readlink" packets.
6990 2012-01-20 Pedro Alves <palves@redhat.com>
6991 Ulrich Weigand <ulrich.weigand@linaro.org>
6993 * server.c (handle_v_requests): Only support vAttach and vRun to
6994 start multiple processes when in extended protocol mode.
6996 2012-01-17 Pedro Alves <palves@redhat.com>
6998 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6999 memalign plus mprotect to allocate the scratch buffer.
7001 2012-01-13 Pedro Alves <palves@redhat.com>
7003 * server.c (attach_inferior): Clear `cont_thread'.
7005 2012-01-13 Pedro Alves <palves@redhat.com>
7007 * server.c (main): Avoid infinite loop while detaching/killing
7010 2012-01-09 Doug Evans <dje@google.com>
7012 * server.c (start_inferior): Set last_ptid in --wrapper case.
7014 2012-01-06 Yao Qi <yao@codesourcery.com>
7016 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7018 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7020 2012-01-04 Yao Qi <yao@codesourcery.com>
7022 * tracepoint.c (cmd_qtdp): Print debug message
7023 for static tracepoint.
7025 2012-01-04 Yao Qi <yao@codesourcery.com>
7027 * tracepoint.c (trace_vdebug): Differentiate debug message
7028 between gdbserver and IPA.
7030 2012-01-03 Yao Qi <yao@codesourcery.com>
7032 * tracepoint.c (tracepoint_was_hit): Don't collect for
7035 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7037 * terminal.h: Reformat copyright header.
7039 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7041 * server.c (gdbserver_version): Update copyright year.
7042 * gdbreplay.c (gdbreplay_version): Likewise.
7044 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7046 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7049 2011-12-18 Hui Zhu <teawater@gmail.com>
7050 * linux-low.c (linux_create_inferior): Save return value to ret.
7052 2011-12-18 Hui Zhu <teawater@gmail.com>
7054 * linux-low.c (linux_create_inferior): Save return value to ret.
7056 2011-12-16 Doug Evans <dje@google.com>
7058 * linux-low.c (linux_create_inferior): If stdio connection,
7059 redirect stdin from /dev/null, stdout to stderr.
7060 * remote-utils.c (remote_is_stdio): New static global.
7061 (remote_connection_is_stdio): New function.
7062 (remote_prepare): Handle stdio connection.
7063 (remote_open): Ditto.
7064 (remote_close): Don't close stdin for stdio connections.
7065 (read_prim,write_prim): New functions. Replace all calls to
7066 read/write to these.
7067 * server.c (main): Watch for "-" argument. Move call to
7068 remote_prepare before start_inferior.
7069 * server.h (STDIO_CONNECTION_NAME): New macro.
7070 (remote_connection_is_stdio): Declare.
7072 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7073 in debugging output.
7075 2011-12-15 Yao Qi <yao@codesourcery.com>
7077 * tracepoint.c: Include sys/syscall.h.
7078 (gdb_ust_thread): Remove preprocessor conditional.
7080 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7082 * linux-low.c (linux_detach_one_lwp): Call
7083 the_low_target.prepare_to_resume before detaching.
7085 2011-12-14 Yao Qi <yao@codesourcery.com>
7087 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7090 2011-12-14 Yao Qi <yao@codesourcery.com>
7092 * i386-low.c (i386_low_stopped_data_address): Initialize local
7095 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7099 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7100 DR_CONTROL unless necessary. Extend comments.
7101 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7102 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7104 2011-12-13 Yao Qi <yao@codesourcery.com>
7106 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7108 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7110 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7112 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7113 Print new debug message for such case.
7115 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7117 Fix overlapping memcpy.
7118 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7119 the read_inferior_memory transfer.
7120 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7121 write_inferior_memory transfer.
7122 (set_fast_tracepoint_jump): New variable buf. Use it for the
7123 read_inferior_memory and write_inferior_memory transfers.
7124 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7125 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7126 Use it for the write_inferior_memory transfer.
7127 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7130 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7132 * linux-low.c (fetch_register, store_register): Make code
7133 consistent, fix formatting.
7135 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7137 * linux-low.c (usr_store_inferior_registers): Factor out code
7138 to handle individual registers into...
7139 (store_register): ... this new function.
7141 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7143 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7144 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7145 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7146 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7147 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7148 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7149 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7150 (srv_xmlfiles): Add new XML files.
7152 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7154 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7155 (init_registers_s390_linux32v1): Add prototype.
7156 (init_registers_s390_linux32v2): Likewise.
7157 (init_registers_s390_linux64v1): Likewise.
7158 (init_registers_s390_linux64v2): Likewise.
7159 (init_registers_s390x_linux64v1): Likewise.
7160 (init_registers_s390x_linux64v2): Likewise.
7161 (s390_num_regs): Increment to 52.
7162 (s390_regmap): Add orig_r2 register.
7163 (s390_num_regs_3264): Increment to 68.
7164 (s390_regmap_3264): Add orig_r2 register.
7165 (s390_collect_ptrace_register): Handle orig_r2 register.
7166 (s390_supply_ptrace_register): Likewise.
7167 (s390_fill_last_break): New function.
7168 (s390_store_last_break): Likewise.
7169 (s390_fill_system_call): New function.
7170 (s390_store_system_call): Likewise.
7171 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7173 (s390_check_regset): New function.
7174 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7175 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7176 Update target_regsets for available register sets.
7178 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7179 Jan Kratochvil <jan.kratochvil@redhat.com>
7181 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7182 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7184 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7185 * linux-low.h (struct process_info_private): New member r_debug.
7186 * server.c (handle_qxfer_libraries): Call
7187 the_target->qxfer_libraries_svr4.
7188 (handle_qxfer_libraries_svr4): New function.
7189 (qxfer_packets): New entry "libraries-svr4".
7190 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7191 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7192 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7193 PACKET_qXfer_libraries_svr4.
7195 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7197 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7198 PSW address/mask between 8-byte and 16-byte formats.
7199 (s390_supply_ptrace_register): Likewise.
7200 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7201 basic addressing mode bit.
7203 2011-11-24 Stan Shebs <stan@codesourcery.com>
7205 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7207 2011-11-17 Stan Shebs <stan@codesourcery.com>
7209 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7210 (tracing_start_time): New global.
7211 (tracing_stop_time): New global.
7212 (tracing_user_name): New global.
7213 (tracing_notes): New global.
7214 (tracing_stop_note): New global.
7215 (cmd_qtstart): Set traceframe_usage, start_time.
7216 (stop_tracing): Set stop_time.
7217 (cmd_qtstatus): Report additional status.
7218 (cmd_qtp): New function.
7219 (handle_tracepoint_query): Call it.
7220 (cmd_qtnotes): New function.
7221 (handle_tracepoint_general_set): Call it.
7222 (get_timestamp): Rename from tsv_get_timestamp.
7224 2011-11-14 Stan Shebs <stan@codesourcery.com>
7225 Kwok Cheung Yeung <kcy@codesourcery.com>
7227 * linux-x86-low.c (small_jump_insn): New.
7228 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7229 trampoline and error message, build a trampoline and issue a small
7230 jump instruction to it.
7231 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7232 trampoline and error message.
7233 (x86_get_min_fast_tracepoint_insn_len): New.
7234 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7235 * linux-low.h (struct linux_target_ops): Add arguments to
7236 install_fast_tracepoint_jump_pad operation, add new operation.
7237 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7239 (linux_get_min_fast_tracepoint_insn_len): New function.
7240 (linux_target_op): Add new operation.
7241 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7242 (gdb_trampoline_buffer_end): Ditto.
7243 (gdb_trampoline_buffer_error): Ditto.
7244 (struct ipa_sym_addresses): Add fields for new IPA variables.
7245 (symbol_list): Add entries for new IPA variables.
7246 (struct tracepoint): Add fields to hold the address range of the
7247 trampoline used by the tracepoint.
7248 (trampoline_buffer_head): New static variable.
7249 (trampoline_buffer_tail): Ditto.
7250 (claim_trampoline_space): New function.
7251 (have_fast_tracepoint_trampoline_buffer): New function.
7252 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7254 (install_fast_tracepoint): Ditto, also add error buffer argument.
7255 (cmd_qtminftpilen): New function.
7256 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7257 (fast_tracepoint_from_trampoline_address): New function.
7258 (fast_tracepoint_collecting): Handle trampoline as part of jump
7260 (set_trampoline_buffer_space): New function.
7261 (initialize_tracepoint): Initialize new IPA variables.
7262 * target.h (struct target_ops): Add arguments to
7263 install_fast_tracepoint_jump_pad operation, add new
7264 get_min_fast_tracepoint_insn_len operation.
7265 (target_get_min_fast_tracepoint_insn_len): New.
7266 (install_fast_tracepoint_jump_pad): Add arguments.
7267 * server.h (IPA_BUFSIZ): Define.
7268 * linux-i386-ipa.c: Include extra header files.
7269 (initialize_fast_tracepoint_trampoline_buffer): New function.
7270 (initialize_low_tracepoint): Call it.
7271 * server.h (set_trampoline_buffer_space): Declare.
7272 (claim_trampoline_space): Ditto.
7273 (have_fast_tracepoint_trampoline_buffer): Ditto.
7275 2011-11-14 Yao Qi <yao@codesourcery.com>
7277 * server.c (handle_query): Handle InstallInTrace for qSupported.
7278 * tracepoint.c (add_tracepoint): Sort list.
7279 (install_tracepoint, download_tracepoint): New.
7280 (cmd_qtdp): Call them to install and download tracepoints.
7281 (sort_tracepoints): Removed.
7282 (cmd_qtstart): Update.
7284 2011-11-14 Yao Qi <yao@codesourcery.com>
7286 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7287 * mem-break.h: Declare.
7288 * tracepoint.c (cmd_qtstart): Move some code to ...
7289 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7291 (download_tracepoints): Move some code to ...
7292 (download_tracepoint_1): ... here. New.
7294 2011-11-08 Yao Qi <yao@codesourcery.com>
7296 * remote-utils.c (relocate_instruction): A comment fix.
7298 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7300 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7301 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7302 dr_status_mirror and dr_control_mirror from debug_reg_state.
7303 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7304 (i386_initial_stuff): Remove use of deleted globals.
7305 (i386_get_thread_context, i386_set_thread_context,
7306 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7307 from debug_reg_state.
7309 2011-11-05 Yao Qi <yao@codesourcery.com>
7311 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7312 address as TPOINT's.
7314 2011-11-02 Stan Shebs <stan@codesourcery.com>
7316 * tracepoint.c (agent_mem_read_string): New function.
7317 (eval_agent_expr): Call it for tracenz.
7318 * server.c (handle_query): Report support for tracenz.
7320 2011-11-02 Yao Qi <yao@codesourcery.com>
7322 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7324 2011-11-02 Yao Qi <yao@codesourcery.com>
7326 * target.h: Fix a typo in comment.
7328 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7330 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7331 clobber the breakpoints' shadows with fast tracepoint jumps.
7332 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7333 * target.c (write_inferior_memory): Also pass MYADDR down to
7336 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7338 * configure.ac: Check support for personality routine.
7339 * configure: Regenerate.
7340 * config.in: Likewise.
7341 * linux-low.c: Include <sys/personality.h>.
7342 Define ADDR_NO_RANDOMIZE if necessary.
7343 (linux_create_inferior): Disable address space randomization when
7344 forking inferior, if requested.
7345 (linux_supports_disable_randomization): New function.
7346 (linux_target_ops): Install it.
7347 * server.h (disable_randomization): Declare.
7348 * server.c (disable_randomization): New global variable.
7349 (handle_general_set): Handle QDisableRandomization.
7350 (handle_query): Likewise for qSupported.
7351 (main): Support --disable-randomization and --no-disable-randomization
7352 command line arguments.
7353 * target.h (struct target_ops): Add supports_disable_randomization.
7354 (target_supports_disable_randomization): New macro.
7356 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7358 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7360 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7361 [!PT_GETDSBT] (target_loadmap): New definition.
7362 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7363 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7364 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7365 and PT_GETDSBT to LINUX_LOADMAP.
7366 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7367 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7369 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7371 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7372 (arm_linux_hwbp_cap): New static variable.
7373 (arm_linux_get_hwbp_cap): Replace by ...
7374 (arm_linux_init_hwbp_cap): ... this new function.
7375 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7376 (arm_linux_get_hw_watchpoint_count): Likewise.
7377 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7378 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7379 (arm_prepare_to_resume): Use perror_with_name instead of error.
7381 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7383 * linux-arm-low.c: Include <signal.h>.
7384 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7385 (struct arm_linux_hwbp_cap): New data type.
7386 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7387 (struct arm_linux_hw_breakpoint): New data type.
7388 (MAX_BPTS, MAX_WPTS): Define.
7389 (struct arch_process_info, struct arch_lwp_info): New data types.
7390 (arm_linux_get_hwbp_cap): New function.
7391 (arm_linux_get_hw_breakpoint_count): Likewise.
7392 (arm_linux_get_hw_watchpoint_count): Likewise.
7393 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7394 (arm_hwbp_control_initialize): Likewise.
7395 (arm_hwbp_control_is_enabled): Likewise.
7396 (arm_hwbp_control_is_initialized): Likewise.
7397 (arm_hwbp_control_disable): Likewise.
7398 (arm_linux_hw_breakpoint_equal): Likewise.
7399 (arm_linux_hw_point_initialize): Likewise.
7400 (struct update_registers_data): New data structure.
7401 (update_registers_callback: New function.
7402 (arm_insert_point): Likewise.
7403 (arm_remove_point): Likewise.
7404 (arm_stopped_by_watchpoint): Likewise.
7405 (arm_stopped_data_address): Likewise.
7406 (arm_new_process): Likewise.
7407 (arm_new_thread): Likewise.
7408 (arm_prepare_to_resume): Likewise.
7409 (the_low_target): Register arm_insert_point, arm_remove_point,
7410 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7411 arm_new_thread, and arm_prepare_to_resume.
7413 2011-09-15 Stan Shebs <stan@codesourcery.com>
7415 * server.h (struct emit_ops): Add compare-goto fields.
7416 * tracepoint.c (gdb_agent_op_sizes): New table.
7417 (emit_eq_goto): New function.
7418 (emit_ne_goto): New function.
7419 (emit_lt_goto): New function.
7420 (emit_le_goto): New function.
7421 (emit_gt_goto): New function.
7422 (emit_ge_goto): New function.
7423 (is_goto_target): New function.
7424 (compile_bytecodes): Recognize special cases of compare-goto
7425 combinations and call specialized emitters for them.
7426 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7427 (amd64_emit_ne_goto): New function.
7428 (amd64_emit_lt_goto): New function.
7429 (amd64_emit_le_goto): New function.
7430 (amd64_emit_gt_goto): New function.
7431 (amd64_emit_ge_goto): New function.
7432 (amd64_emit_ops): Add the new functions.
7433 (i386_emit_eq_goto): New function.
7434 (i386_emit_ne_goto): New function.
7435 (i386_emit_lt_goto): New function.
7436 (i386_emit_le_goto): New function.
7437 (i386_emit_gt_goto): New function.
7438 (i386_emit_ge_goto): New function.
7439 (i386_emit_ops): Add the new functions.
7441 2011-09-08 Stan Shebs <stan@codesourcery.com>
7443 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7444 (i386_emit_epilogue): Restore %ebx.
7446 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7448 * server.c (step_thread): Remove definition.
7449 (process_serial_event): Don't handle Hs.
7450 * server.h (step_thread): Remove declaration.
7451 * target.c (set_desired_inferior): Remove use of step_thread.
7453 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7455 * linux-low.c: Include linux-procfs.h.
7456 (linux_attach_lwp_1): Update comments.
7457 (linux_attach): Scan for existing threads when attaching to a
7458 process that is the tgid.
7459 * Makefile.in: Update dependencies.
7461 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7463 * configure.srv: Add linux-procfs.o dependencies.
7465 2011-08-14 Yao Qi <yao@codesourcery.com>
7467 * target.h (struct target_ops): Fix indent.
7468 * win32-low.c (win32_target_ops): Fix comment.
7470 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7471 Yao Qi <yao@codesourcery.com>
7473 * Makefile.in (clean): Remove tic6x-*.c files.
7474 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7475 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7476 (tic6x-c64xp-linux.c): Likewise.
7477 * configure.srv: Add support for tic6x-*-uclinux.
7478 * linux-tic6x-low.c: New.
7479 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7481 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7482 Yao Qi <yao@codesourcery.com>
7484 * target.h (struct target_ops): Add read_loadmap.
7485 * linux-low.c (struct target_loadseg): New type.
7486 (struct target_loadmap): New type.
7487 (linux_read_loadmap): New function.
7488 (linux_target_ops): Add linux_read_loadmap.
7489 * server.c (handle_query): Support qXfer:fdpic:read packet.
7490 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7493 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7495 * win32-low.c: Include <stdint.h>.
7497 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7499 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7500 to the inferior here.
7501 (i386_remove_aligned_watchpoint): Ditto.
7502 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7503 fit part of the watchpoint in the debug registers.
7504 (i386_update_inferior_debug_regs): New.
7505 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7506 registers, and only update the inferior on success.
7507 (i386_low_remove_watchpoint): Ditto.
7509 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7511 * linux-low.c (compare_ints, unique, list_threads, show_process,
7512 linux_core_of_thread): Delete.
7513 (linux_target_ops): Change linux_core_of_thread to
7514 linux_common_core_of_thread.
7515 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7516 * utils.c (malloc_failure): Change type of argument.
7517 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7518 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7519 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7520 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7521 (IPA_OBJS): Add common-utils-ipa.o.
7522 (ptid_h, linux_osdata_h): New macros.
7523 (server_h): Add common/common-utils.h, common/xml-utils.h,
7524 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7526 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7527 ptid.o, buffer.o): New rules.
7528 (linux-low.o): Add common/linux-osdata.h as a dependency.
7529 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7530 * configure.ac: Add AC_HEADER_DIRENT check.
7531 * config.in: Regenerate.
7532 * configure: Regenerate.
7533 * remote-utils.c (xml_escape_text): Delete.
7534 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7535 buffer_xml_printf): Move to common/buffer.c.
7536 * server.c (main): Remove call to initialize_inferiors.
7537 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7538 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7539 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7540 internal_error, gdb_assert, gdb_assert_fail): Delete.
7541 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7542 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7544 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7545 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7546 initialize_inferiors): Delete.
7548 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7550 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7553 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7555 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7557 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7559 2011-05-26 Yao Qi <yao@codesourcery.com>
7561 * Makefile.in (thread-db.o): Track dependence to
7562 common/gdb_thread_db.h.
7563 * thread-db.c: include gdb_thread_db.h from right place.
7565 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7567 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7568 __FILE__ and __LINE__ to internal_error.
7570 2011-05-13 Doug Evans <dje@google.com>
7572 * thread-db.c (try_thread_db_load_from_sdir): New function.
7573 (try_thread_db_load_from_dir): New function.
7574 (thread_db_load_search): Handle $sdir, ignore $pdir.
7575 Remove trying of system directories if search of
7576 libthread-db-search-path fails, that is now done via $sdir.
7578 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7580 * server.c (handle_query): Add EnableDisableTracepoints to the list
7581 of supported features.
7582 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7584 (cmd_qtenable_disable): New.
7585 (cmd_qtstart): Install tracepoints even if disabled.
7586 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7587 receiving a QTEnable or QTDisable packet.
7588 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7589 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7591 (gdb_probe): Skip data collection if static tracepoint is disabled.
7593 2011-05-10 Doug Evans <dje@google.com>
7595 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7597 2011-05-04 Doug Evans <dje@google.com>
7599 * linux-low.c (linux_join): Skip process lookup.
7600 * spu-low.c (spu_join): Ditto.
7601 * server.c (join_inferiors_callback): Delete.
7602 (process_serial_event): For 'D' packet (detach) call join_inferior
7605 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7607 * README: Don't mention xscale*-*-linux*.
7608 * configure.srv (xscale*-*-linux*): Don't handle target.
7610 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7612 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7614 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7615 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7616 (i386_emit_void_call_2): Likewise.
7618 2011-04-26 Yao Qi <yao@codesourcery.com>
7620 * linux-low.c: Move common macros to linux-ptrace.h.
7621 Include linux-ptrace.h.
7622 * Makefile.in (linux_ptrace_h): New.
7623 (linux-low.o): Depends on linux-ptrace.h.
7625 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7627 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7628 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7629 (remote_prepare): New function with most of the TCP code from ...
7630 (remote_open): ... here. Detect PORT here unconditionally. Move also
7631 setting transport_is_reliable.
7632 * server.c (run_once): New variable.
7633 (gdbserver_usage): Document it.
7634 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7635 the first run if RUN_ONCE.
7636 * server.h (run_once, remote_prepare): New declarations.
7638 2011-04-19 Tom Tromey <tromey@redhat.com>
7640 * win32-low.c (handle_load_dll): Remove duplicate "the".
7642 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7644 Remove support for old Cygwin 1.5 versions.
7645 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7646 function to avoid warning.
7647 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7650 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7652 * gdbserver/server.h (Macro _): Define it if not available.
7654 2011-03-14 Michael Snyder <msnyder@vmware.com>
7656 * hostio.c (handle_close): Remove unnecessary null test.
7658 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7660 * Makefile.in (maintainer-clean realclean distclean): Remove
7661 "make ... subdir_do" command.
7663 2011-03-10 Michael Snyder <msnyder@vmware.com>
7665 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7667 * server.c (handle_v_run): Free alloced buffer on early return.
7669 2011-03-09 Yao Qi <yao@codesourcery.com>
7672 2011-03-04 Yao Qi <yao@codesourcery.com>
7674 * Makefile.in: Remove GNU make feature --directory.
7676 2011-03-05 Yao Qi <yao@codesourcery.com>
7678 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7679 (subdir_do): New make target. Copied from gdb/Makefile.
7680 (maintainer-clean, realclean, distclean, clean): Call corresponding
7681 make targets in common/Makefile.
7683 2011-02-11 Yao Qi <yao@codesourcery.com>
7685 * configure.ac: Call AC_PROG_RANLIB.
7686 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7687 * configure: Regenerate.
7689 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7691 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7693 2011-03-06 Yao Qi <yao@codesourcery.com>
7695 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7697 2011-03-05 Yao Qi <yao@codesourcery.com>
7699 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7700 (subdir_do): New make target. Copied from gdb/Makefile.
7701 (maintainer-clean, realclean, distclean, clean): Call corresponding
7702 make targets in common/Makefile.
7704 2011-03-04 Yao Qi <yao@codesourcery.com>
7706 * Makefile.in: Remove GNU make feature --directory.
7708 2011-03-04 Michael Snyder <msnyder@vmware.com>
7710 * server.c (queue_stop_reply): Call xmalloc not malloc.
7712 2011-03-02 Michael Snyder <msnyder@vmware.com>
7714 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7716 2011-02-28 Michael Snyder <msnyder@vmware.com>
7718 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7719 (cmd_qtframe): Ditto.
7720 (cmd_qtbuffer): Ditto.
7721 (cmd_bigqtbuffer): Ditto.
7723 * utils.c (decimal2str): Initialize 'width' to nine, then
7726 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7728 * hostio.c (require_data): Free *data, not data.
7730 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7732 * hostio.c (require_data): Use free, not xfree.
7734 2011-02-27 Michael Snyder <msnyder@vmware.com>
7736 * server.c (handle_query): Discard unused value.
7738 * hostio.c (require_data): Free malloc memory before returning
7741 2011-02-26 Michael Snyder <msnyder@vmware.com>
7743 * linux-low.c (list_threads): Call closedir for dirent.
7745 2011-02-27 Michael Snyder <msnyder@vmware.com>
7747 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7748 a case statement falls through.
7750 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7752 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7755 2011-02-26 Michael Snyder <msnyder@vmware.com>
7757 * utils.c (decimal2str): Eliminate dead code and dead param.
7758 (pulongest): Drop dead param from call to decimal2str.
7761 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7763 Revert the following patch (not approved yet):
7764 2011-02-21 Hui Zhu <teawater@gmail.com>
7765 * tracepoint.c (tp_printf): New function.
7766 (eval_agent_expr): Handle gdb_agent_op_printf.
7768 2011-02-21 Hui Zhu <teawater@gmail.com>
7770 * tracepoint.c (tp_printf): New function.
7771 (eval_agent_expr): Handle gdb_agent_op_printf.
7773 2011-02-18 Tom Tromey <tromey@redhat.com>
7775 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7776 (tracepoint.o): Likewise.
7777 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7778 (gdb_agent_op_names): Likewise.
7780 2011-02-18 Tom Tromey <tromey@redhat.com>
7782 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7783 gdb_agent_op_rot>: New constants.
7784 (gdb_agent_op_names): Add pick and roll.
7785 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7788 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7790 * aclocal.m4: Regenerated with aclocal-1.11.1.
7792 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7794 * server.c (handle_qxfer_traceframe_info): New.
7795 (qxfer_packets): Register "traceframe-info".
7796 (handle_query): Report support for qXfer:traceframe-info:read+.
7797 * tracepoint.c (match_blocktype): New.
7798 (traceframe_find_block_type): Rename to ...
7799 (traceframe_walk_blocks): ... this. Add callback filter argument,
7801 (traceframe_find_block_type): New, reimplemented on top of
7802 traceframe_walk_blocks.
7803 (build_traceframe_info_xml): New.
7804 (traceframe_read_info): New.
7805 * server.h (traceframe_read_info): Declare.
7807 2011-02-11 Yao Qi <yao@codesourcery.com>
7809 * configure.ac: Call AC_PROG_RANLIB.
7810 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7811 * configure: Regenerate.
7813 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7815 * server.c (gdb_read_memory): Change return semantics to allow
7817 (handle_search_memory_1): Adjust.
7818 (process_serial_event) <'m' packet>: Handle partial transfers.
7819 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7821 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7823 * regcache.c (init_register_cache): Initialize
7824 regcache->register_status.
7825 (free_register_cache): Release regcache->register_status.
7826 (regcache_cpy): Copy register_status.
7827 (registers_to_string): Print 'x's for unavailable registers.
7828 (supply_register): Mark the register's status valid or
7829 unavailable, depending on whether a buffer was passed in or not.
7830 (supply_register_zeroed): New.
7831 (supply_regblock): Mark the registers' status valid or
7832 unavailable, depending on whether a buffer was passed in or not.
7833 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7834 (struct regcache): New `register_status' field.
7835 (supply_register_zeroed): Declare.
7836 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7837 supply_register_zeroed, rather than passing a NULL buffer to
7839 * tracepoint.c (fetch_traceframe_registers): Update comment.
7841 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7843 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7846 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7848 * server.h (decode_xfer_write): Change prototype.
7849 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7850 and don't extract the annex here.
7851 * server.c (decode_xfer_read): Remove `annex' parameter,
7852 and don't extract the annex here.
7854 (struct qxfer): New.
7855 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7856 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7857 (handle_qxfer_statictrace): New functions, abstracted out from
7858 handle_query, and made to use the struct qxfer interface.
7859 (handle_threads_qxfer_proper): Rename to ...
7860 (handle_qxfer_threads_proper): ... this.
7861 (handle_threads_qxfer): Rename to ...
7862 (handle_qxfer_threads): ... this. Adjust.
7863 (qxfer_packets): New array.
7864 (handle_qxfer): New function.
7865 (handle_query): Use handle_qxfer.
7867 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7869 * gdbreplay.c: Shorten lines of >= 80 columns.
7870 * linux-low.c: Ditto.
7871 * linux-ppc-low.c: Ditto.
7872 * linux-s390-low.c: Ditto.
7873 * linux-sparc-low.c: Ditto.
7874 * linux-x86-low.c: Ditto.
7875 * linux-xtensa-low.c: Ditto.
7876 * mem-break.c: Ditto.
7878 * regcache.h: Ditto.
7879 * remote-utils.c: Ditto.
7882 * thread-db.c: Ditto.
7883 * tracepoint.c: Ditto.
7885 * win32-low.h: Ditto.
7887 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7889 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7892 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7894 * server.c (gdbserver_version): Update copyright year in version
7896 * gdbreplay.c (gdbreplay_version): Ditto.
7898 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7900 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7901 * linux-bfin-low.c: New file.
7902 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7903 PT_DATA_ADDR for BFIN targets.
7904 * Makefile.in (SFILES): Add linux-bfin-low.c.
7905 (clean): Remove reg-bfin.c.
7906 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7907 * README: Mention supported Blackfin targets.
7909 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7911 * .gitignore: New file.
7913 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7915 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7917 2010-10-22 Jie Zhang <jie@codesourcery.com>
7919 * Makefile.in: Add FLAGS_TO_PASS variable.
7920 (install): Remove dependency of install-only and recursively
7921 invoke make for install-only.
7923 2010-10-04 Doug Evans <dje@google.com>
7925 * Makefile.in (uninstall): Use $(DESTDIR).
7927 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7931 * linux-x86-low.c (compat_siginfo_from_siginfo)
7932 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7933 si_code is < 0. Check for si_code == SI_TIMER before checking for
7936 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7938 * lynx-i386-low.c: New file.
7939 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7941 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7943 * lynx-low.c (ptrace_request_to_str): Remove handling for
7944 request values that have been removed in LynxOS 5.x.
7946 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7948 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7951 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7953 * configure.ac: Add --enable-inprocess-agent option.
7954 * configure: Rebuilt.
7956 2010-09-06 Yao Qi <yao@codesourcery.com>
7958 * linux-low.c (linux_kill): Remove unused variable.
7959 (linux_stabilize_threads): Likewise.
7960 * server.c (start_inferior): Likewise.
7961 (queue_stop_reply_callback): Likewise.
7962 * tracepoint.c (do_action_at_tracepoint): Likewise.
7964 2010-09-06 Yao Qi <yao@codesourcery.com>
7966 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7969 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7971 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7973 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7975 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7978 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7980 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7981 gdbserver/lynx-ppc-low.c: New files.
7982 * Makefile.in (lynx_low_h): New variable.
7983 (lynx-low.o, lynx-ppc-low.o): New rules.
7984 * configure.ac: On LynxOS, link with -lnetinet.
7985 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7986 * configure: regenerate.
7988 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7990 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7991 * configure.ac: Add check for vasprintf and vsnprintf.
7992 * configure, config.in: Regenerate.
7993 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7995 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7997 * gdbreplay.c: Move include of alloca.h up, next to include of
7999 * server.h: Add include of malloc.h.
8000 * mem-break.c: Remove include of malloc.h.
8001 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8003 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8005 * Makefile.in (memmem.o): Build with -Wno-error.
8007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8009 * utils.c (xsnprintf): Make non-static.
8010 * server.h: Add xsnprintf declaration.
8011 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8012 replace calls to snprintf by calls to xsnprintf throughout.
8014 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8016 * configure.ac: Add configure check for alloca.
8017 * configure, config.in: Regenerate.
8018 * server.h: Include alloca.h if it exists.
8019 * gdbreplay.c: Include alloca.h if it exists.
8021 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8023 * linux-low.c (__SIGRTMIN): Define if not already defined.
8024 (linux_create_inferior): Check for __ANDROID__ rather than
8026 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8027 are already deferred.
8028 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8029 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8030 stopped and already has a pending signal to report.
8031 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8032 a pending signal to report or is moving out of a jump pad.
8033 (linux_init_signals): Check for __ANDROID__ rather than
8036 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8038 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8039 debug_threads check. Avoid a linear search when not doing debug
8042 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8044 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8045 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8046 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8047 (process_event): Change local fd's type to gdb_fildes_t.
8048 (create_file_handler): Adjust prototype.
8049 (delete_file_handler): Adjust prototype.
8050 (handle_file_event): Adjust prototype. Use pfildes.
8051 (create_file_event): Adjsut prototype.
8052 * remote-utils.c (remote_desc, listen_desc): Change type to
8054 * server.h: New gdb_fildes_t typedef.
8055 [USE_WIN32API]: Include winsock2.h.
8056 (delete_file_handler, add_file_handler): Adjust prototypes.
8058 * utils.c (pfildes): New.
8060 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8062 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8063 * configure: Regenerate.
8065 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8067 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8068 (linux_done_accessing_memory): ... this.
8069 (linux_target_ops): Adjust.
8070 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8071 * nto-low.c (nto_target_ops): Adjust comment.
8072 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8073 * spu-low.c (spu_target_ops): Adjust comment.
8074 * target.h (target_ops): Rename unprepare_to_access_memory field
8075 to done_accessing_memory.
8076 (unprepare_to_access_memory): Rename to ...
8077 (done_accessing_memory): ... this.
8079 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8081 * linux-low.c (linux_prepare_to_access_memory): New.
8082 (linux_unprepare_to_access_memory): New.
8083 (linux_target_ops): Install them.
8084 * server.c (read_memory): Rename to ...
8085 (gdb_read_memory): ... this. Use
8086 prepare_to_access_memory/prepare_to_access_memory.
8087 (write_memory): Rename to ...
8088 (gdb_write_memory): ... this. Use
8089 prepare_to_access_memory/prepare_to_access_memory.
8090 (handle_search_memory_1): Adjust.
8091 (process_serial_event): Adjust.
8092 * target.h (struct target_ops): New fields
8093 prepare_to_access_memory and unprepare_to_access_memory.
8094 (prepare_to_access_memory, unprepare_to_access_memory): New.
8095 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8096 prepare_to_access_memory/prepare_to_access_memory.
8097 * nto-low.c (nto_target_ops): Adjust.
8098 * spu-low.c (spu_target_ops): Adjust.
8099 * win32-low.c (win32_target_ops): Adjust.
8101 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8103 * Makefile.in (WARN_CFLAGS): Get it from configure.
8104 (WERROR_CFLAGS): New.
8105 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8106 * configure.ac: Introduce --enable-werror, which adds -Werror to
8107 the compiler command line. Enabled by default. Disable with
8108 --disable-werror. Add -Wdeclaration-after-statement
8109 Wpointer-arith and -Wformat-nonliteral to warning flags.
8110 * configure: Regenerate.
8112 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8114 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8116 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8118 * gdbreplay.c (remote_error): New.
8120 (expect): Use gdbchar. Check for error reading from GDB.
8121 Clarify sync error output.
8122 (play): Check for errors writing to GDB.
8123 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8124 * remote-utils.c (getpkt): Check for errors writing to the remote
8127 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8129 * linux-low.c (linux_wait_1): Move non-debugging code out of
8130 `debug_threads' control.
8132 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8134 * linux-low.c (linux_wait_1): Don't set last_status here.
8135 * server.c (push_event, queue_stop_reply_callback): Assert we're
8136 not pushing a TARGET_WAITKIND_IGNORE event.
8137 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8138 (myresume, handle_target_event): Set the thread's last_resume_kind
8139 and last_status from the target returned status.
8141 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8145 * linux-x86-low.c (update_debug_registers_callback): New.
8146 (i386_dr_low_set_addr): Use it.
8147 (i386_dr_low_get_addr): New.
8148 (i386_dr_low_set_control): Use update_debug_registers_callback.
8149 (i386_dr_low_get_control): New.
8150 (i386_dr_low_get_status): Adjust.
8151 * linux-low.c (linux_stop_lwp): New.
8152 * linux-low.h (linux_stop_lwp): Declare.
8154 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8155 argument instead of a i386_debug_reg_state.
8156 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8157 a i386_debug_reg_state.
8158 (i386_insert_aligned_watchpoint): Adjust.
8159 (i386_remove_aligned_watchpoint): Adjust.
8160 (i386_low_stopped_data_address): Read the debug registers from the
8161 inferior instead of from the mirrors.
8162 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8163 (i386_dr_low_get_addr): Declare.
8164 (i386_dr_low_get_control): Declare.
8165 (i386_dr_low_get_status): Change prototype.
8167 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8168 (i386_dr_low_get_addr): New.
8169 (i386_dr_low_get_control): New.
8170 (i386_dr_low_get_status): Adjust prototype. Return
8172 (i386_initial_stuff): Clear dr_status_mirror and
8174 (i386_get_thread_context): Adjust.
8175 (i386_set_thread_context): Adjust.
8176 (i386_thread_added): Adjust.
8178 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8180 * linux-low.h (linux_thread_area): Delete declaration.
8182 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8184 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8185 after its termination.
8187 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8189 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8190 (gdb_wants_all_stopped): Delete.
8191 (linux_wait_1): Don't call them.
8192 * server.c (handle_v_cont): Tag all threads as want-stopped.
8193 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8194 stopped as "client-wants-stopped".
8196 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8198 * Makefile.in (signals_h): New.
8199 (server_h): Depend on it.
8200 (server.o): Don't depend on $(signals_def).
8201 (signals.o): Depend on $(signals_def).
8203 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8205 * Makefile.in (signals_def): New.
8206 (server_h): Append include/gdb/signals.h and signals_def.
8207 (server.o): Append signals_def.
8209 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8211 * server.c (handle_target_event): Use target_signal_to_host for
8212 resume_info.sig initialization.
8213 * target.h (struct thread_resume) <sig>: New comment.
8215 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8217 * server.c (handle_query): strcpy() the returned string from paddress()
8218 instead of sprintf().
8219 * utils.c (paddress): Return phex_nz().
8221 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8223 * server.c (handle_v_cont): Call mourn_inferior if process
8225 (myresume): Likewise.
8227 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8229 Static tracepoints, and integration with UST.
8231 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8232 * mem-break.c (uninsert_all_breakpoints)
8233 (reinsert_all_breakpoints): New.
8234 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8235 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8236 (gdb_agent_ust_loaded, helper_thread_id)
8237 (gdb_agent_helper_thread_id): New macros.
8238 (struct ipa_sym_addresses): Add addr_ust_loaded,
8239 addr_helper_thread_id, addr_cmd_buf.
8240 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8241 (in_process_agent_loaded_ust): New.
8242 (write_e_ust_not_loaded): New.
8243 (maybe_write_ipa_ust_not_loaded): New.
8244 (struct collect_static_trace_data_action): New.
8245 (enum tracepoint_type) <static_tracepoint>: New.
8246 (struct tracepoint) <handle>: Mention static tracepoints.
8247 (struct static_tracepoint_ctx): New.
8248 (CMD_BUF_SIZE): New.
8249 (add_tracepoint_action): Handle static tracepoint actions.
8250 (unprobe_marker_at): New.
8251 (clear_installed_tracepoints): Handle static tracepoints.
8252 (cmd_qtdp): Handle static tracepoints.
8253 (probe_marker_at): New.
8254 (cmd_qtstart): Handle static tracepoints.
8255 (response_tracepoint): Handle static tracepoints.
8256 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8257 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8258 (get_context_regcache): Handle static tracepoints.
8259 (do_action_at_tracepoint): Handle static tracepoint actions.
8260 (traceframe_find_block_type): Handle static trace data blocks.
8261 (traceframe_read_sdata): New.
8262 (download_tracepoints): Download static tracepoint actions.
8263 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8264 (GDB_PROBE_NAME): New.
8269 (ust_marker_to_static_tracepoint): New.
8271 (collect_ust_data_at_tracepoint): New.
8272 (gdb_ust_probe): New.
8273 (UNIX_PATH_MAX, SOCK_DIR): New.
8274 (gdb_ust_connect_sync_socket): New.
8275 (resume_thread, stop_thread): New.
8276 (run_inferior_command): New.
8277 (init_named_socket): New.
8278 (gdb_ust_socket_init): New.
8279 (cstr_to_hexstr): New.
8281 (first_marker, next_marker): New.
8282 (response_ust_marker): New.
8283 (cmd_qtfstm, cmd_qtsstm): New.
8284 (unprobe_marker_at, probe_marker_at): New.
8285 (cmd_qtstmat, gdb_ust_thread): New.
8286 (gdb_ust_init): New.
8287 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8288 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8290 (x86_64_st_collect_regmap): New.
8291 (X86_64_NUM_ST_COLLECT_GREGS): New.
8292 (AMD64_RIP_REGNUM): New.
8293 (supply_static_tracepoint_registers): New.
8294 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8296 (i386_st_collect_regmap): New.
8297 (i386_NUM_ST_COLLECT_GREGS): New.
8298 (supply_static_tracepoint_registers): New.
8299 * server.c (handle_query): Handle qXfer:statictrace:read.
8300 <qSupported>: Report support for StaticTracepoints, and
8301 qXfer:statictrace:read features.
8302 * server.h (traceframe_read_sdata)
8303 (supply_static_tracepoint_registers): Declare.
8304 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8305 (unpack_varlen_hex): Include in IPA build.
8306 * Makefile.in (ustlibs, ustinc): New.
8307 (IPA_OBJS): Add remote-utils-ipa.o.
8308 ($(IPA_LIB)): Link -ldl and -lpthread.
8310 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8311 * config.in, configure: Regenerate.
8313 2010-06-20 Ian Lance Taylor <iant@google.com>
8314 Pedro Alves <pedro@codesourcery.com>
8316 * linux-x86-low.c (always_true): Delete.
8317 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8318 trying to fool the compiler with always_true.
8320 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8322 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8323 conditions in gdbserver.
8325 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8327 * spu-low.c (spu_read_memory): Wrap around local store limit.
8328 (spu_write_memory): Likewise.
8330 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8332 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8333 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8335 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8337 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8338 uses with LONGEST uses.
8340 2010-06-14 Stan Shebs <stan@codesourcery.com>
8341 Pedro Alves <pedro@codesourcery.com>
8345 * linux-x86-low.c: Include limits.h.
8350 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8351 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8352 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8353 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8354 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8355 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8356 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8357 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8358 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8359 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8360 (amd64_emit_void_call_2): New.
8361 (amd64_emit_ops): New.
8362 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8363 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8364 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8365 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8366 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8367 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8368 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8369 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8370 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8371 (i386_emit_stack_adjust, i386_emit_int_call_1)
8372 (i386_emit_void_call_2): New.
8373 (i386_emit_ops): New.
8374 (x86_emit_ops): New.
8375 (the_low_target): Install x86_emit_ops.
8376 * server.h (struct emit_ops): New.
8377 (get_raw_reg_func_addr): Declare.
8378 (current_insn_ptr, emit_error): Declare.
8379 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8380 (set_trace_state_variable_value): New defines.
8381 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8382 addr_get_trace_state_variable_value and
8383 addr_set_trace_state_variable_value.
8384 (symbol_list): New fields for get_raw_reg,
8385 get_trace_state_variable_value and set_trace_state_variable_value.
8386 (condfn): New typedef.
8387 (struct tracepoint): New field `compiled_cond'.
8388 (do_action_at_tracepoint): Clear compiled_cond.
8389 (get_trace_state_variable_value, set_trace_state_variable_value):
8391 (condition_true_at_tracepoint): If there's a compiled condition,
8393 (current_insn_ptr, emit_error): New globals.
8394 (struct bytecode_address): New.
8395 (get_raw_reg_func_addr): New.
8396 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8397 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8398 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8399 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8400 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8401 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8402 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8403 (compile_tracepoint_condition, compile_bytecodes): New.
8404 * target.h (emit_ops): Forward declare.
8405 (struct target_ops): New field emit_ops.
8406 (target_emit_ops): New.
8407 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8408 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8409 * linux-low.c (linux_emit_ops): New.
8410 (linux_target_ops): Install it.
8411 * linux-low.h (struct linux_target_ops): New field emit_ops.
8413 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8415 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8416 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8418 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8419 Stan Shebs <stan@codesourcery.com>
8421 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8422 (all): Depend on $(extra_libraries).
8423 (install-only): Install the IPA.
8424 (IPA_OBJS, IPA_LIB): New.
8425 (clean): Remove the IPA lib.
8426 (IPAGENT_CFLAGS): New.
8427 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8428 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8429 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8430 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8431 * configure.ac: Check for atomic builtins support in the compiler.
8432 (IPA_DEPFILES, extra_libraries): Define.
8433 * configure.srv (ipa_obj): Add description.
8434 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8435 (i[34567]86-*-linux*): Set ipa_obj.
8436 (x86_64-*-linux*): Set ipa_obj.
8437 * linux-low.c (stabilizing_threads): New.
8438 (supports_fast_tracepoints): New.
8439 (linux_detach): Stabilize threads before detaching.
8440 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8441 the lwp is either not stabilizing, or is moving out of a jump pad.
8442 (linux_fast_tracepoint_collecting): New.
8443 (maybe_move_out_of_jump_pad): New.
8444 (enqueue_one_deferred_signal): New.
8445 (dequeue_one_deferred_signal): New.
8446 (linux_wait_for_event_1): If moving out of a jump pad, defer
8447 pending signals to later.
8448 (linux_stabilize_threads): New.
8449 (linux_wait_1): Check if threads need moving out of jump pads, and
8451 (stuck_in_jump_pad_callback): New.
8452 (move_out_of_jump_pad_callback): New.
8454 (linux_resume_one_lwp): Handle moving out of jump pads.
8455 (linux_set_resume_request): Dequeue deferred signals.
8456 (need_step_over_p): Also step over fast tracepoint jumps.
8457 (start_step_over): Also uninsert fast tracepoint jumps.
8458 (finish_step_over): Also reinsert fast tracepoint jumps.
8459 (linux_install_fast_tracepoint_jump): New.
8460 (linux_target_ops): Install linux_stabilize_threads and
8461 linux_install_fast_tracepoint_jump_pad.
8462 * linux-low.h (linux_target_ops) <get_thread_area,
8463 install_fast_tracepoint_jump_pad>: New fields.
8464 (struct lwp_info) <collecting_fast_tracepoint,
8465 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8466 (linux_get_thread_area): Declare.
8467 * linux-x86-low.c (jump_insn): New.
8468 (x86_get_thread_area): New.
8469 (append_insns): New.
8471 (amd64_install_fast_tracepoint_jump_pad): New.
8472 (i386_install_fast_tracepoint_jump_pad): New.
8473 (x86_install_fast_tracepoint_jump_pad): New.
8474 (the_low_target): Install x86_get_thread_area and
8475 x86_install_fast_tracepoint_jump_pad.
8476 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8477 (struct fast_tracepoint_jump): New.
8478 (fast_tracepoint_jump_insn): New.
8479 (fast_tracepoint_jump_shadow): New.
8480 (find_fast_tracepoint_jump_at): New.
8481 (fast_tracepoint_jump_here): New.
8482 (delete_fast_tracepoint_jump): New.
8483 (set_fast_tracepoint_jump): New.
8484 (uninsert_fast_tracepoint_jumps_at): New.
8485 (reinsert_fast_tracepoint_jumps_at): New.
8486 (set_breakpoint_at): Use write_inferior_memory.
8487 (uninsert_raw_breakpoint): Use write_inferior_memory.
8488 (check_mem_read): Mask out fast tracepoint jumps.
8489 (check_mem_write): Mask out fast tracepoint jumps.
8490 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8491 (set_fast_tracepoint_jump): Declare.
8492 (delete_fast_tracepoint_jump)
8493 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8494 (reinsert_fast_tracepoint_jumps_at): Declare.
8495 * regcache.c: Don't compile many functions when building the
8496 in-process agent library.
8497 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8498 the register buffer in the heap.
8499 (free_register_cache): If the register buffer isn't owned by the
8500 regcache, don't free it.
8501 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8502 pre-existing register caches.
8503 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8505 (convert_ascii_to_int): : Constify `from' parameter type.
8506 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8507 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8508 the needed buffer in-place.
8509 (relocate_instruction): New.
8510 * server.c (handle_query) <qSymbols>: If the target supports
8511 tracepoints, give it a chance of looking up symbols. Report
8512 support for fast tracepoints.
8513 (handle_status): Stabilize threads.
8514 (process_serial_event): Adjust.
8515 * server.h (struct fast_tracepoint_jump): Forward declare.
8516 (struct process_info) <fast_tracepoint_jumps>: New field.
8517 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8518 (decode_X_packet, decode_M_packet): Adjust.
8519 (relocate_instruction): Declare.
8520 (in_process_agent_loaded): Declare.
8521 (tracepoint_look_up_symbols): Declare.
8522 (struct fast_tpoint_collect_status): Declare.
8523 (fast_tracepoint_collecting): Declare.
8524 (force_unlock_trace_buffer): Declare.
8525 (handle_tracepoint_bkpts): Declare.
8526 (initialize_low_tracepoint)
8527 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8528 * target.h (struct target_ops) <stabilize_threads,
8529 install_fast_tracepoint_jump_pad>: New fields.
8530 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8531 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8532 [HAVE_STDINT_H]: Include stdint.h.
8533 (trace_debug_1): Rename to ...
8534 (trace_vdebug): ... this.
8535 (trace_debug): Rename to ...
8536 (trace_debug_1): ... this. Add `level' parameter.
8538 (ATTR_USED, ATTR_NOINLINE): New.
8539 (IP_AGENT_EXPORT): New.
8540 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8541 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8542 (about_to_request_buffer_space, trace_buffer_is_full)
8543 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8544 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8545 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8546 (traceframe_write_count, traceframes_created)
8547 (trace_state_variables)
8548 New renaming defines.
8549 (struct ipa_sym_addresses): New.
8550 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8552 (ipa_sym_addrs): New.
8553 (all_tracepoint_symbols_looked_up): New.
8554 (in_process_agent_loaded): New.
8555 (write_e_ipa_not_loaded): New.
8556 (maybe_write_ipa_not_loaded): New.
8557 (tracepoint_look_up_symbols): New.
8558 (debug_threads) [IN_PROCESS_AGENT]: New.
8559 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8560 (UNKNOWN_SIDE_EFFECTS): New.
8561 (stop_tracing): New.
8562 (flush_trace_buffer): New.
8563 (stop_tracing_bkpt): New.
8564 (flush_trace_buffer_bkpt): New.
8565 (read_inferior_integer): New.
8566 (read_inferior_uinteger): New.
8567 (read_inferior_data_pointer): New.
8568 (write_inferior_data_pointer): New.
8569 (write_inferior_integer): New.
8570 (write_inferior_uinteger): New.
8571 (struct collect_static_trace_data_action): Delete.
8572 (enum tracepoint_type): New.
8573 (struct tracepoint) <type>: New field `type'.
8574 <actions_str, step_actions, step_actions_str>: Only include in
8576 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8577 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8578 (tracepoints): Use IP_AGENT_EXPORT.
8579 (last_tracepoint): Don't include in the IPA.
8580 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8581 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8582 (alloced_trace_state_variables): New.
8583 (trace_state_variables): Use IP_AGENT_EXPORT.
8584 (traceframe_t): Delete unused variable.
8585 (circular_trace_buffer): Don't include in the IPA.
8586 (trace_buffer_start): Delete.
8587 (struct trace_buffer_control): New.
8588 (trace_buffer_free): Delete.
8589 (struct ipa_trace_buffer_control): New.
8590 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8591 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8593 (trace_buffer_ctrl): New.
8594 (TRACE_BUFFER_CTRL_CURR): New.
8595 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8596 Reimplement as macros.
8597 (trace_buffer_wrap): Delete.
8598 (traceframe_write_count, traceframe_read_count)
8599 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8600 (struct tracepoint_hit_ctx) <type>: New field.
8601 (struct fast_tracepoint_ctx): New.
8602 (memory_barrier): New.
8604 (record_tracepoint_error): Update atomically in the IPA.
8605 (clear_inferior_trace_buffer): New.
8606 (about_to_request_buffer_space): New.
8607 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8608 updating the same buffer.
8609 (add_tracepoint): Default the tracepoint's type to trap
8610 tracepoint, and orig_size to -1.
8611 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8613 (create_trace_state_variable): New parameter `gdb'. Handle it.
8614 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8615 (cmd_qtdp): Handle fast tracepoints.
8617 (max_jump_pad_size): New.
8618 (gdb_jump_pad_head): New.
8619 (get_jump_space_head): New.
8620 (claim_jump_space): New.
8621 (sort_tracepoints): New.
8622 (MAX_JUMP_SIZE): New.
8623 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8625 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8626 support. Upload fast traceframes, and delete internal IPA
8628 (stop_tracing_handler): New.
8629 (flush_trace_buffer_handler): New.
8630 (cmd_qtstop): Upload fast tracepoints.
8631 (response_tracepoint): Handle fast tracepoints.
8632 (tracepoint_finished_step): Upload fast traceframes. Set the
8633 tracepoint hit context's tracepoint type.
8634 (handle_tracepoint_bkpts): New.
8635 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8636 type. Add comment about fast tracepoints.
8637 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8638 non-existing action_str field.
8639 (get_context_regcache): Handle fast tracepoints.
8640 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8642 (fast_tracepoint_from_jump_pad_address): New.
8643 (fast_tracepoint_from_ipa_tpoint_address): New.
8644 (collecting_t): New.
8645 (force_unlock_trace_buffer): New.
8646 (fast_tracepoint_collecting): New.
8649 (write_inferior_data_ptr): New.
8650 (target_tp_heap): New.
8651 (target_malloc): New.
8652 (download_agent_expr): New.
8654 (download_tracepoints): New.
8655 (download_trace_state_variables): New.
8656 (upload_fast_traceframes): New.
8657 (IPA_FIRST_TRACEFRAME): New.
8658 (IPA_NEXT_TRACEFRAME_1): New.
8659 (IPA_NEXT_TRACEFRAME): New.
8660 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8661 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8662 (gdb_jump_pad_buffer_end): New.
8663 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8664 (initialize_tracepoint): Adjust.
8665 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8666 buffer. Initialize the low module.
8667 * utils.c (PREFIX, TOOLNAME): New.
8668 (malloc_failure): Use PREFIX.
8669 (error): In the IPA, an error causes an exit.
8670 (fatal, warning): Use PREFIX.
8671 (internal_error): Use TOOLNAME.
8672 (NUMCELLS): Increase to 10.
8673 * configure, config.in: Regenerate.
8675 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8677 * server.c (handle_query) <qSupported>: Do two passes over the
8678 qSupported string to avoid nesting strtok.
8680 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8682 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8684 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8686 * configure: Regenerate.
8687 * proc-service.list: New.
8689 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8691 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8694 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8696 * gdbreplay.c (remote_open): Check error return from socket() call by
8697 its equality to -1 not by it being negative.
8698 * remote-utils.c (remote_open): Likewise.
8700 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8702 * config.h: Regenerate.
8704 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8706 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8707 doesn't provide PTRACE_GET_THREAD_AREA.
8709 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8711 * linux-m68k-low.c: Include <asm/ptrace.h>
8712 (ps_get_thread_area): Implement.
8714 2010-05-03 Doug Evans <dje@google.com>
8716 * event-loop.c (struct callback_event): New struct.
8717 (callback_list): New global.
8718 (append_callback_event, delete_callback_event): New functions.
8719 (process_callback): New function.
8720 (start_event_loop): Call it.
8721 * remote-utils.c (NOT_SCHEDULED): Define.
8722 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8723 moved out of readchar.
8724 (readchar): Rewrite. Call reschedule before returning.
8725 (reset_readchar): New function.
8726 (remote_close): Call it.
8727 (process_remaining, reschedule): New functions.
8728 * server.h (callback_handler_func): New typedef.
8729 (append_callback_event, delete_callback_event): Declare.
8731 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8733 * proc-service.c (ps_pglobal_lookup): Use
8734 thread_db_look_up_one_symbol.
8735 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8736 parameter. Use it instead of all_symbols_looked_up.
8737 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8739 (all_symbols_looked_up): Don't declare.
8740 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8741 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8743 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8744 Set all_symbols_looked_up here.
8745 (thread_db_look_up_one_symbol): New.
8746 (thread_db_get_tls_address): Adjust.
8747 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8748 thread_db object on the heap, and tentatively set it in the
8750 (thread_db_init): Don't set all_symbols_looked_up here.
8751 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8753 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8755 * linux-low.c (linux_kill, linux_detach): Adjust.
8756 (status_pending_p_callback): Remove redundant statement. Check
8757 for !TARGET_WAITIKIND_IGNORE, instead of
8758 TARGET_WAITKIND_STOPPED.
8759 (handle_tracepoints): Make sure LWP is locked. Adjust.
8760 (linux_wait_for_event_1): Adjust.
8761 (linux_cancel_breakpoints): New.
8762 (unsuspend_one_lwp): New.
8763 (unsuspend_all_lwps): New.
8764 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8765 (send_sigstop_callback): Change return type to int, add new
8766 `except' parameter and handle it.
8767 (suspend_and_send_sigstop_callback): New.
8768 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8769 pass them down. If SUSPEND, also increment the lwp's suspend
8771 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8772 (need_step_over_p): Don't consider suspended LWPs.
8773 (start_step_over): Adjust.
8774 (proceed_one_lwp): Change return type to int, add new `except'
8775 parameter and handle it.
8776 (unsuspend_and_proceed_one_lwp): New.
8777 (proceed_all_lwps): Use find_inferior instead of
8779 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8780 also decrement the suspend count of LWPs. Pass `except' down,
8781 instead of hacking its suspend count.
8782 (linux_pause_all): Add `freeze' parameter. Adjust.
8783 (linux_unpause_all): New.
8784 (linux_target_ops): Install linux_unpause_all.
8785 * server.c (handle_status): Adjust.
8786 * target.h (struct target_ops): New fields `unpause_all' and
8787 `cancel_breakpoints'. Add new parameter to `pause_all'.
8788 (pause_all): Add new `freeze' parameter.
8790 (cancel_breakpoints): New.
8791 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8793 (cmd_qtstart): Pause threads.
8794 (stop_tracing): Pause threads, and cancel breakpoints.
8795 * win32-low.c (win32_target_ops): Adjust.
8797 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8799 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8800 the inferior right away from here...
8801 (linux_wait_1): ... to here, and adjust to check the thread's
8802 last_resume_kind instead of the lwp's step or stop_expected flags.
8804 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8806 * README: Use consistent `GDB' and `GDBserver' spellings.
8808 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8810 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8811 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8812 (linux_detach_one_lwp): Assume the lwp is stopped.
8813 (any_thread_of): Delete.
8814 (linux_detach): Stop all lwps here. Don't blindly delete all
8816 (delete_lwp_callback): New.
8817 (linux_mourn): Delete all lwps of the process that is gone.
8818 (linux_wait_1): Don't delete the last lwp of the process here.
8819 * mem-break.h (mark_breakpoints_out): Declare.
8820 * mem-break.c (mark_breakpoints_out): New.
8821 (free_all_breakpoints): Use it.
8822 * server.c (handle_target_event): If the process is gone, mark
8824 * thread-db.c (struct thread_db) <create_bp>: New field.
8825 (thread_db_enable_reporting): Fix prototype. Store a thread event
8826 breakpoint reference in the thread_db struct.
8827 (thread_db_load_search): Clear the thread_db object.
8828 (try_thread_db_load_1): Ditto.
8829 (switch_to_process): New.
8830 (disable_thread_event_reporting): Use it.
8831 (remove_thread_event_breakpoints): New.
8832 (thread_db_detach, thread_db_mourn): Use it.
8834 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8836 * linux-low.c (linux_enable_event_reporting): New.
8837 (linux_wait_for_event_1, handle_extended_wait): Use it.
8839 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8841 * linux-low.c (linux_kill_one_lwp, linux_kill)
8842 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8843 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8844 SIGSTOP even if the LWP is stopped.
8845 (send_sigstop_callback): New.
8846 (stop_all_lwps): Use send_sigstop_callback instead.
8847 (linux_resume_one_thread): Adjust.
8848 (proceed_one_lwp): Still proceed an LWP that the client has
8849 requested to stop, if we haven't reported it as stopped yet. Make
8850 sure that LWPs the client want stopped, have a pending SIGSTOP.
8852 2010-04-26 Doug Evans <dje@google.com>
8854 * server.c (handle_general_set): Make static.
8856 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8857 Print received char after testing for error/eof instead of before.
8858 (input_interrupt): Tweak comment.
8860 2010-04-23 Doug Evans <dje@google.com>
8862 * server.c (start_inferior): Print inferior argv if --debug.
8864 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8866 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8867 * nto-x86-low.c: Include server.h
8869 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8871 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8872 be consistent with other sources of this directory.
8873 (init_registers_amd64): Correct name of source file of this function
8876 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8878 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8881 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8883 * win32-i386-low.c: Add 64-bit support.
8884 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8885 (init_registers_amd64): Declare.
8886 (mappings): Add 64-bit version of array.
8887 (init_windows_x86): New function.
8888 (the_low_target): Change init_arch field to init_windows_x86.
8890 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8892 * win32-low.c: Adapt to support also 64-bit architecture.
8893 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8894 (get_image_name): Use SIZE_T type for local variable `done'.
8895 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8896 (toolhelp_get_dll_name): Idem.
8897 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8898 Use uintptr_t typecast to avoid warning.
8899 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8900 (handle_exception): Use phex_nz to avoid warning.
8901 (win32_wait): Remove unused local variable `process'.
8903 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8905 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8908 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8910 * configure.ac: Use `ws2_32' library for srv_mingw.
8911 * configure: Regenerate.
8912 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8913 * remote-utils.c: Likewise.
8915 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8917 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8918 if __x86_64__ is defined.
8920 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8922 * configure: Regenerate.
8924 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8926 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8927 * target.h (target_ops): New get_tib_address field.
8928 * win32-low.h (win32_thread_info): Add thread_local_base field.
8929 * win32-low.c (child_add_thread): Add tlb argument.
8930 Set thread_local_base field to TLB.
8931 (get_child_debug_event): Adapt to child_add_thread change.
8932 (win32_get_tib_address): New function.
8933 (win32_target_ops): Set get_tib_address field to
8934 win32_get_tib_address.
8935 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8937 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8939 * linux-low.c (linux_mourn): Also remove the process.
8940 * server.c (handle_target_event): Don't remove the process here.
8941 * nto-low.c (nto_mourn): New.
8942 (nto_target_ops): Install it.
8943 * spu-low.c (spu_mourn): New.
8944 (spu_target_ops): Install it.
8945 * win32-low.c (win32_mourn): New.
8946 (win32_target_ops): Install it.
8948 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8950 * server.h (buffer_xml_printf): Remove redundant `;'.
8952 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8954 * regcache.c (set_register_cache): Invalidate regcaches before
8955 changing the register cache layout.
8956 (regcache_invalidate_one): Allow a NULL regcache.
8957 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8958 regcaches before changing the register cache layout or the target
8961 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8963 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8964 variable warning on Linux/x86-64.
8966 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8968 GDBserver disconnected tracing support.
8970 * linux-low.c (linux_remove_process): Delete.
8971 (add_lwp): Don't set last_resume_kind here.
8972 (linux_kill): Use `mourn'.
8973 (linux_detach): Use `thread_db_detach', and `mourn'.
8975 (linux_attach_lwp_1): Adjust comment.
8976 (linux_attach): last_resume_kind moved the thread_info; adjust.
8977 (status_pending_p_callback): Adjust.
8978 (linux_wait_for_event_1): Adjust.
8979 (count_events_callback, select_singlestep_lwp_callback)
8980 (select_event_lwp_callback, cancel_breakpoints_callback)
8981 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8982 (proceed_one_lwp): Adjust.
8983 (linux_async): Add debug output.
8984 (linux_thread_stopped): New.
8985 (linux_pause_all): New.
8986 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8988 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8989 (thread_db_free): Delete declaration.
8990 (thread_db_detach, thread_db_mourn): Declare.
8991 * thread-db.c (thread_db_init): Use thread_db_mourn.
8992 (thread_db_free): Delete, split in two.
8993 (disable_thread_event_reporting): New.
8994 (thread_db_detach): New.
8995 (thread_db_mourn): New.
8997 * server.h (struct thread_info) <last_resume_kind>: New field.
8998 <attached>: Add comment.
8999 <gdb_detached>: New field.
9000 (handler_func): Change return type to int.
9001 (handle_serial_event, handle_target_event): Ditto.
9002 (gdb_connected): Declare.
9004 (disconnected_tracing): Declare.
9005 (stop_tracing): Declare.
9007 * server.c (handle_query) <qSupported>: Report support for
9008 disconnected tracing.
9009 (queue_stop_reply_callback): Account for running threads.
9010 (gdb_wants_thread_stopped): New.
9011 (gdb_wants_all_threads_stopped): New.
9012 (gdb_reattached_process): New.
9013 (handle_status): Clear the `gdb_detached' flag of all processes.
9014 In all-stop, stop all threads.
9015 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9016 (process_serial_event): If the remote connection breaks, or if an
9017 exit was forced with "monitor exit", force an event loop exit.
9018 Handle disconnected tracing on detach.
9019 (handle_serial_event): Adjust.
9020 (handle_target_event): If GDB isn't connected, forward events back
9021 to the inferior, unless the last process exited, in which case,
9022 exit gdbserver. Adjust interface.
9024 * remote-utils.c (remote_open): Don't block in accept. Instead
9025 register an event loop source on the listen socket file
9026 descriptor. Refactor bits into ...
9027 (listen_desc): ... this new global.
9028 (gdb_connected): ... this new function.
9029 (enable_async_notification): ... this new function.
9030 (handle_accept_event): ... this new function.
9031 (remote_close): Clear remote_desc.
9033 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9035 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9037 (mourn_inferior): Define.
9038 (target_process_qsupported): Avoid the dangling else problem.
9039 (thread_stopped): Define.
9040 (pause_all): Define.
9041 (target_waitstatus_to_string): Declare.
9042 * target.c (target_waitstatus_to_string): New.
9044 * tracepoint.c (tracing): Make extern.
9045 (disconnected_tracing): New.
9046 (stop_tracing): Make extern. Handle tracing stops due to GDB
9048 (cmd_qtdisconnected): New.
9049 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9050 (handle_tracepoint_general_set): Handle QTDisconnected.
9052 * event-loop.c (event_handler_func): Change return type to int.
9053 (process_event): Bail out if the event handler wants the event
9055 (handle_file_event): Ditto.
9056 (start_event_loop): Bail out if the event handler wants the event
9059 * nto-low.c (nto_target_ops): Adjust.
9060 * spu-low.c (spu_wait): Don't remove the process here.
9061 (spu_target_ops): Adjust.
9062 * win32-low.c (win32_wait): Don't remove the process here.
9063 (win32_target_ops): Adjust.
9065 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9067 * regcache.c (realloc_register_cache): Invalidate inferior's
9068 regcache before recreating it.
9070 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9072 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9074 2010-04-09 Stan Shebs <stan@codesourcery.com>
9075 Pedro Alves <pedro@codesourcery.com>
9077 * server.h (LONGEST): New.
9078 (struct thread_info) <while_stepping>: New field.
9079 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9081 (initialize_tracepoint, handle_tracepoint_general_set)
9082 (handle_tracepoint_query, tracepoint_finished_step)
9083 (tracepoint_was_hit, release_while_stepping_state_list):
9084 (current_traceframe): Declare.
9085 * server.c (handle_general_set): Handle tracepoint packets.
9087 (write_memory): New.
9088 (handle_search_memory_1): Use read_memory.
9089 (handle_query): Report support for conditional tracepoints, trace
9090 state variables, and tracepoint sources. Handle tracepoint
9092 (main): Initialize the tracepoints module.
9093 (process_serial_event): Handle traceframe reads/writes.
9095 * linux-low.c (handle_tracepoints): New.
9096 (linux_wait_1): Call it.
9097 (linux_resume_one_lwp): Handle while-stepping.
9098 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9099 (linux_target_ops): Install them.
9100 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9102 * linux-x86-low.c (x86_supports_tracepoints): New.
9103 (the_low_target). Install it.
9105 * mem-break.h (delete_breakpoint): Declare.
9106 * mem-break.c (delete_breakpoint): Make external.
9108 * target.h (struct target_ops): Add `supports_tracepoints',
9109 `read_pc', and `write_pc' fields.
9110 (target_supports_tracepoints): Define.
9111 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9114 * regcache.h (struct regcache) <registers_owned>: New field.
9115 (init_register_cache, regcache_cpy): Declare.
9116 (regcache_read_pc, regcache_write_pc): Declare.
9117 (register_cache_size): Declare.
9118 (supply_regblock): Declare.
9119 * regcache.c (init_register_cache): New.
9120 (new_register_cache): Use it.
9121 (regcache_cpy): New.
9122 (register_cache_size): New.
9123 (supply_regblock): New.
9124 (regcache_read_pc, regcache_write_pc): New.
9126 * tracepoint.c: New.
9128 * Makefile.in (OBS): Add tracepoint.o.
9129 (tracepoint.o): New rule.
9131 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9133 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9135 (i386-mmx.c): Likewise.
9136 (i386-mmx-linux.o): Likewise.
9137 (i386-mmx-linux.c): Likewise.
9139 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9140 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9141 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9142 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9144 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9145 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9146 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9148 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9150 * Makefile.in (clean): Updated.
9152 (i386-avx.c): Likewise.
9153 (i386-avx-linux.o): Likewise.
9154 (i386-avx-linux.c): Likewise.
9155 (amd64-avx.o): Likewise.
9156 (amd64-avx.c): Likewise.
9157 (amd64-avx-linux.o): Likewise.
9158 (amd64-avx-linux.c): Likewise.
9160 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9161 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9162 (srv_amd64_regobj): Add amd64-avx.o.
9163 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9164 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9165 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9166 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9167 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9168 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9169 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9171 * i387-fp.c: Include "i386-xstate.h".
9173 (i387_cache_to_xsave): Likewise.
9174 (i387_xsave_to_cache): Likewise.
9175 (x86_xcr0): Likewise.
9177 * i387-fp.h (i387_cache_to_xsave): Likewise.
9178 (i387_xsave_to_cache): Likewise.
9179 (x86_xcr0): Likewise.
9181 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9182 * linux-crisv32-low.c (target_regsets): Likewise.
9183 * linux-m68k-low.c (target_regsets): Likewise.
9184 * linux-mips-low.c (target_regsets): Likewise.
9185 * linux-ppc-low.c (target_regsets): Likewise.
9186 * linux-s390-low.c (target_regsets): Likewise.
9187 * linux-sh-low.c (target_regsets): Likewise.
9188 * linux-sparc-low.c (target_regsets): Likewise.
9189 * linux-xtensa-low.c (target_regsets): Likewise.
9191 * linux-low.c: Include <sys/uio.h>.
9192 (regsets_fetch_inferior_registers): Support nt_type.
9193 (regsets_store_inferior_registers): Likewise.
9194 (linux_process_qsupported): New.
9195 (linux_target_ops): Add linux_process_qsupported.
9197 * linux-low.h (regset_info): Add nt_type.
9198 (linux_target_ops): Add process_qsupported.
9200 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9202 (init_registers_i386_avx_linux): New.
9203 (init_registers_amd64_avx_linux): Likewise.
9204 (xmltarget_i386_linux_no_xml): Likewise.
9205 (xmltarget_amd64_linux_no_xml): Likewise.
9206 (PTRACE_GETREGSET): Likewise.
9207 (PTRACE_SETREGSET): Likewise.
9208 (x86_fill_xstateregset): Likewise.
9209 (x86_store_xstateregset): Likewise.
9210 (use_xml): Likewise.
9211 (x86_linux_update_xmltarget): Likewise.
9212 (x86_linux_process_qsupported): Likewise.
9213 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9214 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9215 init_registers_i386_linux here. Call
9216 x86_linux_update_xmltarget.
9217 (the_low_target): Add x86_linux_process_qsupported.
9219 * server.c (handle_query): Call target_process_qsupported.
9221 * target.h (target_ops): Add process_qsupported.
9222 (target_process_qsupported): New.
9224 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9226 * inferiors.c (add_thread): Set last_status kind to
9227 TARGET_WAITKIND_IGNORE.
9228 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9229 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9230 (linux_wait_1): Move `thread' local definition to block that uses
9231 it. Don't NULL initialize `event_child'.
9232 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9233 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9234 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9236 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9238 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9239 an extended waitstatus, or by a watchpoint.
9240 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9241 thread was stepping or has been stopped by a watchpoint.
9243 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9245 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9246 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9247 of another, then delete the previous, and validate all
9249 (validate_inserted_breakpoint): New.
9250 (delete_disabled_breakpoints): New.
9251 (validate_breakpoints): New.
9252 (check_mem_read): Validate breakpoints before trusting their
9253 shadow. Delete disabled breakpoints.
9254 (check_mem_write): Validate breakpoints before trusting they
9255 should be inserted. Delete disabled breakpoints.
9256 * mem-break.h (validate_breakpoints):
9257 * server.c (handle_query): Validate breakpoints when we see a
9260 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9262 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9263 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9264 if we could tell there's a GDB breakpoint at stop_pc.
9265 (need_step_over_p): Don't do a step over if we find a GDB
9266 breakpoint at the resume PC.
9268 * mem-break.c (struct raw_breakpoint): New.
9269 (enum bkpt_type): New type `gdb_breakpoint'.
9270 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9271 fields. New field `raw'.
9272 (find_raw_breakpoint_at): New.
9273 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9275 (set_breakpoint_at): Adjust.
9276 (delete_raw_breakpoint): New.
9277 (release_breakpoint): New.
9278 (delete_breakpoint): Rename to...
9279 (delete_breakpoint_1): ... this. Add proc parameter. Use
9280 release_breakpoint. Return ENOENT.
9281 (delete_breakpoint): Reimplement.
9282 (find_breakpoint_at): Delete.
9283 (find_gdb_breakpoint_at): New.
9284 (delete_breakpoint_at): Delete.
9285 (set_gdb_breakpoint_at): New.
9286 (delete_gdb_breakpoint_at): New.
9287 (gdb_breakpoint_here): New.
9288 (set_reinsert_breakpoint): Use release_breakpoint.
9289 (uninsert_breakpoint): Rename to ...
9290 (uninsert_raw_breakpoint): ... this.
9291 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9292 (reinsert_raw_breakpoint): Change parameter type to
9294 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9296 (check_breakpoints): Adjust. Use release_breakpoint.
9297 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9298 (breakpoint_inserted_here): Ditto.
9299 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9300 Don't trust the breakpoint's shadow if it is not inserted.
9301 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9302 (delete_all_breakpoints): Adjust.
9303 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9304 use delete_breakpoint_1.
9306 * mem-break.h (breakpoints_supported): Delete declaration.
9307 (set_gdb_breakpoint_at): Declare.
9308 (gdb_breakpoint_here): Declare.
9309 (delete_breakpoint_at): Delete.
9310 (delete_gdb_breakpoint_at): Declare.
9312 * server.h (struct raw_breakpoint): Forward declare.
9313 (struct process_info): New field `raw_breakpoints'.
9315 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9318 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9320 * linux-low.c (status_pending_p_callback): Fix comment.
9321 (linux_wait_for_event_1): Move most of the internal breakpoint
9322 handling from here...
9323 (linux_wait_1): ... to here.
9324 (count_events_callback): New.
9325 (select_singlestep_lwp_callback): New.
9326 (select_event_lwp_callback): New.
9327 (cancel_breakpoints_callback): New.
9328 (select_event_lwp): New.
9329 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9330 priority to all LWPs that have had events that should be reported
9331 to the client. Cancel breakpoints when about to reporting the
9332 event to the client, not while stopping lwps. No longer cancel
9333 finished single-steps here.
9334 (cancel_finished_single_step): Delete.
9335 (cancel_finished_single_steps): Delete.
9337 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9339 * mem-break.c (enum bkpt_type): New.
9340 (struct breakpoint): New field `type'.
9341 (set_breakpoint_at): Change return type to struct breakpoint
9342 pointer. Set type to `other_breakpoint' by default.
9343 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9344 in the breakpoint list.
9345 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9346 (reinsert_breakpoint): Rename to ...
9347 (reinsert_raw_breakpoint): ... this.
9348 (reinsert_breakpoints_at): Adjust.
9349 * mem-break.h (struct breakpoint): Declare.
9350 (set_breakpoint_at): Change return type to struct breakpoint
9353 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9355 * server.c (handle_query): Assign, not compare.
9357 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9359 Teach linux gdbserver to step-over-breakpoints.
9361 * linux-low.c (can_hardware_single_step): New.
9362 (supports_breakpoints): New.
9363 (handle_extended_wait): If stopping threads, read the stop pc of
9366 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9367 low target doesn't support retrieving the PC.
9368 (add_lwp): Set last_resume_kind to resume_continue.
9369 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9370 (linux_attach): Don't clear stop_expected. Set the lwp's
9371 last_resume_kind to resume_stop.
9372 (linux_detach_one_lwp): Don't check for removed breakpoints.
9373 (check_removed_breakpoint): Delete.
9374 (status_pending_p): Rename to ...
9375 (status_pending_p_callback): ... this. Don't check for removed
9376 breakpoints. Don't consider threads that are stopped from GDB's
9378 (linux_wait_for_lwp): Always read the stop_pc here.
9379 (cancel_breakpoint): New.
9380 (step_over_bkpt): New global.
9381 (linux_wait_for_event_1): Implement stepping over breakpoints.
9382 (gdb_wants_lwp_stopped): New.
9383 (gdb_wants_all_stopped): New.
9384 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9385 single-step traps here. Store the thread's last reported target
9387 (send_sigstop): Don't clear stop_expected. Always set it,
9389 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9390 (cancel_finished_single_step): New.
9391 (cancel_finished_single_steps): New.
9392 (wait_for_sigstop): Don't cancel finished single-step traps here.
9393 (linux_resume_one_lwp): Don't check for removed breakpoints.
9394 Don't set `step' on non-hardware step archs.
9395 (linux_set_resume_request): Ignore resume_stop requests if already
9396 stopping or stopped. Set the lwp's last_resume_kind.
9397 (resume_status_pending_p): Don't check for removed breakpoints.
9398 (need_step_over_p): New.
9399 (start_step_over): New.
9400 (finish_step_over): New.
9401 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9402 requests. Clear the thread's last reported target waitstatus.
9403 Don't use the `suspended' flag. Don't consider pending breakpoints.
9404 (linux_resume): Start a step-over if necessary.
9405 (proceed_one_lwp): New.
9406 (proceed_all_lwps): New.
9407 (unstop_all_lwps): New.
9408 * linux-low.h (struct lwp_info): Rewrite comment for the
9409 `suspended' flag. Add the `stop_pc' field. Delete the
9410 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9411 Add `'last_resume_kind' and `need_step_over' fields.
9412 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9413 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9414 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9415 (set_raw_breakpoint_at): New.
9416 (set_breakpoint_at): Rewrite to use it.
9417 (reinsert_breakpoint_handler): Delete.
9418 (set_reinsert_breakpoint): New.
9419 (reinsert_breakpoint_by_bp): Delete.
9420 (delete_reinsert_breakpoints): New.
9421 (uninsert_breakpoint): Rewrite.
9422 (uninsert_breakpoints_at): New.
9423 (reinsert_breakpoint): Rewrite.
9424 (reinsert_breakpoints_at): New.
9425 (check_breakpoints): Rewrite.
9426 (breakpoint_here): New.
9427 (breakpoint_inserted_here): New.
9428 (check_mem_read): Adjust.
9429 * mem-break.h (breakpoints_supported, breakpoint_here)
9430 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9431 (reinsert_breakpoint_by_bp): Delete declaration.
9432 (delete_reinsert_breakpoints): Declare.
9433 (reinsert_breakpoint): Delete declaration.
9434 (reinsert_breakpoints_at): Declare.
9435 (uninsert_breakpoint): Delete declaration.
9436 (uninsert_breakpoints_at): Declare.
9437 (check_breakpoints): Adjust prototype.
9438 * server.h: Adjust include order.
9439 (struct thread_info): Declare here. Add a `last_status' field.
9441 2010-03-23 Michael Snyder <msnyder@vmware.com>
9443 * server.c (crc32): New function.
9444 (handle_query): Add handling for 'qCRC:' request.
9446 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9448 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9449 lwp had been stopped by a watchpoint.
9451 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9453 * server.h (internal_error): Declare.
9454 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9455 * utils.c (internal_error): New function.
9457 2010-03-15 Andreas Schwab <schwab@redhat.com>
9459 * configure.srv: Fix typo setting srv_regobj.
9461 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9463 * linux-low.c (fetch_register): Avoid passing a non string literal
9465 (usr_store_inferior_registers): Ditto.
9467 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9469 * linux-low.c (linux_write_memory): Bail out early if peeking
9472 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9474 * linux-low.h (struct lwp_info): New fields
9475 `stopped_by_watchpoint' and `stopped_data_address'.
9476 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9477 here, and cache them in the lwp object.
9478 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9480 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9482 (linux_stopped_by_watchpoint): Rewrite.
9483 (linux_stopped_data_address): Rewrite.
9485 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9487 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9488 switching the current inferior, not before.
9490 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9492 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9493 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9494 i386-linux.c and amd64-linux.c.
9495 (reg-i386.o): Removed.
9496 (reg-i386.c): Likewise.
9497 (reg-i386-linux.o): Likewise.
9498 (reg-i386-linux.c): Likewise.
9499 (reg-x86-64.o): Likewise.
9500 (reg-x86-64.c): Likewise.
9501 (reg-x86-64-linux.o): Likewise.
9502 (reg-x86-64-linux.c): Likewise.
9505 (i386-linux.o): Likewise.
9506 (i386-linux.c): Likewise.
9507 (amd64.o): Likewise.
9508 (amd64.c): Likewise.
9509 (amd64-linux.o): Likewise.
9510 (amd64-linux.c): Likewise.
9512 * configure.srv (srv_i386_regobj): New.
9513 (srv_i386_linux_regobj): Likewise.
9514 (srv_amd64_regobj): Likewise.
9515 (srv_amd64_linux_regobj): Likewise.
9516 (srv_i386_32bit_xmlfiles): Likewise.
9517 (srv_i386_64bit_xmlfiles): Likewise.
9518 (srv_i386_xmlfiles): Likewise.
9519 (srv_amd64_xmlfiles): Likewise.
9520 (srv_i386_linux_xmlfiles): Likewise.
9521 (srv_amd64_linux_xmlfiles): Likewise.
9522 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9523 srv_xmlfiles to $srv_i386_xmlfiles.
9524 (i[34567]86-*-mingw32ce*): Likewise.
9525 (i[34567]86-*-mingw*): Likewise.
9526 (i[34567]86-*-nto*): Likewise.
9527 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9528 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9529 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9530 (x86_64-*-linux*): Likewise.
9532 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9533 (init_registers_amd64_linux): New.
9534 (x86_arch_setup): Replace init_registers_x86_64_linux with
9535 init_registers_amd64_linux.
9537 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9539 * configure.ac: Check for libdl. If it is not available link against
9540 static libthread_db.
9541 * configure: Regenerate.
9543 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9547 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9548 handing a read watchpoint.
9549 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9551 2010-02-12 Doug Evans <dje@google.com>
9553 * linux-low.c (linux_supports_tracefork_flag): Document.
9554 (linux_look_up_symbols): Add comment.
9556 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9558 * regcache.c (supply_register): Clear regcache if buf is NULL.
9560 2010-02-02 Nicolas Roche <roche@sourceware.org>
9561 Joel Brobecker <brobecker@adacore.com>
9563 * inferiors.c (find_inferior): Add function documentation.
9564 (unloaded_dll): Handle the case where the unloaded dll has not
9565 been previously registered in the dll list.
9567 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9569 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9570 (thumb2_breakpoint): New.
9571 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9573 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9575 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9576 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9579 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9581 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9583 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9585 * linux-s390-low.c (s390_collect_ptrace_register)
9586 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9588 2010-01-21 Doug Evans <dje@google.com>
9590 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9591 (PTRACE_ARG4_TYPE): New macro.
9592 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9593 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9594 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9595 (usr_store_inferior_registers): Ditto.
9596 (linux_read_memory, linux_write_memory): Ditto.
9597 (linux_test_for_tracefork): Ditto.
9599 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9600 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9602 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9604 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9607 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9609 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9610 prototype to take a regcache. Adjust.
9612 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9614 * regcache.h (struct thread_info): Forward declare.
9615 (struct regcache): New.
9616 (new_register_cache): Adjust prototype.
9617 (get_thread_regcache): Declare.
9618 (free_register_cache): Adjust prototype.
9619 (registers_to_string, registers_from_string): Ditto.
9620 (supply_register, supply_register_by_name, collect_register)
9621 (collect_register_as_string, collect_register_by_name): Ditto.
9622 * regcache.c (struct inferior_regcache_data): Delete.
9623 (get_regcache): Rename to ...
9624 (get_thread_regcache): ... this. Adjust. Switch inferior before
9626 (regcache_invalidate_one): Adjust.
9627 (regcache_invalidate): Fix prototype.
9628 (new_register_cache): Return the new register cache.
9629 (free_register_cache): Change prototype.
9630 (realloc_register_cache): Adjust.
9631 (registers_to_string): Change prototype to take a regcache. Adjust.
9632 (registers_from_string): Ditto.
9633 (register_data): Ditto.
9634 (supply_register): Ditto.
9635 (supply_register_by_name): Ditto.
9636 (collect_register): Ditto.
9637 (collect_register_as_string): Ditto.
9638 (collect_register_by_name): Ditto.
9639 * server.c (process_serial_event): Adjust.
9640 * linux-low.h (regset_fill_func, regset_store_func): Change
9642 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9644 * linux-low.c (get_stop_pc): Adjust.
9645 (check_removed_breakpoint): Adjust.
9646 (linux_wait_for_event): Adjust.
9647 (linux_resume_one_lwp): Adjust.
9648 (fetch_register): Add regcache parameter. Adjust.
9649 (usr_store_inferior_registers): Ditto.
9650 (regsets_fetch_inferior_registers): Ditto.
9651 (regsets_store_inferior_registers): Ditto.
9652 (linux_fetch_registers, linux_store_registers): Ditto.
9653 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9655 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9657 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9658 prototype to take a regcache.
9659 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9660 * remote-utils.c (convert_ascii_to_int, outreg)
9661 (prepare_resume_reply): Change prototype to take a regcache.
9663 * target.h (struct target_ops) <fetch_registers, store_registers>:
9664 Change prototype to take a regcache.
9665 (fetch_inferior_registers, store_inferior_registers): Change
9666 prototype to take a regcache. Adjust.
9667 * proc-service.c (ps_lgetregs): Adjust.
9668 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9669 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9670 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9671 take a regcache. Adjust.
9672 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9673 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9674 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9675 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9676 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9677 (cris_cannot_fetch_register):
9678 (cris_breakpoint_at): Change prototype to take a regcache.
9680 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9681 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9682 to take a regcache. Adjust.
9683 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9685 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9686 take a regcache. Adjust.
9687 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9688 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9689 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9690 * linux-mips-low.c (mips_get_pc):
9691 (mips_set_pc): Change prototype to take a regcache. Adjust.
9692 (mips_reinsert_addr): Adjust.
9693 (mips_collect_register): Change prototype to take a regcache.
9695 (mips_supply_register):
9696 (mips_collect_register_32bit, mips_supply_register_32bit)
9697 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9698 (mips_store_fpregset): Ditto.
9699 * linux-ppc-low.c (ppc_supply_ptrace_register)
9700 (ppc_supply_ptrace_register): Ditto.
9701 (parse_spufs_run): Adjust.
9702 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9703 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9704 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9705 take a regcache. Adjust.
9706 * linux-s390-low.c (s390_collect_ptrace_register)
9707 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9708 (s390_set_pc): Change prototype to take a regcache. Adjust.
9709 (s390_arch_setup): Adjust.
9710 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9711 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9712 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9713 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9714 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9716 (sparc_breakpoint_at): Adjust.
9717 * linux-xtensa-low.c (xtensa_fill_gregset):
9718 (xtensa_store_gregset):
9719 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9720 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9721 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9722 prototype to take a regcache. Adjust.
9723 * win32-arm-low.c (arm_fetch_inferior_register)
9724 (arm_store_inferior_register): Change prototype to take a
9726 * win32-i386-low.c (i386_fetch_inferior_register)
9727 (i386_store_inferior_register): Change prototype to take a
9729 * win32-low.c (child_fetch_inferior_registers)
9730 (child_store_inferior_registers): Change prototype to take a
9732 (win32_wait): Adjust.
9733 (win32_fetch_inferior_registers): Change prototype to take a
9735 (win32_store_inferior_registers): Adjust.
9736 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9737 store_inferior_register>: Change prototype to take a regcache.
9739 2010-01-20 Doug Evans <dje@google.com>
9741 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9743 (linux_wait_for_event1, linux_init_signals): Ditto.
9744 (W_STOPCODE): Provide definition if missing.
9746 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9748 * linux-low.c (linux_core_of_thread): New.
9749 (compare_ints, show_process, list_threads): New.
9750 (linux_qxfer_osdata): Report threads and cores.
9751 (linux_target_op): Register linux_core_of_thread.
9752 * remote-utils.c (prepare_resume_reply): Report the core.
9753 (buffer_xml_printf): Support %d specifier.
9754 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9756 (handle_query): Handle qXfer:threads. Announce availability
9758 * target.h (struct target_ops): New field core_of_thread.
9760 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9762 * Makefile.in (clean): Remove new generated files.
9763 (reg-s390.o, reg-s390.c): Remove rules.
9764 (reg-s390x.o, reg-s390x.c): Likewise.
9765 (s390-linux32.o, s390-linux32.c): Add rules.
9766 (s390-linux64.o, s390-linux64.c): Likewise.
9767 (s390x-linux64.o, s390x-linux64.c): Likewise.
9768 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9769 * linux-s390-low.c: Include <elf.h>.
9770 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9771 (init_registers_s390): Remove prototype.
9772 (init_registers_s390x): Likewise.
9773 (init_registers_s390_linux32): Add prototype.
9774 (init_registers_s390_linux64): Likewise.
9775 (init_registers_s390x_linux64): Likewise.
9776 (s390_num_regs_3264): New define.
9777 (s390_regmap_3264): New global variable.
9778 (s390_cannot_fetch_register): Remove obsolete check.
9779 (s390_cannot_store_register): Likewise.
9780 (s390_collect_ptrace_register): Handle upper/lower register halves.
9781 (s390_supply_ptrace_register): Likewise.
9782 (s390_fill_gregset): Update to register number changes.
9783 (s390_get_hwcap): New routine.
9784 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9785 Install appropriate regmap and register set.
9787 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9789 * server.c (gdbserver_version): Update copyright year to 2010.
9790 * gdbreplay.c (gdbreplay_version): Likewise.
9792 2009-12-28 Doug Evans <dje@google.com>
9794 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9795 elf/external.h. Include <elf.h> instead but only if necessary.
9797 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9799 * linux-low.c (linux_remove_process): Remove `detaching'
9800 parameter. Don't release/detach from thread_db here.
9801 (linux_kill): Release/detach from thread_db here, ...
9802 (linux_detach): ... and here, before actually detaching.
9803 (linux_wait_1): ... and here, when a process exits.
9804 * thread-db.c (any_thread_of): New.
9805 (thread_db_free): Switch the current inferior to a thread of the
9808 2009-12-21 Doug Evans <dje@google.com>
9810 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9812 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9813 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9814 warning ifndef __NR_tkill. Move setting of errno there too.
9815 Delete unnecessary resetting of errno after syscall.
9816 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9818 * configure.ac: Check for dladdr.
9819 * config.in: Regenerate.
9820 * configure: Regenerate.
9821 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9822 (try_thread_db_load): Update.
9824 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9826 2009-12-18 Doug Evans <dje@google.com>
9828 * event-loop.c: Include unistd.h if it exists.
9830 * linux-low.c (my_waitpid): Move definition away from being in
9831 between linux_tracefork_child/linux_test_for_tracefork.
9833 * gdb_proc_service.h (psaddr_t): Fix type.
9834 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9835 signature to match glibc.
9837 2009-12-16 Doug Evans <dje@google.com>
9839 * linux-low.c (linux_read_memory): Fix argument to read.
9841 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9843 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9844 events, don't leave current_inferior pointing at null.
9846 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9848 * win32-low.c (LOG): Delete.
9849 (OUTMSG): Output to stderr.
9850 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9851 on compile time LOG macro.
9852 (win32_wait): Fix debug output.
9854 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9856 * win32-low.c (win32_add_one_solib): If the dll name is
9857 "ntdll.dll", prepend the system directory to the dll path.
9859 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9861 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9863 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9864 Vladimir Prus <vladimir@codesourcery.com>
9866 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9867 * configure.ac: Check for __mcoldfire__ and set
9868 gdb_cv_m68k_is_coldfire.
9869 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9870 reg-cf.o and reg-m68k.o.
9871 * configure: Regenerated.
9873 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9875 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9876 Pass it to thread_db_free.
9877 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9878 proper `detaching' argument to linux_remove_process.
9879 * linux-low.h (thread_db_free): Add `detaching' parameter.
9880 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9882 (thread_db_free): Add `detaching' parameter. Only
9883 call td_ta_clear_event if detaching from process.
9885 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9887 * thread-db.c (thread_db_free): Fix typo.
9889 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9892 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9894 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9896 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9897 with an i686 compiler.
9898 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9900 * configure: Rebuilt.
9902 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9906 * server.c (handle_search_memory_1): Correct read_addr initialization
9907 in loop for searching subsequent chunks.
9909 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9911 * configure.ac: New --with-libthread-db option.
9912 * thread-db.c: Allow direct dependence on libthread_db.
9913 (thread_db_free): Adjust.
9914 * config.in: Regenerate.
9915 * configure: Likewise.
9917 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9920 * thread-db.c (attach_thread): New function.
9921 (maybe_attach_thread): Return success/failure.
9922 (find_new_threads_callback): Adjust.
9923 (thread_db_find_new_threads): Loop until no new threads.
9925 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9927 * proc-service.c (ps_lgetregs): Formatting.
9929 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9931 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9932 * configure.ac: Adjust.
9933 * linux-low.h (struct process_info_private): Move members to struct
9935 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9936 * linux-low.c (linux_remove_process): Adjust.
9937 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9938 * server.c (handle_query): Move code ...
9939 (handle_monitor_command): ... here. New function.
9940 * target.h (struct target_ops): New member.
9941 * thread-db.c (struct thread_db): New.
9942 (libthread_db_search_path): New variable.
9943 (thread_db_create_event, thread_db_enable_reporting)
9944 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9945 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9946 (try_thread_db_load_1, dladdr_to_soname): New functions.
9947 (try_thread_db_load, thread_db_load_search): New functions.
9948 (thread_db_init): Search for libthread_db.
9949 (thread_db_free): New function.
9950 (thread_db_handle_monitor_command): Likewise.
9951 * config.in: Regenerate.
9952 * configure: Regenerate.
9954 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9956 * spu-low.c (spu_kill): Wait for inferior to terminate.
9957 Call clear_inferiors.
9958 (spu_detach): Call clear_inferiors.
9960 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9962 * aclocal.m4: Regenerate.
9963 * config.in: Likewise.
9964 * configure: Likewise.
9966 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9968 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9969 (parse_spufs_run): New function.
9970 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9971 (ppc_breakpoint_at): Handle SPU breakpoints.
9973 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9975 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9976 (SPUFS_MAGIC): Define.
9977 (spu_enumerate_spu_ids): New function.
9978 (linux_qxfer_spu): New function.
9979 (linux_target_ops): Install linux_qxfer_spu.
9981 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9983 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9984 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9985 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9986 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9987 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9988 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9989 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9990 (init_registers_powerpc_cell32l): Add prototype.
9991 (init_registers_powerpc_cell64l): Likewise.
9992 (ppc_arch_setup): Detect Cell/B.E. architecture.
9994 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9996 * Makefile.in (datarootdir): New variable.
9998 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10000 * linux-low.c (linux_write_memory): Update debugging output.
10001 * Makefile.in (clean): Add new descriptions.
10002 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10003 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10004 * configure.srv: Add new files for arm*-*-linux*.
10005 * linux-arm-low.c: Add new declarations.
10006 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10007 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10008 (HWCAP_VFPv3D16): New.
10009 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10010 instead of __IWMMXT__.
10011 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10012 (arm_arch_setup): New.
10013 (target_regsets): Remove #ifdef. Add VFP regset.
10014 (the_low_target): Use arm_arch_setup.
10016 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10018 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10019 the main thread again.
10021 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10023 Adding Neutrino gdbserver.
10024 * configure: Regenerated.
10025 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10026 * configure.srv (i[34567]86-*-nto*): New target.
10027 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10028 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10029 (nto_comctrl) [__QNX__]: New function.
10030 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10032 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10034 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10037 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10038 Pedro Alves <pedro@codesourcery.com>
10040 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10041 don't support CONTEXT_EXTENDED_REGISTERS.
10042 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10043 (the_low_target): Install them.
10044 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10045 failing with ERROR_PIPE_NOT_CONNECTED.
10047 2009-06-30 Doug Evans <dje@google.com>
10048 Pierre Muller <muller@ics.u-strasbg.fr>
10050 Add h/w watchpoint support to x86-linux, win32-i386.
10051 * Makefile.in (SFILES): Add i386-low.c
10052 (i386_low_h): Define.
10053 (i386-low.o): Add dependencies.
10054 (linux-x86-low.o): Add i386-low.h dependency.
10055 (win32-i386-low.o): Ditto.
10056 * i386-low.c: New file.
10057 * i386-low.h: New file.
10058 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10059 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10060 * linux-low.c (linux_add_process): Initialize arch_private.
10061 (linux_remove_process): Free arch_private.
10062 (add_lwp): Initialize arch_private.
10063 (delete_lwp): Free arch_private.
10064 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10066 * linux-low.h (process_info_private): New member arch_private.
10067 (lwp_info): New member arch_private.
10068 (linux_target_ops): New members new_process, new_thread,
10070 (ptid_of): New macro.
10071 * linux-x86-low.c: Include stddef.h, i386-low.h.
10072 (arch_process_info): New struct.
10073 (arch_lwp_info): New struct.
10074 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10075 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10076 (i386_dr_low_get_status): New function.
10077 (x86_insert_point, x86_remove_point): New functions.
10078 (x86_stopped_by_watchpoint): New function.
10079 (x86_stopped_data_address): New function.
10080 (x86_linux_new_process, x86_linux_new_thread): New functions.
10081 (x86_linux_prepare_to_resume): New function.
10082 (the_low_target): Add entries for insert_point, remove_point,
10083 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10085 * server.c (debug_hw_points): New global.
10086 (monitor_show_help): Document set debug-hw-points.
10087 (handle_query): Process "set debug-hw-points".
10088 * server.h (debug_hw_points): Declare.
10089 (paddress): Declare.
10090 * utils.c (NUMCELLS, CELLSIZE): New macros.
10091 (get_sell, xsnprintf, paddress): New functions.
10092 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10093 remove_point, stopped_by_watchpoint, stopped_data_address.
10094 * win32-i386-low.c: Include i386-low.h.
10095 (debug_reg_state): Replaces dr.
10096 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10097 (i386_dr_low_get_status): New function.
10098 (i386_insert_point, i386_remove_point): New functions.
10099 (i386_stopped_by_watchpoint): New function.
10100 (i386_stopped_data_address): New function.
10101 (i386_initial_stuff): Update.
10102 (get_thread_context,set_thread_context,i386_thread_added): Update.
10103 (the_low_target): Add entries for insert_point,
10104 remove_point, stopped_by_watchpoint, stopped_data_address.
10105 * win32-low.c (win32_insert_watchpoint): New function.
10106 (win32_remove_watchpoint): New function.
10107 (win32_stopped_by_watchpoint): New function.
10108 (win32_stopped_data_address): New function.
10109 (win32_target_ops): Add entries for insert_watchpoint,
10110 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10111 * win32-low.h (win32_target_ops): New members insert_point,
10112 remove_point, stopped_by_watchpoint, stopped_data_address.
10114 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10116 * server.c (process_serial_event): Re-return unsupported, not
10117 error, if the type isn't recognized. Re-allow supporting only
10118 insert or remove packets. Also call require_running for
10119 breakpoints. Add missing break statement to default case. Tidy.
10120 * target.h (struct target_ops): Rename insert_watchpoint to
10121 insert_point, and remove_watchpoint to remove_point.
10123 * linux-low.h (struct linux_target_ops): Likewise.
10124 * linux-low.c (linux_insert_watchpoint): Rename to ...
10125 (linux_insert_point): ... this. Adjust.
10126 (linux_remove_watchpoint): Rename to ...
10127 (linux_remove_point): ... this. Adjust.
10128 (linux_target_ops): Adjust.
10129 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10130 (cris_insert_point): ... this.
10131 (cris_remove_watchpoint): Rename to ...
10132 (cris_remove_point): ... this.
10133 (the_low_target): Adjust.
10135 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10137 * server.c (handle_v_kill): Pass signal_pid to
10138 kill_inferior if multi_process is zero.
10140 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10142 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10143 * target.h (target_ops): Comment for *_watchpoint to make it clear
10144 the functions can get types '0' and '1'.
10146 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10148 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10149 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10150 * regcache.c (get_regcache): Likewise.
10151 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10152 * win32-low.c (child_fetch_inferior_registers): Remove check for
10155 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10156 Pedro Alves <pedro@codesourcery.com>
10158 * target.h (struct target_ops) <supports_multi_process>: New
10160 (target_supports_multi_process): New.
10161 * server.c (handle_query): Even if GDB reports support, only
10162 enable multi-process if the target also supports it. Report
10163 multi-process support only if the target backend supports it.
10164 * linux-low.c (linux_supports_multi_process): New function.
10165 (linux_target_ops): Install it as target_supports_multi_process
10168 2009-05-24 Doug Evans <dje@google.com>
10170 Global renaming of find_thread_pid to find_thread_ptid.
10171 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10172 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10173 All callers updated.
10175 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10176 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10179 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10180 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10181 (linux_resume_one_lwp): Ditto.
10183 2009-05-23 Doug Evans <dje@google.com>
10185 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10186 from struct inferior_list_entry * to struct lwp_info *.
10187 All callers updated.
10189 2009-05-13 Doug Evans <dje@google.com>
10191 * linux-x86-low.c: Don't include assert.h.
10192 (x86_siginfo_fixup): Use fatal, not assert.
10193 (x86_arch_setup): Fix comment.
10195 2009-05-12 Doug Evans <dje@google.com>
10197 Biarch support for i386/amd64 gdbserver.
10198 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10199 Add linux-x86-low.c.
10200 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10201 (linux-x86-low.o): Add.
10202 * linux-x86-64-low.c: Delete.
10203 * linux-i386-low.c: Delete.
10204 * linux-x86-low.c: New file.
10205 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10207 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10209 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10210 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10211 (linux_child_pid_to_exec_file): New function.
10212 (elf_64_header_p, elf_64_file_p): New functions.
10213 (siginfo_fixup): New function.
10214 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10215 give target a chance to convert layout.
10216 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10217 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10219 2009-05-07 Doug Evans <dje@google.com>
10221 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10222 (regsets_store_inferior_registers): Ditto.
10224 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10228 * linux-low.c (must_set_ptrace_flags): Delete.
10229 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10231 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10232 `lwp->must_set_ptrace_flags' instead.
10233 (linux_wait_for_event_1): Set ptrace options here.
10234 (linux_wait_1): ... not here.
10236 2009-04-30 Doug Evans <dje@google.com>
10238 * inferiors.c (started_inferior_callback): New function.
10239 (attached_inferior_callback): New function.
10240 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10241 * server.c (print_started_pid, print_attached_pid): New functions.
10242 (detach_or_kill_for_exit): New function.
10243 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10244 * server.h (have_started_inferiors_p): Declare.
10245 (have_attached_inferiors_p): Declare.
10247 * inferiors.c (remove_process): Fix memory leak, free process.
10248 * linux-low.c (linux_remove_process): New function.
10249 (linux_kill): Call it instead of remove_process.
10250 (linux_detach, linux_wait_1): Ditto.
10252 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10254 * configure.srv: Add x86 Windows CE target.
10256 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10258 * inferiors.c (get_thread_process): Make global.
10259 * server.h (get_thread_process): Add prototype.
10260 * thread-db.c (find_one_thread): Use get_thread_process
10261 instead of current_process.
10262 (thread_db_get_tls_address): Do not crash if called when
10263 thread layer is not yet initialized.
10265 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10267 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10268 * spu-low.c (current_tid): Rename to ...
10269 (current_ptid): ... this.
10270 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10271 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10272 ptid_get_lwp (current_ptid) instead of current_tid.
10273 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10274 instead of current_tid. Use find_process_pid to verify pid
10275 argument is valid. Pass proper argument to remove_process.
10276 (spu_thread_alive): Compare current_ptid instead of current_tid.
10277 (spu_resume): Likewise.
10279 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10281 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10284 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10286 Implement the multiprocess extensions, and add linux multiprocess
10289 * server.h (ULONGEST): Declare.
10290 (struct ptid, ptid_t): New.
10291 (minus_one_ptid, null_ptid): Declare.
10292 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10293 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10294 (struct inferior_list_entry): Change `id' type from unsigned from
10296 (struct sym_cache, struct breakpoint, struct
10297 process_info_private): Forward declare.
10298 (struct process_info): Declare.
10299 (current_process): Declare.
10300 (all_processes): Declare.
10301 (initialize_inferiors): Declare.
10302 (add_thread): Adjust to use ptid_t.
10303 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10304 (add_process, remove_process, find_thread_pid): Declare.
10305 (find_inferior_id): Adjust to use ptid_t.
10306 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10307 (multi_process): Declare.
10308 (push_event): Adjust to use ptid_t.
10309 (read_ptid, write_ptid): Declare.
10310 (prepare_resume_reply): Adjust to use ptid_t.
10311 (clear_symbol_cache): Declare.
10312 * inferiors.c (all_processes): New.
10313 (null_ptid, minus_one_ptid): New.
10314 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10315 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10316 (add_thread): Change unsigned long to ptid. Remove gdb_id
10318 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10319 (gdb_id_to_thread): Rename to ...
10320 (find_thread_pid): ... this. Change unsigned long to ptid.
10321 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10322 (loaded_dll, pull_pid_from_list): Adjust.
10323 (add_process, remove_process, find_process_pid)
10324 (get_thread_process, current_process, initialize_inferiors): New.
10325 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10326 (struct target_waitstatus) <related_pid>: Ditto.
10327 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10328 return type to int.
10329 (struct target_ops) <join>: Add `pid' argument.
10330 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10331 (struct target_ops) <wait>: Add `ptid' field. Change return type
10333 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10334 (mywait): Add `ptid' argument. Change return type to ptid_t.
10335 (target_pid_to_str): Declare.
10336 * target.c (set_desired_inferior): Adjust to use ptids.
10337 (mywait): Add new `ptid' argument. Adjust.
10338 (target_pid_to_str): New.
10339 * mem-break.h (free_all_breakpoints): Declare.
10340 * mem-break.c (breakpoints): Delelete.
10341 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10342 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10343 to use per-process breakpoint list.
10344 (free_all_breakpoints): New.
10345 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10346 (symbol_cache, all_symbols_looked_up): Delete.
10348 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10350 (prepare_resume_reply): Change ptid argument's type from unsigned
10351 long to ptid_t. Adjust. Implement W;process and X;process.
10352 (free_sym_cache, clear_symbol_cache): New.
10353 (look_up_one_symbol): Adjust to per-process symbol cache. *
10354 * server.c (cont_thread, general_thread, step_thread): Change type
10356 (attached): Delete.
10357 (multi_process): New.
10358 (last_ptid): Change type to ptid_t.
10359 (struct vstop_notif) <ptid>: Change type to ptid_t.
10360 (queue_stop_reply, push_event): Change `ptid' argument's type to
10362 (discard_queued_stop_replies): Add `pid' argument.
10363 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10364 changes. Don't reference the `attached' global.
10365 (attach_inferior): Adjust to mywait interface changes.
10366 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10367 features. Handle and report "multiprocess+". Handle
10369 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10371 (handle_v_kill): New.
10372 (handle_v_stopped): Adjust to use target_pid_to_str.
10373 (handle_v_requests): Allow multiple attaches and runs when
10374 multiprocess extensions are in effect. Handle "vKill".
10375 (myresume): Adjust to use ptids.
10376 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10377 (handle_status): Adjust to discard_queued_stop_replies interface
10379 (first_thread_of, kill_inferior_callback)
10380 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10381 (main): Call initialize_inferiors. Adjust to use ptids, killing
10382 and detaching from all inferiors. Handle multiprocess packet
10384 * linux-low.h: Include gdb_proc_service.h.
10385 (struct process_info_private): New.
10386 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10387 <lwpid_of>: Use ptid_get_lwp.
10388 (get_lwp_thread): Adjust.
10389 (struct lwp_info): Add `dead' member.
10390 (find_lwp_pid): Declare.
10391 * linux-low.c (thread_db_active): Delete.
10392 (new_inferior): Adjust comment.
10393 (inferior_pid): Delete.
10394 (linux_add_process): New.
10395 (handle_extended_wait): Adjust.
10396 (add_lwp): Change unsigned long to ptid.
10397 (linux_create_inferior): Add process to processes table. Adjust
10398 to use ptids. Don't set new_inferior here.
10399 (linux_attach_lwp): Rename to ...
10400 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10401 it. Adjust to use ptids.
10402 (linux_attach_lwp): New.
10403 (linux_attach): Add process to processes table. Don't set
10405 (struct counter): New.
10406 (second_thread_of_pid_p, last_thread_of_process_p): New.
10407 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10408 multiple processes.
10409 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10410 processes. Remove process from process table.
10411 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10412 to multiple processes.
10413 (any_thread_of): New.
10414 (linux_detach): Add `pid' argument, and handle it. Remove process
10415 from processes table.
10416 (linux_join): Add `pid' argument. Handle it.
10417 (linux_thread_alive): Change unsighed long argument to ptid_t.
10418 Consider dead lwps as not being alive.
10419 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10420 threads we're not interested in.
10421 (same_lwp, find_lwp_pid): New.
10422 (linux_wait_for_lwp): Change `pid' argument's type from int to
10424 (linux_wait_for_event): Rename to ...
10425 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10426 from int to ptid_t. Adjust.
10427 (linux_wait_for_event): New.
10428 (linux_wait_1): Add `ptid' argument. Change return type to
10429 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10430 that exit from the process table.
10431 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10433 (mark_lwp_dead): New.
10434 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10435 stopping all threads, mark its main lwp as dead.
10436 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10438 (fetch_register, usr_store_inferior_registers)
10439 (regsets_fetch_inferior_registers)
10440 (regsets_store_inferior_registers, linux_read_memory)
10441 (linux_write_memory): Inline `inferior_pid'.
10442 (linux_look_up_symbols): Adjust to use per-process
10443 `thread_db_active'.
10444 (linux_request_interrupt): Adjust to use ptids.
10445 (linux_read_auxv): Inline `inferior_pid'.
10446 (initialize_low): Don't reference thread_db_active.
10447 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10448 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10449 (ps_getpid): Return the pid of the current inferior.
10450 * thread-db.c (proc_handle, thread_agent): Delete.
10451 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10453 (find_one_thread): Change argument type to ptid_t. Adjust to
10455 (maybe_attach_thread): Adjust to per-process data and ptids.
10456 (thread_db_find_new_threads): Ditto.
10457 (thread_db_init): Ditto.
10458 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10459 processes table. Adjust to use ptids.
10460 (spu_kill, spu_detach): Adjust interface. Remove process from
10462 (spu_join, spu_thread_alive): Adjust interface.
10463 (spu_wait): Adjust interface. Remove process from processes
10464 table. Adjust to use ptids.
10465 * win32-low.c (current_inferior_tid): Delete.
10466 (current_inferior_ptid): New.
10467 (debug_event_ptid): New.
10468 (thread_rec): Take a ptid. Adjust.
10469 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10470 (child_delete_thread): Ditto.
10471 (do_initial_child_stuff): Add `attached' argument. Add process to
10473 (child_fetch_inferior_registers, child_store_inferior_registers):
10475 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10476 (win32_attach): Pass 1 to do_initial_child_stuff.
10477 (win32_kill): Adjust interface. Remove process from processes
10479 (win32_detach): Ditto.
10480 (win32_join): Adjust interface.
10481 (win32_thread_alive): Take a ptid.
10482 (win32_resume): Adjust to use ptids.
10483 (get_child_debug_event): Ditto.
10484 (win32_wait): Adjust interface. Remove exiting process from
10487 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10489 Non-stop mode support.
10491 * server.h (non_stop): Declare.
10492 (gdb_client_data, handler_func): Declare.
10493 (delete_file_handler, add_file_handler, start_event_loop):
10495 (handle_serial_event, handle_target_event, push_event)
10496 (putpkt_notif): Declare.
10497 * target.h (enum resume_kind): New.
10498 (struct thread_resume): Replace `step' field by `kind' field.
10499 (TARGET_WNOHANG): Define.
10500 (struct target_ops) <wait>: Add `options' argument.
10501 <supports_non_stop, async, start_non_stop>: New fields.
10502 (target_supports_non_stop, target_async): New.
10503 (start_non_stop): Declare.
10504 (mywait): Add `options' argument.
10505 * target.c (mywait): Add `options' argument. Print child exit
10506 notifications here.
10507 (start_non_stop): New.
10508 * server.c (non_stop, own_buf, mem_buf): New globals.
10509 (struct vstop_notif): New.
10510 (notif_queue): New global.
10511 (queue_stop_reply, push_event, discard_queued_stop_replies)
10512 (send_next_stop_reply): New.
10513 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10515 (attach_inferior): In non-stop mode, don't wait for the target
10517 (handle_general_set): Handle QNonStop.
10518 (handle_query): When handling qC, return the current general
10519 thread, instead of the first thread of the list.
10520 (handle_query): If the backend supports non-stop mode, include
10521 QNonStop+ in the qSupported query response.
10522 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10524 (handle_v_attach, handle_v_run): Handle non-stop mode.
10525 (handle_v_stopped): New.
10526 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10527 (myresume): Adjust to use resume_kind. Handle non-stop.
10528 (queue_stop_reply_callback): New.
10529 (handle_status): Handle non-stop mode.
10530 (main): Clear non_stop flag on reconnection. Use the event-loop.
10531 Refactor serial protocol handling from here ...
10532 (process_serial_event): ... to this new function. When GDB
10533 selects any thread, select one here. In non-stop mode, wait until
10534 GDB acks all pending events before exiting.
10535 (handle_serial_event, handle_target_event): New.
10536 * remote-utils.c (remote_open): Install remote_desc in the event
10538 (remote_close): Remove remote_desc from the event loop.
10539 (putpkt_binary): Rename to...
10540 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10541 (putpkt_binary): New as wrapper around putpkt_binary_1.
10542 (putpkt_notif): New.
10543 (prepare_resume_reply): In non-stop mode, don't change the
10545 * event-loop.c: New.
10546 * Makefile.in (OBJ): Add event-loop.o.
10547 (event-loop.o): New rule.
10549 * linux-low.h (pid_of): Moved here.
10551 (get_lwp_thread): Use lwpid_of.
10552 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10553 * linux-low.c (pid_of): Delete.
10554 (inferior_pid): Use lwpid_of.
10555 (linux_event_pipe): New.
10556 (target_is_async_p): New.
10558 (handle_extended_wait): Use lwpid_of.
10559 (add_lwp): Don't set lwpid field.
10560 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10561 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10562 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10563 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10564 first. Adjust to linux_wait_for_event interface changes. Use
10566 (linux_detach): Don't delete the main lwp here.
10567 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10568 (status_pending_p): Don't consider explicitly suspended lwps.
10569 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10570 pointer. Add OPTIONS argument. Change return type to int. Use
10571 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10572 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10573 pointer. Add status pointer argument. Return a pid instead of a
10574 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10575 changes. In non-stop mode, don't switch to a random thread.
10576 (linux_wait): Rename to...
10577 (linux_wait_1): ... this. Add target_options argument, and handle
10578 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10579 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10580 clean exit and signal exit code. Don't stop all threads in
10581 non-stop mode. In all-stop mode, only stop all threads when
10582 reporting a stop to GDB. Handle explicit thread stop requests.
10583 (async_file_flush, async_file_mark): New.
10585 (send_sigstop): Use lwpid_of.
10586 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10587 interface changes. In non-stop mode, don't switch to a random
10589 (linux_resume_one_lwp): Use lwpid_of.
10590 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10591 (linux_resume_one_thread): ... this. Handle resume_stop. In
10592 non-stop mode, don't look for pending flag in all threads.
10593 (resume_status_pending_p): Don't consider explicitly suspended
10595 (my_waitpid): Reimplement. Emulate __WALL.
10596 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10598 (sigchld_handler, linux_supports_non_stop, linux_async)
10599 (linux_start_non_stop): New.
10600 (linux_target_ops): Register linux_supports_non_stop, linux_async
10601 and linux_start_non_stop.
10602 (initialize_low): Install SIGCHLD handler.
10603 * thread-db.c (thread_db_create_event, find_one_thread)
10604 (thread_db_get_tls_address): Use lwpid_of.
10605 * win32-low.c (win32_detach): Adjust to use resume_kind.
10606 (win32_wait): Add `options' argument.
10607 * spu-low.c (spu_resume): Adjust to use resume_kind.
10608 (spu_wait): Add `options' argument.
10610 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10612 Decouple target code from remote protocol.
10614 * target.h (enum target_waitkind): New.
10615 (struct target_waitstatus): New.
10616 (struct target_ops) <wait>: Return an unsigned long. Take a
10617 target_waitstatus pointer instead of a char pointer.
10618 (mywait): Likewise.
10619 * target.c (mywait): Change prototype to return an unsigned long.
10620 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10621 * server.h (thread_from_wait, old_thread_from_wait): Delete
10623 (prepare_resume_reply): Change prototype to take a
10625 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10626 (last_status, last_ptid): New.
10627 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10628 pid instead of a signal.
10629 (attach_inferior): Remove "status" and "signal" parameters.
10631 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10633 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10634 (handle_v_requests, myresume): Remove "status" and "signal"
10635 parameters. Adjust.
10636 (handle_status): New.
10637 (main): Delete local `status'. Adjust.
10638 * remote-utils.c: Include target.h.
10639 (prepare_resume_reply): Change prototype to take a
10640 target_waitstatus. Adjust.
10642 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10644 * spu-low.c (spu_wait): Adjust.
10645 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10647 (win32_wait): Adjust.
10649 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10651 * target.h (struct thread_resume): Delete leave_stopped member.
10652 (struct target_ops): Add a `n' argument to the `resume' callback.
10653 * server.c (start_inferior): Adjust.
10654 (handle_v_cont, myresume): Adjust.
10655 * linux-low.c (check_removed_breakpoint): Adjust to resume
10656 interface change, and to removed leave_stopped field.
10657 (resume_ptr): Delete.
10658 (struct thread_resume_array): New.
10659 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10660 resume interface change.
10661 (linux_continue_one_thread, linux_queue_one_thread)
10662 (resume_status_pending_p): Check if the resume field is NULL
10663 instead of checking the leave_stopped member.
10664 (linux_resume): Adjust to the target resume interface change.
10665 * spu-low.c (spu_resume): Adjust to the target resume interface
10667 * win32-low.c (win32_detach, win32_resume): Ditto.
10669 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10671 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10673 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10675 (linux_continue_one_thread): Only preserve the stepping flag if
10676 there's a pending breakpoint.
10678 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10680 * server.c (main): After the inferior having exited, call
10681 remote_close before exiting gdbserver.
10683 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10685 Fix size of FPSCR in Power 7 processors.
10686 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10687 (PPC_FEATURE_HAS_DFP): New #define.
10688 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10691 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10693 * server.c (handle_query) Whitespace and formatting.
10695 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10697 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10698 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10699 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10700 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10701 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10702 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10703 Makefile.in, configure.ac: Fix whitespace throughout.
10704 * configure: Regenerate.
10706 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10708 * inferiors.c (find_inferior): Make it safe for the callback
10709 function to delete the currently iterated inferior.
10711 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10713 * Makefile.in (linuw_low_h): Move higher.
10714 (thread-db.o): Depend on $(linux_low_h).
10716 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10718 Rename "process" to "lwp" throughout.
10720 * linux-low.c (all_processes): Rename to...
10721 (all_lwps): ... this.
10722 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10723 (add_process): Rename to ...
10724 (add_lwp): ... this. Adjust.
10725 (linux_create_inferior): Adjust.
10726 (linux_attach_lwp): Adjust.
10727 (linux_attach): Adjust.
10728 (linux_kill_one_process): Rename to ...
10729 (linux_kill_one_lwp): ... this. Adjust.
10730 (linux_kill): Adjust.
10731 (linux_detach_one_process): Rename to ...
10732 (linux_detach_one_lwp): ... this. Adjust.
10733 (linux_detach): Adjust.
10734 (check_removed_breakpoint): Adjust.
10735 (status_pending_p): Adjust.
10736 (linux_wait_for_process): Rename to ...
10737 (linux_wait_for_lwp): ... this. Adjust.
10738 (linux_wait_for_event): Adjust.
10739 (send_sigstop): Adjust.
10740 (wait_for_sigstop): Adjust.
10741 (stop_all_processes): Rename to ...
10742 (stop_all_lwps): ... this.
10743 (linux_resume_one_process): Rename to ...
10744 (linux_resume_one_lwp): ... this. Adjust.
10745 (linux_set_resume_request, linux_continue_one_thread)
10746 (linux_queue_one_thread, resume_status_pending_p)
10747 (usr_store_inferior_registers, regsets_store_inferior_registers)
10748 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10750 * linux-low.h (get_process): Rename to ...
10751 (get_lwp): ... this. Adjust.
10752 (get_thread_process): Rename to ...
10753 (get_thread_lwp): ... this. Adjust.
10754 (get_process_thread): Rename to ...
10755 (get_lwp_thread): ... this. Adjust.
10756 (struct process_info): Rename to ...
10757 (struct lwp_info): ... this.
10758 (all_processes): Rename to ...
10759 (all_lwps): ... this.
10760 * proc-service.c (ps_lgetregs): Adjust.
10761 * thread-db.c (thread_db_create_event, find_one_thread)
10762 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10764 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10766 * server.c (handle_query): Handle "qAttached".
10768 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10770 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10771 GPLv3, update license URL.
10773 2009-03-01 Doug Evans <dje@google.com>
10775 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10776 (server_h): Add gdb_signals.h.
10777 (signals.o): Update.
10778 * server.h (target_signal_from_host,target_signal_to_host_p)
10779 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10781 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10783 * remote-utils.c (getpkt): Also generate remote-debug
10784 information if noack_mode is set.
10786 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10788 * server.c (handle_query): Report qXfer:siginfo:read and
10789 qXfer:siginfo:write as supported and handle them.
10790 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10791 * linux-low.c (linux_xfer_siginfo): New.
10792 (linux_target_ops): Set it.
10794 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10796 * server.c (gdbserver_usage): Mention --remote-debug.
10797 (main): Accept '--remote-debug' switch.
10799 2009-01-18 Doug Evans <dje@google.com>
10801 * regcache.c (new_register_cache): No need to check result of xcalloc.
10802 * server.c (handle_search_memory): Back out calls to xmalloc,
10803 result is checked and error is returned to user upon failure.
10804 (handle_query): Ditto. Add more checks for result of malloc.
10805 (handle_v_cont): Check result of malloc, report error back to
10807 (handle_v_run): Ditto. Call freeargv.
10808 * server.h (freeargv): Declare.
10809 * utils.c (freeargv): New fn.
10811 2009-01-15 Doug Evans <dje@google.com>
10813 * gdbreplay.c (perror_with_name): Make arg const char *.
10814 * server.h (target_signal_to_name): Make return type const char *.
10815 * thread-db.c (thread_db_err_str): Make return type const char *.
10816 * utils.c (perror_with_name): Make arg const char *.
10818 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10820 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10821 when handling a EXIT_PROCESS_DEBUG_EVENT.
10823 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10825 * gdbreplay.c (gdbreplay_version): Update copyright year.
10826 * server.c (gdbserver_version): Likewise.
10828 2009-01-05 Doug Evans <dje@google.com>
10830 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10831 (handle_extended_wait): Improve comment.
10833 2008-12-13 Doug Evans <dje@google.com>
10835 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10836 * server.h (ATTR_MALLOC): New macro.
10837 (xmalloc,xcalloc,xstrdup): Declare.
10838 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10839 * inferiors.c: Ditto.
10840 * linux-low.c: Ditto.
10841 * mem-break.c: Ditto.
10842 * regcache.c: Ditto.
10843 * remote-utils.c: Ditto.
10846 * win32-low.c: Ditto.
10848 2008-12-12 Doug Evans <dje@google.com>
10850 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10851 in debugging printf.
10853 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10855 2008-12-09 Doug Evans <dje@google.com>
10857 * linux-low.h (struct process_info): Delete member tid, unused.
10858 * thread-db.c (find_one_thread): Update.
10859 (maybe_attach_thread): Update.
10861 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10863 * target.h (struct target_ops): Add qxfer_osdata member.
10864 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10866 (linux_qxfer_osdata): New functions.
10867 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10869 * server.c (handle_query): Handle "qXfer:osdata:read:".
10870 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10871 (buffer_xml_printf): New functions.
10872 * server.h (struct buffer): New.
10873 (buffer_grow_str, buffer_grow_str0): New macros.
10874 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10875 (buffer_xml_printf): Declare.
10877 2008-11-24 Doug Evans <dje@google.com>
10879 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10881 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10883 * server.c (handle_v_run): Always use the supplied argument list.
10885 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10887 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10888 (xtensa_regmap_table): Add entry for scompare1.
10890 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10892 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10893 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10894 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10895 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10896 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10897 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10898 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10899 XML target descriptions.
10900 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10901 when inferior is running on an ISA 2.05 or later processor. Add
10902 special case to return offset for full 64-bit slot of FPSCR when
10905 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10907 * Makefile.in (SFILES, clean): Added sparc64 files.
10908 (reg-sparc64.o, reg-sparc64.c): New.
10909 * configure.srv (sparc*-*-linux*): New configuration.
10910 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10911 syscall arguments for SPARC.
10912 (regsets_store_inferior_registers): Likewise.
10913 * linux-sparc-low.c: New file.
10915 2008-10-21 Doug Evans <dje@google.com>
10917 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10918 (READLINE_DIR,READLINE_DEP): Delete.
10919 (INTERNAL_CFLAGS): Update.
10920 (LINTFLAGS): Update.
10922 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10924 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10925 whole argv from the last run, not just argv[0].
10927 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10929 * regcache.c (new_register_cache): Return NULL if the register
10930 cache size isn't known yet.
10931 (free_register_cache): Avoid dereferencing a NULL regcache.
10933 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10935 * configure.srv: Merge MIPS and MIPS64.
10937 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10939 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10941 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10943 * Makefile.in: Add required vsx dependencies.
10945 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10946 Declare init_registers_powerpc_vsx32l.
10947 Declare init_registers_powerpc_vsx64l.
10948 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10949 (ppc_arch_setup): Check for VSX in hwcap.
10950 (ppc_fill_vsxregset): New function.
10951 (ppc_store_vsxregset): New function.
10952 Add new VSX entry in regset_info target_regsets.
10954 * configure.srv: Add new VSX dependencies.
10956 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10958 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10959 (remote_open): Set or clear transport_is_reliable.
10960 (putpkt_binary): Don't expect acks in noack mode.
10961 (getpkt): Don't send ack/nac in noack mode.
10962 * server.c (handle_general_set): Handle QStartNoAckMode.
10963 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10965 (main): Reset noack_mode on every connection.
10966 * server.h (noack_mode): Declare.
10968 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10970 * Makefile.in (GDBREPLAY_OBS): New variable.
10971 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10973 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10974 Daniel Jacobowitz <dan@codesourcery.com>
10976 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10977 (usr_store_inferior_registers): Likewise.
10978 (regsets_store_inferior_registers): Likewise.
10980 2008-07-31 Rolf Jansen <rj@surtec.com>
10981 Pedro Alves <pedro@codesourcery.com>
10983 * configure.ac: Check for memmem declaration.
10984 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10985 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10986 (disable_packet_qfThreadInfo): Unconditionally compile.
10987 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10988 * configure, config.in: Regenerate.
10990 2008-07-28 Doug Kwan <dougkwan@google.com>
10992 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10993 (linux_write_memory): Remove declaration of errno.
10995 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10997 * linux-low.c (handle_extended_wait): Do not use "status"
10998 variable uninitialized.
11000 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11002 * server.c (handle_v_attach): Inhibit reporting dll changes.
11004 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11006 * remote-utils.c (prepare_resume_reply): If requested, don't
11007 output "thread:TID" in the T stop reply.
11009 * server.c (disable_packet_vCont, disable_packet_Tthread)
11010 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11011 (handle_query): If requested, disable support for qC, qfThreadInfo
11013 (handle_v_requests): If requested, disable support for vCont.
11014 (gdbserver_show_disableable): New.
11015 (main): Handle --disable-packet and --disable-packet=LIST.
11017 * server.h (disable_packet_vCont, disable_packet_Tthread)
11018 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11020 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11022 * server.c (gdbserver_usage): Mention --version.
11024 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11026 * Makefile.in (gdbreplay.o): New rule.
11028 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11030 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11031 message, not gdbserver.
11033 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11034 Nathan Sidwell <nathan@codesourcery.com>
11035 Joseph Myers <joseph@codesourcery.com>
11037 * acinclude.m4: Include ../../config/acx.m4.
11038 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11039 * configure, config.in: Regenerate.
11040 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11041 * server.c (gdbserver_version): Print PKGVERSION.
11042 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11043 (main): Adjust gdbserver_usage calls.
11044 * gdbreplay.c (version, host_name): Add declarations.
11045 (gdbreplay_version, gdbreplay_usage): New.
11046 (main): Accept --version and --help options.
11048 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11050 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11051 (arm_breakpoint_at): Handle Thumb.
11052 (the_low_target): Add comment.
11054 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11056 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11058 2008-05-09 Doug Evans <dje@google.com>
11060 * server.h (decode_search_memory_packet): Declare.
11061 * remote-utils.c (decode_search_memory_packet): New fn.
11062 * server.c (handle_search_memory_1): New fn.
11063 (handle_search_memory): New fn.
11064 (handle_query): Process qSearch:memory packets.
11066 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11068 * regcache.c (registers_length): Remove.
11069 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11070 full register packet.
11071 * regcache.h (registers_length): Remove prototype.
11072 * server.h (PBUFSIZ): Define to 16384.
11074 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11076 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11077 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11078 powerpc-64l.o, and powerpc-altivec64l.o.
11079 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11080 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11081 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11082 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11083 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11086 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11087 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11088 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11089 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11090 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11091 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11092 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11093 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11094 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11095 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11098 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11099 (init_registers_powerpc_32l): ... this new prototype.
11100 (init_registers_powerpc_32): Remove, replace by ...
11101 (init_registers_powerpc_altivec32l): ... this new prototype.
11102 (init_registers_powerpc_e500): Remove, replace by ...
11103 (init_registers_powerpc_e500l): ... this new prototype.
11104 (init_registers_ppc64): Remove, replace by ...
11105 (init_registers_powerpc_64l): ... this new prototype.
11106 (init_registers_powerpc_64): Remove, replace by ...
11107 (init_registers_powerpc_altivec64l): ... this new prototype.
11108 (ppc_num_regs): Set to 73.
11109 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11110 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11111 (ppc_cannot_store_register): Handle orig_r3 and trap.
11112 (ppc_arch_setup): Update init_registers_... calls.
11113 (ppc_fill_gregset): Handle orig_r3 and trap.
11115 * inferiors.c (clear_inferiors): Reset current_inferior.
11117 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11119 * acinclude.m4: Add override.m4.
11120 * configure: Regenerate.
11122 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11124 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11125 initial call to init_register_ppc64.
11127 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11129 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11130 single powerpc*-*-linux* case.
11131 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11133 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11135 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11136 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11138 * linux-ppc-low.c: Include <elf.h>.
11139 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11140 (ppc_hwcap): New global variable.
11141 (ppc_regmap): Remove __SPE__ #ifdef sections.
11142 (ppc_regmap_e500): New global variable.
11143 (ppc_cannot_store_register): Update __SPE__ special case.
11144 (ppc_get_hwcap): New function.
11145 (ppc_arch_setup): Use it to determine whether inferior supports
11146 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11147 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11148 Do not access registers if target does not support AltiVec.
11149 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11150 Do not access registers if target does not support SPE.
11151 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11153 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11155 * linux-low.c (disabled_regsets, num_regsets): New.
11156 (use_regsets_p): Delete.
11157 (linux_wait_for_process): Clear disabled_regsets.
11158 (regsets_fetch_inferior_registers): Check and set it.
11159 (regsets_store_inferior_registers): Likewise.
11160 (linux_fetch_registers, linux_store_registers): Do not use
11162 (initialize_low): Allocate disabled_regsets.
11164 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11166 * Makefile.in (LIBOBJS): New.
11167 (OBS): Use LIBOBJS.
11168 (memmem.o): New rule.
11169 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11170 * configure: Regenerated.
11172 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11174 * server.c (handle_query): Never return "unsupported" for
11175 qXfer:features:read queries.
11177 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11179 * server.c (get_features_xml): Fix inverted condition.
11180 (handle_query): Always support qXfer:feature:read.
11182 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11184 * server.c (wrapper_argv): New.
11185 (start_inferior): Handle wrapper_argv. If set, expect an extra
11187 (gdbserver_usage): Document --wrapper.
11188 (main): Parse --wrapper.
11190 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11192 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11193 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11194 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11195 (ppc_set_pc): Likewise.
11196 (ppc_arch_setup): New function.
11197 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11198 of collect_register.
11199 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11201 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11203 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11204 instead of linux-ppc64-low.o.
11205 * linux-ppc64-low.c: Remove file.
11206 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11207 (linux-ppc64-low.o): Remove rule.
11209 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11210 (init_registers_powerpc_64): Likewise.
11211 (ppc_regmap): Conditionally define depending on __powerpc64__.
11212 (ppc_cannot_store_register): Do not special-case "fpscr" when
11213 compiled on __powerpc64__.
11214 (ppc_collect_ptrace_register): New function.
11215 (ppc_supply_ptrace_register): New function.
11216 (ppc_breakpoint): Change type to "unsigned int".
11217 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11218 (the_low_target): Conditionally provide initializers for the
11219 arch_setup member depending on __powerpc64__. Install
11220 collect_ptrace_register and supply_ptrace_register members.
11222 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11224 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11225 * server.c (gdbserver_xmltarget): Define.
11226 (get_features_xml): Use it to replace "target.xml" and arch_string.
11228 * configure.srv: Remove srv_xmltarget. Add XML files that were
11229 mentioned there to srv_xmlfiles instead. Remove conditional tests
11230 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11231 srv_xmlfiles and srv_regobj to include all possible choices.
11232 * configure.ac (srv_xmltarget): Remove.
11233 (srv_xmlfiles): Do not add "target.xml".
11234 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11235 checks for supplementary target information.
11236 * configure: Regenerate.
11237 * Makefile.in (XML_TARGET): Remove.
11238 (target.xml): Remove rule.
11239 (clean): Do not clean up target.xml.
11240 (.PRECIOUS): Do not mention target.xml.
11242 * target.h (struct target_ops): Remove arch_string member.
11243 * linux-low.c (linux_arch_string): Remove.
11244 (linux_target_ops): Remove arch_string initializer.
11245 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11246 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11247 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11248 * spu-low.c (spu_arch_string): Remove.
11249 (spu_target_ops): Remove arch_string initializer.
11250 * win32-low.c (win32_arch_string): Remove.
11251 (win32_target_ops): Remove arch_string initializer.
11252 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11253 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11254 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11256 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11258 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11259 by collect_ptrace_register and supply_ptrace_register hooks.
11260 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11261 instead of checking for the_low_target.left_pad_xfer.
11262 (usr_store_inferior_registers): Use collect_ptrace_register callback
11263 instead of checking for the_low_target.left_pad_xfer.
11265 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11266 (s390_supply_ptrace_register): Likewise.
11267 (s390_fill_gregset): Call s390_collect_ptrace_register.
11268 (the_low_target): Update.
11270 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11271 (ppc_supply_ptrace_register): Likewise.
11272 (the_low_target): Update.
11274 * linux-i386-low.c (the_low_target): Update.
11275 * linux-x86-64-low.c (the_low_target): Update.
11277 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11279 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11280 reg-s390.o and reg-s390x.o.
11282 * linux-low.c (new_inferior): New global variable.
11283 (linux_create_inferior, linux_attach): Set it.
11284 (linux_wait_for_process): Call the_low_target.arch_setup after the
11285 target has stopped for the first time.
11286 (initialize_low): Do not call the_low_target.arch_setup.
11288 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11289 (s390_set_pc): Likewise.
11290 (s390_arch_setup): New function.
11291 (the_low_target): Use s390_arch_setup as arch_setup routine.
11293 * regcache.c (realloc_register_cache): New function.
11294 (set_register_cache): Call it for each existing regcache.
11296 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11298 * server.h (init_registers): Remove prototype.
11300 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11301 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11302 instead of init_registers ().
11303 * linux-arm-low.c (init_registers_arm): Add prototype.
11304 (init_registers_arm_with_iwmmxt): Likewise.
11305 (the_low_target): Add initializer for arch_setup field.
11306 * linux-cris-low.c (init_registers_cris): Add prototype.
11307 (the_low_target): Add initializer for arch_setup field.
11308 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11309 (the_low_target): Add initializer for arch_setup field.
11310 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11311 (the_low_target): Add initializer for arch_setup field.
11312 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11313 (the_low_target): Add initializer for arch_setup field.
11314 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11315 (the_low_target): Add initializer for arch_setup field.
11316 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11317 (the_low_target): Add initializer for arch_setup field.
11318 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11319 (init_registers_mips64_linux): Likewise.
11320 (the_low_target): Add initializer for arch_setup field.
11321 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11322 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11323 (the_low_target): Add initializer for arch_setup field.
11324 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11325 (init_registers_powerpc_64): Likewise.
11326 (the_low_target): Add initializer for arch_setup field.
11327 * linux-s390-low.c (init_registers_s390): Add prototype.
11328 (init_registers_s390x): Likewise.
11329 (the_low_target): Add initializer for arch_setup field.
11330 * linux-sh-low.c (init_registers_sh): Add prototype.
11331 (the_low_target): Add initializer for arch_setup field.
11332 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11333 (the_low_target): Add initializer for arch_setup field.
11334 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11335 (the_low_target): Add initializer for arch_setup field.
11337 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11338 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11339 instead of init_registers ().
11340 * win32-arm-low.c (init_registers_arm): Add prototype.
11341 (the_low_target): Add initializer for arch_setup field.
11342 * win32-i386-low.c (init_registers_i386): Add prototype.
11343 (the_low_target): Add initializer for arch_setup field.
11345 * spu-low.c (init_registers_spu): Add prototype.
11346 (initialize_low): Call initialie_registers_spu () instead of
11347 initialize_registers ().
11349 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11351 * server.c (handle_v_requests): When handling the vRun and vAttach
11352 packets, if already debugging a process, don't kill it. Return an
11355 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11357 * server.c (handle_query): Correct length check.
11359 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11361 * win32-low.c (do_initial_child_stuff): Add process handle
11362 parameter. Set current_process_handle and current_process_id from the
11363 parameters. Clear globals.
11364 (win32_create_inferior): Don't set current_process_handle and
11365 current_process_id here. Instead pass them on the call to
11366 do_initial_child_stuff.
11367 (win32_attach): Likewise.
11368 (win32_clear_inferiors): New.
11369 (win32_kill): Don't close the current process handle or the
11370 current thread handle here. Instead call win32_clear_inferiors.
11371 (win32_detach): Don't open a new handle to the process. Call
11372 win32_clear_inferiors.
11373 (win32_join): Don't rely on current_process_handle; open a new
11374 handle using the process id.
11375 (win32_wait): Call win32_clear_inferiors when the inferior process
11378 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11380 * server.c (monitor_show_help): Add "exit".
11382 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11384 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11385 (clean): Add reg-xtensa.c.
11386 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11387 * configure.srv (xtensa*-*-linux*) New target.
11388 * linux-xtensa-low.c: New.
11389 * xtensa-xtregs.c: New.
11391 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11393 * hostio.c: Don't include errno.h.
11394 (errno_to_fileio_errno): Move to hostio-errno.
11395 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11396 error number outputting to the target->hostio_last_error callback.
11397 (hostio_packet_error): Use FILEIO_EINVAL directly.
11398 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11399 calls to hostio_error.
11400 * hostio-errno.c: New.
11401 * server.h (hostio_last_error_from_errno): Declare.
11402 * target.h (target_ops): Add hostio_last_error member.
11403 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11404 as hostio_last_error handler.
11405 * spu-low.c (spu_target_ops): Likewise.
11406 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11407 (wince_hostio_last_error): New functions.
11408 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11409 as hostio_last_error handler.
11410 (win32_target_ops) [!_WIN32_WCE]: Register
11411 hostio_last_error_from_errno as hostio_last_error handler.
11412 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11413 (hostio-errno.o): New rule.
11414 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11415 * configure.srv (srv_hostio_err_objs): New variable. Default to
11417 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11418 * configure: Regenerate.
11420 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11422 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11423 (linux_kill, linux_detach): Clean up the process list.
11424 * remote-utils.c (remote_open): Improve port number parsing.
11425 (putpkt_binary, input_interrupt): Only send interrupts if the target
11427 * server.c (extended_protocol): Make static.
11428 (attached): Define earlier.
11429 (exit_requested, response_needed, program_argv): New variables.
11430 (target_running): New.
11431 (start_inferior): Clear attached here.
11432 (attach_inferior): Set attached here.
11433 (require_running): Define.
11434 (handle_query): Use require_running and target_running. Implement
11436 (handle_v_attach, handle_v_run): New.
11437 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11438 (gdbserver_usage): Update.
11439 (main): Redo argument parsing. Handle --debug and --multi. Handle
11440 --attach along with other options or after the port. Save
11441 program_argv. Support no initial program. Resynchronize
11442 communication with GDB after an error. Handle "monitor exit".
11443 Use require_running and target_running. Always allow the extended
11444 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11445 restart in extended mode.
11446 * README: Refer to the GDB manual. Update --attach usage.
11448 2007-12-20 Andreas Schwab <schwab@suse.de>
11450 * linux-low.c (STACK_SIZE): Define.
11451 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11452 (linux_test_for_tracefork): Likewise.
11454 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11456 * linux-low.c (linux_wait_for_event): Update messages. Do not
11457 reinsert auto-delete breakpoints.
11458 * mem-break.c (struct breakpoint): Change return type of handler to
11460 (set_breakpoint_at): Update handler type.
11461 (reinsert_breakpoint_handler): Return 1 instead of calling
11463 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11465 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11466 * mem-break.h (set_breakpoint_at): Update handler type.
11467 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11468 * win32-low.c (auto_delete_breakpoint): New.
11469 (get_child_debug_event): Use it.
11471 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11473 * configure.ac: Check for pread and pwrite.
11474 * hostio.c (handle_pread): Fall back to lseek and read.
11475 (handle_pwrite): Fall back to lseek and write.
11476 * config.in, configure: Regenerated.
11478 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11480 * server.c (myresume): Add own_buf argument.
11481 (main): Update calls.
11483 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11485 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11486 * remote-utils.c (remote_open): Do not call disable_async_io.
11487 (block_async_io): Delete.
11488 (unblock_async_io): Make static.
11489 (initialize_async_io): New.
11490 * server.c (handle_v_cont): Handle async I/O here.
11491 (myresume): Likewise. Move other common resume tasks here...
11492 (main): ... from here. Call initialize_async_io. Disable async
11493 I/O before the main loop.
11494 * server.h (initialize_async_io): Declare.
11495 (block_async_io, unblock_async_io): Delete prototypes.
11496 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11498 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11500 * remote-utils.c (readchar): Allow binary data in received messages.
11502 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11504 * win32-low.c (attaching): New global.
11505 (win32_create_inferior): Clear the `attaching' global.
11506 (win32_attach): Set the `attaching' global.
11507 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11508 attaching. Only set a breakpoint at the entry point if not
11511 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11513 * server.c (main): Don't report dll events on the initial
11514 connection on attaches.
11516 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11518 * server.c (main): Relax numerical bases supported for the pid of
11519 the --attach command line argument.
11521 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11523 * win32-low.c (win32_attach): Call OpenProcess before
11524 DebugActiveProcess, not after. Add last error output to error
11527 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11529 * win32-low.c (win32_get_thread_context)
11530 (win32_set_thread_context): New functions.
11531 (thread_rec): Use win32_get_thread_context.
11532 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11533 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11536 2007-12-03 Leo Zayas
11537 Pedro Alves <pedro_alves@portugalmail.pt>
11539 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11541 (child_add_thread): Minor cleanup.
11542 (child_continue): Resume artificially suspended threads before
11543 calling ContinueDebugEvent.
11544 (suspend_one_thread): New.
11545 (fake_breakpoint_event): New.
11546 (get_child_debug_event): Change return type to int. Check here if
11547 gdb sent an interrupt request. If a soft interrupt was requested,
11548 fake a breakpoint event. Return 0 if there is no event to handle,
11550 (win32_wait): Don't check here if gdb sent an interrupt request.
11551 Ensure there is a valid event to handle.
11552 (win32_request_interrupt): Add soft interruption method as last
11555 2007-12-03 Leo Zayas
11556 Pedro Alves <pedro_alves@portugalmail.pt>
11558 * win32-low.h (win32_thread_info): Add descriptions to the
11559 structure members. Replace `suspend_count' counter by a
11561 * win32-low.c (thread_rec): Update condition of when to get the
11562 context from the inferior. Rely on ContextFlags being set if it
11563 has already been retrieved. Only suspend the inferior thread if
11564 we haven't already. Warn if that fails.
11565 (continue_one_thread): s/suspend_count/suspended/. Only call
11566 ResumeThread once. Warn if that fails.
11568 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11570 * win32-low.c (win32_wait): Don't read from the inferior when it
11571 has already exited.
11573 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11575 * Makefile.in (win32_low_h): New variable.
11576 (win32-low.o): Add dependency on $(win32_low_h).
11577 (win32-arm-low.o, win32-i386-low.o): New rules.
11579 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11581 * hostio.c: Correct copyright year.
11583 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11585 * Makefile.in (OBS): Add hostio.o.
11586 (hostio.o): New rule.
11587 * server.h (handle_vFile): Declare.
11588 * hostio.c: New file.
11589 * server.c (handle_v_requests): Take packet_len and new_packet_len
11590 for binary packets. Call handle_vFile.
11591 (main): Update call to handle_v_requests.
11593 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11595 * linux-low.c: Include <sched.h>.
11597 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11599 * linux-low.c (linux_tracefork_grandchild): New.
11600 (linux_tracefork_child): Use clone.
11601 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11603 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11605 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11607 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11609 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11611 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11613 * inferiors.c (change_inferior_id): Delete.
11614 (add_pid_to_list, pull_pid_from_list): New.
11615 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11616 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11617 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11618 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11619 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11620 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11621 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11622 (using_threads): Always set to 1.
11623 (handle_extended_wait): New.
11624 (add_process): Do not set TID.
11625 (linux_create_inferior): Set must_set_ptrace_flags.
11626 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11627 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11628 (linux_thread_alive): Rename TID argument to LWPID.
11629 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11630 (linux_wait_for_event): Do not use TID or check using_threads. Update
11631 call to dead_thread_notify. Call handle_extended_wait.
11632 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11633 (send_sigstop): Delete sigstop_sent.
11634 (wait_for_sigstop): Avoid TID.
11635 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11636 (linux_test_for_tracefork): New.
11637 (linux_lookup_signals): Use thread_db_active and
11638 linux_supports_tracefork_flag.
11639 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11640 * linux-low.h (get_process_thread): Avoid TID.
11641 (struct process_ifo): Move thread_known and tid to the end. Remove
11643 (linux_attach_lwp, thread_db_init): Update prototypes.
11644 * server.h (change_inferior_id): Delete prototype.
11645 (add_pid_to_list, pull_pid_from_list): New prototypes.
11646 * thread-db.c (thread_db_use_events): New.
11647 (find_first_thread): Rename to...
11648 (find_one_thread): ...this. Update callers and messages. Do not
11649 call fatal. Check thread_db_use_events. Do not call
11650 change_inferior_id or new_thread_notify.
11651 (maybe_attach_thread): Update. Do not call new_thread_notify.
11652 (thread_db_init): Set thread_db_use_events. Check use_events.
11653 * utils.c (fatal, warning): Correct message prefix.
11655 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11657 * Makefile.in (clean): Remove new files.
11658 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11659 (powerpc-64.o, powerpc-64.c): New rules.
11660 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11661 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11663 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11665 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11666 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11667 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11668 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11669 (target_regsets): Add AltiVec and SPE register sets.
11670 * configure.ac: Check for AltiVec and SPE.
11671 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11672 (ppc_fill_vrregset, ppc_store_vrregset): New.
11673 (target_regsets): Add AltiVec register set.
11674 * configure: Regenerated.
11676 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11678 * linux-low.c (O_LARGEFILE): Define.
11679 (linux_read_memory): Use /proc/PID/mem.
11680 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11681 * configure, config.in: Regenerated.
11683 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11685 * linux-low.c (linux_wait_for_event): Do not pass signals while
11688 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11690 * win32-low.c (create_process): New.
11691 (win32_create_inferior): Use create_process instead of
11692 CreateProcess. If create_process failed retry appending an ".exe"
11693 suffix. Store the GetLastError result immediatelly after
11694 create_process calls and use it on the call to error.
11696 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11698 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11700 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11702 * configure.ac: Switch license to GPLv3.
11704 2007-08-01 Michael Snyder <msnyder@access-company.com>
11706 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11708 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11710 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11712 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11713 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11714 CloseToolhelp32Snapshot.
11715 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11716 CloseToolhelp32Snapshot.
11718 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11720 * server.c (main): Check for inferior exit before main loop.
11722 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11724 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11725 instead of on tmp_desc.
11727 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11728 Daniel Jacobowitz <dan@codesourcery.com>
11730 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11731 (add_thread): Minor cleanups.
11732 (clear_inferiors): Move lower in the file. Clear the DLL
11734 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11735 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11736 (xml_escape_text): New.
11737 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11739 (handle_v_cont): Report errors.
11740 (gdbserver_version): Update.
11741 (main): Correct size of own_buf. Do not report initial DLL events.
11742 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11743 (unloaded_dll, xml_escape_text): New.
11744 * win32-low.c (enum target_waitkind): Update comments.
11745 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11746 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11747 (win32_EnumProcessModules, win32_GetModuleInformation)
11748 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11749 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11750 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11751 (win32_Module32First, win32_Module32Next, load_toolhelp)
11752 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11753 (get_child_debug_event): Handle DLL events.
11754 (win32_wait): Likewise.
11756 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11758 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11759 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11761 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11763 * win32-low.c (handle_output_debug_string): Ignore event if not
11766 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11768 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11770 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11772 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11774 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11776 * inferiors.c (change_inferior_id): Add comment.
11777 * linux-low.c (check_removed_breakpoint): Add an early
11778 prototype. Improve debug output.
11779 (linux_attach): Doc update.
11780 (linux_detach_one_process, linux_detach): Clean up before releasing
11782 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11783 * linux-low.h (struct process_info): Doc improvement.
11784 * mem-break.c (delete_all_breakpoints): New.
11785 * mem-break.h (delete_all_breakpoints): New prototype.
11786 * thread-db.c (find_first_thread): New.
11787 (thread_db_create_event): Call it instead of
11788 thread_db_find_new_threads. Clean up unused variables.
11789 (maybe_attach_thread): Remove first thread handling.
11790 (thread_db_find_new_threads): Use find_first_thread.
11791 (thread_db_get_tls_address): Likewise.
11793 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11795 * thread-db.c (thread_db_find_new_threads): Add prototype.
11796 (thread_db_create_event): Check for the main thread before adding
11798 (maybe_attach_thread): Only enable event reporting if TID == 0.
11799 (thread_db_get_tls_address): Check for new threads.
11801 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11803 * linux-low.c (linux_create_inferior): Try execv before execvp.
11804 * spu-low.c (spu_create_inferior): Likewise.
11806 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11808 * linux-low.c (linux_create_inferior): Change execv to execvp.
11809 * spu-low.c (spu_create_inferior): Likewies.
11811 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11813 * Makefile.in (clean): Clean new files instead of deleted ones.
11814 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11815 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11817 * configure.srv: Specify XML files and new regformats for MIPS and
11819 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11820 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11821 an entry for the restart register.
11822 (mips_cannot_fetch_register, mips_cannot_store_register)
11823 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11824 register names to match the XML descriptions.
11825 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11826 restart register instead of $0.
11828 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11829 Markus Deuling <deuling@de.ibm.com>
11831 * remote-utils.c (decode_xfer_write): New function.
11832 * server.h (decode_xfer_write): Add prototype.
11833 * server.c (handle_query): Add PACKET_LEN argument. Support
11834 qXfer:spu:read and qXfer:spu:write packets.
11835 (main): Pass packet_len to handle_query.
11836 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11837 * target.h (target_ops): Add qxfer_spu.
11839 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11841 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11842 accessing non-seekable spufs files.
11844 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11846 * server.c (handle_query): Add reply for qC packet.
11848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11849 Leo Zayas <lerele@champenstudios@com>
11851 * server.h (check_remote_input_interrupt_request): New function.
11852 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11853 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11854 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11855 (check_remote_input_interrupt_request): New function.
11856 * server.h (check_remote_input_interrupt_request): Declare.
11857 * win32-low.c (winapi_DebugBreakProcess,
11858 winapi_GenerateConsoleCtrlEvent): New typedefs.
11859 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11861 (win32_wait): Check for remote interrupt request
11862 with check_remote_input_interrupt_request.
11863 (win32_request_interrupt): New function.
11864 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11866 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11868 * win32-low.c (debug_registers_changed,
11869 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11870 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11871 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11872 (thread_rec): Get context using the low target.
11873 (child_add_thread): Call thread_added on the low target,
11874 which does the same thing.
11876 (do_initial_child_stuff): Remove debug registers references.
11877 Set context using the low target. Resume threads after
11878 setting the contexts.
11879 (child_continue): Remove dead variable. Remove debug
11880 registers references.
11881 (child_fetch_inferior_registers): Go through the low target.
11882 (do_child_store_inferior_registers): Remove.
11883 (child_store_inferior_registers): Go through the low target.
11884 (win32_resume): Remove debug registers references.
11885 Set context using the low target.
11886 (handle_exception): Change return type to void. Don't record
11887 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11888 first chance exception.
11889 (get_child_debug_event): Change return type to void. Remove
11890 goto loop. Always return after waiting for debug event.
11891 (win32_wait): Convert to switch statement. Handle spurious
11894 * win32-i386-low.c (debug_registers_changed,
11895 debug_registers_used): New.
11896 (initial_stuff): Rename to ...
11897 (i386_initial_stuff): ... this. Clear debug registers
11899 (store_debug_registers): Delete.
11900 (i386_get_thread_context): New.
11901 (load_debug_registers): Delete.
11902 (i386_set_thread_context): New.
11903 (i386_thread_added): New.
11904 (single_step): Rename to ...
11905 (i386_single_step): ... this.
11906 (do_fetch_inferior_registers): Rename to ...
11907 (i386_fetch_inferior_register): ... this.
11908 (i386_store_inferior_register): New.
11909 (the_low_target): Adapt to new interface.
11911 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11912 (arm_get_thread_context): New.
11913 (arm_set_thread_context): New.
11915 (do_fetch_inferior_registers): Rename to ...
11916 (arm_fetch_inferior_register): ... this.
11917 (arm_store_inferior_register): New.
11918 (arm_wince_breakpoint): Reimplement as unsigned long.
11919 (arm_wince_breakpoint_len): Define.
11920 (the_low_target): Adapt to new interface.
11922 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11923 load_debug_registers. Add get_thread_context, set_thread_context,
11924 thread_added and store_inferior_register. Rename
11925 fetch_inferior_registers to fetch_inferior_register.
11926 (regptr): Remove declaration.
11928 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11930 * linux-low.c (linux_detach): Change return type to int. Return 0.
11931 * spu-low.c (spu_detach): Likewise.
11933 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11935 * target.h (target_ops): Change return type of detach to int.
11937 (join_inferior): New.
11938 * server.c (main): Don't skip detach support on mingw32.
11939 If the inferior doesn't support detaching return error.
11940 Call join_inferior instead of using waitpid.
11941 * linux-low.c (linux_join): New.
11942 (linux_target_op): Add linux_join.
11943 * spu-low.c (spu_join): New.
11944 (spu_target_ops): Add spu_join.
11945 * win32-low.c (win32_detach): Adapt to new interface.
11946 Reopen current_process_handle before detaching. Issue a child
11947 resume before detaching.
11949 (win32_target_op): Add win32_join.
11951 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11953 * win32-low.c (win32-attach): Fix return value.
11954 * target.h (target_ops): Describe ATTACH return values.
11956 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11958 * win32-low.c (GETPROCADDRESS): Define.
11959 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11960 (winapi_DebugSetProcessKillOnExit): Likewise.
11961 (win32_create_inferior): Force usage of ansi CreateProcessA.
11962 (win32_attach): Use GETPROCADDRESS.
11963 (win32_detach): Likewise.
11965 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11967 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11969 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11971 * win32-low.c: Commit leftover changes from 2007-03-29.
11973 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11975 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11976 fields short instead of int. Add explicit padding.
11977 (i387_cache_to_fsave): Remove unnecessary casts.
11978 (i387_fsave_to_cache): Doc fix.
11979 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11981 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11983 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11984 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11986 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11988 * configure.srv (arm*-*-mingw32ce*): Move near the other
11991 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11993 * configure.ac: Add errno checking.
11994 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11995 sys/file.h and malloc.h.
11996 (AC_CHECK_DECLS): Add perror.
11997 (srv_mingwce): Handle.
11998 * configure.srv (i[34567]86-*-cygwin*): Add
11999 win32-i386-low.o to srv_tgtobj.
12000 (i[34567]86-*-mingw*): Likewise.
12001 (arm*-*-mingw32ce*): Add case.
12002 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12003 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12004 [__MINGW32CE__] (strerror): New function.
12005 [__MINGW32CE__] (errno): Define to GetLastError.
12006 [__MINGW32CE__] (COUNTOF): New macro.
12007 (remote_open): Remove extra close call.
12008 * mem-break.c (delete_breakpoint_at): New function.
12009 * mem-break.h (delete_breakpoint_at): Declare.
12010 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12011 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12012 [USE_WIN32API] (read, write): Add char* casts.
12013 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12014 * server.h: Include wincecompat.h on Windows CE.
12015 [HAVE_ERRNO_H]: Check.
12016 (perror): Declare if not declared.
12017 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12018 (perror_with_name): Remove errno declaration.
12019 * wincecompat.h: New.
12020 * wincecompat.c: New.
12021 * win32-low.h: New.
12022 * win32-arm-low.c: New.
12023 * win32-i386-low.c: New.
12024 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12025 (OUTMSG2): Make it safe.
12027 (COUNTOF): New macro.
12028 (NUM_REGS): Get it from the low target.
12029 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12030 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12031 (thread_rec): Let low target handle debug registers.
12032 (child_add_thread): Likewise.
12033 (child_init_thread_list): Likewise.
12034 (continue_one_thread): Likewise.
12036 (do_child_fetch_inferior_registers): Move to ...
12037 * win32-i386-low.c: ... here, and rename to ...
12038 (do_fetch_inferior_registers): ... this.
12039 * win32-low.c (child_fetch_inferior_registers):
12040 Go through the low target.
12041 (do_child_store_inferior_registers): Use regptr.
12042 (strwinerror): New function.
12043 (win32_create_inferior): Handle Windows CE.
12044 Use strwinerror instead of strerror on Windows error
12045 codes. Add program to the error output.
12046 Don't close the main thread handle on Windows CE.
12047 (win32_attach): Use coredll.dll on Windows CE.
12048 (win32_kill): Close current process and current
12050 (win32_detach): Use coredll.dll on Windows CE.
12051 (win32_resume): Let low target handle debug registers, and
12053 (handle_exception): Add/Remove initial breakpoint. Avoid
12054 non-existant WSTOPSIG on Windows CE.
12055 (win32_read_inferior_memory): Cast to remove warning.
12056 (win32_arch_string): Go through the low target.
12057 (initialize_low): Call set_breakpoint_data with the low
12058 target's breakpoint.
12059 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12060 FOP_REGNUM, mappings): Move to ...
12061 * win32-i386-low.c: ... here.
12062 * win32-low.c (win32_thread_info): Move to ...
12063 * win32-low.h: ... here.
12064 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12065 win32-arm-low.c and wincecompat.c.
12066 (all:): Add $EXEEXT.
12067 (install-only:): Likewise.
12068 (gdbserver:): Likewise.
12069 (gdbreplay:): Likewise.
12070 * config.in: Regenerate.
12071 * configure: Regenerate.
12073 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12075 * win32-low.c: Rename typedef thread_info to
12076 win32_thread_info throughout.
12078 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12080 * win32-i386-low.c: Rename to ...
12081 * win32-low.c: ... this.
12082 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12083 * Makefile.in: Likewise.
12085 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12087 * remote-utils.c (monitor_output): Constify msg parameter.
12088 * server.h (monitor_output): Likewise.
12089 * win32-i386-low.c (handle_output_debug_string): New.
12090 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12091 handle_output_debug_string.
12092 (get_child_debug_event): Likewise.
12094 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12096 * server.c (main): Correct strtoul check.
12098 2007-03-27 Jon Ringle <jon@ringle.org>
12100 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12102 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12104 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12106 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12108 * terminal.h: Check HAVE_SGTTY_H.
12110 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12112 * remote-utils.c (remote_open): Print out the assigned port number.
12114 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12116 * remote-utils.c (monitor_output): New function.
12117 * server.c (debug_threads): Define here.
12118 (monitor_show_help): New function.
12119 (handle_query): Handle qRcmd.
12120 (main): Do not handle 'd' packet.
12121 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12122 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12125 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12127 * Makefile.in (EXEEXT): New.
12128 (clean): Use $(EXEEXT).
12130 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12132 * target.h (target_ops): Rename send_signal to request_interrupt,
12133 and remove enum target_signal parameter.
12134 * linux-low.c (linux_request_interrupt): Rename from
12135 linux_send_signal, and always send SIGINT.
12136 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12137 and always send SIGINT.
12138 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12140 (input_interrupt): Likewise.
12142 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12144 * server.c (get_features_xml): Check if target implemented
12146 * win32-i386-low.c (win32_arch_string): New.
12147 (win32_target_ops): Add win32_arch_string as arch_string member.
12149 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12151 * spu-low.c (spu_arch_string): New.
12152 (spu_target_ops): Add spu_arch_string.
12154 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12156 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12157 * configure.ac: Do not check for terminal.h.
12158 * configure, config.in: Regenerated.
12160 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12162 * Makefile.in (OBS): Add $(XML_BUILTIN).
12163 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12165 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12166 (arm-with-iwmmxt.c): New.
12167 * config.in, configure: Regenerate.
12168 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12169 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12170 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12171 (arm*-*-linux*): Add iWMMXt and regset support.
12172 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12173 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12174 (arm_store_wmmxregset, target_regsets): New.
12175 * server.c (get_features_xml): Take annex argument. Check builtin
12177 (handle_query): Handle multiple annexes.
12179 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12181 * remote-utils.c [USE_WIN32API] (read, write): Define.
12182 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12185 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12187 * linux-i386-low.c (the_low_target): Set arch_string.
12188 * linux-x86-64-low.c (the_low_target): Likewise.
12189 * linux-low.c (linux_arch_string): New.
12190 (linux_target_ops): Add it.
12191 * linux-low.h (struct linux_target_ops): Add arch_string.
12192 * server.c (write_qxfer_response): Use const void * for DATA.
12193 (get_features_xml): New.
12194 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12195 * target.h (struct target_ops): Add arch_string method.
12197 2007-01-03 Denis Pilat <denis.pilat@st.com>
12198 Daniel Jacobowitz <dan@codesourcery.com>
12200 * linux-low.c (linux_kill): Handle being called with no threads.
12201 * win32-i386-low.c (win32_kill): Likewise.
12202 (get_child_debug_event): Clear current_process_handle.
12204 2006-12-30 Denis PILAT <denis.pilat@st.com>
12205 Daniel Jacobowitz <dan@codesourcery.com>
12207 * remote-utils.c (remote_open): Check the type of specified
12208 serial port devices before opening them.
12209 * server.c (main): Kill the inferior if an error occurs during
12210 the first remote_open.
12212 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12214 * README: Update supported targets.
12216 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12218 * Makefile.in (clean): Remove reg-mips64.c.
12219 (reg-mips64.c, reg-mips64.o): New rules.
12220 * configure.srv: Handle mips64. Include regset support for mips.
12221 * linux-mips-low.c (union mips_register): New.
12222 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12223 (mips_breakpoint, mips_breakpoint_at): Use int.
12224 (mips_collect_register, mips_supply_register)
12225 (mips_collect_register_32bit, mips_supply_register_32bit)
12226 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12227 (mips_store_fpregset, target_regsets): New.
12228 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12230 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12232 * configure.srv: Add target "spu*-*-*".
12233 * Makefile.in (clean): Remove reg-spu.c.
12234 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12235 * spu-low.c: New file.
12237 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12239 * configure.ac: Correct td_thr_tls_get_addr test.
12240 * configure: Regenerated.
12242 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12244 * linux-low.c (linux_wait_for_event): Reformat. Use the
12245 pass_signals array.
12246 * remote-utils.c (decode_address_to_semicolon): New.
12247 * server.c (pass_signals, handle_general_set): New.
12248 (handle_query): Mention QPassSignals for qSupported.
12249 (main): Call handle_general_set.
12250 * server.h (pass_signals, decode_address_to_semicolon): New.
12252 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12254 * server.c (handle_query): Correct error handling for read_auxv.
12256 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12258 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12259 and srv_linux_thread_db to yes.
12260 * linux-s390-low.c (s390_fill_gregset): New function.
12261 (target_regsets): Define data structure.
12263 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12265 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12266 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12267 * config.in, configure: Regenerated.
12268 * inferiors.c (gdb_id_to_thread): New function.
12269 (gdb_id_to_thread_id): Use it.
12270 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12271 * linux-low.h (struct process_info): Add th member.
12272 (thread_db_get_tls_address): New prototype.
12273 * remote-utils.c (decode_address): Make non-static.
12274 * server.c (handle_query): Handle qGetTLSAddr.
12275 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12276 * target.h (struct target_ops): Add get_tls_address.
12277 * thread-db.c (maybe_attach_thread): Save the thread handle.
12278 (thread_db_get_tls_address): New.
12280 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12282 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12283 (linux_resume_one_process): Take a siginfo_t *. Update all
12284 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12285 (struct pending_signals): Add a siginfo_t.
12286 (linux_wait_for_process): Always set last_status.
12287 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12288 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12289 * linux-low.h (struct process_info): Add last_status.
12291 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12293 * remote-utils.c (try_rle): New function.
12294 (putpkt_binary): Use it.
12296 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12298 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12299 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12300 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12301 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12302 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12305 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12307 * server.c (terminal_fd): New variable.
12308 (old_foreground_pgrp): Likewise.
12309 (restore_old_foreground_pgrp): New function.
12310 (start_inferior): Record the terminal file descriptor in terminal_fd
12311 and its original foreground group in old_foreground_pgrp. Register
12312 restore_old_foreground_pgrp with atexit().
12314 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12316 * server.c (handle_query): Correct qPart to qXfer.
12318 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12320 * configure.ac: Check for more headers which are missing on
12321 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12322 * configure.srv: Add Cygwin and mingw32.
12323 * remote-utils.c: Don't include headers unconditionally which
12324 are missing on mingw32. Include <winsock.h> for mingw32.
12325 (remote_open): Adjust for mingw32 support. Flush
12326 standard error after writing to it.
12327 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12328 (unblock_async_io, enable_async_io, disable_async_io)
12329 (readchar, getpkt): Update for Winsock support.
12330 (prepare_resume_reply): Expect a protocol signal number.
12331 * server.c: Disable <sys/wait.h> on mingw32.
12332 (start_inferior): Adjust for mingw32 support. Flush
12333 standard error after writing to it.
12334 (attach_inferior): Likewise. Use protocol signal
12336 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12338 * win32-i386-low.c: New file.
12339 * Makefile.in (XM_CLIBS): Set.
12340 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12341 (win32-i386-low.o): New dependency rule.
12342 * linux-low.c (linux_wait): Use target signal numbers.
12343 * target.h (struct target_ops): Doc fix.
12344 * server.h (target_signal_to_name): New prototype.
12345 * gdbreplay.c: Don't include headers unconditionally which
12346 are missing on mingw32. Include <winsock.h> for mingw32.
12347 (remote_close, remote_open): Adjust for Winsock support.
12348 * configure, config.in: Regenerated.
12350 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12352 * server.c (decode_xfer_read, write_qxfer_response): New.
12353 (handle_query): Take a packet length argument. Handle
12354 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12355 the qSupported response.
12356 (main): Update call to handle_query.
12358 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12360 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12361 (putpkt_binary): Renamed from putpkt and adjusted for binary
12363 (putpkt): New wrapper for putpkt_binary.
12364 (readchar): Don't mask off the high bit.
12365 (decode_X_packet): New function.
12366 * server.c (main): Call putpkt_binary if a handler sets the packet
12367 length. Save the length of the incoming packet. Handle 'X'.
12368 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12370 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12372 * server.c (handle_query): Handle qSupported.
12374 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12376 * remote-utils.c (all_symbols_looked_up): New variable.
12377 (look_up_one_symbol): Check it.
12378 * server.h (look_up_one_symbol): New declaration.
12379 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12381 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12383 * Makefile.in (linux-arm-low.o): Update dependencies.
12384 * linux-arm-low.c: Include "gdb_proc_service.h".
12385 (PTRACE_GET_THREAD_AREA): Define.
12386 (ps_get_thread_area): New function.
12388 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12390 * configure.srv (m68k*-*-uclinux*): New target.
12391 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12392 (linux_resume_one_process): Remove extraneous cast.
12393 (linux_read_offsets): New.
12394 (linux_target_op): Add linux_read_offsets on mmuless systems.
12395 * server.c (handle_query): Add qOffsets logic.
12396 * target.h (struct target_ops): Add read_offsets.
12398 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12400 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12401 (PTRACE_GET_THREAD_AREA): Define.
12402 (ps_get_thread_area): New function.
12403 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12404 (linux-x86-64-low.o): Update.
12406 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12408 * configure.ac: Remove checks for prfpregset_t.
12409 * gdb_proc_service.h: New file.
12410 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12411 new "gdb_proc_service.h".
12412 * proc-service.c: Likewise.
12413 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12414 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12415 * Makefile.in (gdb_proc_service_h): Updated.
12416 * configure, config.in: Regenerated.
12418 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12420 * remote-utils.c (prepare_resume_reply): Move declaration
12421 of gdb_id_from_wait to the top of the block.
12423 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12425 * linux-low.c (regsets_store_inferior_registers): Read the regset
12426 from the target before filling it.
12428 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12430 * server.c (attach_inferior): Return SIGTRAP for a successful
12433 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12435 * Makefile.in (OBS): Add version.o.
12436 (STAGESTUFF): Delete.
12437 (version.o): Add dependencies.
12438 (version.c): Replace rule.
12439 (clean): Remove version.c.
12440 * server.c (gdbserver_version): New.
12441 (gdbserver_usage): Use printf.
12442 (main): Handle --version and --help.
12443 * server.h (version, host_name): Add declarations.
12445 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12457 * linux-x86-64-low.c:
12459 * linux-s390-low.c:
12460 * linux-ppc64-low.c:
12462 * linux-mips-low.c:
12463 * linux-m68k-low.c:
12464 * linux-m32r-low.c:
12467 * linux-ia64-low.c:
12468 * linux-i386-low.c:
12469 * linux-crisv32-low.c:
12481 * gdbserver.1: Add (C) after Copyright. Update the FSF
12484 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12486 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12487 (arm_breakpoint_at): Recognize both breakpoints.
12488 (the_low_target): Use the correct breakpoint instruction.
12490 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12492 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12493 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12494 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12495 (the_low_target): Update.
12497 2005-10-25 Andreas Schwab <schwab@suse.de>
12499 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12501 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12502 (ia64_num_regs): Reduce to 462.
12504 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12506 * acinclude.m4: Correct quoting.
12507 * aclocal.m4: Regenerated.
12509 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12510 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12511 (thread_db_init): Call thread_db_err_str.
12512 * configure.ac: Check for TD_VERSION.
12513 * config.in, configure: Regenerated.
12515 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12517 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12519 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12521 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12522 is not available. Define HAVE_PTRACE_GETREGS if it is.
12523 * config.in, configure: Regenerated.
12524 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12525 * linux-i386-low.c, linux-m68k-low.c: Update to use
12526 HAVE_PTRACE_GETREGS.
12527 * linux-low.c (regsets_fetch_inferior_registers)
12528 (regsets_store_inferior_registers): Only return 0 if we processed
12530 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12531 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12533 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12535 * inferiors.c (struct thread_info): Add gdb_id.
12536 (add_thread): Add gdb_id argument.
12537 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12538 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12539 calls to add_thread.
12540 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12541 * server.c (handle_query): Use thread_to_gdb_id.
12542 (handle_v_cont, main): Use gdb_id_to_thread_id.
12543 * server.h (add_thread): Update prototype.
12544 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12547 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12549 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12550 left-padded registers.
12551 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12552 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12554 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12556 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12557 * configure: Regenerate.
12558 * config.in: Regenerate.
12559 * server.h (NEED_DECLARATION_STRERROR):
12560 Replace with !HAVE_DECL_STRERROR.
12562 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12564 * linux-low.c (linux_wait, linux_send_signal): Don't test
12565 an unsigned long variable for > 0 if it could be MAX_ULONG.
12566 * server.c (myresume): Likewise.
12567 * target.c (set_desired_inferior): Likewise.
12569 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12571 * configure.ac: Simplify and improve check for socklen_t.
12572 * configure, config.in: Regenerate.
12574 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12576 * acconfig.h: Remove.
12577 * configure.ac: Add a test for socklen_t. Use three-argument
12578 AC_DEFINE throughout.
12579 * config.in: Regenerated using autoheader 2.59.
12580 * configure: Regenerated.
12582 * gdbreplay.c (socklen_t): Provide a default.
12583 (remote_open): Use socklen_t.
12584 * remote-utils.c (socklen_t): Provide a default.
12585 (remote_open): Use socklen_t.
12586 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12589 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12591 * linux-low.c (linux_read_memory, linux_write_memory)
12592 (linux_read_auxv): Likewise.
12593 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12594 (check_mem_write): Likewise.
12595 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12597 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12598 (registers_from_string, register_data): Likewise.
12599 * server.c (handle_query, main): Likewise.
12600 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12601 (decode_M_packet): Likewise.
12602 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12603 * target.h (struct target_ops): Update read_memory, write_memory,
12605 (read_inferior_memory, write_inferior_memory): Update.
12606 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12607 to unsigned char *.
12608 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12609 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12610 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12611 linux-s390-low.c, linux-sh-low.c: Update for changes in
12612 read_inferior_memory and the_low_target->breakpoint.
12614 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12616 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12617 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12618 * configure.srv: Add powerpc64-*-linux*.
12619 * linux-ppc64-low.c: New file.
12621 2005-05-23 Orjan Friberg <orjanf@axis.com>
12623 * linux-cris-low.c: New file with support for CRIS.
12624 * linux-crisv32-low.c: Ditto for CRISv32.
12625 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12626 (clean): Add reg-cris.c and reg-crisv32.c.
12627 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12628 reg-crisv32.o, and reg-crisv32.c to make rules.
12629 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12630 recognized targets.
12632 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12634 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12635 of sizeof (PTRACE_XFER_TYPE).
12636 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12638 2005-05-12 Orjan Friberg <orjanf@axis.com>
12640 * target.h (struct target_ops): Add insert_watchpoint,
12641 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12642 pointers for hardware watchpoint support.
12643 * linux-low.h (struct linux_target_ops): Ditto.
12644 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12645 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12646 to linux_target_ops.
12647 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12649 * server.c (main): Recognize 'Z' and 'z' packets.
12651 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12653 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12654 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12655 (the_low_target): Add new members.
12657 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12659 * proc-service.c (ps_lgetregs): Search all_processes instead of
12662 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12664 * server.c (start_inferior): Change return type to int.
12665 (attach_inferior): Change sigptr to int *.
12666 (handle_v_cont, handle_v_requests): Change signal to int *.
12667 (main): Change signal to int.
12669 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12671 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12672 * configure.srv: Add m32r*-*-linux*.
12673 * linux-m32r-low.c: New file.
12675 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12677 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12679 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12681 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12682 Take unsigned long arguments for PIDs.
12683 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12684 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12685 (wait_for_sigstop, linux_resume_one_process)
12686 (regsets_fetch_inferior_registers, linux_send_signal)
12687 (linux_read_auxv): Likewise. Update the types of variables holding
12688 PIDs. Update format string specifiers.
12689 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12690 * remote-utils.c (prepare_resume_reply): Likewise.
12691 * server.c (cont_thread, general_thread, step_thread)
12692 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12694 (handle_query): Update format specifiers.
12695 (handle_v_cont, main): Use strtoul for thread IDs.
12696 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12697 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12698 (general_thread, step_thread, thread_from_wait)
12699 (old_thread_from_wait): Update.
12700 * target.h (struct thread_resume): Use unsigned long for THREAD.
12701 (struct target_ops): Use unsigned long for arguments to attach and
12704 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12706 * acinclude.m4: Include bfd/bfd.m4 directly.
12707 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12708 <agriffis@toolchain.org>.
12709 * aclocal.m4, configure: Regenerated.
12711 2005-01-07 Andrew Cagney <cagney@gnu.org>
12713 * configure.ac: Rename configure.in, require autoconf 2.59.
12714 * configure: Re-generate.
12716 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12718 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12719 LIBS when finished.
12720 * aclocal.m4: Regenerated.
12721 * configure: Regenerated.
12723 2004-11-21 Andreas Schwab <schwab@suse.de>
12725 * linux-m68k-low.c (m68k_num_gregs): Define.
12726 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12727 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12728 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12729 (m68k_breakpoint_at): New. Add to the_low_target.
12731 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12732 srv_linux_thread_db to yes.
12734 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12736 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12737 (ARCH_SET_FS): Likewise.
12738 (ARCH_GET_FS): Likewise.
12739 (ARCH_GET_GS): Likewise.
12741 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12743 * linux-i386-low.c (ps_get_thread_area): New.
12744 * linux-x86-64-low.c (ps_get_thread_area): New.
12745 * linux-low.c: Include <sys/syscall.h>.
12746 (linux_kill_one_process): Don't kill the first thread here.
12747 (linux_kill): Kill the first thread here.
12748 (kill_lwp): New function.
12749 (send_sigstop, linux_send_signal): Use it.
12750 * proc-service.c: Clean up #ifdefs.
12751 (fpregset_info): Delete.
12752 (ps_lgetregs): Update and enable implementation.
12753 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12755 * remote-utils.c (struct sym_cache, symbol_cache): New.
12756 (input_interrupt): Print a clearer message.
12757 (async_io_enabled): New variable.
12758 (enable_async_io, disable_async_io): Use it. Update comments.
12759 (look_up_one_symbol): Use the symbol cache.
12760 * thread-db.c (thread_db_look_up_symbols): New function.
12761 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12763 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12765 * configure.in: Test for -rdynamic.
12766 * configure: Regenerated.
12767 * Makefile (INTERNAL_LDFLAGS): New.
12768 (gdbserver, gdbreplay): Use it.
12770 2004-09-02 Andrew Cagney <cagney@gnu.org>
12772 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12774 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12776 * linux-low.c (linux_wait): Clear all_processes list also.
12778 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12780 * linux-low.c: Include <errno.h>. Remove extern declaration of
12783 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12785 * gdbreplay.c, server.h, utils.c: Update copyright years.
12787 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12789 * server.c (main): Print child status or termination signal from
12790 variable 'signal', not 'sig'.
12792 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12794 * linux-low.c (linux_read_memory): Change return type to
12795 int. Check for and return error from ptrace().
12796 * target.c (read_inferior_memory): Change return type to int. Pass
12797 back return status from the_target->read_memory().
12798 * target.h (struct target_ops): Adapt *read_memory() prototype.
12800 (read_inferior_memory): Adapt prototype.
12801 * server.c (main): Return an error packet if
12802 read_inferior_memory() returns an error.
12804 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12806 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12807 Unify with other clean targets.
12809 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12811 * server.c (handle_v_cont): Call set_desired_inferior.
12813 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12815 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12817 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12819 * linux-low.c (linux_wait): Unblock async I/O.
12820 (linux_resume): Block and enable async I/O.
12821 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12822 * server.h (block_async_io, unblock_async_io): Add prototypes.
12824 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12826 * remote-utils.c (remote_open): Print a status notice after
12827 opening a TCP port.
12828 * server.c (attach_inferior): Print a status notice after
12831 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12833 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12835 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12837 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12839 * server.c, target.h: Update copyright years.
12841 2004-02-25 Roland McGrath <roland@redhat.com>
12843 * target.h (struct target_ops): New member `read_auxv'.
12844 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12845 * linux-low.c (linux_read_auxv): New function.
12846 (linux_target_ops): Initialize `read_auxv' member to that.
12848 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12850 Committed by Jim Blandy <jimb@redhat.com>.
12852 * linux-s390-low.c (s390_num_regs): Update.
12853 (s390_regmap): Remove control registers. Use __s390x__ predefine
12854 instead of GPR_SIZE to distiguish s390 and s390x targets.
12856 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12858 * linux-low.c: Update copyright year.
12859 (check_removed_breakpoint): Clear pending_is_breakpoint.
12860 (linux_set_resume_request, linux_queue_one_thread)
12861 (resume_status_pending_p): New functions.
12862 (linux_continue_one_thread): Use process->resume.
12863 (linux_resume): Only resume threads if there are no pending events.
12864 * linux-low.h (struct process_info): Add resume request
12867 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12869 * regcache.c (new_register_cache): Clear the allocated register
12870 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12872 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12874 * linux-low.c (linux_resume): Take a struct thread_resume *
12876 (linux_wait): Update call.
12877 (resume_ptr): New static variable.
12878 (linux_continue_one_thread): Renamed from
12879 linux_continue_one_process. Use resume_ptr.
12880 (linux_resume): Use linux_continue_one_thread.
12881 * server.c (handle_v_cont, handle_v_requests): New functions.
12882 (myresume): New function.
12883 (main): Handle 'v' case.
12884 * target.h (struct thread_resume): New type.
12885 (struct target_ops): Change argument of "resume" to struct
12887 (myresume): Delete macro.
12889 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12891 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12892 (uninstall): Support DESTDIR.
12894 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12896 * configure.srv: Add xscale*linux copy of arm*linux entry.
12898 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12900 * linux-arm-low.c (arm_reinsert_addr): New function.
12901 (the_low_target): Add arm_reinsert_addr.
12903 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12905 * mem-break.c: Remove whitespace at end of file.
12907 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12909 * configure.in: Check whether we need to prototype strerror.
12910 * server.h: Optionally prototype strerror.
12911 * gdbreplay.c (perror_with_name): Use strerror.
12912 * linux-low.c (linux_attach_lwp): Use strerror.
12913 * utils.c (perror_with_name): Use strerror.
12914 * config.in, configure: Regenerated.
12916 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12918 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12919 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12921 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12923 * Makefile.in (SFILES): Update.
12924 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12925 low-sun3.c: Remove files.
12927 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12929 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12930 (linux_detach_one_process, linux_detach): New functions.
12931 (linux_target_ops): Add linux_detach.
12932 * server.c (main): Handle 'D' packet.
12933 * target.h (struct target_ops): Add "detach" member.
12934 (detach_inferior): Define.
12936 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12938 From Kelley Cook <kelleycook@wideopenwest.com>:
12939 * configure.srv: Accept i[34567]86 variants.
12941 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12943 * linux-low.c (linux_wait_for_event): Correct comment typos.
12944 (linux_resume_one_process): Call check_removed_breakpoint.
12945 (linux_send_signal): New function.
12946 (linux_target_ops): Add linux_send_signal.
12947 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12949 * target.h (struct target_ops): Add send_signal.
12951 2003-05-29 Jim Blandy <jimb@redhat.com>
12953 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12954 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12955 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12956 away part of the register's value.
12958 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12960 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12961 (linux_wait_for_event, linux_init_signals): Likewise.
12963 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12965 * configure.in: Check for stdlib.h.
12966 * configure: Regenerated.
12967 * config.in: Regenerated.
12969 2003-01-04 Andreas Schwab <schwab@suse.de>
12971 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12973 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12975 * Makefile.in: Remove obsolete code.
12977 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12979 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12980 defined(PT_FPR0_HI).
12982 2002-11-17 Stuart Hughes <seh@zee2.com>
12984 * linux-arm-low.c (arm_num_regs): Increase.
12985 (arm_regmap): Include status register.
12987 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12989 * linux-low.c (register_addr): Remove incorrect -1 check.
12991 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12993 * linux-low.c (linux_create_inferior): Call setpgid. Return
12995 (unstopped_p, linux_signal_pid): Remove.
12996 (linux_target_ops): Remove linux_signal_pid.
12997 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12998 global instead of target method.
12999 * target.h (struct target_ops): Remove signal_pid. Update comment
13000 for create_inferior.
13001 * server.c (signal_pid): New variable.
13002 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13003 gdbserver. Set the child to be the foreground process group.
13004 (attach_inferior): Set signal_pid.
13006 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13008 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13010 2002-08-20 Jim Blandy <jimb@redhat.com>
13012 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13015 2002-08-01 Andrew Cagney <cagney@redhat.com>
13017 * Makefile.in: Make chill references obsolete.
13019 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13021 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13022 * configure: Regenerate.
13023 * config.in: Regenerate.
13025 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13027 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13028 (perror_with_name, remote_close, remote_open, expect, play): Static.
13030 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13032 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13033 byte offsets instead of an array of indexes.
13034 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13036 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13038 * regcache.c: Add comment.
13040 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13042 * thread-db.c: New file.
13043 * proc-service.c: New file.
13044 * acinclude.m4: New file.
13045 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13046 proc-service.o, and thread-db.o.
13047 (linux-low.o): Add USE_THREAD_DB.
13048 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13049 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13050 * aclocal.m4: Regenerated.
13051 * config.in: Regenerated.
13052 * configure: Regenerated.
13053 * configure.in: Check for proc_service.h, sys/procfs.h,
13054 thread_db.h, and linux/elf.h headrs.
13055 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13056 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13057 Check for -lthread_db and thread support.
13058 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13059 PowerPC, and SuperH.
13060 * i387-fp.c: Constify arguments.
13061 * i387-fp.h: Likewise.
13062 * inferiors.c: (struct thread_info): Renamed from
13063 `struct inferior_info'. Remove PID member. Use generic inferior
13064 list header. All uses updated.
13065 (inferiors, signal_pid): Removed.
13066 (all_threads): New variable.
13067 (get_thread): Define.
13068 (add_inferior_to_list): New function.
13069 (for_each_inferior): New function.
13070 (change_inferior_id): New function.
13071 (add_inferior): Removed.
13072 (remove_inferior): New function.
13073 (add_thread): New function.
13074 (free_one_thread): New function.
13075 (remove_thread): New function.
13076 (clear_inferiors): Use for_each_inferior and free_one_thread.
13077 (find_inferior): New function.
13078 (find_inferior_id): New function.
13079 (inferior_target_data): Update argument type.
13080 (set_inferior_target_data): Likewise.
13081 (inferior_regcache_data): Likewise.
13082 (set_inferior_regcache_data): Likewise.
13083 * linux-low.c (linux_bp_reinsert): Remove.
13084 (all_processes, stopping_threads, using_thrads)
13085 (struct pending_signals, debug_threads, pid_of): New.
13086 (inferior_pid): Replace with macro.
13087 (struct inferior_linux_data): Remove.
13088 (get_stop_pc, add_process): New functions.
13089 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13090 Use add_process and add_thread.
13091 (linux_attach_lwp): New function, based on old linux_attach. Use
13092 add_process and add_thread. Set stop_expected for new threads.
13093 (linux_attach): New function.
13094 (linux_kill_one_process): New function.
13095 (linux_kill): Kill all LWPs.
13096 (linux_thread_alive): Use find_inferior_id.
13097 (check_removed_breakpoints, status_pending_p): New functions.
13098 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13099 Update. Use WNOHANG. Wait for cloned processes also. Update process
13100 struct for the found process.
13101 (linux_wait_for_event): New function.
13102 (linux_wait): Use it. Support LWPs.
13103 (send_sigstop, wait_for_sigstop, stop_all_processes)
13104 (linux_resume_one_process, linux_continue_one_process): New functions.
13105 (linux_resume): Support LWPs.
13106 (REGISTER_RAW_SIZE): Remove.
13107 (fetch_register): Use register_size instead. Call supply_register.
13108 (usr_store_inferior_registers): Likewise. Call collect_register.
13109 Fix recursive case.
13110 (regsets_fetch_inferior_registers): Improve error message.
13111 (regsets_store_inferior_registers): Add debugging.
13112 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13113 (unstopped_p, linux_signal_pid): New functions.
13114 (linux_target_ops): Add linux_signal_pid.
13115 (linux_init_signals): New function.
13116 (initialize_low): Call it. Initialize using_threads.
13117 * regcache.c (inferior_regcache_data): Add valid
13119 (get_regcache): Fetch registers lazily. Add fetch argument
13120 and update all callers.
13121 (regcache_invalidate_one, regcache_invalidate): New
13123 (new_register_cache): Renamed from create_register_cache.
13124 Return the new regcache.
13125 (free_register_cache): Change argument to a void *.
13126 (registers_to_string, registers_from_string): Call get_regcache
13127 with fetch flag set.
13128 (register_data): Make static. Pass fetch flag to get_regcache.
13129 (supply_register): Call get_regcache with fetch flag clear.
13130 (collect_register): Call get_regcache with fetch flag set.
13131 (collect_register_as_string): New function.
13132 * regcache.h: Update.
13133 * remote-utils.c (putpkt): Flush after debug output and use
13135 Handle input interrupts while waiting for an ACK.
13136 (input_interrupt): Use signal_pid method.
13137 (getpkt): Flush after debug output and use stderr.
13138 (outreg): Use collect_register_as_string.
13139 (new_thread_notify, dead_thread_notify): New functions.
13140 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13141 and general_thread.
13142 (look_up_one_symbol): Flush after debug output.
13143 * server.c (step_thread, server_waiting): New variables.
13144 (start_inferior): Don't use signal_pid. Update call to mywait.
13145 (attach_inferior): Update call to mywait.
13146 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13147 (main): Don't fetch/store registers explicitly. Use
13148 set_desired_inferior. Support proposed ``Hs'' packet. Update
13150 * server.h: Update.
13151 (struct inferior_list, struct_inferior_list_entry): New.
13152 * target.c (set_desired_inferior): New.
13153 (write_inferior_memory): Constify.
13154 (mywait): New function.
13155 * target.h: Update.
13156 (struct target_ops): New signal_pid method.
13157 (mywait): Removed macro, added prototype.
13159 * linux-low.h (regset_func): Removed.
13160 (regset_fill_func, regset_store_func): New.
13161 (enum regset_type): New.
13162 (struct regset_info): Add type field. Use new operation types.
13163 (struct linux_target_ops): stop_pc renamed to get_pc.
13164 Add decr_pc_after_break and breakpoint_at.
13165 (get_process, get_thread_proess, get_process_thread)
13166 (strut process_info, all_processes, linux_attach_lwp)
13167 (thread_db_init): New.
13169 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13170 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13171 (the_low_target): Add new members.
13172 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13173 (i386_store_fpxregset): Constify.
13174 (target_regsets): Add new kind identifier.
13175 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13176 (i386_set_pc): Add debugging.
13177 (i386_breakpoint_at): New function.
13178 (the_low_target): Add new members.
13179 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13180 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13181 (mips_breakpoint_at): New.
13182 (the_low_target): Add new members.
13183 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13184 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13185 (the_low_target): Add new members.
13186 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13187 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13188 (the_low_target): Add new members.
13189 * linux-x86-64-low.c (target_regsets): Add new kind
13192 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13194 From Martin Pool <mbp@samba.org>:
13195 * server.c (gdbserver_usage): New function.
13198 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13200 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13201 stop_at -> stop_pc.
13203 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13205 * Makefile.in: Remove obsolete code.
13207 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13209 * linux-low.c (regsets_fetch_inferior_registers),
13210 (regsets_store_inferior_registers): Removed cast to int from
13212 * regcache.h: Added declaration of struct inferior_info.
13214 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13216 * inferiors.c (struct inferior_info): Add regcache_data.
13217 (add_inferior): Call create_register_cache.
13218 (clear_inferiors): Call free_register_cache.
13219 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13220 * regcache.c (struct inferior_regcache_data): New.
13221 (registers): Remove.
13222 (get_regcache): New function.
13223 (create_register_cache, free_register_cache): New functions.
13224 (set_register_cache): Don't initialize the register cache here.
13225 (registers_to_string, registers_from_string, register_data): Call
13227 * regcache.h: Add prototypes.
13228 * server.h: Likewise.
13230 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13232 * mem-break.c: New file.
13233 * mem-break.h: New file.
13234 * Makefile.in: Add mem-break.o rule; update server.h
13236 * inferiors.c (struct inferior_info): Add target_data
13238 (clear_inferiors): Free target_data member if set.
13239 (inferior_target_data, set_inferior_target_data): New functions.
13240 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13241 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13242 * linux-low.c (linux_bp_reinsert): New variable.
13243 (struct inferior_linux_data): New.
13244 (linux_create_inferior): Use set_inferior_target_data.
13245 (linux_attach): Likewise. Call add_inferior.
13246 (linux_wait_for_one_inferior): New function.
13247 (linux_wait): Call it.
13248 (linux_write_memory): Add const.
13249 (initialize_low): Call set_breakpoint_data.
13250 * linux-low.h (struct linux_target_ops): Add breakpoint
13252 * server.c (attach_inferior): Remove extra add_inferior
13254 * server.h: Include mem-break.h. Update inferior.c
13256 * target.c (read_inferior_memory)
13257 (write_inferior_memory): New functions.
13258 * target.h (read_inferior_memory)
13259 (write_inferior_memory): Change macros to prototypes.
13260 (struct target_ops): Update comments. Add const to write_memory
13263 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13265 * linux-low.c (usr_store_inferior_registers): Support
13266 registers which are allowed to fail to store.
13267 * linux-low.h (linux_target_ops): Likewise.
13268 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13269 (ppc_cannot_store_register): FPSCR may not be storable.
13271 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13273 * server.h: Include <string.h> if HAVE_STRING_H.
13274 * ChangeLog: Correct paths in last ChangeLog entry.
13276 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13278 * linux-low.h: Remove obsolete prototypes.
13279 (struct linux_target_ops): New.
13280 (extern the_low_target): New.
13281 * linux-low.c (num_regs, regmap): Remove declarations.
13282 (register_addr): Use the_low_target explicitly.
13283 (fetch_register): Likewise.
13284 (usr_fetch_inferior_registers): Likewise.
13285 (usr_store_inferior_registers): Likewise.
13286 * linux-arm-low.c (num_regs): Remove.
13287 (arm_num_regs): Define.
13288 (arm_regmap): Renamed from regmap, made static.
13289 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13291 (arm_cannot_store_register): Renamed from cannot_store_register,
13293 (the_low_target): New.
13294 * linux-i386-low.c (num_regs): Remove.
13295 (i386_num_regs): Define.
13296 (i386_regmap): Renamed from regmap, made static.
13297 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13299 (i386_cannot_store_register): Renamed from cannot_store_register,
13301 (the_low_target): New.
13302 * linux-ia64-low.c (num_regs): Remove.
13303 (ia64_num_regs): Define.
13304 (ia64_regmap): Renamed from regmap, made static.
13305 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13307 (ia64_cannot_store_register): Renamed from cannot_store_register,
13309 (the_low_target): New.
13310 * linux-m68k-low.c (num_regs): Remove.
13311 (m68k_num_regs): Define.
13312 (m68k_regmap): Renamed from regmap, made static.
13313 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13315 (m68k_cannot_store_register): Renamed from cannot_store_register,
13317 (the_low_target): New.
13318 * linux-mips-low.c (num_regs): Remove.
13319 (mips_num_regs): Define.
13320 (mips_regmap): Renamed from regmap, made static.
13321 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13323 (mips_cannot_store_register): Renamed from cannot_store_register,
13325 (the_low_target): New.
13326 * linux-ppc-low.c (num_regs): Remove.
13327 (ppc_num_regs): Define.
13328 (ppc_regmap): Renamed from regmap, made static.
13329 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13331 (ppc_cannot_store_register): Renamed from cannot_store_register,
13333 (the_low_target): New.
13334 * linux-s390-low.c (num_regs): Remove.
13335 (s390_num_regs): Define.
13336 (s390_regmap): Renamed from regmap, made static.
13337 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13339 (s390_cannot_store_register): Renamed from cannot_store_register,
13341 (the_low_target): New.
13342 * linux-sh-low.c (num_regs): Remove.
13343 (sh_num_regs): Define.
13344 (sh_regmap): Renamed from regmap, made static.
13345 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13347 (sh_cannot_store_register): Renamed from cannot_store_register,
13349 (the_low_target): New.
13350 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13351 (the_low_target): New.
13353 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13355 * Makefile.in: Add stamp-h target.
13356 * configure.in: Create stamp-h.
13357 * configure: Regenerated.
13359 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13361 * inferiors.c: New file.
13362 * target.c: New file.
13363 * target.h: New file.
13364 * Makefile.in: Add target.o and inferiors.o. Update
13366 * linux-low.c (inferior_pid): New static variable,
13367 moved from server.c.
13368 (linux_create_inferior): Renamed from create_inferior.
13369 Call add_inferior. Return 0 on success instead of a PID.
13370 (linux_attach): Renamed from myattach.
13371 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13372 (linux_thread_alive): Renamed from mythread_alive.
13373 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13375 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13376 (regsets_store_inferior_registers): Correct error message.
13377 Add missing ``return 0''.
13378 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13379 (linux_store_registers): Renamed from store_inferior_registers.
13380 (linux_read_memory): Renamed from read_inferior_memory.
13381 (linux_write_memory): Renamed from write_inferior_memory.
13382 (linux_target_ops): New structure.
13383 (initialize_low): Call set_target_ops ().
13384 * remote-utils.c (unhexify): New function.
13385 (hexify): New function.
13386 (input_interrupt): Send signals to ``signal_pid''.
13387 * server.c (inferior_pid): Remove.
13388 (start_inferior): Update create_inferior call.
13389 (attach_inferior): Call add_inferior.
13390 (handle_query): New function.
13391 (main): Call handle_query for `q' packets.
13392 * server.h: Include "target.h". Remove obsolete prototypes.
13393 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13395 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13397 * Makefile.in: Add WARN_CFLAGS. Update configury
13399 * configure.in: Check for <string.h>
13400 * configure: Regenerate.
13401 * config.in: Regenerate.
13402 * gdbreplay.c: Include needed system headers.
13403 (remote_open): Remove strchr prototype.
13404 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13405 * regcache.c (supply_register): Change buf argument to const void *.
13406 (supply_register_by_name): Likewise.
13407 (collect_register): Change buf argument to void *.
13408 (collect_register_by_name): Likewise.
13409 * regcache.h: Add missing prototypes.
13410 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13411 * server.c (handle_query): New function.
13412 (attached): New static variable, moved out of main.
13413 (main): Quiet longjmp clobber warnings.
13414 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13415 * utils.c (error): Remove NORETURN.