public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: mark@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Add StepOverPrologue test.
Date: Mon, 03 Dec 2007 20:47:00 -0000	[thread overview]
Message-ID: <20071203204729.5038.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  32035e6f7ed081a0d73a4fd035b142981048a220 (commit)
      from  778ac77d3fe215ae14102f07822ba0f3d1cc0079 (commit)

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

- Log -----------------------------------------------------------------
commit 32035e6f7ed081a0d73a4fd035b142981048a220
Author: Mark Wielaard <mwielaard@redhat.com>
Date:   Mon Dec 3 21:47:15 2007 +0100

    Add StepOverPrologue test.
    
    frysk-core/frysk/pkglibdir/ChangeLog
    2007-12-03  Mark Wielaard  <mwielaard@redhat.com>
    
        * funit-stepping-asm.S: Add fifth function and _stepOverPrologue_
        marker.
    
    frysk-core/frysk/stepping/ChangeLog
    2007-12-03  Mark Wielaard  <mwielaard@redhat.com>
    
        * TestStepping.java (testASMFunctionStepOverPrologue): New test.

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

Summary of changes:
 frysk-core/frysk/pkglibdir/ChangeLog            |    5 ++
 frysk-core/frysk/pkglibdir/funit-stepping-asm.S |    8 ++++
 frysk-core/frysk/stepping/ChangeLog             |   10 +++-
 frysk-core/frysk/stepping/TestStepping.java     |   46 +++++++++++++++++++++++
 4 files changed, 66 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index 0b15918..6083017 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-03  Mark Wielaard  <mwielaard@redhat.com>
+
+	* funit-stepping-asm.S: Add fifth function and _stepOverPrologue_
+	marker.
+
 2007-12-03  Sami Wagiaalla  <swagiaal@toner.toronto.redhat.com>
 
 	* funit-class-static.cxx: Added a def of static_i.
diff --git a/frysk-core/frysk/pkglibdir/funit-stepping-asm.S b/frysk-core/frysk/pkglibdir/funit-stepping-asm.S
index 4af1506..cde2b22 100644
--- a/frysk-core/frysk/pkglibdir/funit-stepping-asm.S
+++ b/frysk-core/frysk/pkglibdir/funit-stepping-asm.S
@@ -40,10 +40,18 @@
 
 #include "frysk-asm.h"
 
+	FUNCTION_BEGIN(fifth,1)
+	FUNCTION_PROLOGUE(fifth,1) ; NO_OP	// _stepOverPrologue_
+	FUNCTION_EPILOGUE(fifth,1)
+	FUNCTION_RETURN(fifth,1)
+	FUNCTION_END(fifth,1)
+	
+	
 	FUNCTION_BEGIN(fourth,0)
 	FUNCTION_PROLOGUE(fourth,0)
 	NO_OP					// _stepAdvanceStart_
 	NO_OP
+	FUNCTION_CALL(fifth)
 	FUNCTION_EPILOGUE(fourth,0)
 	FUNCTION_RETURN(fourth,0)
 	FUNCTION_END(fourth,0)
diff --git a/frysk-core/frysk/stepping/ChangeLog b/frysk-core/frysk/stepping/ChangeLog
index f643eb3..7a52835 100644
--- a/frysk-core/frysk/stepping/ChangeLog
+++ b/frysk-core/frysk/stepping/ChangeLog
@@ -1,7 +1,11 @@
+2007-12-03  Mark Wielaard  <mwielaard@redhat.com>
+
+	* TestStepping.java (testASMFunctionStepOverPrologue): New test.
+
 2007-11-06  Tim Moore  <timoore@redhat.com>
-    
-    	* SteppingEngine.java (ThreadLifeObservable.updateTerminated):
-    	Clean out the dead task and its siblings if necessary.
+
+	* SteppingEngine.java (ThreadLifeObservable.updateTerminated):
+	Clean out the dead task and its siblings if necessary.
 
 2007-10-14  Andrew Cagney  <cagney@redhat.com>
 
diff --git a/frysk-core/frysk/stepping/TestStepping.java b/frysk-core/frysk/stepping/TestStepping.java
index 7f14ea1..cab4480 100644
--- a/frysk-core/frysk/stepping/TestStepping.java
+++ b/frysk-core/frysk/stepping/TestStepping.java
@@ -952,6 +952,52 @@ public class TestStepping extends TestLib {
 	cleanup();
     }
 
+  /**
+   * Tests that the line stepper steps OK even when stack pointer
+   * changes.
+   */                                                                          
+    public void testASMFunctionStepOverPrologue() {
+
+	/** Variable setup */
+	String source = Config.getRootSrcDir()
+	    + "frysk-core/frysk/pkglibdir/funit-stepping-asm.S";
+
+	this.scanner = new TestfileTokenScanner(new File(source));
+
+	/* The line number where the test begins, prologue of fifth
+	   function. */
+	int startLine = this.scanner.findTokenLine("_stepOverPrologue_");
+
+	/* The line number the test should end up at, still the same
+	   line (only prologue is stepped over, not the NO_OP) */
+	int endLine = this.scanner.findTokenLine("_stepOverPrologue_");
+
+	/* The test process */
+	dbae = new DaemonBlockedAtEntry(Config
+					.getPkgLibFile("funit-stepping-asm"));
+
+	Task theTask = dbae.getMainTask();
+
+	this.testStarted = false;
+
+	initTaskWithTask(theTask, source, startLine, endLine);
+
+	this.currentTest = new AssertLine(endLine, theTask);
+
+	DebugInfoFrame frame = DebugInfoStackFactory
+	    .createDebugInfoStackTrace(theTask);
+	assertTrue("Line information present", frame.getLines().length > 0);
+
+	/** The stepping operation */
+	this.se.stepOver(theTask, frame);
+
+	this.testStarted = true;
+	/** Run to completion */
+	assertRunUntilStop("Running test");
+	cleanup();
+    }
+
+
     boolean genericUpdate = false;
 
     public Task initTask(Offspring process, String source, int startLine,


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


                 reply	other threads:[~2007-12-03 20:47 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=20071203204729.5038.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: link
Be 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).