From f0f6615a25eb87e5e9954b7fec85c71f05100b7d Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 1 Apr 2019 22:53:34 +0000 Subject: add regex support to lldb debug output git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/lldb_cruby.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc/lldb_cruby.py') diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py index 0c4b9fc0d1..a39a41ecd6 100755 --- a/misc/lldb_cruby.py +++ b/misc/lldb_cruby.py @@ -197,6 +197,13 @@ def lldb_inspect(debugger, target, result, val): 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) -- cgit v1.2.3