diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-06-07 22:35:55 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-06-07 22:35:55 +0000 |
commit | f90ef76436a03dabd37dadb4255eb0776c7d16ee (patch) | |
tree | e235a1164a4f5f65741ecec9cd26215c1d06dd41 | |
parent | 45b7523071aa1bffee8795fbb0d3b4cb8a61ca2a (diff) | |
download | gdb-f90ef76436a03dabd37dadb4255eb0776c7d16ee.zip gdb-f90ef76436a03dabd37dadb4255eb0776c7d16ee.tar.gz gdb-f90ef76436a03dabd37dadb4255eb0776c7d16ee.tar.bz2 |
2004-06-07 Jeff Johnston <jjohnstn@redhat.com>
* thread-db.c (thread_get_info_callback): Fill in the thread_info
struct if one exists, even if we are dealing with a zombie thread.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/thread-db.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f6ad170..25f9133 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-06-07 Jeff Johnston <jjohnstn@redhat.com> + + * thread-db.c (thread_get_info_callback): Fill in the thread_info + struct if one exists, even if we are dealing with a zombie thread. + 2004-06-07 Andrew Cagney <cagney@gnu.org> * target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition. diff --git a/gdb/thread-db.c b/gdb/thread-db.c index baa9ba6..50ae747 100644 --- a/gdb/thread-db.c +++ b/gdb/thread-db.c @@ -275,12 +275,18 @@ thread_get_info_callback (const td_thrhandle_t *thp, void *infop) thread_info = find_thread_pid (thread_ptid); /* In the case of a zombie thread, don't continue. We don't want to - attach to it thinking it is a new thread and we don't want to mark - it as valid. */ + attach to it thinking it is a new thread. */ if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE) { if (infop != NULL) *(struct thread_info **) infop = thread_info; + if (thread_info != NULL) + { + memcpy (&thread_info->private->th, thp, sizeof (*thp)); + thread_info->private->th_valid = 1; + memcpy (&thread_info->private->ti, &ti, sizeof (ti)); + thread_info->private->ti_valid = 1; + } return TD_THR_ZOMBIE; } |