mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +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
|
@property
|
||||||
def nextnode(self) -> MMNode:
|
def nextnode(self) -> MMNode:
|
||||||
if not self.nodesize:
|
if not self.nodesize:
|
||||||
|
gdb.write(f"\n\x1b[31;1m Node corrupted: {self} \x1b[m\n")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
addr = int(self.address) + self.nodesize
|
addr = int(self.address) + self.nodesize
|
||||||
|
|||||||
Reference in New Issue
Block a user