about summary refs log tree commit diff stats
path: root/src/wrapped32/generated
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-14 19:43:20 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-14 19:43:20 +0100
commit6a5d8313312ca254b7382019dc99912cabc5dafd (patch)
tree1dc766bf24382ff707030bbe1862814f4329d078 /src/wrapped32/generated
parent2164c564f26a0c144b3ef2f0d1abd790714a59e1 (diff)
downloadbox64-6a5d8313312ca254b7382019dc99912cabc5dafd.tar.gz
box64-6a5d8313312ca254b7382019dc99912cabc5dafd.zip
[BOX32][WRAPPER] Fixes and improves libc wrapping
Diffstat (limited to 'src/wrapped32/generated')
-rw-r--r--src/wrapped32/generated/functions_list.txt15
-rw-r--r--src/wrapped32/generated/wrappedlibctypes32.h14
-rw-r--r--src/wrapped32/generated/wrapper32.c2
-rw-r--r--src/wrapped32/generated/wrapper32.h1
4 files changed, 30 insertions, 2 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 88fbb09c..f688ba69 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -712,6 +712,7 @@
 #() pEppBp_ -> pEppB
 #() pFppbp_ -> pFppB
 #() pFXLbL_ -> pFXLB
+#() iEpprLL_ -> iEppB
 #() iFXLbpp_ -> iFXLB
 #() iFXbLC_i -> iFXBi
 #() vFLbL_bL_ -> vFLBB
@@ -1962,6 +1963,7 @@ wrappedlibc:
   - _obstack_newchunk
 - vEpu:
 - vEpp:
+- iFip:
 - iEip:
   - fstatvfs
   - fstatvfs64
@@ -1980,6 +1982,7 @@ wrappedlibc:
   - statvfs
   - statvfs64
   - utimes
+- iFpp:
 - iEpV:
   - execl
   - execlp
@@ -2022,14 +2025,17 @@ wrappedlibc:
 - iEppi:
   - regcomp
 - iEppp:
+  - __isoc23_vsscanf
   - execvpe
   - vswscanf
 - iEppV:
-  - __isoc99_fscanf
+  - __isoc23_sscanf
   - swscanf
 - iEpON:
 - iESpp:
 - iESpV:
+  - __isoc23_fscanf
+  - __isoc99_fscanf
   - fscanf
 - lEipi:
   - readv
@@ -2047,12 +2053,19 @@ wrappedlibc:
 - pEpLL:
 - pEppi:
   - __realpath_chk
+- IEpBp_i:
+  - __isoc23_strtoll
+- UEpBp_i:
+  - __isoc23_strtoull
 - KEpBp_a:
   - __strtold_l
   - strtold_l
 - lEpBp_i:
+  - __isoc23_strtol
+  - __isoc23_wcstol
   - wcstol
 - LEpBp_i:
+  - __isoc23_strtoul
   - wcstoul
 - vEiipp:
   - __vsyslog_chk
diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h
index 10566663..45a2a970 100644
--- a/src/wrapped32/generated/wrappedlibctypes32.h
+++ b/src/wrapped32/generated/wrappedlibctypes32.h
@@ -43,11 +43,13 @@ typedef void (*vEip_t)(int32_t, void*);
 typedef void (*vEpi_t)(void*, int32_t);
 typedef void (*vEpu_t)(void*, uint32_t);
 typedef void (*vEpp_t)(void*, void*);
+typedef int32_t (*iFip_t)(int32_t, void*);
 typedef int32_t (*iEip_t)(int32_t, void*);
 typedef int32_t (*iEup_t)(uint32_t, void*);
 typedef int32_t (*iEpi_t)(void*, int32_t);
 typedef int32_t (*iEpL_t)(void*, uintptr_t);
 typedef int32_t (*iEpp_t)(void*, void*);
+typedef int32_t (*iFpp_t)(void*, void*);
 typedef int32_t (*iEpV_t)(void*, ...);
 typedef int64_t (*IEII_t)(int64_t, int64_t);
 typedef uint64_t (*UEUU_t)(uint64_t, uint64_t);
@@ -86,6 +88,8 @@ typedef void* (*pEpII_t)(void*, int64_t, int64_t);
 typedef void* (*pFpui_t)(void*, uint32_t, int32_t);
 typedef void* (*pEpLL_t)(void*, uintptr_t, uintptr_t);
 typedef void* (*pEppi_t)(void*, void*, int32_t);
+typedef int64_t (*IEpBp_i_t)(void*, struct_p_t*, int32_t);
+typedef uint64_t (*UEpBp_i_t)(void*, struct_p_t*, int32_t);
 typedef double (*KEpBp_a_t)(void*, struct_p_t*, void*);
 typedef intptr_t (*lEpBp_i_t)(void*, struct_p_t*, int32_t);
 typedef uintptr_t (*LEpBp_i_t)(void*, struct_p_t*, int32_t);
@@ -203,10 +207,13 @@ typedef int32_t (*iFpuippupp_t)(void*, uint32_t, int32_t, void*, void*, uint32_t
 	GO(_ITM_addUserCommitAction, vEpup_t) \
 	GO(posix_spawn_file_actions_adddup2, iEpii_t) \
 	GO(regcomp, iEppi_t) \
+	GO(__isoc23_vsscanf, iEppp_t) \
 	GO(execvpe, iEppp_t) \
 	GO(vswscanf, iEppp_t) \
-	GO(__isoc99_fscanf, iEppV_t) \
+	GO(__isoc23_sscanf, iEppV_t) \
 	GO(swscanf, iEppV_t) \
+	GO(__isoc23_fscanf, iESpV_t) \
+	GO(__isoc99_fscanf, iESpV_t) \
 	GO(fscanf, iESpV_t) \
 	GO(readv, lEipi_t) \
 	GO(recvmsg, lEipi_t) \
@@ -215,9 +222,14 @@ typedef int32_t (*iFpuippupp_t)(void*, uint32_t, int32_t, void*, void*, uint32_t
 	GO(shmat, pEipi_t) \
 	GO(gethostbyaddr, pFpui_t) \
 	GO(__realpath_chk, pEppi_t) \
+	GO(__isoc23_strtoll, IEpBp_i_t) \
+	GO(__isoc23_strtoull, UEpBp_i_t) \
 	GO(__strtold_l, KEpBp_a_t) \
 	GO(strtold_l, KEpBp_a_t) \
+	GO(__isoc23_strtol, lEpBp_i_t) \
+	GO(__isoc23_wcstol, lEpBp_i_t) \
 	GO(wcstol, lEpBp_i_t) \
+	GO(__isoc23_strtoul, LEpBp_i_t) \
 	GO(wcstoul, LEpBp_i_t) \
 	GO(__vsyslog_chk, vEiipp_t) \
 	GO(__syslog_chk, vEiipV_t) \
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 18149a10..259f5551 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -803,6 +803,7 @@ typedef void* (*pEppbp__t)(void*, void*, struct_p_t*);
 typedef void* (*pEppBp__t)(void*, void*, struct_p_t*);
 typedef void* (*pFppbp__t)(void*, void*, struct_p_t*);
 typedef void* (*pFXLbL__t)(void*, uintptr_t, struct_L_t*);
+typedef int32_t (*iEpprLL__t)(void*, void*, struct_LL_t*);
 typedef int32_t (*iFXLbpp__t)(void*, uintptr_t, struct_pp_t*);
 typedef int32_t (*iFXbLC_i_t)(void*, struct_LC_t*, int32_t);
 typedef void (*vFLbL_bL__t)(uintptr_t, struct_L_t*, struct_L_t*);
@@ -2572,6 +2573,7 @@ void pEppbp__32(x64emu_t *emu, uintptr_t fcn) { pEppbp__t fn = (pEppbp__t)fcn; e
 void pEppBp__32(x64emu_t *emu, uintptr_t fcn) { pEppBp__t fn = (pEppBp__t)fcn; errno = emu->libc_err; struct_p_t arg_12={0}; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); emu->libc_err = errno; }
 void pFppbp__32(x64emu_t *emu, uintptr_t fcn) { pFppbp__t fn = (pFppbp__t)fcn; struct_p_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void pFXLbL__32(x64emu_t *emu, uintptr_t fcn) { pFXLbL__t fn = (pFXLbL__t)fcn; struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
+void iEpprLL__32(x64emu_t *emu, uintptr_t fcn) { iEpprLL__t fn = (iEpprLL__t)fcn; errno = emu->libc_err; struct_LL_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_LL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); emu->libc_err = errno; }
 void iFXLbpp__32(x64emu_t *emu, uintptr_t fcn) { iFXLbpp__t fn = (iFXLbpp__t)fcn; struct_pp_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_pp(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_pp(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void iFXbLC_i_32(x64emu_t *emu, uintptr_t fcn) { iFXbLC_i_t fn = (iFXbLC_i_t)fcn; struct_LC_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_LC(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_LC(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void vFLbL_bL__32(x64emu_t *emu, uintptr_t fcn) { vFLbL_bL__t fn = (vFLbL_bL__t)fcn; struct_L_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_L(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(from_ulong(from_ptri(ulong_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 0d38a813..14808964 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -753,6 +753,7 @@ void pEppbp__32(x64emu_t *emu, uintptr_t fnc);
 void pEppBp__32(x64emu_t *emu, uintptr_t fnc);
 void pFppbp__32(x64emu_t *emu, uintptr_t fnc);
 void pFXLbL__32(x64emu_t *emu, uintptr_t fnc);
+void iEpprLL__32(x64emu_t *emu, uintptr_t fnc);
 void iFXLbpp__32(x64emu_t *emu, uintptr_t fnc);
 void iFXbLC_i_32(x64emu_t *emu, uintptr_t fnc);
 void vFLbL_bL__32(x64emu_t *emu, uintptr_t fnc);