Skip to content

Instantly share code, notes, and snippets.

@dset0x
Created April 10, 2019 13:41
Show Gist options
  • Save dset0x/cc7fda32fa842443eec179f2d9de89a6 to your computer and use it in GitHub Desktop.
Save dset0x/cc7fda32fa842443eec179f2d9de89a6 to your computer and use it in GitHub Desktop.
diff --git a/src/ecos.c b/src/ecos.c
index 0dc8d5e..6b8780e 100644
--- a/src/ecos.c
+++ b/src/ecos.c
@@ -28,6 +28,8 @@
/* NEEDED FOR SQRT ----------------------------------------------------- */
#include <math.h>
+#include <unistd.h>
+
#if (defined _WIN32 || defined _WIN64 )
/* include stdio.h for _set_output_format */
#include <stdio.h>
@@ -1111,6 +1113,11 @@ idxint ECOS_solve(pwork* w)
/* Initialize solver */
initcode = init(w);
+
+ int zz = 0;
+ PRINTTEXT("Please run: `gdb --pid %ld` and do `set var zz = 1`.\n", (long)getpid());
+ while (zz == 0) { sleep(1); }
+
if( initcode == ECOS_FATAL ){
#if PRINTLEVEL > 0
if( w->stgs->verbose ) PRINTTEXT("\nFatal error during initialization, aborting.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment