diff --git a/tools/gdb/nuttxgdb/gcore.py b/tools/gdb/nuttxgdb/gcore.py index f15a436b1a6..532d6da7c1e 100644 --- a/tools/gdb/nuttxgdb/gcore.py +++ b/tools/gdb/nuttxgdb/gcore.py @@ -129,8 +129,8 @@ class NXGcore(gdb.Command): os.remove(section) gdb.execute(f"file {tmpfile.name}") - gdb.execute(f"gcore {corefile}") - gdb.execute(f"file {elffile}") + gdb.execute(f'gcore "{corefile}"') + gdb.execute(f'file "{elffile}"') tmpfile.close() print(f"Please run gdbserver.py to parse {corefile}") diff --git a/tools/gdb/nuttxgdb/macros.py b/tools/gdb/nuttxgdb/macros.py index 6ce8f917feb..bf7b960eb31 100644 --- a/tools/gdb/nuttxgdb/macros.py +++ b/tools/gdb/nuttxgdb/macros.py @@ -135,7 +135,7 @@ def fetch_macro_info(file): cache = path.join(path.dirname(path.abspath(file)), f"{hash}.macro") if not path.isfile(cache): start = time.time() - os.system(f"readelf -wm {file} > {cache}") + os.system(f'readelf -wm "{file}" > "{cache}"') print(f"readelf took {time.time() - start:.1f} seconds") print(f"Cache macro info to {cache}") else: diff --git a/tools/gdb/nuttxgdb/utils.py b/tools/gdb/nuttxgdb/utils.py index 985c89d0b49..740012e5353 100644 --- a/tools/gdb/nuttxgdb/utils.py +++ b/tools/gdb/nuttxgdb/utils.py @@ -196,7 +196,7 @@ def get_symbol_value(name, locspec="nx_start", cacheable=True): # in order to use the list command to set the scope. if len(gdb.inferiors()) == 1: gdb.execute( - f"add-inferior -exec {gdb.objfiles()[0].filename} -no-connection", + f'add-inferior -exec "{gdb.objfiles()[0].filename}" -no-connection', to_string=True, ) g_symbol_cache = {}