| 374 | } |
| 375 | |
| 376 | static void WriteFrame(uintptr_t retAddr) |
| 377 | { |
| 378 | char buf[256]; |
| 379 | char* out = buf; |
| 380 | char* end = buf + sizeof(buf); |
| 381 | char mod[128]; |
| 382 | uintptr_t base = ResolveModule(retAddr, mod, sizeof(mod)); |
| 383 | out = AppendLiteral(out, end, "[CR] "); |
| 384 | out = AppendHex(out, end, retAddr); |
| 385 | if (base) { |
| 386 | out = AppendLiteral(out, end, " "); |
| 387 | out = AppendLiteral(out, end, mod[0] ? mod : "?"); |
| 388 | out = AppendLiteral(out, end, "+"); |
| 389 | out = AppendHex(out, end, retAddr - base); |
| 390 | } |
| 391 | out = AppendLiteral(out, end, "\n"); |
| 392 | if (g_debugFd >= 0) write(g_debugFd, buf, (size_t)(out - buf)); |
| 393 | } |
| 394 | |
| 395 | // Find steamclient.so's executable mapping (r-xp) range by scanning /proc/self/maps. |
| 396 | static bool SteamclientExecRange(uintptr_t& lo, uintptr_t& hi) |
no test coverage detected