diff options
author | Pedro Alves <palves@redhat.com> | 2016-05-24 14:47:57 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-05-24 14:51:03 +0100 |
commit | 72b049d38ce85c51fc9f97ee64b00a47be5ebe94 (patch) | |
tree | f279fd54fbdba1db5d8c22e494d89add43ef51f0 /gdb | |
parent | 774113b02f41ded4d9ba4d18571ee5024312ad1b (diff) | |
download | gdb-72b049d38ce85c51fc9f97ee64b00a47be5ebe94.zip gdb-72b049d38ce85c51fc9f97ee64b00a47be5ebe94.tar.gz gdb-72b049d38ce85c51fc9f97ee64b00a47be5ebe94.tar.bz2 |
Make gdb/linux-nat.c consider a waitstatus pending on the infrun side
Working on the fix for gdb/19828, I saw
gdb.threads/attach-many-short-lived-threads.exp fail once in an
unusual way. Unfortunately I didn't keep debug logs, but it's an
issue similar to what's been fixed in remote.c a while ago --
linux-nat.c was not fetching the pending status from the right place.
gdb/ChangeLog:
2016-05-24 Pedro Alves <palves@redhat.com>
PR gdb/19828
* linux-nat.c (get_pending_status): If the thread reported the
event to the core and it's pending, use the pending status signal
number.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/linux-nat.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d08372b..fa20332 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,13 @@ 2016-05-24 Pedro Alves <palves@redhat.com> PR gdb/19828 + * linux-nat.c (get_pending_status): If the thread reported the + event to the core and it's pending, use the pending status signal + number. + +2016-05-24 Pedro Alves <palves@redhat.com> + + PR gdb/19828 * linux-nat.c (lwp_lwpid_htab): New htab. (lwp_info_hash, lwp_lwpid_htab_eq, lwp_lwpid_htab_create) (lwp_lwpid_htab_add_lwp): New functions. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 6cd9fc6..fdd1ae4 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1320,7 +1320,10 @@ get_pending_status (struct lwp_info *lp, int *status) { struct thread_info *tp = find_thread_ptid (lp->ptid); - signo = tp->suspend.stop_signal; + if (tp->suspend.waitstatus_pending_p) + signo = tp->suspend.waitstatus.value.sig; + else + signo = tp->suspend.stop_signal; } else if (!target_is_non_stop_p ()) { |