This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 797f7a043dffef2c61abc9e845d163c77c4f52b0
Author: xuxingliang <xuxingli...@xiaomi.com>
AuthorDate: Wed Nov 13 16:10:24 2024 +0800

    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 <xuxingli...@xiaomi.com>
---
 tools/gdb/nuttxgdb/memdump.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/gdb/nuttxgdb/memdump.py b/tools/gdb/nuttxgdb/memdump.py
index 00602333c0..9135bc5d74 100644
--- a/tools/gdb/nuttxgdb/memdump.py
+++ b/tools/gdb/nuttxgdb/memdump.py
@@ -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

Reply via email to