diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-07 22:36:59 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-07 22:36:59 +0100 |
commit | 94467f11cde22117f1e1d5e4eddda448fb7ebf8b (patch) | |
tree | affe4e8674fc133f098dcb4c5169332421794e35 | |
parent | ebf04404a21733b749edd84b32af1f5f63dfdfe3 (diff) | |
download | sciteco-94467f11cde22117f1e1d5e4eddda448fb7ebf8b.tar.gz |
added hack for Windows to pause at the beginning of main() if DEBUG_PAUSE is defined
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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); |