public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: frame_id question
Date: Fri, 11 Nov 2005 10:35:00 -0000	[thread overview]
Message-ID: <200511111335.18605.ghost@cs.msu.su> (raw)
In-Reply-To: <vt28xvv5vqj.fsf@theseus.home.>

On Friday 11 November 2005 13:23, Jim Blandy wrote:
> Vladimir Prus <ghost@cs.msu.su> writes:
> > The question is: why frame id has to include program address at all? It
> > it ever possible for two frames to have the same stack address? If so,
> > when?
>
> Some functions don't need any stack space at all.  Such a function can
> even call other functions if it moves the return address to a
> callee-saved register while doing so.  

Do I understand correctly that this can happen only on architectures where
return address is not automatically pushed to the stack, but moved to a 
special register? Like MIPS's "jal" instructions that moves return address to 
$31

> Unwinding through such a call, 
> the caller's frame will have the same CFA as the callee, but a
> different function address.  Since the two frame ID's have different
> function addresses, frame_id_eq will declare them distinct, and GDB
> won't complain that it has gotten stuck trying to unwind the stack.

Does it mean that for architectures with automatic pushing of return address, 
using '0' as code address in frame_id will be safe? Or there are some corner 
cases?

Thanks,
Volodya

  reply	other threads:[~2005-11-11 10:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 16:29 Vladimir Prus
2005-11-11 10:23 ` Jim Blandy
2005-11-11 10:35   ` Vladimir Prus [this message]
     [not found]     ` <8f2776cb0511110943p1bb2b03g1b158fb8a82f2528@mail.gmail.com>
2005-11-11 18:05       ` Fwd: " Jim Blandy
2005-11-13 17:32     ` Daniel Jacobowitz
2005-11-13 23:34       ` 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=200511111335.18605.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).