public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Restore old behavior; use this.outer.getSP() to construct FrameIdentifier. Date: Mon, 03 Dec 2007 16:42:00 -0000 [thread overview] Message-ID: <20071203164221.21165.qmail@sourceware.org> (raw) The branch, master has been updated via 7ac95a41f7d7ef6137687c6b882369dd71764a3c (commit) from d0b09b68212a743402612f1cc83647ee153cc8e5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 7ac95a41f7d7ef6137687c6b882369dd71764a3c Author: Andrew Cagney <cagney@redhat.com> Date: Mon Dec 3 11:42:11 2007 -0500 Restore old behavior; use this.outer.getSP() to construct FrameIdentifier. frysk-core/frysk/stack/ChangeLog 2007-12-03 Andrew Cagney <cagney@redhat.com> * LibunwindFrame.java: Revert <<Get CFA from cursor>>; add more comments. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/stack/ChangeLog | 5 +++++ frysk-core/frysk/stack/LibunwindFrame.java | 23 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/stack/ChangeLog b/frysk-core/frysk/stack/ChangeLog index 2755651..9656b93 100644 --- a/frysk-core/frysk/stack/ChangeLog +++ b/frysk-core/frysk/stack/ChangeLog @@ -1,3 +1,8 @@ +2007-12-03 Andrew Cagney <cagney@redhat.com> + + * LibunwindFrame.java: Revert <<Get CFA from cursor>>; add more + comments. + 2007-12-03 Mark Wielaard <mwielaard@redhat.com> * LibunwindFrame.java (getFrameIdentifier): Get CFA from cursor. diff --git a/frysk-core/frysk/stack/LibunwindFrame.java b/frysk-core/frysk/stack/LibunwindFrame.java index 6d8f09e..1495aa5 100644 --- a/frysk-core/frysk/stack/LibunwindFrame.java +++ b/frysk-core/frysk/stack/LibunwindFrame.java @@ -132,19 +132,32 @@ class LibunwindFrame extends Frame /** * Return this frame's FrameIdentifier. - * The frame identifier is the combination of the current - * symbols (function) start address and the call frame address - * of the cursor (frame). + * + * The frame identifier is the combination of the current symbols + * (function) start address and the more outer frame's inner most + * address. */ public FrameIdentifier getFrameIdentifier () { if (frameIdentifier == null) { long functionAddress = getSymbol().getAddress(); - long cfa = cursor.getCFA(); + // Note, cursor.getCFA is wrong here; libunwind returns the + // CFA used as part of computing the location of registers + // in the current cursor and not the "CFA" of this frame; + // effectively this frame's stack-pointer (in fact often + // getCFA() == getSP()). + long cfa = 0; + Frame outer = getOuter(); + if (outer != null) + // Need an address that is constant through out the + // lifetime of the frame (in particular when the stack + // grows). Use the outer-to-this frame's inner most + // stack address a.k.a. the stack-pointer.. + cfa = ((LibunwindFrame)outer).cursor.getSP(); frameIdentifier = new FrameIdentifier(functionAddress, cfa); } return this.frameIdentifier; } - + /** * Returns whether or not this frame's execution was interrupted by * a signal. hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-12-03 16:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071203164221.21165.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@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: linkBe 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).