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 8667f911bca1f9f3e66b3911f84b9ec5f318f93b
Author: xuxingliang <xuxingli...@xiaomi.com>
AuthorDate: Thu Nov 21 16:38:57 2024 +0800

    gdb/mm: fix memdump when mempool backtrace is disabled
    
    Signed-off-by: xuxingliang <xuxingli...@xiaomi.com>
---
 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:

Reply via email to