Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: Jim Ingham <jingham@apple.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] breakpoints and function prologues...
Date: Thu, 15 Aug 2002 19:18:00 -0000	[thread overview]
Message-ID: <20020816021839.GA27038@nevyn.them.org> (raw)
In-Reply-To: <3D5C4FCB.4070005@ges.redhat.com>

On Thu, Aug 15, 2002 at 09:05:15PM -0400, Andrew Cagney wrote:
> >
> >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. 
> 
> Don't forget that ``break func'' is is going to change.  It's going to 
> go back to the start of the function!
> 
> >However, suppose the user puts his breakpoint on the "{" beginning a 
> >function (this is what most folks do when they want to break on a function 
> >generically, BTW.)  Then when the IDE stops, it creates the varobjs for 
> >the local variables, which naively get their frame context from the frame 
> >pointer (which because we stopped at the beginning of the prologue hasn't 
> >been updated yet).  Then the user steps, and all of the variables fail to 
> >evaluate correctly, since their frame pointer actually points to the 
> >previous frame, and there is no such variable in the previous frame...
> 
> That is a bug in gdb.  GDB should be using the debug info that lets it 
> set a breakpoint anywhere in the function.

If you are suggesting that someday we'll support accessing local
variables using better unwind information and prologue analysis -
including for targets where no one has written a better prologue
analyzer yet and for debug formats which don't emit terribly good
unwind information, which covers most of our targets twice over - then
I have to say that ``break func'' _shouldn't_ change.

It'd be nice, but I don't think it's realistic.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-08-16  2:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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] <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] <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
     [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=20020816021839.GA27038@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@ges.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jingham@apple.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