about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-05-10 17:21:14 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-05-10 17:21:14 +0200
commit1f4cc1cf884e0c7befdfea601def2291e54459be (patch)
tree53f57aeff400515e4a025725d3cd6bde22db0dd2 /src/wrapped
parent92dd53177f0119c0638c057ea7da5204046846d0 (diff)
downloadbox64-1f4cc1cf884e0c7befdfea601def2291e54459be.tar.gz
box64-1f4cc1cf884e0c7befdfea601def2291e54459be.zip
Optimized Exit bridge managment
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index c51f37d1..29d00435 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -2939,7 +2939,7 @@ EXPORT int my_backtrace(x64emu_t* emu, void** buffer, int size)
     buffer[0] = (void*)addr;
     while (++idx < size) {
         uintptr_t ret_addr = get_parent_registers(unwind, FindElfAddress(my_context, addr), addr, &success);
-        if (ret_addr == (uintptr_t)GetExit()) {
+        if (ret_addr == my_context->exit_bridge) {
             // TODO: do something to be able to get the function name
             buffer[idx] = (void*)ret_addr;
             success = 2;
@@ -2969,7 +2969,7 @@ EXPORT int my_backtrace_ip(x64emu_t* emu, void** buffer, int size)
     buffer[0] = (void*)addr;
     while ((++idx < size) && success) {
         uintptr_t ret_addr = get_parent_registers(unwind, FindElfAddress(my_context, addr), addr, &success);
-        if (ret_addr == (uintptr_t)GetExit()) {
+        if (ret_addr == my_context->exit_bridge) {
             // TODO: do something to be able to get the function name
             buffer[idx] = (void*)ret_addr;
             success = 2;