From: Shlomi Fish Date: Mon, 24 Feb 2020 12:33:19 +0000 (+0200) Subject: appveyor crash debug 6 - gdb+remove code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4779a07b433f2ae08a55c715d1ab8658e8403c7;p=fortune-mod appveyor crash debug 6 - gdb+remove code --- 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);