This is the mail archive of the mailing list for the GCC 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: make -momit-leaf-frame-pointer the default for x86

In message <>, Daniel Jacobowitz writes:
 > On Wed, May 29, 2002 at 06:46:59PM -0700, Zack Weinberg wrote:
 > > On Wed, May 29, 2002 at 06:38:39PM -0700, Richard Henderson wrote:
 > > > On Wed, May 29, 2002 at 06:34:51PM -0700, Zack Weinberg wrote:
 > > > > Err, I meant in principle, not what is currently implemented.
 > > > 
 > > > Oh, yes, that is true.
 > > 
 > > Last time this came up, I remember it was said that GCC and/or GDB
 > > didn't implement enough of DWARF to make this work in practice, but
 > > that might have changed - does anyone know?
 > I don't "know", but I suspect it's GDB and not changed.  If anyone
 > feels like explaining the necessary features to support it, I could go
 > see if this is feasible now.
Depends on what scheme you want to use.

The old fashioned way you'd beat on the existing code which recognizes
frames by reading prologues and have it determine what the FP value would be
if we had bothered to create a FP.  ie when building the frame chain, you'd
return read_sp () - stack_size instead of read_fp().

You can probably look at the mn10200-tdep.c and mn10300-tdep.c for examples.
They'll differ in some ways, but they should give you the basic concepts.
The other port that does this is the PA, but I don't recommend trying to
make sense of that code.

Alternately (and probably better long term) would be to have the GDB code
know how to read the dwarf2 unwind section.  Given the pc, sp and dwarf2
unwinders, it should be relatively easy to determine what the frame pointer
would be if we created one.


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