chiark / gitweb /
base/asm-common.h: Improve conditional instruction notation.
[catacomb] / .gdbinit
1 define mp-print
2   call (void)fputs("$arg0 = ", stdout)
3   if $arg0 == 0
4     call (void)fputs("(null)", stdout)
5   else
6     call (void)mp_writefile($arg0, stdout, 10)
7   end
8   call (void)putchar('\n')
9 end
10
11 define mp-printr
12   call (void)fputs("$arg1 = ", stdout)
13   if $arg1 == 0
14     call (void)fputs("(null)", stdout)
15   else
16     if $arg0 == 16
17       call (void)fputs("0x", stdout)
18     else
19       if $arg0 == 8
20         call (void)fputs("0", stdout)
21       else
22         if $arg0 != 10
23           call (void)fputs("$arg0:", stdout)
24         end
25       end
26     end
27     call (void)mp_writefile($arg1, stdout, $arg0)
28   end
29   call (void)putchar('\n')
30 end
31
32 document mp-print
33 Print a Catacomb MP as a base-10 integer to stdout.
34 end