]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-10-many-DEBUG.c
ccan/io: go linear for debugging.
[ccan] / ccan / io / test / run-10-many-DEBUG.c
diff --git a/ccan/io/test/run-10-many-DEBUG.c b/ccan/io/test/run-10-many-DEBUG.c
new file mode 100644 (file)
index 0000000..3b18596
--- /dev/null
@@ -0,0 +1,12 @@
+#define DEBUG
+#define PORT "64010"
+#define main real_main
+int real_main(void);
+#include "run-10-many.c"
+#undef main
+/* We stack overflow if we debug all of them! */
+static bool debug_one(struct io_conn *conn)
+{
+       return conn == buf[1].reader;
+}
+int main(void) { io_debug = debug_one; return real_main(); }