1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add some NODE information for lldb

Just adds a conditional in the lldb scripts so we can more easily debug
NODE objects.
This commit is contained in:
Aaron Patterson 2019-08-29 14:51:34 -07:00
parent 94b79bffb1
commit bdc36094e3
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

View file

@ -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