public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: tthomas@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Fixes bug #5405. Date: Mon, 26 Nov 2007 23:11:00 -0000 [thread overview] Message-ID: <20071126231119.10306.qmail@sourceware.org> (raw) The branch, master has been updated via 99e16d1871d3f7f834bdc8834b747591e01299a5 (commit) from ccddf5ed862aeea6996f3e6bfbfee5f1e3f229b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 99e16d1871d3f7f834bdc8834b747591e01299a5 Author: Teresa Thomas <tthomas@redhat.com> Date: Mon Nov 26 18:10:02 2007 -0500 Fixes bug #5405. 2007-11-26 Teresa Thomas <tthomas@redhat.com> * PointerType.java (toPrint): Return on null ptr. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/value/ChangeLog | 2 ++ frysk-core/frysk/value/PointerType.java | 6 +++++- 2 files changed, 7 insertions(+), 1 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/value/ChangeLog b/frysk-core/frysk/value/ChangeLog index 46a2743..151002a 100644 --- a/frysk-core/frysk/value/ChangeLog +++ b/frysk-core/frysk/value/ChangeLog @@ -1,5 +1,7 @@ 2007-11-26 Teresa Thomas <tthomas@redhat.com> + * PointerType.java (toPrint): Return on null ptr. + * PointerType.java (slice): New. * TestPointer.java (testCharPointerSlice): New test. diff --git a/frysk-core/frysk/value/PointerType.java b/frysk-core/frysk/value/PointerType.java index 6766a1e..9cd1e8b 100644 --- a/frysk-core/frysk/value/PointerType.java +++ b/frysk-core/frysk/value/PointerType.java @@ -82,6 +82,9 @@ public class PointerType if (type instanceof CharType) { // XXX: ByteBuffer.slice wants longs. long addr = getBigInteger(location).longValue(); + // Null pointer + if (addr == 0) + return; writer.print(" \""); while (true) { Location l = new ByteBufferLocation(memory, addr, @@ -143,12 +146,13 @@ public class PointerType // Evaluate length and offset of slice. long offset = v.asLong() + i.asLong()*type.getSize(); int len = (int)(j.asLong() - i.asLong() + 1)*type.getSize(); + // Create a simple memory location with it. Location loc = PieceLocation.createSimpleLoc (offset, len, taskMem); /* Determine return type. - * Note: Slicing can give one D or multi-D results + * Note: Slicing can give one-D or multi-D results * depending on the type of value being pointed to. */ hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-11-26 23:11 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=20071126231119.10306.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).