[Vm-dev] help: VMMaker patch

K K Subbu kksubbu.ml at gmail.com
Tue May 12 17:33:43 UTC 2020


Hi,

ImageFileHeader does not position the stream at the given imageOffset 
before reading the header. The header may also be present 512 bytes into 
the file. Attached changeset fixes this gap and also preserves 
littleEndian flag in an instance variable.

I tested the fix by inspecting:
----
#('hdr6502-0be.image' 'hdr6502-0le.image'
'hdr6502-512be.image' 'hdr6502-512le.image'
'hdr6504-0be.image' 'hdr6504-0le.image'
'hdr6504-512be.image' 'hdr6504-512le.image'
'hdr6505-0be.image' 'hdr6505-0le.image'
'hdr6505-512be.image' 'hdr6505-512le.image'
'hdr68002-0be.image' 'hdr68002-0le.image'
'hdr68002-512be.image' 'hdr68002-512le.image'
'Squeak6.0alpha-19603-64bit.image') collect: [:image || f |
     f := FileStream readOnlyFileNamed: image.
     ([f binary. ImageFileHeader readFrom: f ] ensure: [ f close ])
]
----

Regards .. Subbu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sim.2.cs
Type: text/x-csharp
Size: 2169 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200512/536f49f2/attachment-0001.bin>


More information about the Vm-dev mailing list