Skip to content

Commit

Permalink
Implementing all the instruction of getActiveContext
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Jul 17, 2020
1 parent b10ddb6 commit a6e6b50
Show file tree
Hide file tree
Showing 14 changed files with 853 additions and 238 deletions.
8 changes: 7 additions & 1 deletion smalltalksrc/VMMaker-Tools/VMMachineCodeDebugger.class.st
Expand Up @@ -47,6 +47,10 @@ VMMachineCodeDebugger >> connectPresenters [
item
name: 'Set Intruction Pointer Here';
action: [ self setInstructionPointerToSelectedInstruction ] ].
instructionsContextMenu addItem: [ :item |
item
name: 'Inspect';
action: [ instructions selection selectedItem inspect ] ].
instructions contextMenu: instructionsContextMenu
]

Expand All @@ -55,7 +59,7 @@ VMMachineCodeDebugger >> initialDisassembly [

^ machineSimulator disassembler
printImmediatesInHexa;
disassembleNext: 100
disassembleNext: 150
instructionsIn: (cogit objectMemory memory memoryObject
copyFrom: self initialInstructionToDisassemble - cogit objectMemory memory initialAddress + 1
to: cogit objectMemory memory memoryObject size)
Expand All @@ -82,6 +86,7 @@ VMMachineCodeDebugger >> initializePresenters [
machineState := self newTable.
machineState
addColumn: (SpStringTableColumn evaluated: #name);
addColumn: (SpStringTableColumn evaluated: #alias);
addColumn: (SpStringTableColumn evaluated: [ :register | register printString ]).

instructions := self newTable.
Expand All @@ -98,6 +103,7 @@ VMMachineCodeDebugger >> initializePresenters [

stack := self newTable.
stack
addColumn: (SpStringTableColumn evaluated: [ :aPosition | aPosition specialRegister ] );
addColumn: (SpStringTableColumn evaluated: [ :aPosition | aPosition address hex ] );
addColumn: (SpStringTableColumn evaluated: [ :aPosition | aPosition value hex ]).

Expand Down
Expand Up @@ -32,6 +32,14 @@ VMMachineCodeDebuggerStackItem >> machineSimulator: anUnicornARMv8Simulator [
machineSimulator := anUnicornARMv8Simulator
]

{ #category : #evaluating }
VMMachineCodeDebuggerStackItem >> specialRegister [

machineSimulator sp = address ifTrue: [ ^ 'SP' ].
machineSimulator fp = address ifTrue: [ ^ 'FP' ].
^ ''
]

{ #category : #evaluating }
VMMachineCodeDebuggerStackItem >> value [

Expand Down

0 comments on commit a6e6b50

Please sign in to comment.