Skip to content

Commit

Permalink
idf.py: gdb action incorrectly generated EOL gdbinit scripts
Browse files Browse the repository at this point in the history
GDB on Windows incorrectly reads EOL in the script files causing 'gdb'
action to fail.

(gdb) source .../build/gdbinit/py_extensions
(gdb) source .../build\gdbinit\symbols
add symbol table from file "C:\Sources\mhome-hub\build\bootloader\bootloader.elf"
C:/Sources/mhome-hub/build\gdbinit\symbols:6: Error in sourced command file:
Undefined command: "".  Try "help".

Forcing line separator to '\n' resolved the issue

Signed-off-by: Michal Jenikovsky <jendo@jmsystems.sk>
  • Loading branch information
jendo42 committed Aug 10, 2023
1 parent cbce221 commit 2805705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/idf_py_actions/debug_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def generate_gdbinit_rom_add_symbols(target: str) -> str:
r.append('set confirm on')
r.append('end')
r.append('')
return os.linesep.join(r)
return '\n'.join(r)
raise FatalError(f'{ESP_ROM_INFO_FILE} file not found. Please check IDF integrity.')

def generate_gdbinit_files(gdb: str, gdbinit: Optional[str], project_desc: Dict[str, Any]) -> None:
Expand Down

0 comments on commit 2805705

Please sign in to comment.