mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
tools/gdb: move the macros cache files to a temporary directory
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -41,6 +41,7 @@ import hashlib
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
@@ -135,7 +136,7 @@ def fetch_macro_info(file):
|
|||||||
|
|
||||||
macros = {}
|
macros = {}
|
||||||
p = re.compile(r".*macro[ ]*:[ ]*([\S]+\(.*?\)|[\w]+)[ ]*(.*)")
|
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}")
|
print(f"Load macro: {cache}")
|
||||||
if not path.isfile(cache):
|
if not path.isfile(cache):
|
||||||
t = time.time()
|
t = time.time()
|
||||||
|
|||||||
Reference in New Issue
Block a user