diff options
author | Aaron Patterson <[email protected]> | 2020-09-16 17:02:23 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2020-09-22 13:40:57 -0700 |
commit | 3d474e19fdd51b2731c2a77386877cceb8d4e241 () | |
tree | 5d5f4f8fc0bf24b2aa8236b35de44b0878719fbc /misc/lldb_disasm.py | |
parent | 179384a66862d5ef7413b6f4850b97d0becf4ec9 (diff) |
Rudimentary support for disassembling rb_iseq_t
I need to disassemble instruction sequences while debugging, so I wrote this. Usage is like this: ``` (lldb) p iseq (rb_iseq_t *) $147 = 0x0000000101068400 (lldb) rbdisasm iseq 0000 putspecialobject( 3 ) 0002 putnil 0003 defineclass( ID: 0x560b, (rb_iseq_t *)0x1010681d0, 2 ) 0007 pop 0008 putspecialobject( 3 ) 0010 putnil 0011 defineclass( ID: 0x56eb, (rb_iseq_t *)0x101063b58, 2 ) 0015 leave ``` Also thanks a ton to @kivikakk helping me figure out how to navigate LLDB's Python 😆
Notes: Merged: https://.com/ruby/ruby/pull/3554
-rw-r--r-- | misc/lldb_disasm.py | 197 |
1 files changed, 197 insertions, 0 deletions
@@ -0,0 +1,197 @@ |