[Converted from Gnats 468]
At present there is a single global frame cache. If the selected thread is changed, the cache is discarded.
Instead, have per-thread selected_frame, current_frame (better name?) and just switch between them when the thread changes.
Long term, this should be handled naturally by always using a ``thread'' object. Short term, it can be handled by managing the selected thread's frame using the access methods:
These functions can track the inferior_tpid vs the one currently selected by the frame.c code.
flush_cached_frames() would iterate over all the threads invalidating all current frames.
*** This bug has been marked as a duplicate of 8627 ***
Un-duping. Not sure why I did that.
I think it might be preferable to have a thread-aware
frame cache (and frame stash) attached to the address space,
than to have it be explicitly on the thread_info.