Skip to content

Commit

Permalink
Add more information to lldb dump_page helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmaissroff authored and tenderlove committed May 27, 2022
1 parent c3fd2e4 commit ac405dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions misc/lldb_cruby.py
Expand Up @@ -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, "<<<<<"])
Expand Down

0 comments on commit ac405dc

Please sign in to comment.