1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

lldb_cruby.py: fixed dump of embedded RArray

[ci skip]
This commit is contained in:
Nobuyoshi Nakada 2019-11-25 09:19:42 +09:00
parent ce50af21af
commit 9af52c0d09
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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)