From da30c36dfdd56ea68835c21f4d70794aa8845559 Mon Sep 17 00:00:00 2001 From: LarsGit223 Date: Mon, 25 Feb 2019 19:50:51 +0100 Subject: [PATCH] scope: show error message if no executable is set If the user tries to start debugging and no executable is set an error message appears: 'No executable set. Please set an executable under "Debug/Setup Program".' --- scope/src/debug.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scope/src/debug.c b/scope/src/debug.c index 6abbdd3ee..6974078e7 100644 --- a/scope/src/debug.c +++ b/scope/src/debug.c @@ -487,9 +487,13 @@ void on_debug_run_continue(G_GNUC_UNUSED const MenuItem *menu_item) { if (gdb_state == INACTIVE) { - if (check_load_path(program_executable, TRUE, R_OK | X_OK) && - check_load_path(program_working_dir, FALSE, X_OK) && - check_load_path(program_load_script, TRUE, R_OK)) + if (program_executable == NULL || strlen(program_executable) == 0) + { + show_error(_("No executable set. Please set an executable under \"Debug/Setup Program\".")); + } + else if (check_load_path(program_executable, TRUE, R_OK | X_OK) && + check_load_path(program_working_dir, FALSE, X_OK) && + check_load_path(program_load_script, TRUE, R_OK)) { load_program(); }