oadldump - OADL binary inspector
oadldump [flags] filename
The [flags] are zero or more of:
The filename is an executable file produced by the OADL compiler oadlc (with a suffix of ".oax").
By default, oadldump prints all of the information compiled into a .oax file. If any of the "Print" flags are given, then only those items specified by command-line print flags are printed.
bash $ cat foo.oad
proc main()
{
var a = 3->iterate();
"", a, '\n';
}
bash $ oadlc -g -o foo.oax foo.oad
bash $ oadldump -sym main foo.oax
main: PROC( 2) PRC 00000002
bash $ oadldump -procs 2 foo.oax
PROC 00000002 (main)
00000000: aa 0000 DBG_PUSH 0
00000003: a8 0100 PUSH LCL 1
00000006: 35 LOCALS
00000007: bc 00000000 FILE foo.oad
0000000c: 90 01 PUSH INT 1
0000000e: 62 LINE
proc main()
0000000f: 90 03 PUSH INT 3
00000011: 62 LINE
var a = 3->iterate();
00000012: 9a 00 PUSH LCL 0
00000014: 72 PUSH INT 0
00000015: 90 03 PUSH INT 3
00000017: d4 47000000 PUSH PUB 00000047 (iterate)
0000001c: 32 MCALL
0000001d: 44 SETL
0000001e: 9a 00 PUSH LCL 0
00000020: bb 01000000 DBG_VAR INT 1 (a)
00000025: 90 04 PUSH INT 4
00000027: 62 LINE
"", a, '\n';
00000028: 9a 00 PUSH LCL 0
0000002a: 43 GETL
0000002b: 97 0a PUSH CHR a
0000002d: 90 02 PUSH INT 2
0000002f: 9c d0 SAY
00000031: 01 POP
00000032: 61 DBG_POP
00000033: 70 NIL
00000034: 31 RET