This is the mail archive of the gcc@gcc.gnu.org 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]

proposal: make -fomit-frame-pointer the default


The -fomit-frame-pointer option saves time and space,
and I think it should be on by default.

The claim in the doc is that this "makes debugging
impossible on some machines".  But isn't that the fault
of the debugger?  For example, on x86 I think the debugger
can reconstruct the frame pointer as follows:
For a given pc/sp the debugger can determine the current function.
It can "search" from the beginning of the current function
for an execution path to the given pc.
This path will indicate any adjustments made to the sp.
From the adjustments and the given sp it can determine the (virtual)
frame pointer.  Given the complexity of modern debuggers,
this sort of thing would be relatively trivial.
Am I missing something?

Tom Truscott

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