public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Move type printing for ptrs from EvalCommands.java to PointerType.java Date: Tue, 27 Nov 2007 20:08:00 -0000 [thread overview] Message-ID: <20071127200844.26209.qmail@sourceware.org> (raw) The branch, master has been updated via 1dca1ef2a1df6c2b88e4e4279e051041d806096d (commit) from e2e6135d1b8db0d4b46a2e6901bbb4cd1139fea3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1dca1ef2a1df6c2b88e4e4279e051041d806096d Author: Teresa Thomas <tthomas@redhat.com> Date: Tue Nov 27 15:02:27 2007 -0500 Move type printing for ptrs from EvalCommands.java to PointerType.java frysk-core/frysk/value/ChangeLog 2007-11-27 Teresa Thomas <tthomas@redhat.com> * PointerType.java (toPrint): Add type printing. * TestPointer.java (testCharPointer): Update. frysk-core/frysk/hpd/ChangeLog 2007-11-27 Teresa Thomas <tthomas@redhat.com> * EvalCommands.java (Printer..print): Remove type printing for pointers. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 7 ++++++- frysk-core/frysk/hpd/EvalCommands.java | 9 --------- frysk-core/frysk/value/ChangeLog | 5 +++++ frysk-core/frysk/value/PointerType.java | 4 ++++ frysk-core/frysk/value/TestPointer.java | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 6386fb4..79e9b2b 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,10 +1,15 @@ +2007-11-27 Teresa Thomas <tthomas@redhat.com> + + * EvalCommands.java (Printer..print): Remove type printing + for pointers. + 2007-11-27 Tim Moore <timoore@redhat.com> * CLI.java (doAttach): Wrap await call inside loop in order to disregard InterruptedException. * QuitCommand.java (interpret): ditto * RunCommand.java (run): ditto - + 2007-11-22 Rick Moseley <rmoseley@redhat.com> * TestPeekCommand.java: Fix bz #5396; added test for when diff --git a/frysk-core/frysk/hpd/EvalCommands.java b/frysk-core/frysk/hpd/EvalCommands.java index b63e3bf..d318040 100644 --- a/frysk-core/frysk/hpd/EvalCommands.java +++ b/frysk-core/frysk/hpd/EvalCommands.java @@ -43,8 +43,6 @@ import inua.eio.ByteBuffer; import frysk.value.Format; import java.util.Iterator; import frysk.proc.Task; -import frysk.value.PointerType; -import frysk.value.Type; import java.util.List; import frysk.expr.Expression; import java.io.PrintWriter; @@ -59,13 +57,6 @@ abstract class EvalCommands extends ParameterizedCommand { static final Printer VALUE = new Printer() { void print(Expression e, PrintWriter writer, Format format, ByteBuffer memory) { - // XXX: Should be in type? - Type t = e.getType(); - if (t instanceof PointerType) { - writer.print("("); - t.toPrint(writer, 0); - writer.print(") "); - } e.getValue().toPrint(writer, memory, format, 0); writer.println(); } diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog index 151002a..aac4a06 100644 --- a/frysk-core/frysk/value/ChangeLog +++ b/frysk-core/frysk/value/ChangeLog @@ -1,3 +1,8 @@ +2007-11-27 Teresa Thomas <tthomas@redhat.com> + + * PointerType.java (toPrint): Add type printing. + * TestPointer.java (testCharPointer): Update. + 2007-11-26 Teresa Thomas <tthomas@redhat.com> * PointerType.java (toPrint): Return on null ptr. diff --git a/frysk-core/frysk/value/PointerType.java b/frysk-core/frysk/value/PointerType.java index 9cd1e8b..43e5d97 100644 --- a/frysk-core/frysk/value/PointerType.java +++ b/frysk-core/frysk/value/PointerType.java @@ -78,6 +78,10 @@ public class PointerType void toPrint(PrintWriter writer, Location location, ByteBuffer memory, Format format, int indent) { + // Print type of pointer + writer.print("("); + this.toPrint(writer, 0); + writer.print(") "); format.print(writer, location, this); if (type instanceof CharType) { // XXX: ByteBuffer.slice wants longs. diff --git a/frysk-core/frysk/value/TestPointer.java b/frysk-core/frysk/value/TestPointer.java index 5e266a5..062b17f 100644 --- a/frysk-core/frysk/value/TestPointer.java +++ b/frysk-core/frysk/value/TestPointer.java @@ -58,7 +58,7 @@ public class TestPointer 1, true)); // Construct the pointer and try it. Location l = new ScratchLocation(new byte[] { 4 }); - assertEquals("toPrint", "0x4 \"Hello World\"", + assertEquals("toPrint", "(char *) 0x4 \"Hello World\"", t.toPrint(l, memory, Format.NATURAL)); } hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-11-27 20:08 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=20071127200844.26209.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).