gdb/mm: fix memdump when mempool backtrace is disabled

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
xuxingliang 2024-11-21 16:38:57 +08:00 committed by Xiang Xiao
parent ee9673f62e
commit 8667f911bc

View file

@ -93,10 +93,13 @@ class MemPoolBlock:
@property
def is_free(self) -> bool:
if CONFIG_MM_BACKTRACE < 0:
return False
if not self._magic:
self._magic = int(self.blk["magic"])
return CONFIG_MM_BACKTRACE and self._magic != self.MAGIC_ALLOC
return self._magic != self.MAGIC_ALLOC
@property
def seqno(self) -> int: