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 hasWatchpointTriggered in abstract, and sub-classes.
Date: Tue, 01 Apr 2008 20:49:00 -0000	[thread overview]
Message-ID: <20080401204912.27374.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  a0fc4305e0afa24959ac5cd073f65c6bb50eb8b0 (commit)
      from  b927d6c13dcc27d155895895fcb958b4c32fb595 (commit)

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

- Log -----------------------------------------------------------------
commit a0fc4305e0afa24959ac5cd073f65c6bb50eb8b0
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Tue Apr 1 21:48:19 2008 +0100

    Implement hasWatchpointTriggered in abstract, and sub-classes.
    
    2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* Watchpoint.java (hasWatchpointTriggered): Define.
    	* IA32Watchpoint.java (hasWatchpointTriggered): Implement.
    	* X8664Watchpoint.java (hasWatchpointTriggered): Ditto.

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

Summary of changes:
 frysk-core/frysk/isa/watchpoints/ChangeLog         |    6 ++++++
 .../frysk/isa/watchpoints/IA32Watchpoint.java      |   13 ++++++++++++-
 frysk-core/frysk/isa/watchpoints/Watchpoint.java   |   10 ++++++++++
 .../frysk/isa/watchpoints/X8664Watchpoint.java     |   12 ++++++++++++
 4 files changed, 40 insertions(+), 1 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/isa/watchpoints/ChangeLog b/frysk-core/frysk/isa/watchpoints/ChangeLog
index 0e4f56f..f53652b 100644
--- a/frysk-core/frysk/isa/watchpoints/ChangeLog
+++ b/frysk-core/frysk/isa/watchpoints/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-01  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* Watchpoint.java (hasWatchpointTriggered): Define.
+	* IA32Watchpoint.java (hasWatchpointTriggered): Implement.
+	* X8664Watchpoint.java (hasWatchpointTriggered): Ditto.
+
 2008-03-28  Phil Muldoon <pmuldoon@redhat.com>
 
 	* Watchpoint.java: New. Initial Implementation.
diff --git a/frysk-core/frysk/isa/watchpoints/IA32Watchpoint.java b/frysk-core/frysk/isa/watchpoints/IA32Watchpoint.java
index 3627d03..5f97636 100644
--- a/frysk-core/frysk/isa/watchpoints/IA32Watchpoint.java
+++ b/frysk-core/frysk/isa/watchpoints/IA32Watchpoint.java
@@ -197,7 +197,18 @@ class IA32Watchpoint extends Watchpoint {
 	    task.setRegister(IA32Registers.DEBUG_CONTROL, debugControl);
     }
 
-    
+    /**
+     * Reads the Debug Status Register and checks if 
+     * the breakpoint specified has fired.
+     *
+     * @param task - task to read the debug control
+     * register from.
+     */
+    public boolean hasWatchpointTriggered(Task task, int index) {
+	long debugStatus = task.getRegister(IA32Registers.DEBUG_STATUS);	
+	return (debugStatus & (1L << index)) != 0;
+    }
+
 
     /**
      * Reads the Debug control register.
diff --git a/frysk-core/frysk/isa/watchpoints/Watchpoint.java b/frysk-core/frysk/isa/watchpoints/Watchpoint.java
index fc8c234..a0ef202 100644
--- a/frysk-core/frysk/isa/watchpoints/Watchpoint.java
+++ b/frysk-core/frysk/isa/watchpoints/Watchpoint.java
@@ -94,6 +94,16 @@ public abstract class Watchpoint  {
      */
     public abstract long readControlRegister(Task task);
 
+    
+    /**
+     * Reads the Debug Status Register and checks if 
+     * the breakpoint specified has fired.
+     *
+     * @param task - task to read the debug control
+     * register from.
+     */
+    public abstract boolean hasWatchpointTriggered(Task task, int index);
+
     /**
      * Returns number of watchpoints for this architecture
      *
diff --git a/frysk-core/frysk/isa/watchpoints/X8664Watchpoint.java b/frysk-core/frysk/isa/watchpoints/X8664Watchpoint.java
index c581f92..1df98a5 100644
--- a/frysk-core/frysk/isa/watchpoints/X8664Watchpoint.java
+++ b/frysk-core/frysk/isa/watchpoints/X8664Watchpoint.java
@@ -205,5 +205,17 @@ class X8664Watchpoint extends Watchpoint {
 	return task.getRegister(X8664Registers.DEBUG_CONTROL);
     }
 
+    /**
+     * Reads the Debug Status Register and checks if 
+     * the breakpoint specified has fired.
+     *
+     * @param task - task to read the debug control
+     * register from.
+     */
+    public boolean hasWatchpointTriggered(Task task, int index) {
+	long debugStatus = task.getRegister(X8664Registers.DEBUG_STATUS);
+	return (debugStatus & (1L << index)) != 0;
+    }
+
 
 }


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


                 reply	other threads:[~2008-04-01 20:49 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=20080401204912.27374.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).