diff options
Diffstat (limited to 'scripts/lib/devtool/ide_plugins/ide_code.py')
-rw-r--r-- | scripts/lib/devtool/ide_plugins/ide_code.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py index 09f0bb2a07..a62b93224e 100644 --- a/scripts/lib/devtool/ide_plugins/ide_code.py +++ b/scripts/lib/devtool/ide_plugins/ide_code.py | |||
@@ -242,9 +242,19 @@ class IdeVSCode(IdeBase): | |||
242 | if gdb_cross_config.image_recipe.rootfs_dbg: | 242 | if gdb_cross_config.image_recipe.rootfs_dbg: |
243 | launch_config['additionalSOLibSearchPath'] = modified_recipe.solib_search_path_str( | 243 | launch_config['additionalSOLibSearchPath'] = modified_recipe.solib_search_path_str( |
244 | gdb_cross_config.image_recipe) | 244 | gdb_cross_config.image_recipe) |
245 | src_file_map[os.path.join("/usr/src/debug", modified_recipe.pn, modified_recipe.pv)] = "${workspaceFolder}" | 245 | # First: Search for sources of this recipe in the workspace folder |
246 | src_file_map["/usr/src/debug"] = os.path.join( | 246 | if modified_recipe.pn in modified_recipe.target_dbgsrc_dir: |
247 | gdb_cross_config.image_recipe.rootfs_dbg, "usr", "src", "debug") | 247 | src_file_map[modified_recipe.target_dbgsrc_dir] = "${workspaceFolder}" |
248 | else: | ||
249 | logger.error( | ||
250 | "TARGET_DBGSRC_DIR must contain the recipe name PN.") | ||
251 | # Second: Search for sources of other recipes in the rootfs-dbg | ||
252 | if modified_recipe.target_dbgsrc_dir.startswith("/usr/src/debug"): | ||
253 | src_file_map["/usr/src/debug"] = os.path.join( | ||
254 | gdb_cross_config.image_recipe.rootfs_dbg, "usr", "src", "debug") | ||
255 | else: | ||
256 | logger.error( | ||
257 | "TARGET_DBGSRC_DIR must start with /usr/src/debug.") | ||
248 | else: | 258 | else: |
249 | logger.warning( | 259 | logger.warning( |
250 | "Cannot setup debug symbols configuration for GDB. IMAGE_GEN_DEBUGFS is not enabled.") | 260 | "Cannot setup debug symbols configuration for GDB. IMAGE_GEN_DEBUGFS is not enabled.") |