From d625cf68e5b1dc71433ae9db845c1f48f79fd736 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 9 Mar 2021 17:52:07 +0100 Subject: Added strtol wrapped function --- src/wrapped/generated/functions_list.txt | 1 + src/wrapped/generated/wrapper.c | 2 ++ src/wrapped/generated/wrapper.h | 1 + src/wrapped/wrappedlibc_private.h | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 41d1170b..571aba8c 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -245,6 +245,7 @@ #() dFppp #() lFipi #() lFipL +#() lFppi #() LFLLi #() LFLLI #() LFLpu diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 3c9fe484..fd8623a9 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -278,6 +278,7 @@ typedef double (*dFppi_t)(void*, void*, int32_t); typedef double (*dFppp_t)(void*, void*, void*); typedef intptr_t (*lFipi_t)(int32_t, void*, int32_t); typedef intptr_t (*lFipL_t)(int32_t, void*, uintptr_t); +typedef intptr_t (*lFppi_t)(void*, void*, int32_t); typedef uintptr_t (*LFLLi_t)(uintptr_t, uintptr_t, int32_t); typedef uintptr_t (*LFLLI_t)(uintptr_t, uintptr_t, int64_t); typedef uintptr_t (*LFLpu_t)(uintptr_t, void*, uint32_t); @@ -1150,6 +1151,7 @@ void dFppi(x64emu_t *emu, uintptr_t fcn) { dFppi_t fn = (dFppi_t)fcn; emu->xmm[0 void dFppp(x64emu_t *emu, uintptr_t fcn) { dFppp_t fn = (dFppp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } void lFipi(x64emu_t *emu, uintptr_t fcn) { lFipi_t fn = (lFipi_t)fcn; R_RAX=(intptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX); } void lFipL(x64emu_t *emu, uintptr_t fcn) { lFipL_t fn = (lFipL_t)fcn; R_RAX=(intptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } +void lFppi(x64emu_t *emu, uintptr_t fcn) { lFppi_t fn = (lFppi_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX); } void LFLLi(x64emu_t *emu, uintptr_t fcn) { LFLLi_t fn = (LFLLi_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX); } void LFLLI(x64emu_t *emu, uintptr_t fcn) { LFLLI_t fn = (LFLLI_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (int64_t)R_RDX); } void LFLpu(x64emu_t *emu, uintptr_t fcn) { LFLpu_t fn = (LFLpu_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 5bc6db80..20318ebc 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -275,6 +275,7 @@ void dFppi(x64emu_t *emu, uintptr_t fnc); void dFppp(x64emu_t *emu, uintptr_t fnc); void lFipi(x64emu_t *emu, uintptr_t fnc); void lFipL(x64emu_t *emu, uintptr_t fnc); +void lFppi(x64emu_t *emu, uintptr_t fnc); void LFLLi(x64emu_t *emu, uintptr_t fnc); void LFLLI(x64emu_t *emu, uintptr_t fnc); void LFLpu(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index f315e0a8..995fd0f3 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1842,7 +1842,7 @@ GO(strtof, fFpp) //GO(__strtok_r, //GOW(strtok_r, //GO(__strtok_r_1c, -//GOW(strtol, +GOW(strtol, lFppi) //GO(strtold, //GO(__strtold_internal, //GO(__strtold_l, -- cgit 1.4.1