aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-07 22:36:59 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-07 22:36:59 +0100
commit94467f11cde22117f1e1d5e4eddda448fb7ebf8b (patch)
treeaffe4e8674fc133f098dcb4c5169332421794e35
parentebf04404a21733b749edd84b32af1f5f63dfdfe3 (diff)
downloadsciteco-94467f11cde22117f1e1d5e4eddda448fb7ebf8b.tar.gz
added hack for Windows to pause at the beginning of main() if DEBUG_PAUSE is defined
-rw-r--r--src/main.cpp14
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);