public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Include the shared library program/solib's name in debug-info back traces. Date: Tue, 10 Jun 2008 19:03:00 -0000 [thread overview] Message-ID: <20080610190340.9235.qmail@sourceware.org> (raw) The branch, master has been updated via a17e35990190cdddc6e0a0447cb02774b661a659 (commit) from 65837bf7e7a75451a6d5971e52ed06edef716ed3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit a17e35990190cdddc6e0a0447cb02774b661a659 Author: Andrew Cagney <cagney@toil.yyz.redhat.com> Date: Tue Jun 10 15:02:17 2008 -0400 Include the shared library program/solib's name in debug-info back traces. frysk-core/frysk/bindir/ChangeLog 2008-06-10 Andrew Cagney <cagney@redhat.com> * TestFstack.java (testBackTrace, testBackTraceWithDebugNamesAndParams): Check for from <exe>. frysk-core/frysk/debuginfo/ChangeLog 2008-06-10 Andrew Cagney <cagney@redhat.com> * DebugInfoFrame.java (toPrint): Print the library using Frame.printLibraryName. frysk-core/frysk/stack/ChangeLog 2008-06-10 Andrew Cagney <cagney@redhat.com> * Frame.java (printLibraryName(PrintWriter,PrintStackOptions)): New. (toPrint(PrintWriter,PrintStackOptions)): Use. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/bindir/ChangeLog | 3 +++ frysk-core/frysk/bindir/TestFstack.java | 4 ++-- frysk-core/frysk/debuginfo/ChangeLog | 3 +++ frysk-core/frysk/debuginfo/DebugInfoFrame.java | 12 +++++++----- frysk-core/frysk/stack/ChangeLog | 3 +++ frysk-core/frysk/stack/Frame.java | 13 ++++++++++--- 6 files changed, 28 insertions(+), 10 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog index 226c6d7..ce774a0 100644 --- a/frysk-core/frysk/bindir/ChangeLog +++ b/frysk-core/frysk/bindir/ChangeLog @@ -1,5 +1,8 @@ 2008-06-10 Andrew Cagney <cagney@redhat.com> + * TestFstack.java (testBackTrace, + testBackTraceWithDebugNamesAndParams): Check for from <exe>. + * TestFstack.java (testBackTraceWithRich()): Mark as unresolved; bug 6616. * ferror.java: Use PrintDebugInfoStackOptions; don't specify the diff --git a/frysk-core/frysk/bindir/TestFstack.java b/frysk-core/frysk/bindir/TestFstack.java index 837aa3e..fbcb730 100644 --- a/frysk-core/frysk/bindir/TestFstack.java +++ b/frysk-core/frysk/bindir/TestFstack.java @@ -83,14 +83,14 @@ public class TestFstack extends TestLib { public void testBackTrace () { TearDownExpect e = fstack("funit-stack-outlined", new String[0]); // Just look for main. - e.expect ("main"); + e.expect ("main.* from funit-stack-outlined"); } public void testBackTraceWithDebugNamesAndParams() { TearDownExpect e = fstack("funit-stack-outlined", new String[] { "-print", "debug-names,params" }); - e.expect("\\#0 .* in third\\(int arg3\\) at funit-stack-outlined\\.c#"); + e.expect("\\#0 .* in third\\(int arg3\\) at funit-stack-outlined\\.c#[0-9]+ from funit-stack-outlined"); e.expect("\\#1"); } diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog index 649fe31..8c2186b 100644 --- a/frysk-core/frysk/debuginfo/ChangeLog +++ b/frysk-core/frysk/debuginfo/ChangeLog @@ -1,5 +1,8 @@ 2008-06-10 Andrew Cagney <cagney@redhat.com> + * DebugInfoFrame.java (toPrint): Print the library using + Frame.printLibraryName. + * DebugInfoFrame.java (toPrint(PrintWriter,boolean,boolean)): Delete. (toPrint(PrintWriter,DebugInfoStackOptions)): New. * PrintParameterOptions.java: New. diff --git a/frysk-core/frysk/debuginfo/DebugInfoFrame.java b/frysk-core/frysk/debuginfo/DebugInfoFrame.java index ea0b1b7..3a0482e 100644 --- a/frysk-core/frysk/debuginfo/DebugInfoFrame.java +++ b/frysk-core/frysk/debuginfo/DebugInfoFrame.java @@ -198,17 +198,19 @@ public class DebugInfoFrame extends FrameDecorator { subprogram.printParameters(writer, this, options.printValues()); } writer.print(") at "); + SourceLocation line = this.getLine(); if (options.printFullPaths()) { - SourceLocation line = this.getLine(); writer.print(line.getFile().getPath()); - writer.print("#"); - writer.print(line.getLine()); } else { - SourceLocation line = this.getLine(); writer.print(line.getFile().getName()); + } + writer.print("#"); + writer.print(line.getLine()); + if (line.getColumn() > 0) { writer.print("#"); - writer.print(line.getLine()); + writer.print(line.getColumn()); } + printLibraryName(writer, options); } else { super.toPrint(writer, options); } diff --git a/frysk-core/frysk/stack/ChangeLog b/frysk-core/frysk/stack/ChangeLog index 28e41a3..367f17a 100644 --- a/frysk-core/frysk/stack/ChangeLog +++ b/frysk-core/frysk/stack/ChangeLog @@ -1,5 +1,8 @@ 2008-06-10 Andrew Cagney <cagney@redhat.com> + * Frame.java (printLibraryName(PrintWriter,PrintStackOptions)): New. + (toPrint(PrintWriter,PrintStackOptions)): Use. + * Frame.java (toPrint(PrintWriter,PrintStackOptions)): Replace toPrint(PrintWriter,boolean,boolean). (toPrint(PrintWriter)): Delete. diff --git a/frysk-core/frysk/stack/Frame.java b/frysk-core/frysk/stack/Frame.java index 11d3cf7..2ad9ea5 100644 --- a/frysk-core/frysk/stack/Frame.java +++ b/frysk-core/frysk/stack/Frame.java @@ -157,10 +157,17 @@ public abstract class Frame { writer.write(symbol.getDemangledName()); if (symbol != SymbolFactory.UNKNOWN) writer.write(" ()"); - if (options.printLibraryNames()){ + printLibraryName(writer, options); + } + + /** + * If requrested by the stack options, print the library name + * using the form " from LIBRARY". + */ + protected void printLibraryName(PrintWriter writer, PrintStackOptions options) { + if (options.printLibraryNames()) { // the library if known ... String library = getLibraryName(); - System.err.println("library: " + library); if (library != null) { writer.print(" from "); if (library.startsWith("[")) { @@ -177,7 +184,7 @@ public abstract class Frame { } } - } + } } public String getLibraryName() { hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-06-10 19:03 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=20080610190340.9235.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).