public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fix length set bit issues, and length set reading issues.
@ 2008-04-04 20:46 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2008-04-04 20:46 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  05a55f67efefeea21a1a7fe679a82800da5816e7 (commit)
      from  29f47275f3883d5fccd3068eabd29f76395641fb (commit)

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

- Log -----------------------------------------------------------------
commit 05a55f67efefeea21a1a7fe679a82800da5816e7
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Fri Apr 4 21:45:52 2008 +0100

    Fix length set bit issues, and length set reading issues.
    
    2008-04-04  Phil Muldoon  <pmuldoon@redhat.com>
    
            * X8664WatchpointFunctions.java (setWatchpoint): Set 2 byte watch to
            binary flags: 01, not 10. Set 8 bytes watch binary flag to 10, not 01.
            (readWatchpoint): Fix bit settings to detect above on read.
            * IA32WatchpointFunctions.java (setWatchpoint): Set 2 byte watch to
            binary flag 01, not 10. Delete 8 byte case, not relevant in IA32.

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

Summary of changes:
 frysk-core/frysk/isa/watchpoints/ChangeLog         |    6 +++++
 .../isa/watchpoints/IA32WatchpointFunctions.java   |   22 +++++++++----------
 .../isa/watchpoints/X8664WatchpointFunctions.java  |   16 +++++++-------
 3 files changed, 24 insertions(+), 20 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/isa/watchpoints/ChangeLog b/frysk-core/frysk/isa/watchpoints/ChangeLog
index 4d0e585..4c408b4 100644
--- a/frysk-core/frysk/isa/watchpoints/ChangeLog
+++ b/frysk-core/frysk/isa/watchpoints/ChangeLog
@@ -1,5 +1,11 @@
 2008-04-04  Phil Muldoon  <pmuldoon@redhat.com>
 
+	* X8664WatchpointFunctions.java (setWatchpoint): Set 2 byte watch to
+	binary flags: 01, not 10. Set 8 bytes watch binary flag to 10, not 01.
+	(readWatchpoint): Fix bit settings to detect above on read.
+	* IA32WatchpointFunctions.java (setWatchpoint): Set 2 byte watch to
+	binary flag 01, not 10. Delete 8 byte case, not relevant in IA32.
+	 
 	* TestWatchpoint.java (testWatchpointTrigger): New.
 	(WatchpointObserver): New.
 	(TerminatedObserver): New.
diff --git a/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java b/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
index e7cc0a8..c8964db 100644
--- a/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
+++ b/frysk-core/frysk/isa/watchpoints/IA32WatchpointFunctions.java
@@ -119,17 +119,13 @@ class IA32WatchpointFunctions extends WatchpointFunctions {
 		debugControl &= ~(1L << length+1);
 		break;
 	    case 2:
-		debugControl &= ~(1L << length);
-		debugControl |= (1L << length+1);
+		debugControl |= (1L << length);
+		debugControl &= ~(1L << length+1);
 		break;
 	    case 4:
 		debugControl |=(1L << length);
 		debugControl |= (1L << length+1);
 		break;
-	    case 8:
-		debugControl |= (1L << length);
-		debugControl &= ~(1L << length+1);
-		break;
 	    }
 
 	    task.setRegister(IA32Registers.DEBUG_CONTROL, debugControl);
@@ -174,14 +170,16 @@ class IA32WatchpointFunctions extends WatchpointFunctions {
 
         // Test length on combination of bits. 00 = 1, 01 = 2
         // 11 = 4.
-        if (!testBit(debugStatus,lengthOfWP)) 
+        if (!testBit(debugStatus,lengthOfWP)) {
             if (!testBit(debugStatus,lengthOfWP+1))
-        	length = 1;
+                length = 1;
+        } else {
+            if (!testBit(debugStatus,lengthOfWP+1))
+                length = 2;
             else
-        	length = 2;
-        else
-            if (testBit(debugStatus, lengthOfWP))
-        	length = 4;
+                length = 4;
+        }
+
 	return Watchpoint.create(address, length, index, writeOnly);
     }	
 
diff --git a/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java b/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
index 5b9aa03..b227be6 100644
--- a/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
+++ b/frysk-core/frysk/isa/watchpoints/X8664WatchpointFunctions.java
@@ -116,16 +116,16 @@ class X8664WatchpointFunctions extends WatchpointFunctions {
 		debugControl &= ~(1L << length+1);
 		break;
 	    case 2:
-		debugControl &= ~(1L << length);
-		debugControl |= (1L << length+1);
+		debugControl |= (1L << length);
+		debugControl &= ~(1L << length+1);
 		break;
 	    case 4:
 		debugControl |=(1L << length);
 		debugControl |= (1L << length+1);
 		break;
 	    case 8:
-		debugControl |= (1L << length);
-		debugControl &= ~(1L << length+1);
+		debugControl &= ~(1L << length);
+		debugControl |= (1L << length+1);
 		break;
 	    }
 
@@ -167,17 +167,17 @@ class X8664WatchpointFunctions extends WatchpointFunctions {
 	// Move over +2 bits for length
         int lengthOfWP = typeOfWpTrap + 2;
         int length = 0;
-
+        
         // Test length on combination of bits. 00 = 1 bytes, 01 = 2
         // 11 = 4 and 10 = 8
         if (!testBit(debugStatus,lengthOfWP)) 
             if (!testBit(debugStatus,lengthOfWP+1))
         	length = 1;
             else
-        	length = 2;
-        else
-            if (!testBit(debugStatus, lengthOfWP))
         	length = 8;
+        else
+            if (!testBit(debugStatus, lengthOfWP+1))
+        	length = 2;
             else
         	length = 4;
 	return Watchpoint.create(address, length, index, writeOnly);


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


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

only message in thread, other threads:[~2008-04-04 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-04 20:46 [SCM] master: Fix length set bit issues, and length set reading issues 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).