From 8667f911bca1f9f3e66b3911f84b9ec5f318f93b Mon Sep 17 00:00:00 2001 From: xuxingliang Date: Thu, 21 Nov 2024 16:38:57 +0800 Subject: [PATCH] gdb/mm: fix memdump when mempool backtrace is disabled Signed-off-by: xuxingliang --- tools/gdb/nuttxgdb/mm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/gdb/nuttxgdb/mm.py b/tools/gdb/nuttxgdb/mm.py index 4a785704d7..f1e84c19c6 100644 --- a/tools/gdb/nuttxgdb/mm.py +++ b/tools/gdb/nuttxgdb/mm.py @@ -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: