From 55f4c8c75a4f795623d8009912181e001c08b7c4 Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@users.noreply.github.com>
Date: Thu, 22 Oct 2020 19:16:31 -0400
Subject: [PATCH] lldb script: Print flags of method entries

---
 misc/lldb_cruby.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py
index 075612735c..64f1ead1ac 100755
--- a/misc/lldb_cruby.py
+++ b/misc/lldb_cruby.py
@@ -415,6 +415,8 @@ 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)
+            if imemo_type == 6:
+                print("complemented={} cached={} invalidated={}".format((flags & RUBY_FL_USER7) > 0, (flags & RUBY_FL_USER8) > 0, (flags & RUBY_FL_USER9) > 0), file=result)
         elif flType == RUBY_T_ZOMBIE:
             tRZombie = target.FindFirstType("struct RZombie").GetPointerType()
             val = val.Cast(tRZombie)