Bug 7573

Summary: cache frame_info in thread_info
Product: gdb Reporter: ac131313
Component: threadsAssignee: Not yet assigned to anyone <unassigned>
Status: REOPENED ---    
Severity: normal CC: gdb-prs, tromey
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description ac131313 2002-04-06 14:58:00 UTC
[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:
    get_current_frame()
 +  get_selected_frame()
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.

Release:
2002-04-05
Comment 1 Tom Tromey 2010-06-10 16:51:10 UTC

*** This bug has been marked as a duplicate of 8627 ***
Comment 2 Tom Tromey 2013-11-18 17:47:58 UTC
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.