- added a couple of more calling conventions defines - renamed, in CV records, 'call' field into 'callconv' for clarity
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/msc.c | 8 +++---- include/cvconst.h | 3 +++ include/wine/mscvpdb.h | 8 +++---- tools/winedump/msc.c | 56 ++++++++++++++++++++++++++++++++++++++++++------ 4 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index ddb094f4591..a5e6fd12449 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1295,7 +1295,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, break;
case LF_PROCEDURE_V1: - symt = codeview_new_func_signature(ctp, existing, type->procedure_v1.call); + symt = codeview_new_func_signature(ctp, existing, type->procedure_v1.callconv); if (details) { codeview_add_type(curr_type, symt); @@ -1306,7 +1306,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, } break; case LF_PROCEDURE_V2: - symt = codeview_new_func_signature(ctp, existing,type->procedure_v2.call); + symt = codeview_new_func_signature(ctp, existing,type->procedure_v2.callconv); if (details) { codeview_add_type(curr_type, symt); @@ -1321,7 +1321,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, /* FIXME: for C++, this is plain wrong, but as we don't use arg types * nor class information, this would just do for now */ - symt = codeview_new_func_signature(ctp, existing, type->mfunction_v1.call); + symt = codeview_new_func_signature(ctp, existing, type->mfunction_v1.callconv); if (details) { codeview_add_type(curr_type, symt); @@ -1335,7 +1335,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, /* FIXME: for C++, this is plain wrong, but as we don't use arg types * nor class information, this would just do for now */ - symt = codeview_new_func_signature(ctp, existing, type->mfunction_v2.call); + symt = codeview_new_func_signature(ctp, existing, type->mfunction_v2.callconv); if (details) { codeview_add_type(curr_type, symt); diff --git a/include/cvconst.h b/include/cvconst.h index 39829c73592..95fdc9c73e5 100644 --- a/include/cvconst.h +++ b/include/cvconst.h @@ -720,6 +720,9 @@ typedef enum CV_call_e CV_CALL_TRICALL, CV_CALL_SH5CALL, CV_CALL_M32RCALL, + CV_CALL_CLRCALL, + CV_CALL_INLINE, + CV_CALL_NEAR_VECTOR, CV_CALL_RESERVED, } CV_call_e;
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 433a80fd8f4..40b2a32f411 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -308,7 +308,7 @@ union codeview_type unsigned short int len; short int id; unsigned short int rvtype; - unsigned char call; + unsigned char callconv; unsigned char funcattr; unsigned short int params; unsigned short int arglist; @@ -319,7 +319,7 @@ union codeview_type unsigned short int len; short int id; unsigned int rvtype; - unsigned char call; + unsigned char callconv; unsigned char funcattr; unsigned short int params; unsigned int arglist; @@ -332,7 +332,7 @@ union codeview_type unsigned short int rvtype; unsigned short int class_type; unsigned short int this_type; - unsigned char call; + unsigned char callconv; unsigned char funcattr; unsigned short int params; unsigned short int arglist; @@ -346,7 +346,7 @@ union codeview_type unsigned int rvtype; unsigned int class_type; unsigned this_type; - unsigned char call; + unsigned char callconv; unsigned char funcattr; unsigned short params; unsigned int arglist; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index f2eabf31024..67f7de14e78 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -410,6 +410,49 @@ static const char* get_language(unsigned l) return lang; }
+static const char* get_callconv(unsigned cc) +{ + const char* callconv; + + switch (cc) + { + case CV_CALL_NEAR_C: callconv = "near C"; break; + case CV_CALL_FAR_C: callconv = "far C"; break; + case CV_CALL_NEAR_PASCAL: callconv = "near pascal"; break; + case CV_CALL_FAR_PASCAL: callconv = "far pascal"; break; + case CV_CALL_NEAR_FAST: callconv = "near fast"; break; + case CV_CALL_FAR_FAST: callconv = "far fast"; break; + case CV_CALL_SKIPPED: callconv = "skipped"; break; + case CV_CALL_NEAR_STD: callconv = "near std"; break; + case CV_CALL_FAR_STD: callconv = "far std"; break; + case CV_CALL_NEAR_SYS: callconv = "near sys"; break; + case CV_CALL_FAR_SYS: callconv = "far sys"; break; + case CV_CALL_THISCALL: callconv = "this call"; break; + case CV_CALL_MIPSCALL: callconv = "mips call"; break; + case CV_CALL_GENERIC: callconv = "generic"; break; + case CV_CALL_ALPHACALL: callconv = "alpha call"; break; + case CV_CALL_PPCCALL: callconv = "ppc call"; break; + case CV_CALL_SHCALL: callconv = "sh call"; break; + case CV_CALL_ARMCALL: callconv = "arm call"; break; + case CV_CALL_AM33CALL: callconv = "am33 call"; break; + case CV_CALL_TRICALL: callconv = "tri call"; break; + case CV_CALL_SH5CALL: callconv = "sh5 call"; break; + case CV_CALL_M32RCALL: callconv = "m32r call"; break; + case CV_CALL_CLRCALL: callconv = "clr call"; break; + case CV_CALL_INLINE: callconv = "inline"; break; + case CV_CALL_NEAR_VECTOR: callconv = "near vector"; break; + case CV_CALL_RESERVED: callconv = "reserved"; break; + default: + { + static char tmp[16]; + sprintf(tmp, "callconv=%x", cc); + callconv = tmp; + } + break; + } + return callconv; +} + static void do_field(const unsigned char* start, const unsigned char* end) { /* @@ -883,26 +926,25 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type break;
case LF_PROCEDURE_V1: - /* FIXME: unknown could be the calling convention for the proc */ - printf("\t%x => Procedure V1 ret_type:%x call:%x attr:%s (#%u args_type:%x)\n", + printf("\t%x => Procedure V1 ret_type:%x callconv:%s attr:%s (#%u args_type:%x)\n", curr_type, type->procedure_v1.rvtype, - type->procedure_v1.call, get_funcattr(type->procedure_v1.funcattr), + get_callconv(type->procedure_v1.callconv), get_funcattr(type->procedure_v1.funcattr), type->procedure_v1.params, type->procedure_v1.arglist); break;
case LF_PROCEDURE_V2: - printf("\t%x => Procedure V2 ret_type:%x unk:%x attr:%s (#%u args_type:%x)\n", + printf("\t%x => Procedure V2 ret_type:%x callconv:%s attr:%s (#%u args_type:%x)\n", curr_type, type->procedure_v2.rvtype, - type->procedure_v2.call, get_funcattr(type->procedure_v2.funcattr), + get_callconv(type->procedure_v2.callconv), get_funcattr(type->procedure_v1.funcattr), type->procedure_v2.params, type->procedure_v2.arglist); break;
case LF_MFUNCTION_V2: - printf("\t%x => MFunction V2 ret-type:%x call:%x class-type:%x this-type:%x attr:%s\n" + printf("\t%x => MFunction V2 ret-type:%x callconv:%s class-type:%x this-type:%x attr:%s\n" "\t\t#args:%x args-type:%x this_adjust:%x\n", curr_type, type->mfunction_v2.rvtype, - type->mfunction_v2.call, + get_callconv(type->mfunction_v2.callconv), type->mfunction_v2.class_type, type->mfunction_v2.this_type, get_funcattr(type->mfunction_v2.funcattr),
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=95999
Your paranoid android.
=== debiant2 (build log) ===
error: patch failed: include/cvconst.h:720 error: patch failed: include/wine/mscvpdb.h:308 error: patch failed: tools/winedump/msc.c:410 Task: Patch failed to apply
=== debiant2 (build log) ===
error: patch failed: include/cvconst.h:720 error: patch failed: include/wine/mscvpdb.h:308 error: patch failed: tools/winedump/msc.c:410 Task: Patch failed to apply