There is always a thread
Andrew Cagney
ac131313@redhat.com
Fri Nov 29 15:36:00 GMT 2002
(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
More information about the Gdb
mailing list