[SCM] master: Fixes bug #5405.

tthomas@sourceware.org tthomas@sourceware.org
Mon Nov 26 23:11:00 GMT 2007


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



More information about the Frysk-cvs mailing list