How to force cdecl on variadic function
How to force cdecl on variadicĀ function
Iām writing a 64bit operating system using g++, and I have a variadic function like:
void DbgPrint(const char *fmt, ...);
which shall behave quite like printf. The problem here is that g++ follows the System V ABI, and thus it passes the first arguments in RDI, RSI, RDX, RCX, R8, R9, then pushes remaining (if any) on the stack.
Using the old stdarg.h macros va_start, va_arg, etc, with cdecl,ā¦
View On WordPress

















