{
int i;
int bRelay = 0;
- int bInPrototype;
+ int bInPrototype = 0;
if (pexp->nCallingConvention != CC_STUB &&
(pexp->uFlags & FL_STUB) == 0)
case ARG_WSTR: fprintf(file, "wchar_t*"); break;
case ARG_DBL: fprintf(file, "double"); break;
case ARG_INT64 : fprintf(file, "__int64"); break;
- case ARG_INT128 : fprintf(file, "__int128"); break;
+ /* __int128 is not supported on x86, and int128 in spec files most often represents a GUID */
+ case ARG_INT128 : fprintf(file, "GUID"); break;
case ARG_FLOAT: fprintf(file, "float"); break;
}
fprintf(file, " a%d", i);
case ARG_STR: fprintf(file, "'%%s'"); break;
case ARG_WSTR: fprintf(file, "'%%ws'"); break;
case ARG_DBL: fprintf(file, "%%f"); break;
- case ARG_INT64: fprintf(file, "%%\"PRix64\""); break;
- case ARG_INT128: fprintf(file, "%%\"PRix128\""); break;
+ case ARG_INT64: fprintf(file, "%%\"PRIx64\""); break;
+ case ARG_INT128: fprintf(file, "'%%s'"); break;
case ARG_FLOAT: fprintf(file, "%%f"); break;
}
}
case ARG_WSTR: fprintf(file, "(wchar_t*)a%d", i); break;
case ARG_DBL: fprintf(file, "(double)a%d", i); break;
case ARG_INT64: fprintf(file, "(__int64)a%d", i); break;
- case ARG_INT128: fprintf(file, "(__int128)a%d", i); break;
+ case ARG_INT128: fprintf(file, "wine_dbgstr_guid(&a%d)", i); break;
case ARG_FLOAT: fprintf(file, "(float)a%d", i); break;
}
}
}
void
-Output_symbol(FILE *fileDest, char* pszSymbolName)
+Output_stublabel(FILE *fileDest, char* pszSymbolName)
{
if (giArch == ARCH_ARM)
{
sprintf(szNameBuffer, "@_stub_%.*s@%d",
pexp->strName.len, pexp->strName.buf, pexp->nStackBytes);
}
- else if (pexp->nCallingConvention == CC_CDECL ||
- pexp->nCallingConvention == CC_STUB)
+ else if ((pexp->nCallingConvention == CC_CDECL) ||
+ (pexp->nCallingConvention == CC_THISCALL) ||
+ (pexp->nCallingConvention == CC_EXTERN) ||
+ (pexp->nCallingConvention == CC_STUB))
{
sprintf(szNameBuffer, "__stub_%.*s",
pexp->strName.len, pexp->strName.buf);
}
- else if (pexp->nCallingConvention == CC_EXTERN)
+ else
{
- sprintf(szNameBuffer, "__stub_%.*s",
- pexp->strName.len, pexp->strName.buf);
+ fprintf(stderr, "Invalid calling convention");
+ return 0;
}
- Output_symbol(fileDest, szNameBuffer);
+ Output_stublabel(fileDest, szNameBuffer);
return 1;
}
/* C++ stubs are forwarded to C stubs */
fprintf(fileDest, "=stub_function%d", pexp->nNumber);
}
- else if (gbTracing && ((pexp->uFlags & FL_NORELAY) == 0) && (pexp->nCallingConvention == CC_STDCALL) &&
+ else if (gbTracing && ((pexp->uFlags & FL_NORELAY) == 0) &&
+ (pexp->nCallingConvention == CC_STDCALL) &&
(pexp->strName.buf[0] != '?'))
{
/* Redirect it to the relay-tracing trampoline */