mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
tools/gdb: fix elf file with special character
Make sure file name is surrounded by \" Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
6d0d4458cd
commit
96a518af35
3 changed files with 4 additions and 4 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue