forked from nuttx/nuttx-update
tools/gdb: move the macros cache files to a temporary directory
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
7aa2dc24cd
commit
9eaec7ba49
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue