fix for PR 13618 -- gdb incorrectly reports thread information.
If other systems besides nm-sun4sol2 exhibit the problem, they may need definitions of FIND_NEW_THREADS and a corresponding support function.
This commit is contained in:
parent
c14d0cc015
commit
022278948f
4 changed files with 53 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
Fri Oct 24 16:48:21 1997 David Taylor <taylor@texas.cygnus.com>
|
||||
|
||||
* sol-thread.c (sol_find_new_threads_callback,
|
||||
sol_find_new_threads): New functions.
|
||||
* config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): New macro, invoke
|
||||
sol_find_new_threads.
|
||||
* thread.c (info_threads_command): invoke FIND_NEW_THREADS if it
|
||||
is defined.
|
||||
|
||||
Thu Oct 23 16:16:04 1997 Jeff Law (law@fast.cs.utah.edu)
|
||||
|
||||
* dbxread.c (process_one_symbol): Put back initialization
|
||||
|
|
|
@ -39,4 +39,7 @@ struct objfile;
|
|||
|
||||
void sol_thread_new_objfile PARAMS ((struct objfile *objfile));
|
||||
|
||||
#define FIND_NEW_THREADS sol_find_new_threads
|
||||
void sol_find_new_threads PARAMS ((void));
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1239,6 +1239,43 @@ solaris_pid_to_str (pid)
|
|||
}
|
||||
|
||||
|
||||
/* Worker bee for find_new_threads
|
||||
Callback function that gets called once per USER thread (i.e., not
|
||||
kernel) thread. */
|
||||
|
||||
static int
|
||||
sol_find_new_threads_callback(th, ignored)
|
||||
const td_thrhandle_t *th;
|
||||
void *ignored;
|
||||
{
|
||||
td_err_e retval;
|
||||
td_thrinfo_t ti;
|
||||
int pid;
|
||||
|
||||
if ((retval = p_td_thr_get_info(th, &ti)) != TD_OK)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
pid = BUILD_THREAD(ti.ti_tid, PIDGET(inferior_pid));
|
||||
if (!in_thread_list(pid))
|
||||
add_thread(pid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
sol_find_new_threads()
|
||||
{
|
||||
if (inferior_pid == -1)
|
||||
{
|
||||
printf_filtered("No process.\n");
|
||||
return;
|
||||
}
|
||||
p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *)0,
|
||||
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
|
||||
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
|
||||
}
|
||||
|
||||
#ifdef MAINTENANCE_CMDS
|
||||
/* Worker bee for info sol-thread command. This is a callback function that
|
||||
gets called once for each Solaris thread (ie. not kernel thread) in the
|
||||
|
|
|
@ -347,6 +347,10 @@ info_threads_command (arg, from_tty)
|
|||
if (!target_has_stack) error ("No stack.");
|
||||
|
||||
prune_threads ();
|
||||
#if defined(FIND_NEW_THREADS)
|
||||
FIND_NEW_THREADS ();
|
||||
#endif
|
||||
|
||||
for (tp = thread_list; tp; tp = tp->next)
|
||||
{
|
||||
if (tp->pid == current_pid)
|
||||
|
|
Loading…
Add table
Reference in a new issue