On Mon, Mar 03, 2003 at 06:40:08PM -0500, Andrew Cagney wrote:
Since GDB's frames have a very short life time (flushed the moment there
is even the faintest wiff of a changed target) it may be possible to
instead use `struct thread_info':
struct thread_info *get_frame_thread (frame)
and
get_thread_regcache (thread_info);
For this to work, though, there would need to be a function that was
guarenteed to always return a thread_info object. Such a
get_selected_thread() or find_thread_by_tpid(?inferior_tpid?) would need
to return a thread object when there were no threads ...
Definitely sounds like a change whose time has come. There's one
hiccup in that when we go from one-process to one-thread we need to
update the thread ID; you can see how I handled this (inelegantly) in
gdbserver. Gdbserver's always got a thread... more or less.