[fix debugging script to work with fgrin
John Meacham <john@repetae.net>**20070301140429] {
hunk ./data/jhc_rts2.c 99
+#ifndef NDEBUG
+// these ensure the type synonyms are available to the debugger
+uintptr_t _dummy1;
+node_t *_dummy2;
+dnode_t *_dummy3;
+sptr_t *_dummy4;
+fptr_t *_dummy5;
+wptr_t *_dummy6;
+#endif
hunk ./utils/debug.gdb 8
-        printf "--- lazy node %p %p\n", $arg0, ((uintptr_t)$arg0 & ~0x3)
-        if (((node_t *)((uintptr_t)$arg0 & ~0x3))->tag & 1)
+        set $dt = (node_t *)((uintptr_t)$arg0 & ~0x3)
+        printf "--- lazy node %p %p\n", $arg0, $dt
+        if ((uintptr_t)$dt->head & 1)
hunk ./utils/debug.gdb 15
-        printf "tag: %p\n", ((node_t *)((uintptr_t)$arg0 & ~0x3))->tag
-        printf "a1: %p\n", ((node_t *)((uintptr_t)$arg0 & ~0x3))->rest[0]
-        printf "a2: %p\n", ((node_t *)((uintptr_t)$arg0 & ~0x3))->rest[1]
-        printf "--- line %u\n", *(uintptr_t *)(((uintptr_t)$arg0 & ~0x3) - sizeof(uintptr_t))
+        printf "head: %p\n", $dt->head
+        printf "a1: %p\n", $dt->rest[0]
+        printf "a2: %p\n", $dt->rest[1]
+        printf "--- line %u\n", *(uintptr_t *)((uintptr_t)$dt - sizeof(uintptr_t))
hunk ./utils/debug.gdb 22
-        printf "tag: %p %u\n", ((node_t *)$arg0)->tag, ((node_t *)$arg0)->tag
-        printf "a1:  %p %u\n", ((node_t *)$arg0)->rest[0], ((node_t *)$arg0)->rest[0]
-        printf "a2:  %p %u\n", ((node_t *)$arg0)->rest[1], ((node_t *)$arg0)->rest[1]
-        printf "a3:  %p %u\n", ((node_t *)$arg0)->rest[2], ((node_t *)$arg0)->rest[2]
+        printf "tag: %p %u\n", ((dnode_t *)$arg0)->what, ((dnode_t *)$arg0)->what
+        printf "a1:  %p %u\n", ((dnode_t *)$arg0)->rest[0], ((node_t *)$arg0)->rest[0]
+        printf "a2:  %p %u\n", ((dnode_t *)$arg0)->rest[1], ((node_t *)$arg0)->rest[1]
+        printf "a3:  %p %u\n", ((dnode_t *)$arg0)->rest[2], ((node_t *)$arg0)->rest[2]
}
