ruby-changes:52682
From: nobu <ko1@a...>
Date: Mon, 1 Oct 2018 23:49:02 +0900 (JST)
Subject: [ruby-changes:52682] nobu:r64894 (trunk): lldb_cruby.py: T_DATA support [ci skip]
nobu 2018-10-01 23:48:54 +0900 (Mon, 01 Oct 2018) New Revision: 64894 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64894 Log: lldb_cruby.py: T_DATA support [ci skip] Modified files: trunk/misc/lldb_cruby.py Index: misc/lldb_cruby.py =================================================================== --- misc/lldb_cruby.py (revision 64893) +++ misc/lldb_cruby.py (revision 64894) @@ -130,6 +130,15 @@ def lldb_rp(debugger, command, result, i https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L130 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") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/