3 defn acidinit() // Called after all the init modules are loaded
10 "/sys/src/libc/port/",
11 "/sys/src/libc/9sys/",
15 srcfiles = {}; // list of loaded files
16 srctext = {}; // the text of the files
29 defn lstk() // trace with locals
34 defn gpr() // print general(hah hah!) purpose registers
36 print("AX\t", *AX, " BX\t", *BX, " CX\t", *CX, " DX\t", *DX, "\n");
37 print("DI\t", *DI, " SI\t", *SI, " BP\t", *BP, "\n");
40 defn spr() // print special processor registers
46 print("PC\t", pc, " ", fmt(pc, 'a'), " ");
48 print("SP\t", *SP, " ECODE ", *ECODE, " EFLAG ", *EFLAGS, "\n");
49 print("CS\t", *CS, " DS\t ", *DS, " SS\t", *SS, "\n");
50 print("GS\t", *GS, " FS\t ", *FS, " ES\t", *ES, "\n");
53 print("TRAP\t", cause, " ", reason(cause), "\n");
56 defn regs() // print all registers
64 print("F0\t", *F0, "\n");
65 print("F1\t", *F1, "\n");
66 print("F2\t", *F2, "\n");
67 print("F3\t", *F3, "\n");
68 print("F4\t", *F4, "\n");
69 print("F5\t", *F5, "\n");
70 print("F6\t", *F6, "\n");
71 print("F7\t", *F7, "\n");
72 print("control\t", *fmt(E0, 'x'), "\n");
73 print("status\t", *fmt(E1, 'x'), "\n");
74 print("tag\t", *fmt(E2, 'x'), "\n");
75 print("ip offset\t", *fmt(E3, 'X'), "\n");
76 print("cs selector\t", *fmt(E4, 'x'), "\n");
77 print("opcode\t", *fmt(E4>>8, 'x'), "\n");
78 print("data operand offset\t", *fmt(E5, 'x'), "\n");
79 print("operand selector\t", *fmt(E6, 'x'), "\n");
84 print("MM0\t", *MM0, " MM1\t", *MM1, "\n");
85 print("MM2\t", *MM2, " MM3\t", *MM3, "\n");
86 print("MM4\t", *MM4, " MM5\t", *MM5, "\n");
87 print("MM6\t", *MM6, " MM7\t", *MM7, "\n");
97 print(pid,": ", reason(*TRAP), "\t");
98 print(fmt(pc, 'a'), "\t", fmt(pc, 'i'), "\n");
101 if notes[0] != "sys: breakpoint" then {
102 print("Notes pending:\n");
105 print("\t", head l, "\n");
141 print(" di ", addr.di, "\n");
142 print(" si ", addr.si, "\n");
143 print(" bp ", addr.bp, "\n");
144 print(" nsp ", addr.nsp, "\n");
145 print(" bx ", addr.bx, "\n");
146 print(" dx ", addr.dx, "\n");
147 print(" cx ", addr.cx, "\n");
148 print(" ax ", addr.ax, "\n");
149 print(" gs ", addr.gs, "\n");
150 print(" fs ", addr.fs, "\n");
151 print(" es ", addr.es, "\n");
152 print(" ds ", addr.ds, "\n");
153 print(" trap ", addr.trap, "\n");
154 print(" ecode ", addr.ecode, "\n");
155 print(" pc ", addr.pc, "\n");
156 print(" cs ", addr.cs, "\n");
157 print(" flags ", addr.flags, "\n");
158 print(" sp ", addr.sp, "\n");
159 print(" ss ", addr.ss, "\n");
163 print("/sys/lib/acid/386");