From 94467f11cde22117f1e1d5e4eddda448fb7ebf8b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 7 Mar 2015 22:36:59 +0100 Subject: added hack for Windows to pause at the beginning of main() if DEBUG_PAUSE is defined --- src/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index f17f942..de27e5e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,6 +40,15 @@ #include "undo.h" #include "error.h" +/* + * Define this to pause the program at the beginning + * of main() (Windows only). + * This is a useful hack on Windows, where gdbserver + * sometimes refuses to start SciTECO but attaches + * to a running process just fine. + */ +//#define DEBUG_PAUSE + namespace SciTECO { #define INI_FILE ".teco_ini" @@ -286,6 +295,11 @@ main(int argc, char **argv) realloc /* try_realloc */ }; +#ifdef DEBUG_PAUSE + /* Windows debugging hack (see above) */ + system("pause"); +#endif + signal(SIGINT, sigint_handler); g_mem_set_vtable(&vtable); -- cgit v1.2.3