diff options
Diffstat (limited to 'src/os/perfmap.c')
| -rw-r--r-- | src/os/perfmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/os/perfmap.c b/src/os/perfmap.c index 3d6e482d..753144d4 100644 --- a/src/os/perfmap.c +++ b/src/os/perfmap.c @@ -5,6 +5,7 @@ #include <string.h> #include <assert.h> #include <unistd.h> +#include <inttypes.h> #include "debug.h" #include "box64context.h" @@ -20,9 +21,9 @@ void writePerfMap(uintptr_t func_addr, uintptr_t code_addr, size_t code_size, co uintptr_t start = 0; const char* symbname = FindNearestSymbolName(FindElfAddress(my_context, func_addr), (void*)func_addr, &start, &sz); if(!symbname || !strcmp(symbname, "???")) - snprintf(pbuf, sizeof(pbuf), "0x%lx %ld %p:%s\n", code_addr, code_size, func_addr, inst_name); + snprintf(pbuf, sizeof(pbuf), "0x%" PRIx64 " %" PRId64 " 0x%" PRIx64 ":%s\n", code_addr, code_size, func_addr, inst_name); else - snprintf(pbuf, sizeof(pbuf), "0x%lx %ld %s:%s\n", code_addr, code_size, symbname, inst_name); + snprintf(pbuf, sizeof(pbuf), "0x%" PRIx64 " %" PRId64 " %s:%s\n", code_addr, code_size, symbname, inst_name); (void)!write(BOX64ENV(dynarec_perf_map_fd), pbuf, strlen(pbuf)); } #else |