This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
There is always a thread
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 29 Nov 2002 18:36:38 -0500
- Subject: There is always a thread
(Goes nicely with the `there is always a frame' dogma, but I've a patch
for that one :-)
GDB contains the function:
void
load_infrun_state (ptid_t ptid, ...)
{
struct thread_info *tp;
/* If we can't find the thread, then we're debugging a single threaded
process. No need to do anything in that case. */
tp = find_thread_id (pid_to_thread_id (ptid));
if (tp == NULL)
return;
*prev_pc = tp->prev_pc;
*prev_func_start = tp->prev_func_start;
*prev_func_name = tp->prev_func_name;
*trap_expected = tp->trap_expected;
...;
}
where what is being modified (even though it's all nicely parameterized)
are global variables (see "inferior.h").
Anywone interested in trying to change this so that, instead, it assumes
that `there is always a thread' and hence, not constantly swap thread
and global variables.
Andrew