...
Source file src/runtime/defs_windows_arm.go
1
2
3
4
5 package runtime
6
7 const (
8 _PROT_NONE = 0
9 _PROT_READ = 1
10 _PROT_WRITE = 2
11 _PROT_EXEC = 4
12
13 _MAP_ANON = 1
14 _MAP_PRIVATE = 2
15
16 _DUPLICATE_SAME_ACCESS = 0x2
17 _THREAD_PRIORITY_HIGHEST = 0x2
18
19 _SIGINT = 0x2
20 _CTRL_C_EVENT = 0x0
21 _CTRL_BREAK_EVENT = 0x1
22
23 _CONTEXT_CONTROL = 0x10001
24 _CONTEXT_FULL = 0x10007
25
26 _EXCEPTION_ACCESS_VIOLATION = 0xc0000005
27 _EXCEPTION_BREAKPOINT = 0x80000003
28 _EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d
29 _EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e
30 _EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f
31 _EXCEPTION_FLT_OVERFLOW = 0xc0000091
32 _EXCEPTION_FLT_UNDERFLOW = 0xc0000093
33 _EXCEPTION_INT_DIVIDE_BY_ZERO = 0xc0000094
34 _EXCEPTION_INT_OVERFLOW = 0xc0000095
35
36 _INFINITE = 0xffffffff
37 _WAIT_TIMEOUT = 0x102
38
39 _EXCEPTION_CONTINUE_EXECUTION = -0x1
40 _EXCEPTION_CONTINUE_SEARCH = 0x0
41 )
42
43 type systeminfo struct {
44 anon0 [4]byte
45 dwpagesize uint32
46 lpminimumapplicationaddress *byte
47 lpmaximumapplicationaddress *byte
48 dwactiveprocessormask uint32
49 dwnumberofprocessors uint32
50 dwprocessortype uint32
51 dwallocationgranularity uint32
52 wprocessorlevel uint16
53 wprocessorrevision uint16
54 }
55
56 type exceptionrecord struct {
57 exceptioncode uint32
58 exceptionflags uint32
59 exceptionrecord *exceptionrecord
60 exceptionaddress *byte
61 numberparameters uint32
62 exceptioninformation [15]uint32
63 }
64
65 type neon128 struct {
66 low uint64
67 high int64
68 }
69
70 type context struct {
71 contextflags uint32
72 r0 uint32
73 r1 uint32
74 r2 uint32
75 r3 uint32
76 r4 uint32
77 r5 uint32
78 r6 uint32
79 r7 uint32
80 r8 uint32
81 r9 uint32
82 r10 uint32
83 r11 uint32
84 r12 uint32
85
86 spr uint32
87 lrr uint32
88 pc uint32
89 cpsr uint32
90
91 fpscr uint32
92 padding uint32
93
94 floatNeon [16]neon128
95
96 bvr [8]uint32
97 bcr [8]uint32
98 wvr [1]uint32
99 wcr [1]uint32
100 padding2 [2]uint32
101 }
102
103 func (c *context) ip() uintptr { return uintptr(c.pc) }
104 func (c *context) sp() uintptr { return uintptr(c.spr) }
105 func (c *context) lr() uintptr { return uintptr(c.lrr) }
106
107 func (c *context) set_ip(x uintptr) { c.pc = uint32(x) }
108 func (c *context) set_sp(x uintptr) { c.spr = uint32(x) }
109 func (c *context) set_lr(x uintptr) { c.lrr = uint32(x) }
110
111 func dumpregs(r *context) {
112 print("r0 ", hex(r.r0), "\n")
113 print("r1 ", hex(r.r1), "\n")
114 print("r2 ", hex(r.r2), "\n")
115 print("r3 ", hex(r.r3), "\n")
116 print("r4 ", hex(r.r4), "\n")
117 print("r5 ", hex(r.r5), "\n")
118 print("r6 ", hex(r.r6), "\n")
119 print("r7 ", hex(r.r7), "\n")
120 print("r8 ", hex(r.r8), "\n")
121 print("r9 ", hex(r.r9), "\n")
122 print("r10 ", hex(r.r10), "\n")
123 print("r11 ", hex(r.r11), "\n")
124 print("r12 ", hex(r.r12), "\n")
125 print("sp ", hex(r.spr), "\n")
126 print("lr ", hex(r.lrr), "\n")
127 print("pc ", hex(r.pc), "\n")
128 print("cpsr ", hex(r.cpsr), "\n")
129 }
130
131 type overlapped struct {
132 internal uint32
133 internalhigh uint32
134 anon0 [8]byte
135 hevent *byte
136 }
137
138 type memoryBasicInformation struct {
139 baseAddress uintptr
140 allocationBase uintptr
141 allocationProtect uint32
142 regionSize uintptr
143 state uint32
144 protect uint32
145 type_ uint32
146 }
147
148 func stackcheck() {
149
150 }
151
View as plain text