Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: Andrew Cagney <ac131313@ges.redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] breakpoints and function prologues...
Date: Fri, 23 Aug 2002 11:27:00 -0000	[thread overview]
Message-ID: <20020823181328.GA21035@nevyn.them.org> (raw)
In-Reply-To: <3D656658.9D01C76D@redhat.com>

On Thu, Aug 22, 2002 at 03:31:52PM -0700, Michael Snyder wrote:
> Daniel Jacobowitz wrote:
> > 
> > On Thu, Aug 15, 2002 at 01:57:13AM -0400, Andrew Cagney wrote:
> > > >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.
> > 
> > Sure, if the user knows there's code there.  I don't think most of our
> > users would understand that there is code on the "{", or what it is
> > for -
> 
> I suspect that this is a result of a changing user base.
> There are more and more users who don't know a lot about
> how things work "under the hood".

Absolutely.

> > and I don't think that breaking by line number should break on
> > code inserted by the compiler rather than the user.
> 
> The question is, is there a strong reason to change a behavior
> that has been consistent for a very long time (even if undocumented).
> Even if the ability to debug the prologue is un-important for most
> users, it is important to some, and those users (GCC developers,
> for instance) may be quite accustomed to the current behavior.
> I am, for instance...

I believe there's a strong reason; the change in our user base means
that this confuses more people than it helps.  Most or all of the
people who need to look at the beginning of prologues know about "break
*foo".

> 
> 
> > So I have to agree with Jim (both Jims, I think?).
> > 
> > > If an architecture can't unwind the frame for that breakpoint address
> > > then that is a bug in the architecture and/or GDB.  The main reason the
> > > average prologue analyzer doesn't handle breakpoints in the prologue is,
> > > I think, more a factor of not being tested then of being ``hard''.
> > 
> > Most of our ports don't support it, however.
> 
> Most of mine do.

Enough to provide frame information for local variables and stack
arguments at that point?  I didn't think that was the case.  Without
using CFI or a much more sophisticated prologue analysis mechanism, I
don't see how it could be... but I could certainly be wrong :)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-08-23 18:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1028439120.16228.ezmlm@sources.redhat.com>
2002-08-06 13:37 ` Jim Ingham
2002-08-14 22:57   ` Andrew Cagney
2002-08-15  6:53     ` Daniel Jacobowitz
2002-08-22 15:33       ` Michael Snyder
2002-08-22 16:19         ` Joel Brobecker
2002-08-23 11:27         ` Daniel Jacobowitz [this message]
     [not found] <1030059293.13128.ezmlm@sources.redhat.com>
2002-08-23 10:50 ` Jim Ingham
2002-08-23 11:34   ` Andrew Cagney
2002-08-24 18:31     ` Jim Ingham
2002-08-25  7:45       ` Andrew Cagney
2002-08-25  8:21         ` Daniel Jacobowitz
2002-08-25 15:24         ` Jim Ingham
2002-08-23 11:45   ` Michael Snyder
2002-08-23 11:48     ` Daniel Jacobowitz
     [not found] <1029446396.15888.ezmlm@sources.redhat.com>
2002-08-15 15:26 ` Jim Ingham
2002-08-15 18:05   ` Andrew Cagney
2002-08-15 19:11     ` Joel Brobecker
2002-08-16 10:02       ` Jim Blandy
2002-08-16 10:17         ` Joel Brobecker
2002-08-15 19:18     ` Daniel Jacobowitz
2002-08-16  9:34     ` Jim Blandy
2002-08-16 11:34     ` Jim Ingham
2002-08-22 15:38     ` Michael Snyder
2002-08-22 15:56       ` Andrew Cagney
2002-08-22 16:34         ` Michael Snyder
     [not found] <1027384602.26926.ezmlm@sources.redhat.com>
2002-07-22 18:54 ` Jim Ingham
2002-07-22 22:49   ` Joel Brobecker
2002-07-22 17:36 Joel Brobecker
2002-07-23 16:53 ` Jim Blandy
2002-07-26  6:12   ` Joel Brobecker
2002-07-29 13:34     ` Daniel Jacobowitz
2002-07-29 23:57     ` Jim Blandy
2002-07-30 20:18       ` Joel Brobecker
2002-07-31 13:55         ` Jim Blandy
2002-08-01 15:44           ` Michael Snyder
2002-08-02 23:48             ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020823181328.GA21035@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@ges.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox