mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
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:
@@ -240,7 +240,11 @@ class MMDump(gdb.Command):
|
|||||||
if node or (node := self.find(heaps, addr)):
|
if node or (node := self.find(heaps, addr)):
|
||||||
printnode(node, 1)
|
printnode(node, 1)
|
||||||
source = "Pool" if node.from_pool else "Heap"
|
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:
|
else:
|
||||||
print(f"Address {addr:#x} not found in any heap")
|
print(f"Address {addr:#x} not found in any heap")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user