This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frame cache


Daniel Jacobowitz wrote:
On Tue, Jul 24, 2007 at 10:08:25AM -0700, Michael Eager wrote:
And one more question:

3)  In <target>_skip_prologue(), an dummy <target>_frame_cache is
    created to be passed to <target>_analyze_prologue().  This
    dummy cache entry is discarded.   Why not retain this info?

I think the answers to your other two questions should clarify this. We don't have anywhere to keep it, and the information is not quite the same because it depends how far into the function we're allowed to analyze (the PC "limit"). Also, many targets don't do it this way.

This seems odd. The function is <target>_analyze_prologue() not <target>_analyze_part_of_a_prologue(). The prologue isn't going to change depending on where the program stopped. <target>_skip_prologue() can return a pc based on whatever a complete analysis reveals.

In i386, for example, the "pc limit" (called current_pc) passed
to i386_analyze_prologue() is 0xffffffff.  Sparc is similar.
Neither seem to restrict how far the analyze_prologue function scans.

I do see that some targets merge skip_prologue and analyze_prologue.
Are there other methods?  It would seem to me that for any function
that has DWARF data, one can locate the end of the prologue without
reading data from the target.  I don't see any target which does this.

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]