From: Andrew Cagney <ac131313@ges.redhat.com>
Date: Wed Aug 14, 2002 10:57:13 PM US/Pacific
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] breakpoints and function prologues...
I agree with Jim here. I think most folks are actually surprised to
find that if they break on the "{" beginning a function (or indeed
anywhere before the first executable line of code) then their
backtrace will not be correct. Understanding why this is so requires
you to "pay attention to the man behind the curtain", and that we
breaks the illusion that source code maps straight-forwardly onto the
running program. Where this extra knowledge is helpful (like when
debugging optimized code) it is fine to require folks to have it.
But here, where it really doesn't do any good, I think it is just
confusing. And, of course, it causes big heartburn for GUIs the
varobj code, as I said earlier.
I doubt that "{" breaks on the prologue is a crucial feature of gdb,
and given that there are other ways to do this, I don't think it is
really worth supporting...
Michael is right here. If a CLI user sets a breakpoint on a line
(with code) then that user clearly wants the breakpoint set on that
line.
Most users I have talked to think that setting a break on the "{" at
the beginning of a function means the same thing as setting a
breakpoint on the function. But that is not the case. "break
funcName" is AFTER the prologue, "break file:<line containing "{"> is
the true function beginning.