public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: tthomas@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Merge branch 'master' of ssh://sourceware.org/git/frysk
Date: Thu, 29 May 2008 15:51:00 -0000	[thread overview]
Message-ID: <20080529155111.26553.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  b13abf2affd8f6f2011c4359e7df9956b96e7f3c (commit)
       via  4bae1f3d3f5fb5de4544c7aed24f683c26d9a5f6 (commit)
      from  8078d5459fa06dc2a04983d077d03412baf24d55 (commit)

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

- Log -----------------------------------------------------------------
commit b13abf2affd8f6f2011c4359e7df9956b96e7f3c
Merge: 4bae1f3d3f5fb5de4544c7aed24f683c26d9a5f6 8078d5459fa06dc2a04983d077d03412baf24d55
Author: Teresa Thomas <tthomas@redhat.com>
Date:   Thu May 29 11:53:16 2008 -0400

    Merge branch 'master' of ssh://sourceware.org/git/frysk

commit 4bae1f3d3f5fb5de4544c7aed24f683c26d9a5f6
Author: Teresa Thomas <tthomas@redhat.com>
Date:   Thu May 29 11:37:53 2008 -0400

    Display watchpoint set message only once when using multiple observers.
    
    frysk-core/frysk/rt/ChangeLog:
    2008-05-29  Teresa Thomas  <tthomas@redhat.com>
    
    	* WatchObserverInstaller.java (WatchpointObserver.addedTo):
    	Display set message only for first observer.
    
    frysk-core/frysk/hpd/ChangeLog:
    2008-05-29  Teresa Thomas  <tthomas@redhat.com>
    
    	* TestWatchCommand.java (testWatchpointSetMessage): New.

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog                  |   10 +++++--
 frysk-core/frysk/hpd/TestWatchCommand.java      |   20 +++++++++++++++
 frysk-core/frysk/rt/ChangeLog                   |    5 ++++
 frysk-core/frysk/rt/WatchObserverInstaller.java |   29 +++++++++++++++++-----
 4 files changed, 54 insertions(+), 10 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 200c141..5f65fca 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-29  Teresa Thomas  <tthomas@redhat.com>
+
+	* TestWatchCommand.java (testWatchpointSetMessage): New.	
+
 2008-05-29  Rick Moseley  <rmoseley@redhat.com>
 
 	* CLI.java: Clean up by removing unnecessary methods;
@@ -12,11 +16,11 @@
 	* TestDisplayCommand.java: Fix message testing.
 	* TestFhpdStepping.java: Ditto.
 
-2008-05-28 Teresa Thomas  <tthomas@redhat.com>
+2008-05-28  Teresa Thomas  <tthomas@redhat.com>
 
 	* WatchCommand.java (interpret): Use rt.WatchObserverInstaller.
 
-2008-05-26 Teresa Thomas  <tthomas@redhat.com>
+2008-05-26  Teresa Thomas  <tthomas@redhat.com>
 
 	* WatchCommand.java (watchpointsInUse): New
 	(WatchpointObserver.addedTo): Increment watchpointsInUse.
@@ -25,7 +29,7 @@
 
 	* TestWatchCommand.java (testBadWatch): New.
 
-2008-05-23 Teresa Thomas  <tthomas@redhat.com>
+2008-05-23  Teresa Thomas  <tthomas@redhat.com>
 
 	* WatchCommand.java (interpret): Install multiple
 	watchobservers if necessary.
diff --git a/frysk-core/frysk/hpd/TestWatchCommand.java b/frysk-core/frysk/hpd/TestWatchCommand.java
index f7748fb..dbacbb4 100644
--- a/frysk-core/frysk/hpd/TestWatchCommand.java
+++ b/frysk-core/frysk/hpd/TestWatchCommand.java
@@ -120,6 +120,26 @@ public class TestWatchCommand extends TestLib {
       e.close();
   }  
   
+  public void testWatchpointSetMessage()
+  {
+      e = new HpdTestbed();
+      e.sendCommandExpectPrompt("load " + Prefix.pkgLibFile("funit-ctypes").getPath(),
+                                "Loaded executable file.*");
+      e.sendCommandExpectPrompt("start", "Attached to process.*");
+      
+      // Should show set message only once even 
+      // when multiple debug registers required.
+      e.send("watch long_long\n"); 
+      e.expect("Watchpoint set: long_long.*");
+            
+      e.send("watch char_\n"); 
+      e.expect("Watchpoint set: char_.*");
+
+      e.send("quit\n");
+      e.expect("Quitting\\.\\.\\.");
+      e.close();
+  }   
+  
   /*
    * Test to watch a data type whose size is larger than
    * that can be watched by all hardware watch registers
diff --git a/frysk-core/frysk/rt/ChangeLog b/frysk-core/frysk/rt/ChangeLog
index 82cf8e7..1651511 100644
--- a/frysk-core/frysk/rt/ChangeLog
+++ b/frysk-core/frysk/rt/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-29  Teresa Thomas  <tthomas@redhat.com>
+
+	* WatchObserverInstaller.java (WatchpointObserver.addedTo):
+	Display set message only for first observer. 
+
 2008-05-28  Teresa Thomas  <tthomas@redhat.com>
 
 	* WatchObserverInstaller.java (WatchpointObserver):
diff --git a/frysk-core/frysk/rt/WatchObserverInstaller.java b/frysk-core/frysk/rt/WatchObserverInstaller.java
index 3d0bfd6..df0034d 100644
--- a/frysk-core/frysk/rt/WatchObserverInstaller.java
+++ b/frysk-core/frysk/rt/WatchObserverInstaller.java
@@ -102,18 +102,21 @@ public class WatchObserverInstaller {
 	// to completely watch the variable.
 	int numberOfObservers = (int)Math.ceil((double)variableLength/
 	                           	       (double)maxWatchLength);
+	int observerNumber = 1;
 	
 	// Add watchpoint observers to task. 
 	for (int i=0; i< numberOfObservers-1; i++) {
 	    WatchpointObserver wpo = new WatchpointObserver
-	                               (expr, exprString, task, ste, writer);    
+	                               (expr, exprString, task, ste, writer, 
+	                        	observerNumber++, numberOfObservers);    
 	    task.requestAddWatchObserver
 	         (wpo, variableAddress + i*maxWatchLength, 
 	          maxWatchLength, writeOnly);
-	}	
+	}
 	// Last observer may not need to watch all watchLength bytes. 
 	WatchpointObserver wpo = new WatchpointObserver
-	                           (expr, exprString, task, ste, writer); 
+	                           (expr, exprString, task, ste, writer, 
+	                            observerNumber++, numberOfObservers); 
 	task.requestAddWatchObserver
 	       (wpo, variableAddress + (numberOfObservers-1)*maxWatchLength, 
 		variableLength-(numberOfObservers-1)*maxWatchLength, writeOnly);
@@ -134,17 +137,22 @@ public class WatchObserverInstaller {
 	PrintWriter writer;
 	String oldValue;
 	Task task;
+	int observerNumber;
+	int numberOfObservers;
 	
 	WatchpointObserver(Expression expr, String exprStr, Task task,
-		           SteppingEngine ste, PrintWriter writer) {
+		           SteppingEngine ste, PrintWriter writer,
+		           int observerNumber, int numberOfObservers) {
 	    this.expr = expr;
 	    this.exprString = exprStr;
 	    this.ste = ste;
 	    this.writer = writer;
 	    this.task = task;
 	    this.oldValue = "";
-
+	    this.observerNumber = observerNumber;
+	    this.numberOfObservers = numberOfObservers;
 	}
+	
 	public Action updateHit(Task task, long address, int length) {
 
 	    String newValue = expr.getValue().toPrint
@@ -166,11 +174,18 @@ public class WatchObserverInstaller {
 	}
 
 	public void addedTo(Object observable) {
-	    writer.println("Watchpoint set: " + exprString); 
+	    
+	    // Display set message only for first 
+	    // observer of an expression
+	    if (observerNumber == 1) {
+		writer.print("Watchpoint set: " + exprString); 
+		writer.println(" (Uses "+ numberOfObservers + " debug register(s))");	
+	    }
+	    
 	    watchpointsInUse++;
 	    // XXX: getValue may modify inferior.
 	    oldValue = expr.getValue().toPrint
-	                      (Format.NATURAL, task.getMemory());	    
+	                 (Format.NATURAL, task.getMemory());	    
 	}
 
 	public void deletedFrom(Object observable) {


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


             reply	other threads:[~2008-05-29 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 15:51 tthomas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-05-07 15:23 tthomas
2008-04-19  0:32 scox
2007-11-27  2:15 pzhao
2007-11-20 17:23 cagney
2007-11-08 20:57 cagney

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=20080529155111.26553.qmail@sourceware.org \
    --to=tthomas@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).