From c17ace4397c73bcdeb616f1b854a1cf8a8b6579c Mon Sep 17 00:00:00 2001 From: Hannes Domani Date: Sat, 23 May 2020 19:45:44 +0200 Subject: [PATCH] Move exit_status_set_internal_vars out of GLOBAL_CURDIR Fixes these testsuite fails on Windows: FAIL: gdb.base/shell.exp: shell success exitcode FAIL: gdb.base/shell.exp: shell fail exitcode The convenience variables $_shell_exitcode and $_shell_exitsignal don't depend on the GLOBAL_CURDIR define. gdb/ChangeLog: 2020-05-27 Hannes Domani * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars. --- gdb/ChangeLog | 4 ++++ gdb/cli/cli-cmds.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2f2958c599b..487a5783882 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-05-27 Hannes Domani + + * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars. + 2020-05-27 Hannes Domani * exec.c (exec_file_attach): Use errno value of first openp failure. diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index fdc8758bcd0..cd6f7856599 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -830,8 +830,8 @@ shell_escape (const char *arg, int from_tty) /* Make sure to return to the directory GDB thinks it is, in case the shell command we just ran changed it. */ chdir (current_directory); - exit_status_set_internal_vars (rc); #endif + exit_status_set_internal_vars (rc); #else /* Can fork. */ int status, pid; -- 2.30.2