Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dump_page helper to LLDB #4277

Merged
merged 2 commits into from
Mar 16, 2021
Merged

Conversation

eightbitraptor
Copy link
Contributor

This PR adds a dump_page helper to LLDB to enable easy visualisation of the current state of all slots on a heap_page. The output looks like this:

(lldb) p $1
(struct heap_page *) $1 = 0x0000000100a05890
(lldb) dump_page 0x0000000100a05890
bits: [     ] T_NONE     [  0]: Addr: 0x1007e8028 (flags: 0x0)
bits: [     ] T_NONE     [  1]: Addr: 0x1007e8050 (flags: 0x0)
bits: [     ] T_NONE     [  2]: Addr: 0x1007e8078 (flags: 0x0)
bits: [     ] T_NONE     [  3]: Addr: 0x1007e80a0 (flags: 0x0)
... rest of page snipped for brevity...

that dumps the heap page bitmaps for a slot
This dumps out object type information for every object on a page in the
form:

bits [LM R ] T_CLASS    [389]: Addr: 0x1007ebcf0 (flags: 0x100000062)
@tenderlove tenderlove merged commit a47697a into ruby:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants