about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-12-12 18:41:35 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-12-12 22:40:49 +0100
commitcaed2ae7573d472a65c152ee1bec17b98c74a7d1 (patch)
tree0ffe904344021b5d95d09bf38baef8476cf26bf3 /src
parent5ffdb8eeb48b3722bf733d0eab190ec87f8f7f72 (diff)
downloadbox64-caed2ae7573d472a65c152ee1bec17b98c74a7d1.tar.gz
box64-caed2ae7573d472a65c152ee1bec17b98c74a7d1.zip
Use print_cycle_log here
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index e2e6c672..0e3f3c93 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -361,13 +361,7 @@ void EXPORT my___stack_chk_fail(x64emu_t* emu)
     sprintf(buff, "%p: Stack is corrupted, aborting\n", (void*)emu->old_ip);
     #endif
     if(cycle_log) {
-        int j = (my_context->current_line+1)%cycle_log;
-        for (int i=0; i<cycle_log; ++i) {
-            int k = (i+j)%cycle_log;
-            if(my_context->log_call[k][0]) {
-                printf_log(LOG_INFO, "%s => return %s\n", my_context->log_call[k], my_context->log_ret[k]);
-            }
-        }
+        print_cycle_log(LOG_INFO);
     }
     StopEmu(emu, buff);
 }