idf.py gdb: autoload prefix_map_gdbinit when exists in project_description.json

This commit is contained in:
Fu Hanxi
2021-10-26 10:41:13 +08:00
parent ea1005b740
commit 42405604af
4 changed files with 25 additions and 17 deletions
+2
View File
@@ -151,6 +151,8 @@ if(NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS 8.0.0)
endif()
if(CONFIG_APP_REPRODUCIBLE_BUILD)
idf_build_set_property(DEBUG_PREFIX_MAP_GDBINIT "${BUILD_DIR}/prefix_map_gdbinit")
list(APPEND compile_options "-fdebug-prefix-map=${IDF_PATH}=/IDF")
list(APPEND compile_options "-fdebug-prefix-map=${PROJECT_DIR}=/IDF_PROJECT")
list(APPEND compile_options "-fdebug-prefix-map=${BUILD_DIR}=/IDF_BUILD")