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

ruby-changes:55200

From: tenderlove <ko1@a...>
Date: Tue, 2 Apr 2019 07:53:37 +0900 (JST)
Subject: [ruby-changes:55200] tenderlove:r67407 (trunk): add regex support to lldb debug output

tenderlove	2019-04-02 07:53:34 +0900 (Tue, 02 Apr 2019)

  New Revision: 67407

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67407

  Log:
    add regex support to lldb debug output

  Modified files:
    trunk/misc/lldb_cruby.py
Index: misc/lldb_cruby.py
===================================================================
--- misc/lldb_cruby.py	(revision 67406)
+++ misc/lldb_cruby.py	(revision 67407)
@@ -197,6 +197,13 @@ def lldb_inspect(debugger, target, resul https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L197
             if not imag.startswith("-"):
                 imag = "+" + imag
             print >> result, "(Complex) " + real + imag + "i"
+        elif flType == RUBY_T_REGEX:
+            tRRegex = target.FindFirstType("struct RRegexp").GetPointerType()
+            val = val.Cast(tRRegex)
+            print >> result, "(Regex)"
+            print >> result, "->src {",
+            lldb_inspect(debugger, target, result, val.GetValueForExpressionPath("->src"))
+            print >> result, "}"
         elif flType == RUBY_T_DATA:
             tRTypedData = target.FindFirstType("struct RTypedData").GetPointerType()
             val = val.Cast(tRTypedData)

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

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