[前][次][番号順一覧][スレッド一覧]

ruby-changes:66428

From: Nobuyoshi <ko1@a...>
Date: Fri, 4 Jun 2021 09:25:23 +0900 (JST)
Subject: [ruby-changes:66428] 91c542ad05 (master): lldb_cruby.py: push non-flonum float to history [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=91c542ad05

From 91c542ad0570d02c269877226689085128038f54 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 4 Jun 2021 09:24:57 +0900
Subject: lldb_cruby.py: push non-flonum float to history [ci skip]

---
 misc/lldb_cruby.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index 67810d5..3f0479b 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -348,9 +348,7 @@ def lldb_inspect(debugger, target, result, val): https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L348
                 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)
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]