From 7f5bec5c0dd5edec30c5d8dd463d3192974e9d0e Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 20 Oct 2017 11:49:26 +0200 Subject: [PATCH] tool/run: link core with debug symbols optionally If there is no debug/core-.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 --- tool/run/run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tool/run/run b/tool/run/run index 53678caa6..f0278147a 100755 --- a/tool/run/run +++ b/tool/run/run @@ -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/ *]