Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Christophe LYON <christophe.lyon@st.com>
Cc: gdb@sourceware.org
Subject: Re: Handling the 'next' command on a variable-length bundles target
Date: Tue, 24 May 2005 13:03:00 -0000	[thread overview]
Message-ID: <20050524130255.GA1460@nevyn.them.org> (raw)
In-Reply-To: <4292E29B.A1FE162E@st.com>

On Tue, May 24, 2005 at 10:15:23AM +0200, Christophe LYON wrote:
> 
> > > I would like to have your inputs on possible
> > > clean ways of handling this.
> > > I am considering modyfing the way 'next' and
> > > 'stepi' memorize the frame in this specific
> > > case, but this is far from being generic.
> > > Maybe it is too specific to think of a generic
> > > fix, but maybe some of you have similar
> > > features?
> > 
> > This is not a missing feature in GDB, it's a bug in your target.  The
> > ID for a frame should be constant throughout the function.  You need to
> > use either code analysis or DWARF-2 style unwind information to have a
> > constant ID for the frame; in this case, probably the unadjusted SP.
> > 
> 
> Well, I am not (yet) very familiar with debugging optimized code.
> 
> What do you mean by "code analysis" ?
> 
> Currently, the recorded frame contains the unadjusted SP, but
> upon return from the call SP has been modified and the current
> frame is thus different from the recorded one. As you say
> the frame ID should be the unadjusted SP, I don't understand
> exactly how: you mean that after the call the frame ID should
> also contain the unadjusted SP?

Yes.  You might want to look at how DWARF-2 unwind information works;
the "stack" part of the GDB frame ID should usually be equivalent to
the DWARF-2 notion of a "call frame address".

-- 
Daniel Jacobowitz
CodeSourcery, LLC


      reply	other threads:[~2005-05-24 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-23 15:37 Christophe LYON
2005-05-23 15:45 ` Daniel Jacobowitz
2005-05-24  8:15   ` Christophe LYON
2005-05-24 13:03     ` Daniel Jacobowitz [this message]

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=20050524130255.GA1460@nevyn.them.org \
    --to=drow@false.org \
    --cc=christophe.lyon@st.com \
    --cc=gdb@sourceware.org \
    /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