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

ruby-changes:58902

From: Nobuyoshi <ko1@a...>
Date: Mon, 25 Nov 2019 09:21:48 +0900 (JST)
Subject: [ruby-changes:58902] 9af52c0d09 (master): lldb_cruby.py: fixed dump of embedded RArray

https://git.ruby-lang.org/ruby.git/commit/?id=9af52c0d09

From 9af52c0d099083fb6b56f39584a0909baa9e7a10 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 25 Nov 2019 09:19:42 +0900
Subject: lldb_cruby.py: fixed dump of embedded RArray

[ci skip]

diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index 93663b2..c34a185 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -158,7 +158,10 @@ def lldb_inspect(debugger, target, result, val): https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L158
                 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 v0.10.2


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

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