aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-01 22:53:34 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-01 22:53:34 +0000
commitf0f6615a25eb87e5e9954b7fec85c71f05100b7d (patch)
tree0369a4c38932c9c673adcd1af03d995747e5d58b /misc
parentf4bff3a7f944edee72118de5b762a46b1b98d463 (diff)
downloadruby-f0f6615a25eb87e5e9954b7fec85c71f05100b7d.tar.gz
add regex support to lldb debug output
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/lldb_cruby.py7
1 files changed, 7 insertions, 0 deletions
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)