From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21235 invoked by alias); 3 Dec 2007 16:42:22 -0000 Received: (qmail 21180 invoked by uid 367); 3 Dec 2007 16:42:21 -0000 Date: Mon, 03 Dec 2007 16:42:00 -0000 Message-ID: <20071203164221.21165.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Restore old behavior; use this.outer.getSP() to construct FrameIdentifier. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: d0b09b68212a743402612f1cc83647ee153cc8e5 X-Git-Newrev: 7ac95a41f7d7ef6137687c6b882369dd71764a3c Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2007-q4/txt/msg00508.txt.bz2 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 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 * LibunwindFrame.java: Revert <>; 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 + + * LibunwindFrame.java: Revert <>; add more + comments. + 2007-12-03 Mark Wielaard * 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