summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-06-21 16:12:27 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-06-21 18:16:10 -0700
commit87a560a0570adf51bd37f9d3da5086db3e3f27a0 (patch)
treed14171fba16fab5d87e707245d0f8d7afab1f9c6 /misc
parent7fd51c0241f767ebe434c43568a4605cdb692e94 (diff)
Add T_STRUCT to lldb inspect helper
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6052
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/lldb_cruby.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index a752b98bb3..b146361a0f 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -418,6 +418,10 @@ def lldb_inspect(debugger, target, result, val):
print("T_IMEMO: ", file=result)
append_command_output(debugger, "p (enum imemo_type) %d" % imemo_type, result)
append_command_output(debugger, "p *(struct MEMO *) %0#x" % val.GetValueAsUnsigned(), result)
+ elif flType == RUBY_T_STRUCT:
+ tRTypedData = target.FindFirstType("struct RStruct").GetPointerType()
+ val = val.Cast(tRTypedData)
+ append_command_output(debugger, "p *(struct RStruct *) %0#x" % val.GetValueAsUnsigned(), result)
elif flType == RUBY_T_ZOMBIE:
tRZombie = target.FindFirstType("struct RZombie").GetPointerType()
val = val.Cast(tRZombie)