diff options
author | Pedro Alves <palves@redhat.com> | 2009-06-10 17:26:36 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-06-10 17:26:36 +0000 |
commit | 66852e9c4de0fbfa8be916df494f98e6bcc9eed8 (patch) | |
tree | 6c3624a89766999e6e13b90147115517e1e740ac /gdb | |
parent | d0c6ba3d4d2a2f081454f060b95af3354e3f82ba (diff) | |
download | gdb-66852e9c4de0fbfa8be916df494f98e6bcc9eed8.zip gdb-66852e9c4de0fbfa8be916df494f98e6bcc9eed8.tar.gz gdb-66852e9c4de0fbfa8be916df494f98e6bcc9eed8.tar.bz2 |
* infrun.c (handle_inferior_event): Update comment around trying
to revert back to a stepping thread that has exited.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infrun.c | 22 |
2 files changed, 24 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 537fea8..3d97324 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-06-10 Pedro Alves <pedro@codesourcery.com> + + * infrun.c (handle_inferior_event): Update comment around trying + to revert back to a stepping thread that has exited. + 2009-06-10 Cary Coutant <ccoutant@google.com> * dwarf2read.c (dwarf_decode_lines): Recognize and ignore diff --git a/gdb/infrun.c b/gdb/infrun.c index 4b10151..885e325 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3496,9 +3496,25 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n"); return; } - /* If the stepping thread exited, then don't try reverting - back to it, just keep going. We need to query the target - in case it doesn't support thread exit events. */ + /* If the stepping thread exited, then don't try to switch + back and resume it, which could fail in several different + ways depending on the target. Instead, just keep going. + + We can find a stepping dead thread in the thread list in + two cases: + + - The target supports thread exit events, and when the + target tries to delete the thread from the thread list, + inferior_ptid pointed at the exiting thread. In such + case, calling delete_thread does not really remove the + thread from the list; instead, the thread is left listed, + with 'exited' state. + + - The target's debug interface does not support thread + exit events, and so we have no idea whatsoever if the + previously stepping thread is still alive. For that + reason, we need to synchronously query the target + now. */ if (is_exited (tp->ptid) || !target_thread_alive (tp->ptid)) { |