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", *FCW, "\n");
73 print("status\t", *FSW, "\n");
74 print("tag\t", *FTW, "\n");
75 print("ip\t", *FIP, "\n");
76 print("cs selector\t", *FCS, "\n");
77 print("opcode\t", *FOP, "\n");
78 print("data operand\t", *FDP, "\n");
79 print("operand selector\t", *FDS, "\n");
89 print(pid,": ", reason(*TRAP), "\t");
90 print(fmt(pc, 'a'), "\t", fmt(pc, 'i'), "\n");
93 if notes[0] != "sys: breakpoint" then {
94 print("Notes pending:\n");
97 print("\t", head l, "\n");
133 print(" di ", addr.di, "\n");
134 print(" si ", addr.si, "\n");
135 print(" bp ", addr.bp, "\n");
136 print(" nsp ", addr.nsp, "\n");
137 print(" bx ", addr.bx, "\n");
138 print(" dx ", addr.dx, "\n");
139 print(" cx ", addr.cx, "\n");
140 print(" ax ", addr.ax, "\n");
141 print(" gs ", addr.gs, "\n");
142 print(" fs ", addr.fs, "\n");
143 print(" es ", addr.es, "\n");
144 print(" ds ", addr.ds, "\n");
145 print(" trap ", addr.trap, "\n");
146 print(" ecode ", addr.ecode, "\n");
147 print(" pc ", addr.pc, "\n");
148 print(" cs ", addr.cs, "\n");
149 print(" flags ", addr.flags, "\n");
150 print(" sp ", addr.sp, "\n");
151 print(" ss ", addr.ss, "\n");
155 print("/sys/lib/acid/386");