mirror of
https://github.com/apache/nuttx.git
synced 2025-12-17 10:16:49 +08:00
nxgdb/mm: warning if corrupted memory node found
If the nodesize is 0, we cannot iterate to next node, siliently return None will cause memleak command to generate false positive report with no warnings. Add log to indicate such case. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -479,6 +479,7 @@ class MMNode(gdb.Value, p.MMFreeNode):
|
||||
@property
|
||||
def nextnode(self) -> MMNode:
|
||||
if not self.nodesize:
|
||||
gdb.write(f"\n\x1b[31;1m Node corrupted: {self} \x1b[m\n")
|
||||
return None
|
||||
|
||||
addr = int(self.address) + self.nodesize
|
||||
|
||||
Reference in New Issue
Block a user