Lines Matching refs:os
134 void Dump(std::ostream& os) const;
136 void DumpRegister32(std::ostream& os, const char* name, uint32_t value) const;
137 void DumpRegister64(std::ostream& os, const char* name, uint64_t value) const;
139 void DumpX86Flags(std::ostream& os, uint32_t flags) const;
142 void DumpArmStatusRegister(std::ostream& os, RegisterType status_register) const;
147 void UContext::Dump(std::ostream& os) const {
149 DumpRegister32(os, "eax", context->__ss.__eax);
150 DumpRegister32(os, "ebx", context->__ss.__ebx);
151 DumpRegister32(os, "ecx", context->__ss.__ecx);
152 DumpRegister32(os, "edx", context->__ss.__edx);
153 os << '\n';
155 DumpRegister32(os, "edi", context->__ss.__edi);
156 DumpRegister32(os, "esi", context->__ss.__esi);
157 DumpRegister32(os, "ebp", context->__ss.__ebp);
158 DumpRegister32(os, "esp", context->__ss.__esp);
159 os << '\n';
161 DumpRegister32(os, "eip", context->__ss.__eip);
162 os << " ";
163 DumpRegister32(os, "eflags", context->__ss.__eflags);
164 DumpX86Flags(os, context->__ss.__eflags);
165 os << '\n';
167 DumpRegister32(os, "cs", context->__ss.__cs);
168 DumpRegister32(os, "ds", context->__ss.__ds);
169 DumpRegister32(os, "es", context->__ss.__es);
170 DumpRegister32(os, "fs", context->__ss.__fs);
171 os << '\n';
172 DumpRegister32(os, "gs", context->__ss.__gs);
173 DumpRegister32(os, "ss", context->__ss.__ss);
175 DumpRegister32(os, "eax", context.gregs[REG_EAX]);
176 DumpRegister32(os, "ebx", context.gregs[REG_EBX]);
177 DumpRegister32(os, "ecx", context.gregs[REG_ECX]);
178 DumpRegister32(os, "edx", context.gregs[REG_EDX]);
179 os << '\n';
181 DumpRegister32(os, "edi", context.gregs[REG_EDI]);
182 DumpRegister32(os, "esi", context.gregs[REG_ESI]);
183 DumpRegister32(os, "ebp", context.gregs[REG_EBP]);
184 DumpRegister32(os, "esp", context.gregs[REG_ESP]);
185 os << '\n';
187 DumpRegister32(os, "eip", context.gregs[REG_EIP]);
188 os << " ";
189 DumpRegister32(os, "eflags", context.gregs[REG_EFL]);
190 DumpX86Flags(os, context.gregs[REG_EFL]);
191 os << '\n';
193 DumpRegister32(os, "cs", context.gregs[REG_CS]);
194 DumpRegister32(os, "ds", context.gregs[REG_DS]);
195 DumpRegister32(os, "es", context.gregs[REG_ES]);
196 DumpRegister32(os, "fs", context.gregs[REG_FS]);
197 os << '\n';
198 DumpRegister32(os, "gs", context.gregs[REG_GS]);
199 DumpRegister32(os, "ss", context.gregs[REG_SS]);
201 DumpRegister64(os, "rax", context.gregs[REG_RAX]);
202 DumpRegister64(os, "rbx", context.gregs[REG_RBX]);
203 DumpRegister64(os, "rcx", context.gregs[REG_RCX]);
204 DumpRegister64(os, "rdx", context.gregs[REG_RDX]);
205 os << '\n';
207 DumpRegister64(os, "rdi", context.gregs[REG_RDI]);
208 DumpRegister64(os, "rsi", context.gregs[REG_RSI]);
209 DumpRegister64(os, "rbp", context.gregs[REG_RBP]);
210 DumpRegister64(os, "rsp", context.gregs[REG_RSP]);
211 os << '\n';
213 DumpRegister64(os, "r8 ", context.gregs[REG_R8]);
214 DumpRegister64(os, "r9 ", context.gregs[REG_R9]);
215 DumpRegister64(os, "r10", context.gregs[REG_R10]);
216 DumpRegister64(os, "r11", context.gregs[REG_R11]);
217 os << '\n';
219 DumpRegister64(os, "r12", context.gregs[REG_R12]);
220 DumpRegister64(os, "r13", context.gregs[REG_R13]);
221 DumpRegister64(os, "r14", context.gregs[REG_R14]);
222 DumpRegister64(os, "r15", context.gregs[REG_R15]);
223 os << '\n';
225 DumpRegister64(os, "rip", context.gregs[REG_RIP]);
226 os << " ";
227 DumpRegister32(os, "eflags", context.gregs[REG_EFL]);
228 DumpX86Flags(os, context.gregs[REG_EFL]);
229 os << '\n';
231 DumpRegister32(os, "cs", (context.gregs[REG_CSGSFS]) & 0x0FFFF);
232 DumpRegister32(os, "gs", (context.gregs[REG_CSGSFS] >> 16) & 0x0FFFF);
233 DumpRegister32(os, "fs", (context.gregs[REG_CSGSFS] >> 32) & 0x0FFFF);
234 os << '\n';
236 DumpRegister32(os, "r0", context.arm_r0);
237 DumpRegister32(os, "r1", context.arm_r1);
238 DumpRegister32(os, "r2", context.arm_r2);
239 DumpRegister32(os, "r3", context.arm_r3);
240 os << '\n';
242 DumpRegister32(os, "r4", context.arm_r4);
243 DumpRegister32(os, "r5", context.arm_r5);
244 DumpRegister32(os, "r6", context.arm_r6);
245 DumpRegister32(os, "r7", context.arm_r7);
246 os << '\n';
248 DumpRegister32(os, "r8", context.arm_r8);
249 DumpRegister32(os, "r9", context.arm_r9);
250 DumpRegister32(os, "r10", context.arm_r10);
251 DumpRegister32(os, "fp", context.arm_fp);
252 os << '\n';
254 DumpRegister32(os, "ip", context.arm_ip);
255 DumpRegister32(os, "sp", context.arm_sp);
256 DumpRegister32(os, "lr", context.arm_lr);
257 DumpRegister32(os, "pc", context.arm_pc);
258 os << '\n';
260 DumpRegister32(os, "cpsr", context.arm_cpsr);
261 DumpArmStatusRegister(os, context.arm_cpsr);
262 os << '\n';
266 DumpRegister64(os, reg_name.c_str(), context.regs[i]);
268 os << '\n';
271 os << '\n';
273 DumpRegister64(os, "sp", context.sp);
274 DumpRegister64(os, "pc", context.pc);
275 os << '\n';
277 DumpRegister64(os, "pstate", context.pstate);
278 DumpArmStatusRegister(os, context.pstate);
279 os << '\n';
282 os << "Unknown architecture/word size/OS in ucontext dump";
286 void UContext::DumpRegister32(std::ostream& os, const char* name, uint32_t value) const {
287 os << StringPrintf(" %6s: 0x%08x", name, value);
290 void UContext::DumpRegister64(std::ostream& os, const char* name, uint64_t value) const {
291 os << StringPrintf(" %6s: 0x%016" PRIx64, name, value);
294 void UContext::DumpX86Flags(std::ostream& os, uint32_t flags) const {
295 os << " [";
297 os << " CF";
300 os << " PF";
303 os << " AF";
306 os << " ZF";
309 os << " SF";
312 os << " TF";
315 os << " IF";
318 os << " DF";
321 os << " OF";
323 os << " ]";
327 void UContext::DumpArmStatusRegister(std::ostream& os, RegisterType status_register) const {
334 os << " [";
336 os << " N";
339 os << " Z";
342 os << " C";
345 os << " V";
347 os << " ]";
415 << "OS: " << Dumpable<OsInfo>(os_info) << std::endl