[PATCH 6/7] Move exit_status_set_internal_vars out of GLOBAL_CURDIR

Hannes Domani
2020-05-25T18:57:39Z

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-25 Hannes Domani <ssbssa@yahoo.de>

* cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
---
gdb/cli/cli-cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index eb6e32b046..7e657c2e76 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.26.2