tool/run: link core with debug symbols optionally

If there is no debug/core-<kernel>.o library available, e.g., when
running a scenario in a fresh build directory where core is provided
via a depot package, the build_core_image step of the run tool was
canceled in the past, when trying to access the non-existing library.
This commit changes the semantic of build_core_image to link a core
binary with debug symbols only when the designated library is in place.

This fixup is related to issue #2339
This commit is contained in:
Stefan Kalkowski 2017-10-20 11:49:26 +02:00 committed by Christian Helmuth
parent 42b1eefe73
commit 7f5bec5c0d
1 changed files with 3 additions and 1 deletions

View File

@ -812,7 +812,9 @@ proc build_core_image { modules } {
copy_genode_binaries_to_run_dir $modules
# create core binary without modules for debugging
build_core debug/$core_obj {} [run_dir].core [core_link_address]
if {[file exists debug/$core_obj]} {
build_core debug/$core_obj {} [run_dir].core [core_link_address]
}
# determine modules to be incorporated into the core image
set modules [glob -nocomplain -tails -directory [run_dir]/genode/ *]