aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-03-04 20:41:15 +0000
committerPedro Alves <palves@redhat.com>2015-03-04 20:41:15 +0000
commit15c66dd626380fbd7db6538b0c21d1fe86dda6c9 (patch)
treeb40b69ffce06061ecf0b40524748a0305cab154c /gdb/gdbserver/linux-low.h
parent1cf4d9513af10d419c71099ae644f07b6724642b (diff)
downloadgdb-15c66dd626380fbd7db6538b0c21d1fe86dda6c9.zip
gdb-15c66dd626380fbd7db6538b0c21d1fe86dda6c9.tar.gz
gdb-15c66dd626380fbd7db6538b0c21d1fe86dda6c9.tar.bz2
enum lwp_stop_reason -> enum target_stop_reason
We're going to need the same enum as enum lwp_stop_reason in more targets, so this promotes it to common code. gdb/gdbserver/ChangeLog: 2015-03-04 Pedro Alves <palves@redhat.com> enum lwp_stop_reason -> enum target_stop_reason * linux-low.c (check_stopped_by_breakpoint): Adjust. (thread_still_has_status_pending_p, check_stopped_by_watchpoint) (linux_wait_1, stuck_in_jump_pad_callback) (move_out_of_jump_pad_callback, linux_resume_one_lwp) (linux_stopped_by_watchpoint): * linux-low.h (enum lwp_stop_reason): Delete. (struct lwp_info) <stop_reason>: Now an enum target_stop_reason. * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust. gdb/ChangeLog: 2015-03-04 Pedro Alves <palves@redhat.com> enum lwp_stop_reason -> enum target_stop_reason * linux-nat.c (linux_resume_one_lwp, check_stopped_by_watchpoint) (linux_nat_stopped_by_watchpoint, status_callback) (linux_nat_wait_1): Adjust. * linux-nat.h (enum lwp_stop_reason): Delete. (struct lwp_info) <stop_reason>: Now an enum target_stop_reason. * x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust. * target/waitstatus.h (enum target_stop_reason): New.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index bea4a37..bbff3aa 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -24,6 +24,7 @@
/* Included for ptrace type definitions. */
#include "nat/linux-ptrace.h"
+#include "target/waitstatus.h" /* For enum target_stop_reason. */
#define PTRACE_XFER_TYPE long
@@ -230,24 +231,6 @@ extern struct linux_target_ops the_low_target;
#define get_thread_lwp(thr) ((struct lwp_info *) (inferior_target_data (thr)))
#define get_lwp_thread(lwp) ((lwp)->thread)
-/* Reasons an LWP last stopped. */
-
-enum lwp_stop_reason
-{
- /* Either not stopped, or stopped for a reason that doesn't require
- special tracking. */
- LWP_STOPPED_BY_NO_REASON,
-
- /* Stopped by a software breakpoint. */
- LWP_STOPPED_BY_SW_BREAKPOINT,
-
- /* Stopped by a hardware breakpoint. */
- LWP_STOPPED_BY_HW_BREAKPOINT,
-
- /* Stopped by a watchpoint. */
- LWP_STOPPED_BY_WATCHPOINT
-};
-
/* This struct is recorded in the target_data field of struct thread_info.
On linux ``all_threads'' is keyed by the LWP ID, which we use as the
@@ -299,7 +282,7 @@ struct lwp_info
/* The reason the LWP last stopped, if we need to track it
(breakpoint, watchpoint, etc.) */
- enum lwp_stop_reason stop_reason;
+ enum target_stop_reason stop_reason;
/* On architectures where it is possible to know the data address of
a triggered watchpoint, STOPPED_DATA_ADDRESS is non-zero, and