From ac405dc214b336a34a763bf12dfc3baa540cb440 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Thu, 26 May 2022 15:42:42 -0400 Subject: [PATCH] Add more information to lldb dump_page helper --- misc/lldb_cruby.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py index e7f7003214..c9ed7dd429 100755 --- a/misc/lldb_cruby.py +++ b/misc/lldb_cruby.py @@ -599,9 +599,13 @@ def dump_page_internal(page, target, process, thread, frame, result, debugger, h try: flidx = "%3d" % freelist.index(obj_addr) except ValueError: - flidx = ' ' + flidx = ' -1' - result_str = "%s idx: [%3d] freelist_idx: {%s} Addr: %0#x (flags: %0#x)" % (rb_type(flags, ruby_type_map), page_index, flidx, obj_addr, flags) + if flType == RUBY_T_NONE: + klass = obj.GetChildMemberWithName('klass').GetValueAsUnsigned() + result_str = "%s idx: [%3d] freelist_idx: {%s} Addr: %0#x (flags: %0#x, next: %0#x)" % (rb_type(flags, ruby_type_map), page_index, flidx, obj_addr, flags, klass) + else: + result_str = "%s idx: [%3d] freelist_idx: {%s} Addr: %0#x (flags: %0#x)" % (rb_type(flags, ruby_type_map), page_index, flidx, obj_addr, flags) if highlight == obj_addr: result_str = ' '.join([result_str, "<<<<<"])