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

lldb_cruby.py: push non-flonum float to history [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2021-06-04 09:24:57 +09:00
parent 3c57c087ec
commit 91c542ad05
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -348,9 +348,7 @@ def lldb_inspect(debugger, target, result, val):
append_command_output(debugger, "expression -Z %x -fx -- (const BDIGIT*)((struct RBignum*)%d)->as.heap.digits" % (len, val.GetValueAsUnsigned()), result)
# append_command_output(debugger, "x ((struct RBignum *) %0#x)->as.heap.digits / %d" % (val.GetValueAsUnsigned(), len), result)
elif flType == RUBY_T_FLOAT:
tRFloat = target.FindFirstType("struct RFloat").GetPointerType()
val = val.Cast(tRFloat)
print(val.GetValueForExpressionPath("->float_value"), file=result)
append_command_output(debugger, "print ((struct RFloat *)%d)->float_value" % val.GetValueAsUnsigned(), result)
elif flType == RUBY_T_RATIONAL:
tRRational = target.FindFirstType("struct RRational").GetPointerType()
val = val.Cast(tRRational)