Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Maxim Grigoriev <maxim@tensilica.com>
Cc: gdb-patches@sources.redhat.com,
	Bob Wilson <bwilson@tensilica.com>,
		Marc Gauthier <marc@tensilica.com>
Subject: Re: Xtensa GDB port -- revised patch
Date: Thu, 28 Sep 2006 01:19:00 -0000	[thread overview]
Message-ID: <20060928011910.GA20142@nevyn.them.org> (raw)
In-Reply-To: <451B202C.3090804@hq.tensilica.com>

On Wed, Sep 27, 2006 at 06:06:52PM -0700, Maxim Grigoriev wrote:
> After some investigation, it turns out that the get_fp_num() function, 
> which was "grubbing around in the private data structures of the symbol 
> reader", is not needed at all.  Perhaps that code was left over from an 
> earlier version of GDB. Stack unwinding on Xtensa can be done using the 
> register windows -- it requires neither prologue analysis to find the 
> frame pointer nor DWARF unwind info.  The only thing the get_fp_num() 
> function was used for was identifying frames, but it seems like we can 
> just use the stack pointer for the frame ID.  (Is that right?)  I've 
> changed the code to do this and it appears to work fine: no DejaGnu 
> regression has been detected, and manual testing on alloca-tests hasn't 
> exposed anything.

I'm not entirely sure, but I think you're off by one frame.  The goal
is to use a long-lived value which will never change during a single
execution of a function.  So we normally use the DWARF concept of a
"Call Frame Address" - the stack pointer at the time of the call.
If you use the current stack pointer for the frame, then you
are liable to change the ID during execution of a function, while
single stepping.  Normally this isn't a big problem; I don't remember
offhand what the usual symptoms are.

Can you use the previous frame's stack pointer instead?  Is that going
to work?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-09-28  1:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28  1:07 Maxim Grigoriev
2006-09-28  1:19 ` Daniel Jacobowitz [this message]
2006-10-05 23:55   ` Maxim Grigoriev
2006-10-06  9:51     ` Eli Zaretskii
2006-11-10 20:39     ` Daniel Jacobowitz
2006-11-11  1:21       ` Maxim Grigoriev
2006-11-11  1:40         ` Daniel Jacobowitz
2006-11-11  2:15           ` Maxim Grigoriev
     [not found]           ` <455530BB.3060403@hq.tensilica.com>
2006-11-14 21:54             ` Daniel Jacobowitz

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=20060928011910.GA20142@nevyn.them.org \
    --to=drow@false.org \
    --cc=bwilson@tensilica.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=marc@tensilica.com \
    --cc=maxim@tensilica.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