summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-05-15 20:11:48 +0000
committerPedro Alves <pedro@codesourcery.com>2008-05-15 20:11:48 +0000
commitce955a760c1d5be16156962f7d622cd26af7adf7 (patch)
tree9b5806e00c86f1dfcf4d202d0643620f90229bec
parentcfe9d0043a8ddc03ed5f69c0c7ca6bb56f6fa62a (diff)
downloadgdb-ce955a760c1d5be16156962f7d622cd26af7adf7.tar.gz
* linux-nat.c (trap_ptid): Delete.
(linux_nat_detach, linux_nat_wait, linux_nat_mourn_inferior): Adjust. * linux-thread-db.c (thread_db_wait): Adjust.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/linux-nat.c16
-rw-r--r--gdb/linux-thread-db.c5
3 files changed, 9 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d0e5df8c80d..f2357a60b5f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-15 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-nat.c (trap_ptid): Delete.
+ (linux_nat_detach, linux_nat_wait, linux_nat_mourn_inferior):
+ Adjust.
+ * linux-thread-db.c (thread_db_wait): Adjust.
+
2008-05-15 Joel Brobecker <brobecker@adacore.com>
* linespec.c (decode_line_1): Fix a couple of comments.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 5d15d42a510..091e64102bb 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -790,11 +790,6 @@ struct lwp_info *lwp_list;
static int num_lwps;
-/* If the last reported event was a SIGTRAP, this variable is set to
- the process id of the LWP/thread that got it. */
-ptid_t trap_ptid;
-
-
/* Since we cannot wait (in linux_nat_wait) for the initial process and
any cloned processes with a single call to waitpid, we have to use
the WNOHANG flag and call waitpid in a loop. To optimize
@@ -1404,8 +1399,6 @@ linux_nat_detach (char *args, int from_tty)
target_pid_to_str (lwp_list->ptid));
}
- trap_ptid = null_ptid;
-
/* Destroy LWP info; it's no longer valid. */
init_lwp_list ();
@@ -2777,14 +2770,11 @@ retry:
if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP)
{
- trap_ptid = lp->ptid;
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
- "LLW: trap_ptid is %s.\n",
- target_pid_to_str (trap_ptid));
+ "LLW: trap ptid is %s.\n",
+ target_pid_to_str (lp->ptid));
}
- else
- trap_ptid = null_ptid;
if (lp->waitstatus.kind != TARGET_WAITKIND_IGNORE)
{
@@ -2916,8 +2906,6 @@ linux_nat_kill (void)
static void
linux_nat_mourn_inferior (void)
{
- trap_ptid = null_ptid;
-
/* Destroy LWP info; it's no longer valid. */
init_lwp_list ();
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index c7aaf6065d8..2ae2f5c70a1 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -823,8 +823,6 @@ check_event (ptid_t ptid)
static ptid_t
thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
- extern ptid_t trap_ptid;
-
ptid = target_beneath->to_wait (ptid, ourstatus);
if (ourstatus->kind == TARGET_WAITKIND_IGNORE)
@@ -861,9 +859,6 @@ thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
event gets postponed by other simultaneous events. In such a
case, we want to just ignore the event and continue on. */
- if (!ptid_equal (trap_ptid, null_ptid))
- trap_ptid = thread_from_lwp (trap_ptid);
-
ptid = thread_from_lwp (ptid);
if (GET_PID (ptid) == -1)
ourstatus->kind = TARGET_WAITKIND_SPURIOUS;