[Vm-dev] VM Maker: Cog-eem.311.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Dec 17 17:13:05 UTC 2015
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.311.mcz
==================== Summary ====================
Name: Cog-eem.311
Author: eem
Time: 17 December 2015, 9:12:51.591 am
UUID: 0e27e1e0-b2f9-4e89-9c6d-57da998c94fc
Ancestors: Cog-eem.310
Fix slip in relative address disassembly decoration.
=============== Diff against Cog-eem.310 ===============
Item was changed:
----- Method: BochsIA32Alien>>decorateDisassembly:for:fromAddress: (in category 'disassembly') -----
decorateDisassembly: anInstructionString for: aSymbolManager "<Cogit>" fromAddress: address
| string i1 i2 v |
string := anInstructionString.
aSymbolManager relativeBaseForDisassemblyInto:
[:baseAddress :baseName|
string := baseName, '+', (address - baseAddress printStringBase: 16 length: 4 padded: true), (string copyFrom: (string indexOf: $:) + 1 to: string size)].
- aSymbolManager relativeBaseForDisassemblyInto:
- [:baseAddress :baseName| | stream delta |
- stream := ReadStream on: string from: 1 to: string size.
- delta := (Integer readFrom: stream base: 16) - baseAddress.
- string := baseName, '+', (delta printStringBase: 16 length: 4 padded: true), (string copyFrom: stream position to: stream size)].
(i1 := string indexOfSubCollection: '%ds:0x') > 0 ifTrue:
[i2 := i1 + 6.
['0123456789abcdef' includes: (string at: i2)] whileTrue: [i2 := i2 + 1].
string := string
copyReplaceFrom: i1 + 4
to: i2 - 1
with: (aSymbolManager lookupCHexString: (string copyFrom: i1 + 4 to: i2 - 1))].
(i1 := string indexOfSubCollection: '%ss:0x') > 0 ifTrue:
[i2 := i1 + 6.
['0123456789abcdef' includes: (string at: i2)] whileTrue: [i2 := i2 + 1].
((string at: i2) = $(
and: [(string at: i2 + 1) = $%]) ifTrue:
[v := Integer readFrom: (ReadStream on: string from: i1 + 6 to: i2 - 1) base: 16.
string := string
copyReplaceFrom: i1
to: i2 - 1
with: ((v bitAnd: (1 bitShift: 31) - 1) - (v bitAnd: (1 bitShift: 31))) printString]].
(i1 := string indexOfSubCollection: '$0x') > 0 ifTrue:
[i2 := i1 + 3.
['0123456789abcdef' includes: (string at: i2)] whileTrue: [i2 := i2 + 1].
string := string
copyReplaceFrom: i1 + 1
to: i2 - 1
with: (aSymbolManager lookupCHexString: (string copyFrom: i1 + 1 to: i2 - 1))].
((i1 := string indexOf: $() > 1
and: [(string at: i1 + 1) isDigit
and: [i1 < (i2 := string indexOf: $))]]) ifTrue:
[string := string
copyReplaceFrom: i1 + 1
to: i2 - 1
with: (aSymbolManager lookupCHexString: (string copyFrom: i1 + 1 to: i2 - 1))].
^string!
More information about the Vm-dev
mailing list