diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-29 14:51:34 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-08-29 14:51:34 -0700 |
commit | bdc36094e3e11c045b26b2831a3a7e69b937ec61 (patch) | |
tree | 542dc93934f8ee09540eb2a26db60c20e00a2787 /misc | |
parent | 94b79bffb108ccacb6d165f31e177fa24d392774 (diff) |
Add some NODE information for lldb
Just adds a conditional in the lldb scripts so we can more easily debug
NODE objects.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/lldb_cruby.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py index 71bb98679f..92624b4662 100755 --- a/misc/lldb_cruby.py +++ b/misc/lldb_cruby.py @@ -216,6 +216,12 @@ def lldb_inspect(debugger, target, result, val): else: print >> result, "T_DATA:" append_command_output(debugger, "p *(struct RData *) %0#x" % val.GetValueAsUnsigned(), result) + elif flType == RUBY_T_NODE: + tRTypedData = target.FindFirstType("struct RNode").GetPointerType() + nd_type = (flags & RUBY_NODE_TYPEMASK) >> RUBY_NODE_TYPESHIFT + append_command_output(debugger, "p (node_type) %d" % nd_type, result) + val = val.Cast(tRTypedData) + append_command_output(debugger, "p *(struct RNode *) %0#x" % val.GetValueAsUnsigned(), result) else: print >> result, "Not-handled type %0#x" % flType print >> result, val |