| 296 | } |
| 297 | |
| 298 | static char* AppendHex(char* out, char* end, uintptr_t v) |
| 299 | { |
| 300 | static const char hex[] = "0123456789abcdef"; |
| 301 | out = AppendLiteral(out, end, "0x"); |
| 302 | bool started = false; |
| 303 | for (int shift = (int)(sizeof(uintptr_t) * 8) - 4; shift >= 0; shift -= 4) { |
| 304 | unsigned int nibble = (unsigned int)((v >> shift) & 0xF); |
| 305 | if (nibble || started || shift == 0) { |
| 306 | started = true; |
| 307 | if (out < end) *out++ = hex[nibble]; |
| 308 | } |
| 309 | } |
| 310 | return out; |
| 311 | } |
| 312 | |
| 313 | static uintptr_t FaultInstructionPointer(void* ctx) |
| 314 | { |
no test coverage detected