diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-04-23 11:48:37 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-04-23 11:48:37 +0200 |
| commit | 468a3c2165a737029ed01862361d6a62c511501d (patch) | |
| tree | 9d7dda31ceee15326a4d6603c037a53acb635f24 /src | |
| parent | 3afe87bccedbe06bdf13633fe81b2cdbb52c28ab (diff) | |
| download | box64-468a3c2165a737029ed01862361d6a62c511501d.tar.gz box64-468a3c2165a737029ed01862361d6a62c511501d.zip | |
[PERFMAP] Added x86 address of code when function name cannot be found, instead of ???
Diffstat (limited to 'src')
| -rw-r--r-- | src/os/perfmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os/perfmap.c b/src/os/perfmap.c index ab0d4c8d..3d6e482d 100644 --- a/src/os/perfmap.c +++ b/src/os/perfmap.c @@ -19,7 +19,10 @@ void writePerfMap(uintptr_t func_addr, uintptr_t code_addr, size_t code_size, co uint64_t sz = 0; uintptr_t start = 0; const char* symbname = FindNearestSymbolName(FindElfAddress(my_context, func_addr), (void*)func_addr, &start, &sz); - snprintf(pbuf, sizeof(pbuf), "0x%lx %ld %s:%s\n", code_addr, code_size, symbname, inst_name); + if(!symbname || !strcmp(symbname, "???")) + snprintf(pbuf, sizeof(pbuf), "0x%lx %ld %p:%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); (void)!write(BOX64ENV(dynarec_perf_map_fd), pbuf, strlen(pbuf)); } #else |