aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
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/linux-nat.c
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/linux-nat.c')
-rw-r--r--gdb/linux-nat.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 57bd1e7..09edaf9 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -1522,7 +1522,7 @@ linux_resume_one_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, lp->ptid, step, signo);
- lp->stop_reason = LWP_STOPPED_BY_NO_REASON;
+ lp->stop_reason = TARGET_STOPPED_BY_NO_REASON;
lp->stopped = 0;
registers_changed_ptid (lp->ptid);
}
@@ -2375,7 +2375,7 @@ check_stopped_by_watchpoint (struct lwp_info *lp)
if (linux_ops->to_stopped_by_watchpoint (linux_ops))
{
- lp->stop_reason = LWP_STOPPED_BY_WATCHPOINT;
+ lp->stop_reason = TARGET_STOPPED_BY_WATCHPOINT;
if (linux_ops->to_stopped_data_address != NULL)
lp->stopped_data_address_p =
@@ -2387,7 +2387,7 @@ check_stopped_by_watchpoint (struct lwp_info *lp)
do_cleanups (old_chain);
- return lp->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
+ return lp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT;
}
/* Called when the LWP stopped for a trap that could be explained by a
@@ -2396,7 +2396,7 @@ check_stopped_by_watchpoint (struct lwp_info *lp)
static void
save_sigtrap (struct lwp_info *lp)
{
- gdb_assert (lp->stop_reason == LWP_STOPPED_BY_NO_REASON);
+ gdb_assert (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON);
gdb_assert (lp->status != 0);
if (check_stopped_by_watchpoint (lp))
@@ -2415,7 +2415,7 @@ linux_nat_stopped_by_watchpoint (struct target_ops *ops)
gdb_assert (lp != NULL);
- return lp->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
+ return lp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT;
}
static int
@@ -2535,8 +2535,8 @@ status_callback (struct lwp_info *lp, void *data)
if (!lp->resumed)
return 0;
- if (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT
- || lp->stop_reason == LWP_STOPPED_BY_HW_BREAKPOINT)
+ if (lp->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
+ || lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
{
struct regcache *regcache = get_thread_regcache (lp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -2689,7 +2689,7 @@ check_stopped_by_breakpoint (struct lwp_info *lp)
regcache_write_pc (regcache, sw_bp_pc);
lp->stop_pc = sw_bp_pc;
- lp->stop_reason = LWP_STOPPED_BY_SW_BREAKPOINT;
+ lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
return 1;
}
@@ -2701,7 +2701,7 @@ check_stopped_by_breakpoint (struct lwp_info *lp)
target_pid_to_str (lp->ptid));
lp->stop_pc = pc;
- lp->stop_reason = LWP_STOPPED_BY_HW_BREAKPOINT;
+ lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
return 1;
}
@@ -3361,7 +3361,7 @@ linux_nat_wait_1 (struct target_ops *ops,
/* Now that we've selected our final event LWP, un-adjust its PC if
it was a software breakpoint. */
- if (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT)
+ if (lp->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT)
{
struct regcache *regcache = get_thread_regcache (lp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);