diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-07-22 20:45:16 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-07-22 20:45:16 +0200 |
| commit | 67c9378fb8568b6104979e158ed690e4c6d3bc04 (patch) | |
| tree | 883eb19b91fb4fa22ca01724ad0408cc8c72af1b /src/wrapped/wrappedlibc.c | |
| parent | 7ab299b2465cda2b9fb0ce5c4014906cc7d20e31 (diff) | |
| download | box64-67c9378fb8568b6104979e158ed690e4c6d3bc04.tar.gz box64-67c9378fb8568b6104979e158ed690e4c6d3bc04.zip | |
Hacked wrapped ptrace to avoid crash when wine handle exception (and debug registers in general)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index ff20404e..59953d9c 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -39,6 +39,7 @@ #include <malloc.h> #include <getopt.h> #include <sys/prctl.h> +#include <sys/ptrace.h> #undef LOG_INFO #undef LOG_DEBUG @@ -2981,6 +2982,15 @@ EXPORT int my_semctl(int semid, int semnum, int cmd, union semun b) return ret; } +EXPORT int my_ptrace(x64emu_t* emu, int request, pid_t pid, void* addr, void* data) +{ + if(request == PTRACE_POKEUSER) { + // lets just ignore this for now! + return 0; + } + return ptrace(request, pid, addr, data); +} + // Backtrace stuff #include "elfs/elfdwarf_private.h" |