public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: mark@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: frysk-core/frysk/stack/ChangeLog Date: Mon, 19 Nov 2007 11:43:00 -0000 [thread overview] Message-ID: <20071119114304.2363.qmail@sourceware.org> (raw) The branch, master has been updated via bbf660ad5f803e000274503ad878040f4d604fef (commit) from 549835f8c32000e9cae1b45dd50012fb9c7762e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit bbf660ad5f803e000274503ad878040f4d604fef Author: Mark Wielaard <mwielaard@redhat.com> Date: Mon Nov 19 12:42:54 2007 +0100 frysk-core/frysk/stack/ChangeLog 2007-11-19 Mark Wielaard <mwielaard@redhat.com> * LibunwindFrame.java (getAddress): Don't do a proc name lookup, use new Cursor.getIP(). frysk-imports/libunwind/ChangeLog 2007-11-19 Mark Wielaard <mwielaard@redhat.com> * src/mi/Gget_reg.c (unw_get_reg): Use cached value from cursor when looking for UNW_REG_IP. frysk-sys/lib/unwind/ChangeLog 2007-11-19 Mark Wielaard <mwielaard@redhat.com> * Cursor.java (getIP): New method. (unwind): Check current ip. * Unwind.java (getIP): New method. * cni/UnwindH.hxx (getIP): Likewise. (getContext): Check for null elfImage. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/stack/ChangeLog | 6 ++++++ frysk-core/frysk/stack/LibunwindFrame.java | 9 +-------- frysk-imports/libunwind/ChangeLog | 5 +++++ frysk-imports/libunwind/src/mi/Gget_reg.c | 7 +++++++ frysk-sys/lib/unwind/ChangeLog | 9 +++++++++ frysk-sys/lib/unwind/Cursor.java | 8 ++++++-- frysk-sys/lib/unwind/Unwind.java | 1 + frysk-sys/lib/unwind/cni/UnwindH.hxx | 14 ++++++++++++++ 8 files changed, 49 insertions(+), 10 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/stack/ChangeLog b/frysk-core/frysk/stack/ChangeLog index f5bce74..110edfe 100644 --- a/frysk-core/frysk/stack/ChangeLog +++ b/frysk-core/frysk/stack/ChangeLog @@ -1,4 +1,10 @@ +2007-11-19 Mark Wielaard <mwielaard@redhat.com> + + * LibunwindFrame.java (getAddress): Don't do a proc name lookup, + use new Cursor.getIP(). + 2007-11-13 Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> + * LibunwindAddressSpace.java: Add PowerPC32/64 unwinder classes to the constructors. diff --git a/frysk-core/frysk/stack/LibunwindFrame.java b/frysk-core/frysk/stack/LibunwindFrame.java index 080df12..64e9c28 100644 --- a/frysk-core/frysk/stack/LibunwindFrame.java +++ b/frysk-core/frysk/stack/LibunwindFrame.java @@ -44,7 +44,6 @@ import frysk.isa.Register; import java.util.logging.Logger; import lib.unwind.Cursor; import lib.unwind.ProcInfo; -import lib.unwind.ProcName; import frysk.isa.ISA; import frysk.proc.Task; import frysk.symtab.Symbol; @@ -92,13 +91,7 @@ class LibunwindFrame extends Frame * Returns the current program counter of this Frame. */ public long getAddress() { - ProcInfo myInfo = cursor.getProcInfo(); - ProcName myName = cursor.getProcName(0); - - if (myInfo.getError() != 0 || myName.getError() != 0) - return 0; - - return myInfo.getStartIP() + myName.getOffset(); + return cursor.getIP(); } /** diff --git a/frysk-imports/libunwind/ChangeLog b/frysk-imports/libunwind/ChangeLog index af994a5..74d2fbf 100644 --- a/frysk-imports/libunwind/ChangeLog +++ b/frysk-imports/libunwind/ChangeLog @@ -1,3 +1,8 @@ +2007-11-19 Mark Wielaard <mwielaard@redhat.com> + + * src/mi/Gget_reg.c (unw_get_reg): Use cached value from cursor + when looking for UNW_REG_IP. + 2007-10-13 Mark Wielaard <mwielaard@redhat.com> * config/.cvsignore: New. Ignore generated files. diff --git a/frysk-imports/libunwind/src/mi/Gget_reg.c b/frysk-imports/libunwind/src/mi/Gget_reg.c index 23b72be..5179a88 100644 --- a/frysk-imports/libunwind/src/mi/Gget_reg.c +++ b/frysk-imports/libunwind/src/mi/Gget_reg.c @@ -30,5 +30,12 @@ unw_get_reg (unw_cursor_t *cursor, int regnum, unw_word_t *valp) { struct cursor *c = (struct cursor *) cursor; + // No need to go look up the IP value since it is cached in the cursor. + if (regnum == UNW_REG_IP) + { + *valp = c->dwarf.ip; + return 0; + } + return tdep_access_reg (c, regnum, valp, 0); } diff --git a/frysk-sys/lib/unwind/ChangeLog b/frysk-sys/lib/unwind/ChangeLog index 4ccd677..ebe978e 100644 --- a/frysk-sys/lib/unwind/ChangeLog +++ b/frysk-sys/lib/unwind/ChangeLog @@ -1,4 +1,13 @@ +2007-11-19 Mark Wielaard <mwielaard@redhat.com> + + * Cursor.java (getIP): New method. + (unwind): Check current ip. + * Unwind.java (getIP): New method. + * cni/UnwindH.hxx (getIP): Likewise. + (getContext): Check for null elfImage. + 2007-11-13 Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> + * UnwindPPC32.cxx: New. To support powerpc32. 2007-11-09 Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> diff --git a/frysk-sys/lib/unwind/Cursor.java b/frysk-sys/lib/unwind/Cursor.java index 190e315..6433ace 100644 --- a/frysk-sys/lib/unwind/Cursor.java +++ b/frysk-sys/lib/unwind/Cursor.java @@ -81,6 +81,10 @@ public class Cursor bytes, start); } + public long getIP() { + return unwinder.getIP(cursor); + } + public long getSP() { return unwinder.getSP(cursor); } @@ -110,8 +114,8 @@ public class Cursor public Cursor unwind() { logger.log(Level.FINE, "{0}, unwind\n", this); - //XXX: Don't unwind if no more frames. - if (step == 0) + //XXX: Don't unwind if no more, or unknown frames. + if (step == 0 || getIP() == 0) return null; Cursor newCursor = new Cursor(addressSpace, diff --git a/frysk-sys/lib/unwind/Unwind.java b/frysk-sys/lib/unwind/Unwind.java index 23181ec..8e9d3d3 100644 --- a/frysk-sys/lib/unwind/Unwind.java +++ b/frysk-sys/lib/unwind/Unwind.java @@ -70,6 +70,7 @@ public abstract class Unwind abstract void setRegister(RawDataManaged cursor, int regNum, long offset, int length, byte[] word, int start); + public abstract long getIP(RawDataManaged cursor); public abstract long getSP(RawDataManaged cursor); abstract RawDataManaged copyCursor(RawDataManaged cursor); diff --git a/frysk-sys/lib/unwind/cni/UnwindH.hxx b/frysk-sys/lib/unwind/cni/UnwindH.hxx index c13576c..f48494e 100644 --- a/frysk-sys/lib/unwind/cni/UnwindH.hxx +++ b/frysk-sys/lib/unwind/cni/UnwindH.hxx @@ -402,6 +402,17 @@ lib::unwind::TARGET::getSP(gnu::gcj::RawDataManaged* cursor) return sp; } +jlong +lib::unwind::TARGET::getIP(gnu::gcj::RawDataManaged* cursor) +{ + unw_word_t ip; + int status = unw_get_reg((::unw_cursor_t *) cursor, UNW_REG_IP, &ip); + if (status < 0) + return 0; // bottom of stack. + else + return ip; +} + jint lib::unwind::TARGET::getContext(gnu::gcj::RawDataManaged* context) @@ -445,6 +456,9 @@ lib::unwind::TARGET::createProcInfoFromElfImage(lib::unwind::AddressSpace* addre jboolean needUnwindInfo, lib::unwind::ElfImage* elfImage) { + if (elfImage == NULL) + return new lib::unwind::ProcInfo(UNW_ENOINFO); + unw_proc_info_t *procInfo = (::unw_proc_info_t *) JvAllocBytes(sizeof (::unw_proc_info_t)); hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-11-19 11:43 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=20071119114304.2363.qmail@sourceware.org \ --to=mark@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).