public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: nodebug and noeh frame unwind tests.
@ 2008-01-23 14:32 mark
  0 siblings, 0 replies; only message in thread
From: mark @ 2008-01-23 14:32 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  c58823fffbb2d85b9503b1bdc703c6c4be377318 (commit)
      from  6de8b43dc07e0bae95d88c2ef141bfa610579faf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit c58823fffbb2d85b9503b1bdc703c6c4be377318
Author: Mark Wielaard <mwielaard@redhat.com>
Date:   Wed Jan 23 15:32:01 2008 +0100

    nodebug and noeh frame unwind tests.
    
    frysk-core/ChangeLog:
    2008-01-23  Mark Wielaard  <mwielaard@redhat.com>
    
        * Makefile.am: Add rules to create -nodebug and -noeh versions of
        funit-stacks, funit-empty-functions, funit-stacks-exit,
        funit-scopes, funit-scopes-workaround, funit-stack-inlined,
        funit-stacks-values, funit-stacks-linenum and
        funit-cpp-scopes-class.
    
    frysk-core/frysk/debuginfo/ChangeLog:
    2008-01-23  Mark Wielaard  <mwielaard@redhat.com>
    
        * TestFrameDebugInfo.java: Add NoDebug and NoEH variants of
        testFrameDebugInfoStackTrace, testFrameCompilerInlinedFunctions,
        testFrameAdjustedAddress, testFrameScopes,
        testDebugInfoFrameScopes, testFrameScopesWorkAround,
        testGetInlinedSubroutines, testVirtualStackTrace,
        testInlinedFunctionDerailment, testLineNumbers and
        testThatArtificialParametersAreIgnored.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/ChangeLog                               |    8 +
 frysk-core/Makefile.am                             |  115 ++++++++++
 frysk-core/frysk/debuginfo/ChangeLog               |   10 +
 frysk-core/frysk/debuginfo/TestFrameDebugInfo.java |  230 ++++++++++++++++++--
 4 files changed, 339 insertions(+), 24 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/ChangeLog b/frysk-core/ChangeLog
index 8754565..20ba130 100644
--- a/frysk-core/ChangeLog
+++ b/frysk-core/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-23  Mark Wielaard  <mwielaard@redhat.com>
+
+	* Makefile.am: Add rules to create -nodebug and -noeh versions of
+	funit-stacks, funit-empty-functions, funit-stacks-exit,
+	funit-scopes, funit-scopes-workaround, funit-stack-inlined,
+	funit-stacks-values, funit-stacks-linenum and
+	funit-cpp-scopes-class.
+	
 2008-01-17  Stan Cox  <scox@redhat.com>
 
 	* Makefile.am (install-data-hook): Don't install gen-type-funit-tests.
diff --git a/frysk-core/Makefile.am b/frysk-core/Makefile.am
index 9f8581b..10d88cc 100644
--- a/frysk-core/Makefile.am
+++ b/frysk-core/Makefile.am
@@ -97,6 +97,121 @@ installcheck-funit:
 # Create executables for type tests for TestTypeEntry.java.
 frysk/debuginfo/TestTypeEntry.java: frysk/pkglibdir/funit-type-entry.c
 
+# Executable without debug_frame and without eh_frame for Frame tests.
+# Note that this depends on both being available by default because
+# Makefile.rules adds both -g and -fasynchronous-unwind-tables
+# WARNING. eh_frames can only be removed if it isn't used during runtime
+# of the test program (in particular c++ exceptions).
+
+# funit-stacks
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-noeh
+frysk_pkglibdir_funit_stacks_nodebug_SOURCES =
+frysk_pkglibdir_funit_stacks_noeh_SOURCES =
+frysk/pkglibdir/funit-stacks-nodebug: frysk/pkglibdir/funit-stacks
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-stacks $@
+frysk/pkglibdir/funit-stacks-noeh: frysk/pkglibdir/funit-stacks
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-stacks $@
+
+# funit-empty-functions
+pkglib_PROGRAMS += frysk/pkglibdir/funit-empty-functions-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-empty-functions-noeh
+frysk_pkglibdir_funit_empty_functions_nodebug_SOURCES =
+frysk_pkglibdir_funit_empty_functions_noeh_SOURCES =
+frysk/pkglibdir/funit-empty-functions-nodebug: frysk/pkglibdir/funit-empty-functions
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-empty-functions $@
+frysk/pkglibdir/funit-empty-functions-noeh: frysk/pkglibdir/funit-empty-functions
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-empty-functions $@
+
+# funit-stacks-exit
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-exit-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-exit-noeh
+frysk_pkglibdir_funit_stacks_exit_nodebug_SOURCES =
+frysk_pkglibdir_funit_stacks_exit_noeh_SOURCES =
+frysk/pkglibdir/funit-stacks-exit-nodebug: frysk/pkglibdir/funit-stacks-exit
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-stacks-exit $@
+frysk/pkglibdir/funit-stacks-exit-noeh: frysk/pkglibdir/funit-stacks-exit
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-stacks-exit $@
+
+# funit-scopes
+pkglib_PROGRAMS += frysk/pkglibdir/funit-scopes-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-scopes-noeh
+frysk_pkglibdir_funit_scopes_nodebug_SOURCES =
+frysk_pkglibdir_funit_scopes_noeh_SOURCES =
+frysk/pkglibdir/funit-scopes-nodebug: frysk/pkglibdir/funit-scopes
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-scopes $@
+frysk/pkglibdir/funit-scopes-noeh: frysk/pkglibdir/funit-scopes
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-scopes $@
+
+# funit-scopes-workaround
+pkglib_PROGRAMS += frysk/pkglibdir/funit-scopes-workaround-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-scopes-workaround-noeh
+frysk_pkglibdir_funit_scopes_workaround_nodebug_SOURCES =
+frysk_pkglibdir_funit_scopes_workaround_noeh_SOURCES =
+frysk/pkglibdir/funit-scopes-workaround-nodebug: frysk/pkglibdir/funit-scopes-workaround
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-scopes-workaround $@
+frysk/pkglibdir/funit-scopes-workaround-noeh: frysk/pkglibdir/funit-scopes-workaround
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-scopes-workaround $@
+
+# funit-stack-inlined
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stack-inlined-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stack-inlined-noeh
+frysk_pkglibdir_funit_stack_inlined_nodebug_SOURCES =
+frysk_pkglibdir_funit_stack_inlined_noeh_SOURCES =
+frysk/pkglibdir/funit-stack-inlined-nodebug: frysk/pkglibdir/funit-stack-inlined
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-stack-inlined $@
+frysk/pkglibdir/funit-stack-inlined-noeh: frysk/pkglibdir/funit-stack-inlined
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-stack-inlined $@
+
+# funit-stacks-values
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-values-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-values-noeh
+frysk_pkglibdir_funit_stacks_values_nodebug_SOURCES =
+frysk_pkglibdir_funit_stacks_values_noeh_SOURCES =
+frysk/pkglibdir/funit-stacks-values-nodebug: frysk/pkglibdir/funit-stacks-values
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-stacks-values $@
+frysk/pkglibdir/funit-stacks-values-noeh: frysk/pkglibdir/funit-stacks-values
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-stacks-values $@
+
+# funit-stacks-linenum
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-linenum-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-stacks-linenum-noeh
+frysk_pkglibdir_funit_stacks_linenum_nodebug_SOURCES =
+frysk_pkglibdir_funit_stacks_linenum_noeh_SOURCES =
+frysk/pkglibdir/funit-stacks-linenum-nodebug: frysk/pkglibdir/funit-stacks-linenum
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-stacks-linenum $@
+frysk/pkglibdir/funit-stacks-linenum-noeh: frysk/pkglibdir/funit-stacks-linenum
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-stacks-linenum $@
+
+# funit-cpp-scopes-class
+pkglib_PROGRAMS += frysk/pkglibdir/funit-cpp-scopes-class-nodebug
+pkglib_PROGRAMS += frysk/pkglibdir/funit-cpp-scopes-class-noeh
+frysk_pkglibdir_funit_cpp_scopes_class_nodebug_SOURCES =
+frysk_pkglibdir_funit_cpp_scopes_class_noeh_SOURCES =
+frysk/pkglibdir/funit-cpp-scopes-class-nodebug: frysk/pkglibdir/funit-cpp-scopes-class
+	objcopy --remove-section=.debug_frame \
+		frysk/pkglibdir/funit-cpp-scopes-class $@
+frysk/pkglibdir/funit-cpp-scopes-class-noeh: frysk/pkglibdir/funit-cpp-scopes-class
+	objcopy --remove-section=.eh_frame_hdr --remove-section=.eh_frame \
+		frysk/pkglibdir/funit-cpp-scopes-class $@
+
+
 # Create executables for symbol tests for TestSymbol.java.
 
 pkglib_PROGRAMS += frysk/pkglibdir/funit-symbols-nodebug
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index 3ea01bc..55436de 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-23  Mark Wielaard  <mwielaard@redhat.com>
+
+	* TestFrameDebugInfo.java: Add NoDebug and NoEH variants of
+	 testFrameDebugInfoStackTrace, testFrameCompilerInlinedFunctions,
+	 testFrameAdjustedAddress, testFrameScopes,
+	 testDebugInfoFrameScopes, testFrameScopesWorkAround,
+	 testGetInlinedSubroutines, testVirtualStackTrace,
+	 testInlinedFunctionDerailment, testLineNumbers and
+	 testThatArtificialParametersAreIgnored.
+	
 2008-01-18  Mark Wielaard  <mwielaard@redhat.com>
 
 	* CompilerVersionFactory.java: Add copyright boilerplate.
diff --git a/frysk-core/frysk/debuginfo/TestFrameDebugInfo.java b/frysk-core/frysk/debuginfo/TestFrameDebugInfo.java
index 3cf8375..3a8e7a8 100644
--- a/frysk-core/frysk/debuginfo/TestFrameDebugInfo.java
+++ b/frysk-core/frysk/debuginfo/TestFrameDebugInfo.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -69,10 +69,25 @@ public class TestFrameDebugInfo
     /// I am not looking at what you are typing. I just have to see ya type
   Logger logger = Logger.getLogger("frysk");
 
-  public void testFrameDebugInfoStackTrace ()
+  public void testFrameDebugInfoStackTrace()
+  {
+    frameDebugInfoStackTrace("");
+  }
+
+  public void testFrameDebugInfoStackTraceNoDebug()
+  {
+    frameDebugInfoStackTrace("-nodebug");
+  }
+
+  public void testFrameDebugInfoStackTraceNoEH()
+  {
+    frameDebugInfoStackTrace("-noeh");
+  }
+
+  public void frameDebugInfoStackTrace(String ext)
   {
       
-    Task task = (new DaemonBlockedAtSignal("funit-stacks")).getMainTask();
+    Task task = (new DaemonBlockedAtSignal("funit-stacks" + ext)).getMainTask();
     
     StringWriter stringWriter = new StringWriter();
     DebugInfoFrame frame = DebugInfoStackFactory.createDebugInfoStackTrace(task);
@@ -86,22 +101,52 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testFrameCompilerIlinedFucntions ()
+  public void testFrameCompilerInlinedFunctions()
+  {
+    frameCompilerInlinedFunctions("");
+  }
+
+  public void testFrameCompilerInlinedFunctionsNoDebug()
+  {
+    frameCompilerInlinedFunctions("-nodebug");
+  }
+
+  public void testFrameCompilerInlinedFunctionsNoEH()
+  {
+    frameCompilerInlinedFunctions("-noeh");
+  }
+
+  public void frameCompilerInlinedFunctions(String ext)
   {
 
-    Task task = (new DaemonBlockedAtSignal("funit-empty-functions")).getMainTask();
+    Task task = (new DaemonBlockedAtSignal("funit-empty-functions" + ext)).getMainTask();
     
     DebugInfoFrame frame = DebugInfoStackFactory.createVirtualStackTrace(task);
     Subprogram subprogram = frame.getSubprogram();
     assertNotNull(subprogram);
   }
   
-  public void testFrameAdjustedAddress ()
+  public void testFrameAdjustedAddress()
+  {
+    frameAdjustedAddress("");
+  }
+
+  public void testFrameAdjustedAddressNoDebug()
+  {
+    frameAdjustedAddress("-nodebug");
+  }
+
+  public void testFrameAdjustedAddressNoEH()
+  {
+    frameAdjustedAddress("-noeh");
+  }
+
+  public void frameAdjustedAddress(String ext)
   {
     if(unresolved(4676))
         return;
 
-    Task task = (new DaemonBlockedAtSignal("funit-stacks-exit")).getMainTask();
+    Task task = (new DaemonBlockedAtSignal("funit-stacks-exit" + ext)).getMainTask();
     
     Frame frame = StackFactory.createFrame(task);
     StringWriter stringWriter = new StringWriter();
@@ -116,10 +161,25 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testFrameScopes ()
+  public void testFrameScopes()
   {
+    frameScopes("");
+  }
 
-      Task task = (new DaemonBlockedAtSignal("funit-scopes")).getMainTask();
+  public void testFrameScopesNoDebug()
+  {
+    frameScopes("-nodebug");
+  }
+
+  public void testFrameScopesNoEH()
+  {
+    frameScopes("-noeh");
+  }
+
+  public void frameScopes(String ext)
+  {
+
+      Task task = (new DaemonBlockedAtSignal("funit-scopes" + ext)).getMainTask();
     
     Frame frame = StackFactory.createFrame(task);
     
@@ -135,10 +195,25 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testDebugInfoFrameScopes ()
+  public void testDebugInfoFrameScopes()
   {
+    debugInfoFrameScopes("");
+  }
 
-      Task task = (new DaemonBlockedAtSignal("funit-scopes")).getMainTask();
+  public void testDebugInfoFrameScopesNoDebug()
+  {
+    debugInfoFrameScopes("-nodebug");
+  }
+
+  public void testDebugInfoFrameScopesNoEH()
+  {
+    debugInfoFrameScopes("-noeh");
+  }
+
+  public void debugInfoFrameScopes(String ext)
+  {
+
+      Task task = (new DaemonBlockedAtSignal("funit-scopes" + ext)).getMainTask();
     DebugInfoFrame frame = DebugInfoStackFactory.createDebugInfoStackTrace(task);
     
     Scope scope1 = frame.getScopes();
@@ -151,10 +226,25 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testFrameScopesWorkAround ()
+  public void testFrameScopesWorkAround()
+  {
+    frameScopesWorkAround("");
+  }
+
+  public void testFrameScopesWorkAroundNoDebug()
+  {
+    frameScopesWorkAround("-nodebug");
+  }
+
+  public void testFrameScopesWorkAroundNoEH()
+  {
+    frameScopesWorkAround("-noeh");
+  }
+
+  public void frameScopesWorkAround(String ext)
   {
     
-      Task task = (new DaemonBlockedAtSignal("funit-scopes-workaround")).getMainTask();
+      Task task = (new DaemonBlockedAtSignal("funit-scopes-workaround" + ext)).getMainTask();
     Frame frame = StackFactory.createFrame(task);
     
     Dwfl dwfl = DwflCache.getDwfl(task);
@@ -170,10 +260,25 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testGetInlinedSubroutines ()
+  public void testGetInlinedSubroutines()
+  {
+    getInlinedSubroutines("");
+  }
+
+  public void testGetInlinedSubroutinesNoDebug()
+  {
+    getInlinedSubroutines("-nodebug");
+  }
+
+  public void testGetInlinedSubroutinesNoEH()
+  {
+    getInlinedSubroutines("-noeh");
+  }
+
+  public void getInlinedSubroutines(String ext)
   {
     
-      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined")).getMainTask();
+      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined" + ext)).getMainTask();
     DebugInfoFrame frame = DebugInfoStackFactory.createDebugInfoStackTrace(task);
     
     LinkedList inlinedSubprograms =  frame.getInlinedSubprograms();
@@ -182,10 +287,25 @@ public class TestFrameDebugInfo
     
   }
   
-  public void testVirtualStackTrace ()
+  public void testVirtualStackTrace()
+  {
+    virtualStackTrace("");
+  }
+
+  public void testVirtualStackTraceNoDebug()
+  {
+    virtualStackTrace("-nodebug");
+  }
+
+  public void testVirtualStackTraceNoEH()
+  {
+    virtualStackTrace("-noeh");
+  }
+
+  public void virtualStackTrace(String ext)
   {
     
-      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined")).getMainTask();
+      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined" + ext)).getMainTask();
     StringWriter stringWriter = new StringWriter();
     
     DebugInfoStackFactory.printVirtualTaskStackTrace(new PrintWriter(stringWriter), task,0, true, true, true);
@@ -197,13 +317,28 @@ public class TestFrameDebugInfo
     assertTrue("contains main", stringWriter.getBuffer().toString().contains("main"));
   }
   
+  public void testInlinedFunctionDerailment()
+  {
+    inlinedFunctionDerailment("");
+  }
+
+  public void testInlinedFunctionDerailmentNoDebug()
+  {
+    inlinedFunctionDerailment("-nodebug");
+  }
+
+  public void testInlinedFunctionDerailmentNoEH()
+  {
+    inlinedFunctionDerailment("-noeh");
+  }
+
   // test that a Subprogram can be retrieved for a function even
   // if the call stack contains calls to inlined functions inner
   // to it.
-  public void testInlinedFunctionDerailment ()
+  public void inlinedFunctionDerailment(String ext)
   {
   
-      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined")).getMainTask();
+      Task task = (new DaemonBlockedAtSignal("funit-stack-inlined" + ext)).getMainTask();
     
     DebugInfoFrame frame = DebugInfoStackFactory.createVirtualStackTrace(task);
     Subprogram subprogram = null;
@@ -223,7 +358,22 @@ public class TestFrameDebugInfo
   
   public void testValues() throws NameNotFoundException
   {
-      Task task = (new DaemonBlockedAtSignal("funit-stacks-values")).getMainTask();
+    values("");
+  }
+
+  public void testValuesNoDebug() throws NameNotFoundException
+  {
+    values("-nodebug");
+  }
+
+  public void testValuesNoEH() throws NameNotFoundException
+  {
+    values("-noeh");
+  }
+
+  public void values(String ext) throws NameNotFoundException
+  {
+    Task task = (new DaemonBlockedAtSignal("funit-stacks-values" + ext)).getMainTask();
     Subprogram subprogram;
     DebugInfoFrame frame;
     Variable variable;
@@ -282,8 +432,24 @@ public class TestFrameDebugInfo
       
   }
   
-  public void testLineNumbers(){
-      Task task = (new DaemonBlockedAtSignal("funit-stacks-linenum")).getMainTask();
+  public void testLineNumbers()
+  {
+    lineNumbers("");
+  }
+
+  public void testLineNumbersNoDebug()
+  {
+    lineNumbers("-nodebug");
+  }
+
+  public void testLineNumbersNoEH()
+  {
+    lineNumbers("-noeh");
+  }
+
+  public void lineNumbers(String ext)
+  {
+      Task task = (new DaemonBlockedAtSignal("funit-stacks-linenum" + ext)).getMainTask();
       
       Subprogram subprogram;
       DebugInfoFrame frame;
@@ -333,9 +499,25 @@ public class TestFrameDebugInfo
       assertEquals("line number", variable.getLineNumber(), 10);
   }
 
-  public void testThatArtificialParametersAreIgnored() {
+  public void testThatArtificialParametersAreIgnored()
+  {
+    artificialParametersAreIgnored("");
+  }
+
+  public void testThatArtificialParametersAreIgnoredNoDebug()
+  {
+    artificialParametersAreIgnored("-nodebug");
+  }
+
+  public void testThatArtificialParametersAreIgnoredNoEH()
+  {
+    artificialParametersAreIgnored("-noeh");
+  }
+
+  public void artificialParametersAreIgnored(String ext)


hooks/post-receive
--
frysk system monitor/debugger


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

only message in thread, other threads:[~2008-01-23 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-23 14:32 [SCM] master: nodebug and noeh frame unwind tests mark

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