Re: [RFC] breakpoints and function prologues...

Daniel Jacobowitz
2002-07-29T20:06:44Z

On Thu, Jul 25, 2002 at 10:33:20PM -0700, Joel Brobecker wrote:
> > In the long term, if we can get GDB to use Dwarf 2 CFI and location
> > lists, there will be no difference between setting breakpoints before
> > or after the prologue. The prologue scanning and skipping behavior
> > will only be necessary in the absence of that debugging info.
>
> I agree.
>
> In the meantime, may I suggest we install Jim Ingham's patch? I think
> the new behavior would be more useful than the current, but maybe I'm
> wrong?
>
> Another alternative that has been discussed at ACT is to move the line
> where the function declaration is located to an address immediately
> past the function prologue. And the prologue would get a separate line
> info entry with a line number set to 0. The rationale behind modifying
> the compiler is that the compiler knows much better than GDB what part
> of the code is the prologue, and therefore should be in a better
> position of to provide accurate line information.
>
> But I personally (ie I'm not speaking for ACT) prefer changing GDB. What
> do you think?

I don't like adding yet another meaning to line-number-0 very much; it
has a defined meaning in GDB, which is "not part of a function".

--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer