Lines Matching refs:os
137 void Dump(std::ostream& os) const;
139 void DumpRegister32(std::ostream& os, const char* name, uint32_t value) const;
140 void DumpRegister64(std::ostream& os, const char* name, uint64_t value) const;
142 void DumpX86Flags(std::ostream& os, uint32_t flags) const;
145 void DumpArmStatusRegister(std::ostream& os, RegisterType status_register) const;
150 void UContext::Dump(std::ostream& os) const { in Dump()
152 DumpRegister32(os, "eax", context->__ss.__eax); in Dump()
153 DumpRegister32(os, "ebx", context->__ss.__ebx); in Dump()
154 DumpRegister32(os, "ecx", context->__ss.__ecx); in Dump()
155 DumpRegister32(os, "edx", context->__ss.__edx); in Dump()
156 os << '\n'; in Dump()
158 DumpRegister32(os, "edi", context->__ss.__edi); in Dump()
159 DumpRegister32(os, "esi", context->__ss.__esi); in Dump()
160 DumpRegister32(os, "ebp", context->__ss.__ebp); in Dump()
161 DumpRegister32(os, "esp", context->__ss.__esp); in Dump()
162 os << '\n'; in Dump()
164 DumpRegister32(os, "eip", context->__ss.__eip); in Dump()
165 os << " "; in Dump()
166 DumpRegister32(os, "eflags", context->__ss.__eflags); in Dump()
167 DumpX86Flags(os, context->__ss.__eflags); in Dump()
168 os << '\n'; in Dump()
170 DumpRegister32(os, "cs", context->__ss.__cs); in Dump()
171 DumpRegister32(os, "ds", context->__ss.__ds); in Dump()
172 DumpRegister32(os, "es", context->__ss.__es); in Dump()
173 DumpRegister32(os, "fs", context->__ss.__fs); in Dump()
174 os << '\n'; in Dump()
175 DumpRegister32(os, "gs", context->__ss.__gs); in Dump()
176 DumpRegister32(os, "ss", context->__ss.__ss); in Dump()
178 DumpRegister32(os, "eax", context.gregs[REG_EAX]); in Dump()
179 DumpRegister32(os, "ebx", context.gregs[REG_EBX]); in Dump()
180 DumpRegister32(os, "ecx", context.gregs[REG_ECX]); in Dump()
181 DumpRegister32(os, "edx", context.gregs[REG_EDX]); in Dump()
182 os << '\n'; in Dump()
184 DumpRegister32(os, "edi", context.gregs[REG_EDI]); in Dump()
185 DumpRegister32(os, "esi", context.gregs[REG_ESI]); in Dump()
186 DumpRegister32(os, "ebp", context.gregs[REG_EBP]); in Dump()
187 DumpRegister32(os, "esp", context.gregs[REG_ESP]); in Dump()
188 os << '\n'; in Dump()
190 DumpRegister32(os, "eip", context.gregs[REG_EIP]); in Dump()
191 os << " "; in Dump()
192 DumpRegister32(os, "eflags", context.gregs[REG_EFL]); in Dump()
193 DumpX86Flags(os, context.gregs[REG_EFL]); in Dump()
194 os << '\n'; in Dump()
196 DumpRegister32(os, "cs", context.gregs[REG_CS]); in Dump()
197 DumpRegister32(os, "ds", context.gregs[REG_DS]); in Dump()
198 DumpRegister32(os, "es", context.gregs[REG_ES]); in Dump()
199 DumpRegister32(os, "fs", context.gregs[REG_FS]); in Dump()
200 os << '\n'; in Dump()
201 DumpRegister32(os, "gs", context.gregs[REG_GS]); in Dump()
202 DumpRegister32(os, "ss", context.gregs[REG_SS]); in Dump()
204 DumpRegister64(os, "rax", context.gregs[REG_RAX]); in Dump()
205 DumpRegister64(os, "rbx", context.gregs[REG_RBX]); in Dump()
206 DumpRegister64(os, "rcx", context.gregs[REG_RCX]); in Dump()
207 DumpRegister64(os, "rdx", context.gregs[REG_RDX]); in Dump()
208 os << '\n'; in Dump()
210 DumpRegister64(os, "rdi", context.gregs[REG_RDI]); in Dump()
211 DumpRegister64(os, "rsi", context.gregs[REG_RSI]); in Dump()
212 DumpRegister64(os, "rbp", context.gregs[REG_RBP]); in Dump()
213 DumpRegister64(os, "rsp", context.gregs[REG_RSP]); in Dump()
214 os << '\n'; in Dump()
216 DumpRegister64(os, "r8 ", context.gregs[REG_R8]); in Dump()
217 DumpRegister64(os, "r9 ", context.gregs[REG_R9]); in Dump()
218 DumpRegister64(os, "r10", context.gregs[REG_R10]); in Dump()
219 DumpRegister64(os, "r11", context.gregs[REG_R11]); in Dump()
220 os << '\n'; in Dump()
222 DumpRegister64(os, "r12", context.gregs[REG_R12]); in Dump()
223 DumpRegister64(os, "r13", context.gregs[REG_R13]); in Dump()
224 DumpRegister64(os, "r14", context.gregs[REG_R14]); in Dump()
225 DumpRegister64(os, "r15", context.gregs[REG_R15]); in Dump()
226 os << '\n'; in Dump()
228 DumpRegister64(os, "rip", context.gregs[REG_RIP]); in Dump()
229 os << " "; in Dump()
230 DumpRegister32(os, "eflags", context.gregs[REG_EFL]); in Dump()
231 DumpX86Flags(os, context.gregs[REG_EFL]); in Dump()
232 os << '\n'; in Dump()
234 DumpRegister32(os, "cs", (context.gregs[REG_CSGSFS]) & 0x0FFFF); in Dump()
235 DumpRegister32(os, "gs", (context.gregs[REG_CSGSFS] >> 16) & 0x0FFFF); in Dump()
236 DumpRegister32(os, "fs", (context.gregs[REG_CSGSFS] >> 32) & 0x0FFFF); in Dump()
237 os << '\n'; in Dump()
239 DumpRegister32(os, "r0", context.arm_r0); in Dump()
240 DumpRegister32(os, "r1", context.arm_r1); in Dump()
241 DumpRegister32(os, "r2", context.arm_r2); in Dump()
242 DumpRegister32(os, "r3", context.arm_r3); in Dump()
243 os << '\n'; in Dump()
245 DumpRegister32(os, "r4", context.arm_r4); in Dump()
246 DumpRegister32(os, "r5", context.arm_r5); in Dump()
247 DumpRegister32(os, "r6", context.arm_r6); in Dump()
248 DumpRegister32(os, "r7", context.arm_r7); in Dump()
249 os << '\n'; in Dump()
251 DumpRegister32(os, "r8", context.arm_r8); in Dump()
252 DumpRegister32(os, "r9", context.arm_r9); in Dump()
253 DumpRegister32(os, "r10", context.arm_r10); in Dump()
254 DumpRegister32(os, "fp", context.arm_fp); in Dump()
255 os << '\n'; in Dump()
257 DumpRegister32(os, "ip", context.arm_ip); in Dump()
258 DumpRegister32(os, "sp", context.arm_sp); in Dump()
259 DumpRegister32(os, "lr", context.arm_lr); in Dump()
260 DumpRegister32(os, "pc", context.arm_pc); in Dump()
261 os << '\n'; in Dump()
263 DumpRegister32(os, "cpsr", context.arm_cpsr); in Dump()
264 DumpArmStatusRegister(os, context.arm_cpsr); in Dump()
265 os << '\n'; in Dump()
269 DumpRegister64(os, reg_name.c_str(), context.regs[i]); in Dump()
271 os << '\n'; in Dump()
274 os << '\n'; in Dump()
276 DumpRegister64(os, "sp", context.sp); in Dump()
277 DumpRegister64(os, "pc", context.pc); in Dump()
278 os << '\n'; in Dump()
280 DumpRegister64(os, "pstate", context.pstate); in Dump()
281 DumpArmStatusRegister(os, context.pstate); in Dump()
282 os << '\n'; in Dump()
284 os << "Unknown architecture/word size/OS in ucontext dump"; in Dump()
288 void UContext::DumpRegister32(std::ostream& os, const char* name, uint32_t value) const { in DumpRegister32() argument
289 os << StringPrintf(" %6s: 0x%08x", name, value); in DumpRegister32()
292 void UContext::DumpRegister64(std::ostream& os, const char* name, uint64_t value) const { in DumpRegister64() argument
293 os << StringPrintf(" %6s: 0x%016" PRIx64, name, value); in DumpRegister64()
296 void UContext::DumpX86Flags(std::ostream& os, uint32_t flags) const { in DumpX86Flags() argument
297 os << " ["; in DumpX86Flags()
299 os << " CF"; in DumpX86Flags()
302 os << " PF"; in DumpX86Flags()
305 os << " AF"; in DumpX86Flags()
308 os << " ZF"; in DumpX86Flags()
311 os << " SF"; in DumpX86Flags()
314 os << " TF"; in DumpX86Flags()
317 os << " IF"; in DumpX86Flags()
320 os << " DF"; in DumpX86Flags()
323 os << " OF"; in DumpX86Flags()
325 os << " ]"; in DumpX86Flags()
329 void UContext::DumpArmStatusRegister(std::ostream& os, RegisterType status_register) const { in DumpArmStatusRegister() argument
336 os << " ["; in DumpArmStatusRegister()
338 os << " N"; in DumpArmStatusRegister()
341 os << " Z"; in DumpArmStatusRegister()
344 os << " C"; in DumpArmStatusRegister()
347 os << " V"; in DumpArmStatusRegister()
349 os << " ]"; in DumpArmStatusRegister()