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

Jim Ingham
2002-08-06T20:37:54Z

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...

Jim

On Saturday, August 3, 2002, at 10:32 PM,
gdb-patches-digest-help@sources.redhat.com wrote:

> From: Jim Blandy <jimb@redhat.com>
> Date: Fri Aug 2, 2002 11:48:26 PM US/Pacific
> To: Michael Snyder <msnyder@redhat.com>
> Cc: Joel Brobecker <brobecker@gnat.com>, gdb-patches@sources.redhat.com
> Subject: Re: [RFC] breakpoints and function prologues...
>
>
>
> Michael Snyder <msnyder@redhat.com> writes:
>>> So I'd support changing `break LINENO' to always skip the prologue.
>>
>> I would not. It's changing a behavior that people have
>> become accustomed to.
>
> Well, that alone isn't a good reason to keep a behavior, is it? I
> mean, it's pretty confusing. And there's a good alternative.
>
>
>
--
Jim Ingham jingham@apple.com
Developer Tools - gdb
Apple Computer