public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Print pointers correctly on a watch hit. Date: Thu, 17 Apr 2008 21:36:00 -0000 [thread overview] Message-ID: <20080417213653.10305.qmail@sourceware.org> (raw) The branch, master has been updated via 381a90e5676cd8616a0ea5a125771304946af16a (commit) from 8c7084e590bc33cd6f81bd0f0f62192a120ae004 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 381a90e5676cd8616a0ea5a125771304946af16a Author: Teresa Thomas <tthomas@redhat.com> Date: Thu Apr 17 17:34:19 2008 -0400 Print pointers correctly on a watch hit. frysk-core/frysk/hpd/ChangeLog: 2008-04-17 Teresa Thomas <tthomas@redhat.com> * WatchCommand.java (interpret): Pass task memory to toPrint. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 9 +++++++++ frysk-core/frysk/hpd/WatchCommand.java | 30 +++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 7a78133..c133bcc 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -8,6 +8,15 @@ 2008-04-17 Teresa Thomas <tthomas@redhat.com> + * WatchCommand.java (interpret): Pass task memory to toPrint(). + +2008-04-17 Teresa Thomas <tthomas@redhat.com> + + * WatchCommand.java (interpret): Add memory error + handling. + +2008-04-17 Teresa Thomas <tthomas@redhat.com> + * WatchCommand.java (WatchpointObserver.updateHit): Use SteppingEngine.blockedByActionPoint diff --git a/frysk-core/frysk/hpd/WatchCommand.java b/frysk-core/frysk/hpd/WatchCommand.java index 5a8170f..ad15faa 100644 --- a/frysk-core/frysk/hpd/WatchCommand.java +++ b/frysk-core/frysk/hpd/WatchCommand.java @@ -46,7 +46,7 @@ import frysk.expr.Expression; import frysk.proc.Action; import frysk.proc.Task; import frysk.proc.TaskObserver; -import frysk.value.Value; +import frysk.value.Format; class WatchCommand extends ParameterizedCommand { @@ -99,13 +99,16 @@ class WatchCommand extends ParameterizedCommand { // XXX: will fail for non-contiguos memory and registers // XXX: Add error handling long address = expr.getLocation().getAddress(); - + // XXX: getValue may modify inferior. - String oldValue = expr.getValue().toPrint(); - + String oldValueStr = expr.getValue().toPrint + (Format.NATURAL, task.getMemory()); + // Add a watch point observer to task. - WatchpointObserver wpo = new WatchpointObserver(expr, cli, expressionStr, oldValue); - task.requestAddWatchObserver(wpo, address, expr.getType().getSize(), writeOnly); + WatchpointObserver wpo = new WatchpointObserver + (expr, cli, expressionStr, oldValueStr); + task.requestAddWatchObserver + (wpo, address, expr.getType().getSize(), writeOnly); } } @@ -115,25 +118,26 @@ class WatchCommand extends ParameterizedCommand { Expression expr; CLI cli; String exprStr; - String oldValue; + String oldValueStr; - WatchpointObserver(Expression expr, CLI cli, String exprStr, String oldValue) { + WatchpointObserver(Expression expr, CLI cli, String exprStr, String oldValueStr) { this.expr = expr; this.cli = cli; this.exprStr = exprStr; - this.oldValue = oldValue; + this.oldValueStr = oldValueStr; } public Action updateHit(Task task, long address, int length) { - Value newValue = expr.getValue(); + String newValueStr = expr.getValue().toPrint + (Format.NATURAL, task.getMemory()); cli.outWriter.println("Watchpoint hit: " + exprStr); cli.outWriter.println(); - cli.outWriter.println(" Value before hit = " + oldValue); - cli.outWriter.println(" Value after hit = " + newValue.toPrint()); + cli.outWriter.println(" Value before hit = " + oldValueStr); + cli.outWriter.println(" Value after hit = " + newValueStr); cli.outWriter.println(); // Remember the previous value - oldValue = newValue.toPrint(); + oldValueStr = newValueStr; cli.getSteppingEngine().blockedByActionPoint(task, this); task.requestUnblock(this); hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-04-17 21:36 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=20080417213653.10305.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).