public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Return a valid status when there is no map contianing unwind info. Date: Sat, 24 May 2008 18:49:00 -0000 [thread overview] Message-ID: <20080524184920.9107.qmail@sourceware.org> (raw) The branch, master has been updated via d1d421d9f90c359b825250b02887eebe586be8f5 (commit) from 55130603149765b7e8e3394cd806b2be65567cba (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit d1d421d9f90c359b825250b02887eebe586be8f5 Author: Andrew Cagney <cagney@redhat.com> Date: Sat May 24 14:48:07 2008 -0400 Return a valid status when there is no map contianing unwind info. frysk-core/frysk/stack/ChangeLog 2008-05-24 Andrew Cagney <cagney@redhat.com> * LibunwindAddressSpace.java (findProcInfo): Return ProcInfo.fillNotAvailable() when there is no map. frysk-sys/frysk/rsl/ChangeLog 2008-05-24 Andrew Cagney <cagney@redhat.com> * Log.java (log(Object,String,long,String,long,String,long)): New. (log(Object,String,Object,String,long,String,long,String,long)): New. frysk-sys/lib/unwind/ChangeLog 2008-05-24 Andrew Cagney <cagney@redhat.com> * ProcInfo.java (fillNotAvailable): New. * Unwind.java (fillProcInfoNotAvailable): New. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/stack/ChangeLog | 3 ++ frysk-core/frysk/stack/LibunwindAddressSpace.java | 32 +++++++++++++-------- frysk-sys/frysk/rsl/ChangeLog | 5 +++ frysk-sys/frysk/rsl/Log.java | 12 ++++++++ frysk-sys/lib/unwind/ChangeLog | 3 ++ frysk-sys/lib/unwind/ProcInfo.java | 8 +++++ frysk-sys/lib/unwind/Unwind.java | 2 + frysk-sys/lib/unwind/cni/UnwindH.hxx | 6 +++- 8 files changed, 58 insertions(+), 13 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/stack/ChangeLog b/frysk-core/frysk/stack/ChangeLog index 913c26f..5d32375 100644 --- a/frysk-core/frysk/stack/ChangeLog +++ b/frysk-core/frysk/stack/ChangeLog @@ -1,5 +1,8 @@ 2008-05-24 Andrew Cagney <cagney@redhat.com> + * LibunwindAddressSpace.java (findProcInfo): Return + ProcInfo.fillNotAvailable() when there is no map. + * LibunwindAddressSpace.java (procInfo): Delete. (getElfImage(long)): Delete. (findProcInfo): Use ProcInfo.fillFromElfImage et.al. methods. diff --git a/frysk-core/frysk/stack/LibunwindAddressSpace.java b/frysk-core/frysk/stack/LibunwindAddressSpace.java index d4b2dc3..a85a6bb 100644 --- a/frysk-core/frysk/stack/LibunwindAddressSpace.java +++ b/frysk-core/frysk/stack/LibunwindAddressSpace.java @@ -123,22 +123,30 @@ class LibunwindAddressSpace extends AddressSpace { ProcInfo procInfo) { fine.log(this, "findProcInfo ip", ip, "needUnwindInfo", needUnwindInfo); MemoryMap map = task.getProc().getMap(ip); + int ret; if (map == null) { fine.log(this, "Couldn't find memory map"); - return -1; - } - if (DwflFactory.isVDSO(task.getProc(), map)) { - fine.log(this, "Handling VDSO map"); - return procInfo.fillFromVDSO(this, map.addressLow, - map.addressHigh, map.offset, - ip, needUnwindInfo); + return procInfo.fillNotAvailable(); + } else if (DwflFactory.isVDSO(task.getProc(), map)) { + fine.log(this, "Filling from VDSO " + + "low", map.addressLow, + "high", map.addressHigh, + "offset", map.offset); + ret = procInfo.fillFromVDSO(this, map.addressLow, + map.addressHigh, map.offset, + ip, needUnwindInfo); } else { - fine.log(this, "Handling regular map name", map.name); - return procInfo.fillFromElfImage(this, map.name, - map.addressLow, - map.addressHigh, map.offset, - ip, needUnwindInfo); + fine.log(this, "Filling from file " + + "name", map.name, + "low", map.addressLow, + "high", map.addressHigh, + "offset", map.offset); + ret = procInfo.fillFromElfImage(this, map.name, + map.addressLow, + map.addressHigh, map.offset, + ip, needUnwindInfo); } + return ret; } public void putUnwindInfo (final ProcInfo procInfo) { diff --git a/frysk-sys/frysk/rsl/ChangeLog b/frysk-sys/frysk/rsl/ChangeLog index 99c01ef..37ad53b 100644 --- a/frysk-sys/frysk/rsl/ChangeLog +++ b/frysk-sys/frysk/rsl/ChangeLog @@ -1,3 +1,8 @@ +2008-05-24 Andrew Cagney <cagney@redhat.com> + + * Log.java (log(Object,String,long,String,long,String,long)): New. + (log(Object,String,Object,String,long,String,long,String,long)): New. + 2008-05-15 Petr Machata <pmachata@redhat.com> * Log.java (log(String, Object, String, long, String, Object, String, Object)): New. diff --git a/frysk-sys/frysk/rsl/Log.java b/frysk-sys/frysk/rsl/Log.java index 2b80e33..0356ab1 100644 --- a/frysk-sys/frysk/rsl/Log.java +++ b/frysk-sys/frysk/rsl/Log.java @@ -386,6 +386,18 @@ public final class Log { return; prefix(self).print(p1).print(p2).print(p3).print(p4).print(p5).print(p6).suffix(); } + public void log(Object self, String p1, long p2, String p3, long p4, String p5, long p6) { + if (!logging) + return; + prefix(self).print(p1).print(p2).print(p3).print(p4).print(p5).print(p6).suffix(); + } + + // dynamic 8 parameters + public void log(Object self, String p1, Object p2, String p3, long p4, String p5, long p6, String p7, long p8) { + if (!logging) + return; + prefix(self).print(p1).print(p2).print(p3).print(p4).print(p5).print(p6).print(p7).print(p8).suffix(); + } // dynamic 9 parameters public void log(Object self, String p1, Object p2, String p3, long p4, String p5, int p6, String p7, int p8, String p9) { diff --git a/frysk-sys/lib/unwind/ChangeLog b/frysk-sys/lib/unwind/ChangeLog index 27027ff..e3409c3 100644 --- a/frysk-sys/lib/unwind/ChangeLog +++ b/frysk-sys/lib/unwind/ChangeLog @@ -1,5 +1,8 @@ 2008-05-24 Andrew Cagney <cagney@redhat.com> + * ProcInfo.java (fillNotAvailable): New. + * Unwind.java (fillProcInfoNotAvailable): New. + * ProcInfo.java (ProcInfo(int)): Delete. (error, getError()): Delete. (fillFromElfImage, fillFromVDSO): New. diff --git a/frysk-sys/lib/unwind/ProcInfo.java b/frysk-sys/lib/unwind/ProcInfo.java index 77f31fe..99f85e0 100644 --- a/frysk-sys/lib/unwind/ProcInfo.java +++ b/frysk-sys/lib/unwind/ProcInfo.java @@ -51,6 +51,14 @@ public class ProcInfo { unwinder.destroyProcInfo(unwProcInfo); } + /** + * Oops, there was no unwind info; for instance, the address is + * invalid. Fill-in and return the applicable failure indication. + */ + public int fillNotAvailable() { + return unwinder.fillProcInfoNotAvailable(unwProcInfo); + } + public int fillFromVDSO(AddressSpace addressSpace, long addressLow, long addressHigh, long offset, long ip, diff --git a/frysk-sys/lib/unwind/Unwind.java b/frysk-sys/lib/unwind/Unwind.java index 79afbf7..db1d852 100644 --- a/frysk-sys/lib/unwind/Unwind.java +++ b/frysk-sys/lib/unwind/Unwind.java @@ -72,6 +72,8 @@ public abstract class Unwind { abstract long copyCursor(long unwCursor); abstract int getContext(long context); + abstract int fillProcInfoNotAvailable(long unwProcInfo); + // FIXME: shouldn't be public. public abstract int createProcInfoFromElfImage(AddressSpace addressSpace, long ip, diff --git a/frysk-sys/lib/unwind/cni/UnwindH.hxx b/frysk-sys/lib/unwind/cni/UnwindH.hxx index 3d24398..eaaf681 100644 --- a/frysk-sys/lib/unwind/cni/UnwindH.hxx +++ b/frysk-sys/lib/unwind/cni/UnwindH.hxx @@ -649,7 +649,6 @@ TARGET::createProcInfoFromElfImage(AddressSpace* addressSpace, // address adjustment eh_table_hdr); - logf(fine, this, "Post unw_get_unwind_table %d", ret); return ret; } @@ -741,6 +740,11 @@ TARGET::createElfImageFromVDSO(AddressSpace* addressSpace, return elfImage; } +jint +TARGET::fillProcInfoNotAvailable(jlong unwProcInfo) { + return -UNW_ENOINFO; +} + jlong TARGET::getStartIP(jlong unwProcInfo) { return (jlong) ((unw_proc_info_t *) unwProcInfo)->start_ip; hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-05-24 18:49 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=20080524184920.9107.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).