3 defn acidinit() // Called after all the init modules are loaded
12 "/sys/src/libc/port/",
13 "/sys/src/libc/9sys/",
17 srcfiles = {}; // list of loaded files
18 srctext = {}; // the text of the files
31 defn lstk() // trace with locals
36 defn gpr() // print general(hah hah!) purpose registers
38 print("AX\t", *AX, " BX\t", *BX, " CX\t", *CX, " DX\t", *DX, "\n");
39 print("DI\t", *DI, " SI\t", *SI, " BP\t", *BP, "\n");
42 defn spr() // print special processor registers
48 print("PC\t", pc, " ", fmt(pc, 'a'), " ");
50 print("SP\t", *SP, " ECODE ", *ECODE, " EFLAG ", *EFLAGS, "\n");
51 print("CS\t", *CS, " DS\t ", *DS, " SS\t", *SS, "\n");
52 print("GS\t", *GS, " FS\t ", *FS, " ES\t", *ES, "\n");
55 print("TRAP\t", cause, " ", reason(cause), "\n");
58 defn regs() // print all registers
66 print("F0\t", *F0, "\n");
67 print("F1\t", *F1, "\n");
68 print("F2\t", *F2, "\n");
69 print("F3\t", *F3, "\n");
70 print("F4\t", *F4, "\n");
71 print("F5\t", *F5, "\n");
72 print("F6\t", *F6, "\n");
73 print("F7\t", *F7, "\n");
74 print("control\t", *FCW, "\n");
75 print("status\t", *FSW, "\n");
76 print("tag\t", *FTW, "\n");
77 print("ip\t", *FIP, "\n");
78 print("cs selector\t", *FCS, "\n");
79 print("opcode\t", *FOP, "\n");
80 print("data operand\t", *FDP, "\n");
81 print("operand selector\t", *FDS, "\n");
91 if notes && regexp("^sys: watchpoint ", notes[0]) then
94 print(pid,": ", reason(*TRAP), "\t");
95 print(fmt(pc, 'a'), "\t", pc, "\n");
98 if regexp("^sys: watchpoint ", notes[0]) then
100 else if notes[0] != "sys: breakpoint" then {
101 print("Notes pending:\n");
104 print("\t", head l, "\n");
140 print(" di ", addr.di, "\n");
141 print(" si ", addr.si, "\n");
142 print(" bp ", addr.bp, "\n");
143 print(" nsp ", addr.nsp, "\n");
144 print(" bx ", addr.bx, "\n");
145 print(" dx ", addr.dx, "\n");
146 print(" cx ", addr.cx, "\n");
147 print(" ax ", addr.ax, "\n");
148 print(" gs ", addr.gs, "\n");
149 print(" fs ", addr.fs, "\n");
150 print(" es ", addr.es, "\n");
151 print(" ds ", addr.ds, "\n");
152 print(" trap ", addr.trap, "\n");
153 print(" ecode ", addr.ecode, "\n");
154 print(" pc ", addr.pc, "\n");
155 print(" cs ", addr.cs, "\n");
156 print(" flags ", addr.flags, "\n");
157 print(" sp ", addr.sp, "\n");
158 print(" ss ", addr.ss, "\n");
162 print("/sys/lib/acid/386");