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.
This commit is contained in:
parent
45b7523071
commit
f90ef76436
2 changed files with 13 additions and 2 deletions
|
@ -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>
|
2004-06-07 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
* target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition.
|
* target.h (PC_REQUIRES_RUN_BEFORE_USE): Delete definition.
|
||||||
|
|
|
@ -275,12 +275,18 @@ thread_get_info_callback (const td_thrhandle_t *thp, void *infop)
|
||||||
thread_info = find_thread_pid (thread_ptid);
|
thread_info = find_thread_pid (thread_ptid);
|
||||||
|
|
||||||
/* In the case of a zombie thread, don't continue. We don't want to
|
/* 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
|
attach to it thinking it is a new thread. */
|
||||||
it as valid. */
|
|
||||||
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
|
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
|
||||||
{
|
{
|
||||||
if (infop != NULL)
|
if (infop != NULL)
|
||||||
*(struct thread_info **) infop = thread_info;
|
*(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;
|
return TD_THR_ZOMBIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue