gdb/memdump: show prev and next node in address finding mode
This will make it easier to debug memory corruption when agacent node is corrupted. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
dd7203aff7
commit
797f7a043d
1 changed files with 5 additions and 1 deletions
|
|
@ -240,7 +240,11 @@ class MMDump(gdb.Command):
|
|||
if node or (node := self.find(heaps, addr)):
|
||||
printnode(node, 1)
|
||||
source = "Pool" if node.from_pool else "Heap"
|
||||
print(f"{addr: #x} found belongs to {source}, node@{node.address:#x}")
|
||||
print(f"{addr: #x} found belongs to {source} {node}")
|
||||
if node.prevnode:
|
||||
print(f"prevnode: {node.prevnode}")
|
||||
if node.nextnode:
|
||||
print(f"nextnode: {node.nextnode}")
|
||||
else:
|
||||
print(f"Address {addr:#x} not found in any heap")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue