diff options
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/lldb_cruby.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py index 93663b28dd..c34a185217 100755 --- a/misc/lldb_cruby.py +++ b/misc/lldb_cruby.py @@ -158,7 +158,10 @@ def lldb_inspect(debugger, target, result, val): result.write(" {(empty)}\n") else: result.write("\n") - append_command_output(debugger, "expression -Z %d -fx -- (const VALUE*)%0#x" % (len, ptr.GetValueAsUnsigned()), result) + if ptr.GetValueAsSigned() == 0: + append_command_output(debugger, "expression -fx -- ((struct RArray*)%0#x)->as.ary" % val.GetValueAsUnsigned(), result) + else: + append_command_output(debugger, "expression -Z %d -fx -- (const VALUE*)%0#x" % (len, ptr.GetValueAsUnsigned()), result) elif flType == RUBY_T_HASH: result.write("T_HASH: %s" % flaginfo) append_command_output(debugger, "p *(struct RHash *) %0#x" % val.GetValueAsUnsigned(), result) |