Bug 4272

Summary: ArrayType iterator limited to Java's primitive types
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: ASSIGNED ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 3393    

Description Andrew Cagney 2007-03-23 21:03:02 UTC
The ArrayType contains the code:

	public Object next ()
	{
	    if (type.typeId == BaseTypes.baseTypeChar)
		return new Character((char)v.getByte(idx * type.getSize()));
	    else if (type.typeId == BaseTypes.baseTypeShort)
		return new Integer(v.getShort(idx * type.getSize()));
	    else if (type.typeId == BaseTypes.baseTypeInteger)

this doesn't work - as the "type" could be a pointer, or some other more
abstract type.

Instead the iteratore should use "ByteBuffer.slice" to slice the underlying
array of bytes and then create a Variable from that.
Comment 1 Stan Cox 2007-06-14 14:48:17 UTC
struct is now supported, need to add pointers.