feat(debugging): move gdbinit generation to CMake

This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

allow to pass custom options to "idf.py gdb":

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
This commit is contained in:
Alexey Lapshin
2024-12-06 05:07:52 +08:00
committed by BOT
parent a24dc94030
commit 3af39a0ab0
18 changed files with 392 additions and 320 deletions
+7
View File
@@ -353,6 +353,13 @@ function(__project_info test_components)
idf_build_get_property(COMPONENT_KCONFIGS_PROJBUILD KCONFIG_PROJBUILDS)
idf_build_get_property(debug_prefix_map_gdbinit DEBUG_PREFIX_MAP_GDBINIT)
__generate_gdbinit()
idf_build_get_property(gdbinit_files_prefix_map GDBINIT_FILES_PREFIX_MAP)
idf_build_get_property(gdbinit_files_symbols GDBINIT_FILES_SYMBOLS)
idf_build_get_property(gdbinit_files_py_extensions GDBINIT_FILES_PY_EXTENSIONS)
idf_build_get_property(gdbinit_files_connect GDBINIT_FILES_CONNECT)
__get_openocd_options(debug_arguments_openocd)
if(CONFIG_APP_BUILD_TYPE_RAM)
set(PROJECT_BUILD_TYPE ram_app)
else()