Simple (non-projective) curves over prime fields now seem to work.
[u/mdw/catacomb] / .gdbinit
diff --git a/.gdbinit b/.gdbinit
new file mode 100644 (file)
index 0000000..daa7ee3
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,34 @@
+define mp-print
+  call (void)fputs("$arg0 = ", stdout)
+  if $arg0 == 0
+    call (void)fputs("(null)", stdout)
+  else
+    call (void)mp_writefile($arg0, stdout, 10)
+  end
+  call (void)putchar('\n')
+end
+
+define mp-printr
+  call (void)fputs("$arg0 = ", stdout)
+  if $arg0 == 0
+    call (void)fputs("(null)", stdout)
+  else
+    if $arg1 == 16
+      call (void)fputs("0x", stdout)
+    else
+      if $arg1 == 8
+        call (void)fputs("0", stdout)
+      else
+        if $arg1 != 10
+          call (void)fputs("$arg1", stdout)
+        end
+      end
+    end
+    call (void)mp_writefile($arg0, stdout, $arg1)
+  end
+  call (void)putchar('\n')
+end
+
+document mp-print
+Print a Catacomb MP as a base-10 integer to stdout.
+end