Skip to content

Commit

Permalink
tools/gdb: move the macros cache files to a temporary directory
Browse files Browse the repository at this point in the history
Signed-off-by: yinshengkai <[email protected]>
  • Loading branch information
Gary-Hobson authored and xiaoxiang781216 committed Nov 25, 2024
1 parent 7aa2dc2 commit 9eaec7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/gdb/nuttxgdb/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import json
import os
import re
import tempfile
import time
from os import path

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9eaec7b

Please sign in to comment.