From b4779a07b433f2ae08a55c715d1ab8658e8403c7 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 24 Feb 2020 14:33:19 +0200 Subject: [PATCH] appveyor crash debug 6 - gdb+remove code --- CI-testing/continuous-integration-testing.pl | 4 +++- fortune-mod/fortune/fortune.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CI-testing/continuous-integration-testing.pl b/CI-testing/continuous-integration-testing.pl index 079ba18..331b50d 100644 --- a/CI-testing/continuous-integration-testing.pl +++ b/CI-testing/continuous-integration-testing.pl @@ -116,10 +116,12 @@ do_system( ); if ($IS_WIN) { + my $gdb_cmds_fn = "cmds.gdb"; + path($gdb_cmds_fn)->spew_utf8("r\nbt\nq\n"); do_system( { cmd => [ -"$WIN32__DOUBLE_AMPERSAND__PROPER_HANDLING__NEEDED_PREFIX c:/foo/games/fortune.exe" +"$WIN32__DOUBLE_AMPERSAND__PROPER_HANDLING__NEEDED_PREFIX gdb --command=$gdb_cmds_fn c:/foo/games/fortune.exe" ] } ); diff --git a/fortune-mod/fortune/fortune.c b/fortune-mod/fortune/fortune.c index 5f991fa..cf3b5ec 100644 --- a/fortune-mod/fortune/fortune.c +++ b/fortune-mod/fortune/fortune.c @@ -1777,6 +1777,7 @@ int main(int ac, char *av[]) request = recode_new_request (outer); #endif +#ifndef REMOVE_CODE setlocale(LC_ALL,""); #ifdef _WIN32 ctype = "C"; @@ -1791,6 +1792,7 @@ int main(int ac, char *av[]) ctype="ISO-8859-1"; } #endif +#endif #ifdef WITH_RECODE crequest = malloc(strlen(ctype) + 7 + 1); -- 2.40.0