mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'contrib/github_pr_12683_v5.1' into 'release/v5.1'
fix(tools): fix path delimiter in gdbinit for Windows (v5.1) See merge request espressif/esp-idf!27575
This commit is contained in:
commit
e3ca11c83a
@ -256,7 +256,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
raise FatalError('ELF file not found. You need to build & flash the project before running debug targets')
|
||||
|
||||
# Recreate empty 'gdbinit' directory
|
||||
gdbinit_dir = os.path.join(project_desc['build_dir'], 'gdbinit')
|
||||
gdbinit_dir = '/'.join([project_desc['build_dir'], 'gdbinit'])
|
||||
if os.path.isfile(gdbinit_dir):
|
||||
os.remove(gdbinit_dir)
|
||||
elif os.path.isdir(gdbinit_dir):
|
||||
@ -264,7 +264,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
os.mkdir(gdbinit_dir)
|
||||
|
||||
# Prepare gdbinit for Python GDB extensions import
|
||||
py_extensions = os.path.join(gdbinit_dir, 'py_extensions')
|
||||
py_extensions = '/'.join([gdbinit_dir, 'py_extensions'])
|
||||
with open(py_extensions, 'w') as f:
|
||||
if is_gdb_with_python(gdb):
|
||||
f.write(GDBINIT_PYTHON_TEMPLATE.format(sys_path=sys.path))
|
||||
@ -272,7 +272,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
f.write(GDBINIT_PYTHON_NOT_SUPPORTED)
|
||||
|
||||
# Prepare gdbinit for related ELFs symbols load
|
||||
symbols = os.path.join(gdbinit_dir, 'symbols')
|
||||
symbols = '/'.join([gdbinit_dir, 'symbols'])
|
||||
with open(symbols, 'w') as f:
|
||||
boot_elf = get_normalized_path(project_desc['bootloader_elf']) if 'bootloader_elf' in project_desc else None
|
||||
if boot_elf and os.path.exists(boot_elf):
|
||||
@ -284,7 +284,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
|
||||
# Generate the gdbinit for target connect if no custom gdbinit is present
|
||||
if not gdbinit:
|
||||
gdbinit = os.path.join(gdbinit_dir, 'connect')
|
||||
gdbinit = '/'.join([gdbinit_dir, 'connect'])
|
||||
with open(gdbinit, 'w') as f:
|
||||
f.write(GDBINIT_CONNECT)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user