public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Additional watchpoint tests.
@ 2008-05-26 15:03 tthomas
  0 siblings, 0 replies; only message in thread
From: tthomas @ 2008-05-26 15:03 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  908e55a3ee987daa0209107ae8a09ab1e562c936 (commit)
      from  5d97469db26f702cc28746e00e1022a7588d1ae6 (commit)

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

- Log -----------------------------------------------------------------
commit 908e55a3ee987daa0209107ae8a09ab1e562c936
Author: Teresa Thomas <tthomas@redhat.com>
Date:   Mon May 26 11:03:41 2008 -0400

    Additional watchpoint tests.
    
    frysk-core/frysk/hpd/ChangeLog:
    2008-05-26 Teresa Thomas  <tthomas@redhat.com>
    
    	* TestWatchCommand.java (testBadWatch): New.

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog             |    4 +++
 frysk-core/frysk/hpd/TestWatchCommand.java |   40 ++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 5adea17..2487faf 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-26 Teresa Thomas  <tthomas@redhat.com>
+
+	* TestWatchCommand.java (testBadWatch): New.
+
 2008-05-23 Teresa Thomas  <tthomas@redhat.com>
 
 	* WatchCommand.java (interpret): Install multiple
diff --git a/frysk-core/frysk/hpd/TestWatchCommand.java b/frysk-core/frysk/hpd/TestWatchCommand.java
index db673ec..cc9cf00 100644
--- a/frysk-core/frysk/hpd/TestWatchCommand.java
+++ b/frysk-core/frysk/hpd/TestWatchCommand.java
@@ -40,6 +40,9 @@
 package frysk.hpd;
 
 import frysk.config.Prefix;
+import frysk.isa.ISA;
+import frysk.proc.Task;
+import frysk.testbed.DaemonBlockedAtEntry;
 
 /**
 * This class tests the "watch" command.
@@ -158,4 +161,41 @@ public class TestWatchCommand extends TestLib {
       e.expect("Quitting\\.\\.\\.");
       e.close();     
   }
+  
+  /*
+   * Test for watching expressions with no legal addresses.
+   */
+  public void testBadWatch() {
+      e = new HpdTestbed();
+      e.sendCommandExpectPrompt("load " + Prefix.pkgLibFile("funit-ctypes").getPath(),
+                                "Loaded executable file.*");
+      e.sendCommandExpectPrompt("start", "Attached to process.*");
+
+      Task task = getStoppedTask();
+      ISA isa = task.getISA();
+
+      if (isa == ISA.IA32) {
+	  e.send("watch $eax\n"); 
+      } else if (isa == ISA.X8664) {
+	  e.send("watch $rdi\n");
+      }
+      e.expect("Error: Location not in contiguous memory.*");
+      
+      e.send("quit\n");
+      e.expect("Quitting\\.\\.\\.");
+      e.close();     
+  }
+
+  
+  private Task getStoppedTask() {
+      return this.getStoppedTask("funit-ctypes");
+  }
+
+  private Task getStoppedTask (String process) {
+      DaemonBlockedAtEntry daemon = new DaemonBlockedAtEntry 
+                                    (new String[] { getExecPath(process) });
+      
+      return daemon.getMainTask();
+  }  
+
 }
\ No newline at end of file


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


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

only message in thread, other threads:[~2008-05-26 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-26 15:03 [SCM] master: Additional watchpoint tests tthomas

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