[tools] Commit memory debug (et al) tooling

These are some changes I made to debug tooling while tracking down the
bugfix in the previous commit.

Each `scripts/debug_*_alloc.gdb` script has gdb output a `*_allocs.txt`
file, which in turn can be parsed by the `scripts/parse_*_allocs.py`
script to find errors.
This commit is contained in:
Justin C. Miller
2023-07-10 01:31:07 -07:00
parent ad3afae315
commit 350396d70f
11 changed files with 336 additions and 3 deletions

View File

@@ -0,0 +1,62 @@
das -enabled off
break heap_allocator.cpp:200
commands
silent
printf "n %016lx %d\n", m_end, current
continue
end
break heap_allocator.cpp:206
commands
silent
printf "N %016lx %d\n", m_end, order
continue
end
break heap_allocator::register_free_block
commands
silent
printf "F %016lx %d\n", block, order
continue
end
break heap_allocator.cpp:118
commands
silent
printf "f %016lx %d\n", block, info->order
continue
end
break heap_allocator.cpp:241
commands
silent
printf "S %016lx %d\n", block, order
continue
end
break heap_allocator.cpp:158
commands
silent
printf "P %016lx %d\n", block, order
continue
end
break heap_allocator.cpp:180
commands
silent
printf "p %016lx %d\n", block, order
continue
end
break heap_allocator.cpp:182
commands
silent
printf "M %016lx %016lx %d\n", block, buddy, order
continue
end
set logging file buddy_allocs.txt
set logging overwrite on
set logging enabled on
continue