public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: pmuldoon@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Implement getWatchpointMinLength() which returns the minimum size of a hardware watchpoint on that architecture.
Date: Thu, 05 Jun 2008 08:59:00 -0000	[thread overview]
Message-ID: <20080605085954.31093.qmail@sourceware.org> (raw)

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


                 reply	other threads:[~2008-06-05  8:59 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=20080605085954.31093.qmail@sourceware.org \
    --to=pmuldoon@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).