public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Include the shared library program/solib's name in debug-info back traces.
@ 2008-06-10 19:03 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-06-10 19:03 UTC (permalink / raw)
  To: frysk-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-10 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 19:03 [SCM] master: Include the shared library program/solib's name in debug-info back traces cagney

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).