VM Maker: Cog-eem.431.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: Cog-eem.431.mcz

commits-2
 
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.431.mcz

==================== Summary ====================

Name: Cog-eem.431
Author: eem
Time: 2 January 2021, 2:12:35.69088 pm
UUID: 8d16e5f1-d6b0-4302-b154-1f64d9b06e74
Ancestors: Cog-eem.430

Fix printing labels for every ibstructuion in a trampoline when disassembling an entire trampoline.

=============== Diff against Cog-eem.430 ===============

Item was changed:
  ----- Method: CogProcessorAlien>>disassembleFrom:to:in:for:labels:on: (in category 'disassembly') -----
  disassembleFrom: startAddress to: endAddress in: memory for: aSymbolManager "<Cogit>" labels: labelDictionary on: aStream
+ | address firstLabel |
- | address |
  address := startAddress.
+ (aSymbolManager labelForPC: address) ifNotNil:
+ [:label|
+ firstLabel := label copyUpThrough: Character space.
+ firstLabel last = Character space ifFalse:
+ [firstLabel := firstLabel, ' ']].
  [address <= endAddress] whileTrue:
  [[:sizeArg :stringArg| | size string |
   size := sizeArg.
   string := stringArg.
   (aSymbolManager labelForPC: address) ifNotNil:
+ [:label|
+ (firstLabel notNil and: [label beginsWith: firstLabel]) ifFalse:
+ [aStream nextPutAll: label; nextPut: $:; cr]].
- [:label| aStream nextPutAll: label; nextPut: $:; cr].
   (labelDictionary at: address ifAbsent: []) ifNotNil:
  [:label|
  (label ~~ #oneWordLiteral and: [label ~~ #twoWordLiteral]) ifTrue:
  [self printLabel: label on: aStream at: address for: aSymbolManager.
  label isArray ifTrue:
  [string := nil.
  size := label third]]].
   string ifNotNil:
  [aStream nextPutAll: (self decorateDisassembly: string for: aSymbolManager fromAddress: address labels: labelDictionary)].
   aStream cr; flush.
   address := address + size]
  valueWithArguments: (self
  primitiveDisassembleAt: address
  inMemory: memory)].
  (labelDictionary at: address ifAbsent: []) ifNotNil:
  [:label| self printLabel: label on: aStream at: address for: aSymbolManager]!