diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-25 09:19:42 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-25 09:21:27 +0900 |
commit | 9af52c0d099083fb6b56f39584a0909baa9e7a10 (patch) | |
tree | 9e165932d28ba3abf5de335b053c7c8dd348735e /misc | |
parent | ce50af21af3d23e292b73f955a8b12ea9c2038e3 (diff) | |
download | ruby-9af52c0d099083fb6b56f39584a0909baa9e7a10.tar.gz |
lldb_cruby.py: fixed dump of embedded RArray
[ci skip]
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) |