From 9af52c0d099083fb6b56f39584a0909baa9e7a10 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 25 Nov 2019 09:19:42 +0900 Subject: lldb_cruby.py: fixed dump of embedded RArray [ci skip] --- misc/lldb_cruby.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3