diff options
author | Matt Valentine-House <[email protected]> | 2022-06-15 14:06:36 +0100 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-06-15 10:59:29 -0700 |
commit | acee714ce0b6af0375be5d38293010a688b617e6 () | |
tree | a48fa668440de2e572cc60c39228f2c6ce4b000f /misc/lldb_cruby.py | |
parent | a327ce8b07e8778b838a5b82939bea9409cfa9f5 (diff) |
[ci skip] Print the rb_classext_t for a class, using an offset
Now that classes are using VWA, the RCLASS_PTR uses an offset to get the rb_classext_t object. Doing this all the time in lldb is boring. So script lldb to do it for us
Notes: Merged: https://.com/ruby/ruby/pull/6024
-rwxr-xr-x | misc/lldb_cruby.py | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -716,6 +716,24 @@ def rb_id2str(debugger, command, result, internal_dict): id_str = rb_ary_entry(target, ary, pos, result) lldb_inspect(debugger, target, result, id_str) def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand("command script add -f lldb_cruby.lldb_rp rp") debugger.HandleCommand("command script add -f lldb_cruby.count_objects rb_count_objects") @@ -727,6 +745,7 @@ def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand("command script add -f lldb_cruby.dump_page dump_page") debugger.HandleCommand("command script add -f lldb_cruby.dump_page_rvalue dump_page_rvalue") debugger.HandleCommand("command script add -f lldb_cruby.rb_id2str rb_id2str") lldb_init(debugger) print("lldb scripts for ruby has been installed.") |