about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-03 21:48:04 +0800
committerGitHub <noreply@github.com>2025-04-03 15:48:04 +0200
commit8cba915bca8d48a7ac4d9571004975320f71a7ff (patch)
tree259c7742564658696da8f75f421e29c1ceb9bf7e /src/wrapped
parentcd3163a78585c35d41a18f248cb9575c46ffab38 (diff)
downloadbox64-8cba915bca8d48a7ac4d9571004975320f71a7ff.tar.gz
box64-8cba915bca8d48a7ac4d9571004975320f71a7ff.zip
Moved more functions to os.h (#2497)
* Removed some unused function declarations

* Moved more functions to os.h

* review
Diffstat (limited to 'src/wrapped')
-rw-r--r--src/wrapped/wrappedlibc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 9685831c..68169d2f 100644
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -47,6 +47,7 @@
 
 #include "wrappedlibs.h"
 
+#include "os.h"
 #include "box64stack.h"
 #include "x64emu.h"
 #include "box64cpu.h"
@@ -3540,7 +3541,7 @@ EXPORT int my_backtrace_ip(x64emu_t* emu, void** buffer, int size)
             if (++idx < size) buffer[idx] = (void*)ret_addr;
         } else if (!success) {
             if(getProtection((uintptr_t)addr)&(PROT_READ)) {
-                if(getProtection((uintptr_t)addr-19) && *(uint8_t*)(addr-19)==0xCC && *(uint8_t*)(addr-19+1)=='S' && *(uint8_t*)(addr-19+2)=='C') {
+                if (getProtection((uintptr_t)addr - 19) && *(uint8_t*)(addr - 19) == 0xCC && IsBridgeSignature(*(uint8_t*)(addr - 19 + 1), *(uint8_t*)(addr - 19 + 2))) {
                     buffer[idx-1] = (void*)(addr-19);
                     success = 2;
                     if(idx==1)