From bdc36094e3e11c045b26b2831a3a7e69b937ec61 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 Aug 2019 14:51:34 -0700 Subject: [PATCH] Add some NODE information for lldb Just adds a conditional in the lldb scripts so we can more easily debug NODE objects. --- misc/lldb_cruby.py | 6 ++++++ 1 file changed, 6 insertions(+) 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