public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Implement getWatchpointMinLength() which returns the minimum size of a hardware watchpoint on that architecture.
@ 2008-06-05  8:59 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2008-06-05  8:59 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  0fe10ca241a02a853f4882c9d68431b6957d384b (commit)
      from  eb52dfd7c43676cc1b160fe542afd70a26598743 (commit)

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

- Log -----------------------------------------------------------------
commit 0fe10ca241a02a853f4882c9d68431b6957d384b
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Thu Jun 5 09:59:43 2008 +0100

    Implement getWatchpointMinLength() which returns the minimum size of a hardware watchpoint on that architecture.
    
    2008-06-05  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* WatchpointFunctions.java (getWatchpointMinLength): New.
    	* IA32WatchpointFunctions.java (IA32WatchpointFunctions): Set minimum size.
    	* X8664WatchpointFunctions.java (X8664WatchpointFunctions): Ditto.
    	* TestWatchpoint.java (testGetMaxWatchpointSize): New.
    	(testGetMinWatchpointSize): New.

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

Summary of changes:
 frysk-core/frysk/isa/watchpoints/ChangeLog         |    8 ++++++++
 .../isa/watchpoints/IA32WatchpointFunctions.java   |    1 +
 .../frysk/isa/watchpoints/TestWatchpoint.java      |   18 ++++++++++++++++++
 .../frysk/isa/watchpoints/WatchpointFunctions.java |   16 ++++++++++++++++
 .../isa/watchpoints/X8664WatchpointFunctions.java  |    1 +
 5 files changed, 44 insertions(+), 0 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/isa/watchpoints/ChangeLog b/frysk-core/frysk/isa/watchpoints/ChangeLog
index 93291a7..0dd75aa 100644
--- a/frysk-core/frysk/isa/watchpoints/ChangeLog
+++ b/frysk-core/frysk/isa/watchpoints/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-05  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* WatchpointFunctions.java (getWatchpointMinLength): New.	
+	* IA32WatchpointFunctions.java (IA32WatchpointFunctions): Set minimum size.
+	* X8664WatchpointFunctions.java (X8664WatchpointFunctions): Ditto.
+	* TestWatchpoint.java (testGetMaxWatchpointSize): New.
+	(testGetMinWatchpointSize): New.	
+
 2008-05-15  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* WatchpointFunctions.java (getWatchpointMaxLength): New.
diff --git a/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java b/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
index 8680b5d..e9d43ab 100644
--- a/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
+++ b/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
@@ -49,6 +49,7 @@ class IA32WatchpointFunctions extends WatchpointFunctions {
     public IA32WatchpointFunctions () {
 	noOfWatchpoints = 4;
 	watchpointMaxLength = 4;
+	watchpointMinLength = 1;
     }
 
     /**
diff --git a/frysk-core/frysk/isa/watchpoints/TestWatchpoint.java b/frysk-core/frysk/isa/watchpoints/TestWatchpoint.java
index 939e02b..d59d933 100644
--- a/frysk-core/frysk/isa/watchpoints/TestWatchpoint.java
+++ b/frysk-core/frysk/isa/watchpoints/TestWatchpoint.java
@@ -220,6 +220,24 @@ public class TestWatchpoint extends TestLib {
 
     }
 
+    public void testGetMinWatchpointSize () {
+	if (unresolvedOnPPC(5991)) 
+	    return;
+	Proc proc = giveMeABlockedProc();
+	Task task = proc.getMainTask();
+	WatchpointFunctions wp = WatchpointFunctionFactory.getWatchpointFunctions(task.getISA());
+	assertTrue("Minimum Watchpoint size > 0", wp.getWatchpointMinLength() > 0);	
+    }
+
+    public void testGetMaxWatchpointSize () {
+	if (unresolvedOnPPC(5991)) 
+	    return;
+	Proc proc = giveMeABlockedProc();
+	Task task = proc.getMainTask();
+	WatchpointFunctions wp = WatchpointFunctionFactory.getWatchpointFunctions(task.getISA());
+	assertTrue("Minimum Watchpoint size > 0", wp.getWatchpointMaxLength() > 0);	
+    }
+
     public void testGetAllWatchpoints () {
 	// Set maximum number of watchpoints, then test them
 	// via getAll.
diff --git a/frysk-core/frysk/isa/watchpoints/WatchpointFunctions.java b/frysk-core/frysk/isa/watchpoints/WatchpointFunctions.java
index 9abfb6f..994d0cb 100644
--- a/frysk-core/frysk/isa/watchpoints/WatchpointFunctions.java
+++ b/frysk-core/frysk/isa/watchpoints/WatchpointFunctions.java
@@ -54,6 +54,11 @@ public abstract class WatchpointFunctions  {
     // in a single hardware register
     protected int watchpointMaxLength = 0;
 
+    
+    // Mainimum length of a single watchpoint,
+    // in a single hardware register
+    protected int watchpointMinLength = 0;
+
    /**
     * Builds and sets a hardware watchpoint on a task.
     *
@@ -163,4 +168,15 @@ public abstract class WatchpointFunctions  {
     public final int getWatchpointMaxLength() {
 	return watchpointMaxLength;
     }
+    
+    /**
+     * Returns minimum length of a single watchpoint
+     * in a single hardware register
+     *
+     * @return int minimum length
+     */
+    public final int getWatchpointMinLength() {
+	return watchpointMaxLength;
+    }
+
 }
diff --git a/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java b/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
index 7524394..45e667a 100644
--- a/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
+++ b/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
@@ -49,6 +49,7 @@ class X8664WatchpointFunctions extends WatchpointFunctions {
     public X8664WatchpointFunctions () {
 	noOfWatchpoints = 4;
 	watchpointMaxLength = 8;
+	watchpointMinLength = 1;
     }
    
     /**


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


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

only message in thread, other threads:[~2008-06-05  8:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05  8:59 [SCM] master: Implement getWatchpointMinLength() which returns the minimum size of a hardware watchpoint on that architecture pmuldoon

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