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 9eaec7ba49f7d4292df86eefa221c71c4b5a27fe
Author: yinshengkai <yinsheng...@xiaomi.com>
AuthorDate: Wed Nov 13 11:59:22 2024 +0800

    tools/gdb: move the macros cache files to a temporary directory
    
    Signed-off-by: yinshengkai <yinsheng...@xiaomi.com>
---
 tools/gdb/nuttxgdb/macros.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/gdb/nuttxgdb/macros.py b/tools/gdb/nuttxgdb/macros.py
index bbfdfa019e..c86e0205e8 100644
--- a/tools/gdb/nuttxgdb/macros.py
+++ b/tools/gdb/nuttxgdb/macros.py
@@ -41,6 +41,7 @@ import hashlib
 import json
 import os
 import re
+import tempfile
 import time
 from os import path
 
@@ -135,7 +136,7 @@ def fetch_macro_info(file):
 
     macros = {}
     p = re.compile(r".*macro[ ]*:[ ]*([\S]+\(.*?\)|[\w]+)[ ]*(.*)")
-    cache = path.join(path.dirname(path.abspath(file)), f"{hash}.json")
+    cache = path.join(tempfile.gettempdir(), f"{hash}.json")
     print(f"Load macro: {cache}")
     if not path.isfile(cache):
         t = time.time()

Reply via email to