summaryrefslogtreecommitdiff
path: root/misc/lldb_cruby.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/lldb_cruby.py')
-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)