1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add regex support to lldb debug output

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2019-04-01 22:53:34 +00:00
parent f4bff3a7f9
commit f0f6615a25

View file

@ -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)