diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-06-18 23:13:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 17:13:34 +0200 |
| commit | c96c1ad5ddb977a3723b6d53317f7942546e0779 (patch) | |
| tree | fa2ea910ed9cca3806de8a1020b4e0d4e78ef41f /src/os/perfmap.c | |
| parent | 71220b7fef4466f98cc78b1d013755aca8e217c6 (diff) | |
| download | box64-c96c1ad5ddb977a3723b6d53317f7942546e0779.tar.gz box64-c96c1ad5ddb977a3723b6d53317f7942546e0779.zip | |
[BIONIC] Fixed some compilation warnings (#2756)
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 |