This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: frame cache
Daniel Jacobowitz wrote:
On Tue, Jul 24, 2007 at 10:35:59AM -0700, Michael Eager wrote:
I don't see any links to the <target>_frame_cache in frame_info.
I don't see anything in frame.c which looks like it searches
for the correct <target>_frame_cache. Can you point me at the
right place?
Sure:
/* The frame's low-level unwinder and corresponding cache. The
low-level unwinder is responsible for unwinding register values
for the previous frame. The low-level unwind methods are
selected based on the presence, or otherwise, of register unwind
information such as CFI. */
void *prologue_cache;
const struct frame_unwind *unwind;
I missed that prologue_cache ==> <target>_frame_cache.
I only saw that it was set by sentinel_frame_cache, but
now I see that it is passed to frame_unwind_find_by_frame()
and on from there. (Bad void pointer, bad, bad.)
When I put debugging code in <target>_analyze_prologue(), I see
that it is called over and over while executing a "next" command.
All those bits going back and forth over the serial line to the
target.
I like to use GDB's built in data caching and/or set
trust-readonly-sections. I hope we can make the data caching more
aggressive by default at some point.
Perhaps you or someone could write some documentation for this? :-)
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077