mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lldb_cruby.py: T_DATA support [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b74f7fc3f2
commit
6b4d78fc43
1 changed files with 9 additions and 0 deletions
|
@ -130,6 +130,15 @@ def lldb_rp(debugger, command, result, internal_dict):
|
|||
else:
|
||||
debugger.HandleCommand("expression -Z %d -fx -- (const VALUE*)((struct RArray*)%d)->as.heap.ptr" % (len, val.GetValueAsUnsigned()))
|
||||
debugger.HandleCommand("p (struct RArray *) %0#x" % val.GetValueAsUnsigned())
|
||||
elif flType == RUBY_T_DATA:
|
||||
tRTypedData = target.FindFirstType("struct RTypedData").GetPointerType()
|
||||
val = val.Cast(tRTypedData)
|
||||
flag = val.GetValueForExpressionPath("->typed_flag")
|
||||
if flag.GetValueAsUnsigned() == 1:
|
||||
debugger.HandleCommand("p *(rb_data_type_t *) %0#x" % val.GetValueForExpressionPath("->type").GetValueAsUnsigned())
|
||||
debugger.HandleCommand("p (void *) %0#x" % val.GetValueForExpressionPath("->data").GetValueAsUnsigned())
|
||||
else:
|
||||
debugger.HandleCommand("p *(struct RData *) %0#x" % val.GetValueAsUnsigned())
|
||||
|
||||
def count_objects(debugger, command, ctx, result, internal_dict):
|
||||
objspace = ctx.frame.EvaluateExpression("ruby_current_vm->objspace")
|
||||
|
|
Loading…
Reference in a new issue