diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-16 16:47:03 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-16 16:47:03 +0200 |
| commit | 87fde19623b3366996a2f0c73a4c09bd9fa72458 (patch) | |
| tree | 2c78be7743106c6f23e69cb43e04ff2cbc06a476 /src | |
| parent | 93a4201c66e5229cba60603a1560850ec9dd38e3 (diff) | |
| download | box64-87fde19623b3366996a2f0c73a4c09bd9fa72458.tar.gz box64-87fde19623b3366996a2f0c73a4c09bd9fa72458.zip | |
Do not compute name and other info if they are not shown on signal
Diffstat (limited to 'src')
| -rwxr-xr-x | src/libtools/signals.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index 263711f2..90986298 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -1077,7 +1077,7 @@ exit(-1); old_pc = pc; old_addr = addr; old_tid = GetTID(); - const char* name = GetNativeName(pc); + const char* name = (log_minimum<=box64_log)?GetNativeName(pc):NULL; uintptr_t x64pc = (uintptr_t)-1; const char* x64name = NULL; const char* elfname = NULL; @@ -1118,10 +1118,12 @@ exit(-1); #endif //DYNAREC if(!db && (sig==SIGSEGV) && ((uintptr_t)addr==x64pc-1)) x64pc--; - x64name = getAddrFunctionName(x64pc); - elfheader_t* elf = FindElfAddress(my_context, x64pc); - if(elf) - elfname = ElfName(elf); + if(log_minimum<=box64_log) { + x64name = getAddrFunctionName(x64pc); + elfheader_t* elf = FindElfAddress(my_context, x64pc); + if(elf) + elfname = ElfName(elf); + } if(jit_gdb) { pid_t pid = getpid(); int v = vfork(); // is this ok in a signal handler??? |