public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Maintain previous value of watched variable statically. Date: Wed, 28 May 2008 18:57:00 -0000 [thread overview] Message-ID: <20080528185730.20627.qmail@sourceware.org> (raw) The branch, master has been updated via 3a848ec1396198a762420c60d340cf0cf77b2b11 (commit) from 96c93548e77eb436d7128ed95277832242e9f092 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 3a848ec1396198a762420c60d340cf0cf77b2b11 Author: Teresa Thomas <tthomas@redhat.com> Date: Wed May 28 14:59:16 2008 -0400 Maintain previous value of watched variable statically. frysk-core/frysk/rt/ChangeLog: 2008-05-28 Teresa Thomas <tthomas@redhat.com> * WatchObserverInstaller.java (oldValue): Make static. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/rt/ChangeLog | 4 +++- frysk-core/frysk/rt/WatchObserverInstaller.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/rt/ChangeLog b/frysk-core/frysk/rt/ChangeLog index 0f9b8a9..abf6639 100644 --- a/frysk-core/frysk/rt/ChangeLog +++ b/frysk-core/frysk/rt/ChangeLog @@ -1,7 +1,9 @@ 2008-05-28 Teresa Thomas <tthomas@redhat.com> + * WatchObserverInstaller.java (oldValue): Make static. + * WatchObserverInstaller.java: New file. - + 2008-05-15 Sami Wagiaalla <swagiaal@redhat.com> * FunctionBreakpoint.java: Added comment. diff --git a/frysk-core/frysk/rt/WatchObserverInstaller.java b/frysk-core/frysk/rt/WatchObserverInstaller.java index d90bcda..885f43c 100644 --- a/frysk-core/frysk/rt/WatchObserverInstaller.java +++ b/frysk-core/frysk/rt/WatchObserverInstaller.java @@ -61,6 +61,11 @@ public class WatchObserverInstaller { private static int watchpointsInUse = 0; + // Maintain oldValue statically so that changes made to a + // a value being watched by multiple watchpoints are + // are reflected in all watch observers. + private static String oldValue = ""; + Expression expr; String exprString; SteppingEngine ste; @@ -74,7 +79,7 @@ public class WatchObserverInstaller { * @param exprString Text string of expression */ public WatchObserverInstaller(Expression expr, SteppingEngine ste, - PrintWriter writer, String exprString) { + PrintWriter writer, String exprString) { this.expr = expr; this.ste = ste; this.writer = writer; @@ -132,7 +137,6 @@ public class WatchObserverInstaller { String exprString; SteppingEngine ste; PrintWriter writer; - String oldValue; Task task; WatchpointObserver(Expression expr, String exprStr, Task task, @@ -142,9 +146,8 @@ public class WatchObserverInstaller { this.ste = ste; this.writer = writer; this.task = task; - this.oldValue = ""; - } + public Action updateHit(Task task, long address, int length) { String newValue = expr.getValue().toPrint @@ -170,7 +173,7 @@ public class WatchObserverInstaller { 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-28 18:57 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=20080528185730.20627.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: linkBe 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).