...
Source file
src/runtime/defs_plan9_386.go
Documentation: runtime
1
2
3
4
5 package runtime
6
7 const _PAGESIZE = 0x1000
8
9 type ureg struct {
10 di uint32
11 si uint32
12 bp uint32
13 nsp uint32
14 bx uint32
15 dx uint32
16 cx uint32
17 ax uint32
18 gs uint32
19 fs uint32
20 es uint32
21 ds uint32
22 trap uint32
23 ecode uint32
24 pc uint32
25 cs uint32
26 flags uint32
27 sp uint32
28 ss uint32
29 }
30
31 type sigctxt struct {
32 u *ureg
33 }
34
35
36
37 func (c *sigctxt) pc() uintptr { return uintptr(c.u.pc) }
38
39 func (c *sigctxt) sp() uintptr { return uintptr(c.u.sp) }
40 func (c *sigctxt) lr() uintptr { return uintptr(0) }
41
42 func (c *sigctxt) setpc(x uintptr) { c.u.pc = uint32(x) }
43 func (c *sigctxt) setsp(x uintptr) { c.u.sp = uint32(x) }
44 func (c *sigctxt) setlr(x uintptr) {}
45
46 func (c *sigctxt) savelr(x uintptr) {}
47
48 func dumpregs(u *ureg) {
49 print("ax ", hex(u.ax), "\n")
50 print("bx ", hex(u.bx), "\n")
51 print("cx ", hex(u.cx), "\n")
52 print("dx ", hex(u.dx), "\n")
53 print("di ", hex(u.di), "\n")
54 print("si ", hex(u.si), "\n")
55 print("bp ", hex(u.bp), "\n")
56 print("sp ", hex(u.sp), "\n")
57 print("pc ", hex(u.pc), "\n")
58 print("flags ", hex(u.flags), "\n")
59 print("cs ", hex(u.cs), "\n")
60 print("fs ", hex(u.fs), "\n")
61 print("gs ", hex(u.gs), "\n")
62 }
63
64 func sigpanictramp()
65
View as plain text