proposal: make -fomit-frame-pointer the default
Thomas R. Truscott
trt@cs.duke.edu
Fri Apr 14 09:41:00 GMT 2000
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
More information about the Gcc
mailing list