plugins/bee/BeeSymbol.st
changeset 165 1e2a4cb4afdd
parent 160 fea681d31a3c
child 167 16cd2d937309
--- a/plugins/bee/BeeSymbol.st	Mon Jun 10 14:36:46 2019 +0100
+++ b/plugins/bee/BeeSymbol.st	Mon Jun 10 14:59:26 2019 +0100
@@ -2,7 +2,7 @@
 
 "{ NameSpace: Smalltalk }"
 
-GDBObject subclass:#BeeSymbol
+GDBDebuggerObject subclass:#BeeSymbol
 	instanceVariableNames:'name addr size'
 	classVariableNames:''
 	poolDictionaries:''
@@ -31,6 +31,20 @@
     addr := something.
 !
 
+disassemble
+    | result disassembly arch |
+
+    result := debugger send: (GDBMI_data_disassemble arguments: (Array with: '-s' with: addr with: '-e' with: addr + size with: '--' with: 5)).
+
+    disassembly := result propertyAt: 'asm_insns'.
+    arch := GDBArchitecture named: 'i386:x86-64'.    
+    disassembly do:[:each | each setDebugger: debugger; setArchitecture: arch ].
+    ^ disassembly
+
+    "Created: / 10-06-2019 / 10:30:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 10-06-2019 / 11:34:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 name
     ^ name
 !