Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Jafa <jafa@silicondust.com>
Cc: gdb@sources.redhat.com
Subject: Re: Frame handling
Date: Tue, 01 Jul 2003 13:02:00 -0000	[thread overview]
Message-ID: <3F01864B.6070403@redhat.com> (raw)
In-Reply-To: <00cd01c33f8d$b4e570e0$0a00a8c0@nkelseyhome>

> Out of interest, what is the theory behind the frame id being made up of
> address + func?

 From the definition of frame ID:

/* The frame object's ID.  This provides a per-frame unique identifier
    that can be used to relocate a `struct frame_info' after a target
    resume or a frame cache destruct.  It of course assumes that the
    inferior hasn't unwound the stack past that frame.  */

struct frame_id
{
   /* The frame's stack address.  This shall be constant through out
      the lifetime of a frame.  Note that this requirement applies to
      not just the function body, but also the prologue and (in theory
      at least) the epilogue.  Since that value needs to fall either on
      the boundary, or within the frame's address range, the frame's
      outer-most address (the inner-most address of the previous frame)
      is used.  Watch out for all the legacy targets that still use the
      function pointer register or stack pointer register.  They are
      wrong.  */
   /* NOTE: cagney/2002-11-16: The ia64 has two stacks and hence two
      frame bases.  This will need to be expanded to accomodate that.  */
   CORE_ADDR stack_addr;
   /* The frame's code address.  This shall be constant through out the
      lifetime of the frame.  While the PC (a.k.a. resume address)
      changes as the function is executed, this code address cannot.
      Typically, it is set to the address of the entry point of the
      frame's function (as returned by frame_func_unwind().  */
   CORE_ADDR code_addr;
};

/* Methods for constructing and comparing Frame IDs.

    NOTE: Given frameless functions A and B, where A calls B (and hence
    B is inner-to A).  The relationships: !eq(A,B); !eq(B,A);
    !inner(A,B); !inner(B,A); all hold.  This is because, while B is
    inner to A, B is not strictly inner to A (being frameless, they
    have the same .base value).  */




  parent reply	other threads:[~2003-07-01 13:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01  5:00 Jafa
2003-07-01 12:45 ` Daniel Jacobowitz
2003-07-01 13:02 ` Andrew Cagney [this message]
2003-07-03  9:05   ` Paul N. Hilfinger
  -- strict thread matches above, loose matches on Subject: below --
2003-07-01  1:20 Jafa
2003-07-01  3:42 ` Daniel Jacobowitz
2003-07-01  4:18   ` Andrew Cagney
     [not found]   ` <redirect-6800274@silicondust.com>
2003-07-01  5:13     ` Jafa
2003-07-01 12:58       ` Andrew Cagney
2003-07-01 14:09         ` Daniel Jacobowitz
2003-07-01 14:57           ` Andrew Cagney
     [not found]           ` <redirect-6810110@silicondust.com>
2003-07-01 17:00             ` Jafa
     [not found]       ` <redirect-6810084@silicondust.com>
2003-07-01 16:14         ` Jafa
2003-07-01 17:59           ` Andrew Cagney
2003-04-08 18:35 Jafa
2003-04-14  3:43 ` Andrew Cagney

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=3F01864B.6070403@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jafa@silicondust.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