diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-11-27 12:57:36 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-11-27 12:57:36 +0100 |
| commit | 737d4a5506b56ae9d1b5f54595ac60f8dacea515 (patch) | |
| tree | 705c485e2b846d609a27dc70fc3cc4a2c80c8b41 /src | |
| parent | e5b16e9ef108c741343cbbaaca2d26f264d93c9a (diff) | |
| download | box64-737d4a5506b56ae9d1b5f54595ac60f8dacea515.tar.gz box64-737d4a5506b56ae9d1b5f54595ac60f8dacea515.zip | |
[TRACE] Fixes some crash when setting a trace in a lib load later
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index ddd918b4..3e6ab168 100644 --- a/src/main.c +++ b/src/main.c @@ -1315,10 +1315,10 @@ void setupTrace() } } } else { - if (GetGlobalSymbolStartEnd(my_context->maplib, p, &s_trace_start, &s_trace_end, NULL, -1, NULL, NULL, NULL)) { + if (my_context->elfs && GetGlobalSymbolStartEnd(my_context->maplib, p, &s_trace_start, &s_trace_end, NULL, -1, NULL, NULL, NULL)) { SetTraceEmu(s_trace_start, s_trace_end); printf_log(LOG_INFO, "TRACE on %s only (%p-%p)\n", p, (void*)s_trace_start, (void*)s_trace_end); - } else if(GetLocalSymbolStartEnd(my_context->maplib, p, &s_trace_start, &s_trace_end, NULL, -1, NULL, NULL, NULL)) { + } else if(my_context->elfs && GetLocalSymbolStartEnd(my_context->maplib, p, &s_trace_start, &s_trace_end, NULL, -1, NULL, NULL, NULL)) { SetTraceEmu(s_trace_start, s_trace_end); printf_log(LOG_INFO, "TRACE on %s only (%p-%p)\n", p, (void*)s_trace_start, (void*)s_trace_end); } else { |