This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: frame cache
- From: Michael Eager <eager at eagercon dot com>
- To: Wenbo Yang <wenbo dot yang at simplnano dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb at sources dot redhat dot com
- Date: Mon, 30 Jul 2007 14:17:36 -0700
- Subject: Re: frame cache
- References: <46A648BC.8070105@eagercon.com> <46A98934.5040902@simplnano.com>
Wenbo Yang wrote:
Michael Eager wrote:
Perhaps so, I don't see where other targets check for debug
info before calling analyze_prologue(). For example, on i386,
i386_analyze_prologue() is called each and every time that
i386_skip_prologue() is called.
It depends on target . If you register dwarf2 frame sniffers to gdbarch,
and your compiler can emit proper debugging information, gdb will not
call analyze_prologue(). At least for our target(I did the porting), it
works as Mark Kettenis said:
"prologue analysis should only be done as a last resort, i.e. when
proper debug information is not available. "
Which target?
I don't see where there is any test in symtab.c or infrun.c
which tests for debug info before calling SKIP_PROLOGUE which
calls <target>_skip_prologue.
Because if you want to use debugging information to skip prologue, you
write the code in this function. So, test should be place here in this
function.
As I mentioned, in x86 or PowerPC there is no code to bypass analyzing
the prologue, even if there is debug info. If prologue analysis is
truly to be done "only as a last resort", and I agree that this should
be the case, then this seems not to be represented in the gdb code.
If I've missed where this is done, feel free to point me at the correct
code.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077