[RFC] breakpoints and function prologues...

Joel Brobecker brobecker@gnat.com
Thu Aug 15 19:11:00 GMT 2002


> Don't forget that ``break func'' is is going to change.  It's going to 
> go back to the start of the function!

Why this change? This is going to have a negative effect on the 
Alpha Tru64 platform, since the first 2 instructions of the prologue
are often optimized out by the linker. If we move "break func" back to
the start of the function, the breakpoint will never be hit even if the
function is entered.

I agree with Daniel and Jim here: most of our users don't know what a
function prologue is. To take one example, they don't understand why the
parameter values are not correct when they put a breakpoint on the curly
brace. There is no definite answer whether we should skip the prologue
or not, but I believe that GDB users debugging at the source level will
much more often want GDB to be "prologue-transparent". For those of us
who sometimes debug at the instruction level, there are other
alternatives that allow us to do what we want.

-- 
Joel



More information about the Gdb-patches mailing list