The following series updates pdb information and enhances tools/winedump. Most information details comes from https://github.com/Microsoft/microsoft-pdb.
---
Eric Pouech (11): tools/winedump: move string conversion of machine and language into dedicated helpers tools/winedump: added more supported languages from .pdb COMPILE records tools/winedump: added a bunch of new CPU definitions for PDB tools/winedump: now properly displaying function attributes in function/methods codeview records tools/winedump: enhanced dumping function attributes for CodeView tools/winedump: added some new bits in UDT's property field dbghelp, tools/winedump: Added proper support for S_OBJNAME records include/wine/mscvpdb.h: made len and id type/symbol fields unsigned (as it's supposed to be) dbghelp, tools/winedump: update support for S_COMPILE* records include/wine/mscvpdb.h: added typedef:s for type-id references tools/winedump: fix public and data/proc ref definitions of Codeview records
dlls/dbghelp/msc.c | 64 ++--- include/cvconst.h | 92 ++++++ include/wine/mscvpdb.h | 625 +++++++++++++++++++++++------------------ tools/winedump/msc.c | 340 ++++++++++++++++------ 4 files changed, 718 insertions(+), 403 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- tools/winedump/msc.c | 96 ++++++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 43 deletions(-)
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index fbbbfe4ab7f..d037cec89dd 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -264,6 +264,54 @@ static const char* get_property(unsigned prop) return tmp; }
+static const char* get_machine(unsigned m) +{ + const char* machine; + + switch (m) + { + case 0x00: machine = "Intel 8080"; break; + case 0x01: machine = "Intel 8086"; break; + case 0x02: machine = "Intel 80286"; break; + case 0x03: machine = "Intel 80386"; break; + case 0x04: machine = "Intel 80486"; break; + case 0x05: machine = "Intel Pentium"; break; + case 0x10: machine = "MIPS R4000"; break; + default: + { + static char tmp[16]; + sprintf(tmp, "machine=%x", m); + machine = tmp; + } + break; + } + return machine; +} + +static const char* get_language(unsigned l) +{ + const char* lang; + + switch (l) + { + case 0x00: lang = "C"; break; + case 0x01: lang = "C++"; break; + case 0x02: lang = "Fortran"; break; + case 0x03: lang = "Masm"; break; + case 0x04: lang = "Pascal"; break; + case 0x05: lang = "Basic"; break; + case 0x06: lang = "Cobol"; break; + default: + { + static char tmp[16]; + sprintf(tmp, "lang=%x", l); + lang = tmp; + } + break; + } + return lang; +} + static void do_field(const unsigned char* start, const unsigned char* end) { /* @@ -1131,49 +1179,11 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) break;
case S_COMPILE: - { - const char* machine; - const char* lang; - - switch (sym->compiland_v1.unknown & 0xFF) - { - case 0x00: machine = "Intel 8080"; break; - case 0x01: machine = "Intel 8086"; break; - case 0x02: machine = "Intel 80286"; break; - case 0x03: machine = "Intel 80386"; break; - case 0x04: machine = "Intel 80486"; break; - case 0x05: machine = "Intel Pentium"; break; - case 0x10: machine = "MIPS R4000"; break; - default: - { - static char tmp[16]; - sprintf(tmp, "machine=%x", sym->compiland_v1.unknown & 0xFF); - machine = tmp; - } - break; - } - switch ((sym->compiland_v1.unknown >> 8) & 0xFF) - { - case 0x00: lang = "C"; break; - case 0x01: lang = "C++"; break; - case 0x02: lang = "Fortran"; break; - case 0x03: lang = "Masm"; break; - case 0x04: lang = "Pascal"; break; - case 0x05: lang = "Basic"; break; - case 0x06: lang = "Cobol"; break; - default: - { - static char tmp[16]; - sprintf(tmp, "language=%x", (sym->compiland_v1.unknown >> 8) & 0xFF); - lang = tmp; - } - break; - } - - printf("\tS-Compiland V1 '%s' %s %s unk:%x\n", - p_string(&sym->compiland_v1.p_name), machine, lang, - sym->compiland_v1.unknown >> 16); - } + printf("\tS-Compiland V1 '%s' %s %s unk:%x\n", + p_string(&sym->compiland_v1.p_name), + get_machine(sym->compiland_v1.unknown & 0xFF), + get_language((sym->compiland_v1.unknown >> 8) & 0xFF), + sym->compiland_v1.unknown >> 16); break;
case S_COMPILE2_ST:
update cvconst.h accordingly
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/cvconst.h | 21 +++++++++++++++++++++ tools/winedump/msc.c | 25 ++++++++++++++++++------- 2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/include/cvconst.h b/include/cvconst.h index 80b8e440edc..adb18d420fb 100644 --- a/include/cvconst.h +++ b/include/cvconst.h @@ -722,3 +722,24 @@ typedef enum CV_call_e CV_CALL_M32RCALL, CV_CALL_RESERVED, } CV_call_e; + +typedef enum CV_CFL_LANG +{ + CV_CFL_C, + CV_CFL_CXX, + CV_CFL_FORTRAN, + CV_CFL_MASM, + CV_CFL_PASCAL, + CV_CFL_BASIC, + CV_CFL_COBOL, + CV_CFL_LINK, + CV_CFL_CVTRES, + CV_CFL_CVTPGD, + CV_CFL_CSHARP, + CV_CFL_VB, + CV_CFL_ILASM, + CV_CFL_JAVA, + CV_CFL_JSCRIPT, + CV_CFL_MSIL, + CV_CFL_HLSL, +} CV_CFL_LANG; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index d037cec89dd..01c0fff3052 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -42,6 +42,7 @@ #include "windef.h" #include "winbase.h" #include "winedump.h" +#include "cvconst.h" #include "wine/mscvpdb.h"
#define PSTRING(adr, ofs) \ @@ -294,13 +295,23 @@ static const char* get_language(unsigned l)
switch (l) { - case 0x00: lang = "C"; break; - case 0x01: lang = "C++"; break; - case 0x02: lang = "Fortran"; break; - case 0x03: lang = "Masm"; break; - case 0x04: lang = "Pascal"; break; - case 0x05: lang = "Basic"; break; - case 0x06: lang = "Cobol"; break; + case CV_CFL_C: lang = "C"; break; + case CV_CFL_CXX: lang = "C++"; break; + case CV_CFL_FORTRAN: lang = "Fortran"; break; + case CV_CFL_MASM: lang = "Masm"; break; + case CV_CFL_PASCAL: lang = "Pascal"; break; + case CV_CFL_BASIC: lang = "Basic"; break; + case CV_CFL_COBOL: lang = "Cobol"; break; + case CV_CFL_LINK: lang = "Link"; break; + case CV_CFL_CVTRES: lang = "Resource"; break; + case CV_CFL_CVTPGD: lang = "PoGo"; break; + case CV_CFL_CSHARP: lang = "C#"; break; + case CV_CFL_VB: lang = "VisualBasic"; break; + case CV_CFL_ILASM: lang = "IL ASM"; break; + case CV_CFL_JAVA: lang = "Java"; break; + case CV_CFL_JSCRIPT: lang = "JavaScript"; break; + case CV_CFL_MSIL: lang = "MSIL"; break; + case CV_CFL_HLSL: lang = "HLSL"; break; default: { static char tmp[16];
updated cvinfo.h accordingly
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/cvconst.h | 68 +++++++++++++++++++++++++++++++++++++++++ tools/winedump/msc.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 143 insertions(+), 7 deletions(-)
diff --git a/include/cvconst.h b/include/cvconst.h index adb18d420fb..39829c73592 100644 --- a/include/cvconst.h +++ b/include/cvconst.h @@ -743,3 +743,71 @@ typedef enum CV_CFL_LANG CV_CFL_MSIL, CV_CFL_HLSL, } CV_CFL_LANG; + +typedef enum CV_CPU_TYPE_e +{ + CV_CFL_8080, + CV_CFL_8086, + CV_CFL_80286, + CV_CFL_80386, + CV_CFL_80486, + CV_CFL_PENTIUM, + CV_CFL_PENTIUMII, + CV_CFL_PENTIUMPRO = CV_CFL_PENTIUMII, + CV_CFL_PENTIUMIII, + CV_CFL_MIPS = 0x10, + CV_CFL_MIPSR4000 = CV_CFL_MIPS, + CV_CFL_MIPS16, + CV_CFL_MIPS32, + CV_CFL_MIPS64, + CV_CFL_MIPSI, + CV_CFL_MIPSII, + CV_CFL_MIPSIII, + CV_CFL_MIPSIV, + CV_CFL_MIPSV, + CV_CFL_M68000 = 0x20, + CV_CFL_M68010, + CV_CFL_M68020, + CV_CFL_M68030, + CV_CFL_M68040, + CV_CFL_ALPHA = 0x30, + CV_CFL_ALPHA_21064 = 0x30, + CV_CFL_ALPHA_21164, + CV_CFL_ALPHA_21164A, + CV_CFL_ALPHA_21264, + CV_CFL_ALPHA_21364, + CV_CFL_PPC601 = 0x40, + CV_CFL_PPC603, + CV_CFL_PPC604, + CV_CFL_PPC620, + CV_CFL_PPCFP, + CV_CFL_SH3 = 0x50, + CV_CFL_SH3E, + CV_CFL_SH3DSP, + CV_CFL_SH4, + CV_CFL_SHMEDIA, + CV_CFL_ARM3 = 0x60, + CV_CFL_ARM4, + CV_CFL_ARM4T, + CV_CFL_ARM5, + CV_CFL_ARM5T, + CV_CFL_ARM6, + CV_CFL_ARM_XMAC, + CV_CFL_ARM_WMMX, + CV_CFL_ARM7, + CV_CFL_OMNI = 0x70, + CV_CFL_IA64 = 0x80, + CV_CFL_IA64_1 = 0x80, + CV_CFL_IA64_2, + CV_CFL_CEE = 0x90, + CV_CFL_AM33 = 0xA0, + CV_CFL_M32R = 0xB0, + CV_CFL_TRICORE = 0xC0, + CV_CFL_X64 = 0xD0, + CV_CFL_AMD64 = CV_CFL_X64, + CV_CFL_EBC = 0xE0, + CV_CFL_THUMB = 0xF0, + CV_CFL_ARMNT = 0xF4, + CV_CFL_ARM64 = 0xF6, + CV_CFL_D3D11_SHADER = 0x100, +} CV_CPU_TYPE_e; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 01c0fff3052..2155d876696 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -271,13 +271,81 @@ static const char* get_machine(unsigned m)
switch (m) { - case 0x00: machine = "Intel 8080"; break; - case 0x01: machine = "Intel 8086"; break; - case 0x02: machine = "Intel 80286"; break; - case 0x03: machine = "Intel 80386"; break; - case 0x04: machine = "Intel 80486"; break; - case 0x05: machine = "Intel Pentium"; break; - case 0x10: machine = "MIPS R4000"; break; + case CV_CFL_8080: machine = "Intel 8080"; break; + case CV_CFL_8086: machine = "Intel 8086"; break; + case CV_CFL_80286: machine = "Intel 80286"; break; + case CV_CFL_80386: machine = "Intel 80386"; break; + case CV_CFL_80486: machine = "Intel 80486"; break; + case CV_CFL_PENTIUM: machine = "Intel Pentium"; break; + case CV_CFL_PENTIUMII: machine = "Intel Pentium II"; break; + case CV_CFL_PENTIUMIII: machine = "Intel Pentium III"; break; + + case CV_CFL_MIPS: machine = "MIPS R4000"; break; + case CV_CFL_MIPS16: machine = "MIPS16"; break; + case CV_CFL_MIPS32: machine = "MIPS32"; break; + case CV_CFL_MIPS64: machine = "MIPS64"; break; + case CV_CFL_MIPSI: machine = "MIPS I"; break; + case CV_CFL_MIPSII: machine = "MIPS II"; break; + case CV_CFL_MIPSIII: machine = "MIPS III"; break; + case CV_CFL_MIPSIV: machine = "MIPS IV"; break; + case CV_CFL_MIPSV: machine = "MIPS V"; break; + + case CV_CFL_M68000: machine = "M68000"; break; + case CV_CFL_M68010: machine = "M68010"; break; + case CV_CFL_M68020: machine = "M68020"; break; + case CV_CFL_M68030: machine = "M68030"; break; + case CV_CFL_M68040: machine = "M68040"; break; + + case CV_CFL_ALPHA_21064: machine = "Alpha 21064"; break; + case CV_CFL_ALPHA_21164: machine = "Alpha 21164"; break; + case CV_CFL_ALPHA_21164A: machine = "Alpha 21164A"; break; + case CV_CFL_ALPHA_21264: machine = "Alpha 21264"; break; + case CV_CFL_ALPHA_21364: machine = "Alpha 21364"; break; + + case CV_CFL_PPC601: machine = "PowerPC 601"; break; + case CV_CFL_PPC603: machine = "PowerPC 603"; break; + case CV_CFL_PPC604: machine = "PowerPC 604"; break; + case CV_CFL_PPC620: machine = "PowerPC 620"; break; + case CV_CFL_PPCFP: machine = "PowerPC FP"; break; + + case CV_CFL_SH3: machine = "SH3"; break; + case CV_CFL_SH3E: machine = "SH3E"; break; + case CV_CFL_SH3DSP: machine = "SH3DSP"; break; + case CV_CFL_SH4: machine = "SH4"; break; + case CV_CFL_SHMEDIA: machine = "SHMEDIA"; break; + + case CV_CFL_ARM3: machine = "ARM 3"; break; + case CV_CFL_ARM4: machine = "ARM 4"; break; + case CV_CFL_ARM4T: machine = "ARM 4T"; break; + case CV_CFL_ARM5: machine = "ARM 5"; break; + case CV_CFL_ARM5T: machine = "ARM 5T"; break; + case CV_CFL_ARM6: machine = "ARM 6"; break; + case CV_CFL_ARM_XMAC: machine = "ARM XMAC"; break; + case CV_CFL_ARM_WMMX: machine = "ARM WMMX"; break; + case CV_CFL_ARM7: machine = "ARM 7"; break; + + case CV_CFL_OMNI: machine = "OMNI"; break; + + case CV_CFL_IA64_1: machine = "Itanium"; break; + case CV_CFL_IA64_2: machine = "Itanium 2"; break; + + case CV_CFL_CEE: machine = "CEE"; break; + + case CV_CFL_AM33: machine = "AM33"; break; + + case CV_CFL_M32R: machine = "M32R"; break; + + case CV_CFL_TRICORE: machine = "TRICORE"; break; + + case CV_CFL_X64: machine = "x86_64"; break; + + case CV_CFL_EBC: machine = "EBC"; break; + + case CV_CFL_THUMB: machine = "Thumb"; break; + case CV_CFL_ARMNT: machine = "ARM NT"; break; + case CV_CFL_ARM64: machine = "ARM 64"; break; + + case CV_CFL_D3D11_SHADER: machine = "D3D11 shader"; break; default: { static char tmp[16];
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/wine/mscvpdb.h | 8 ++++---- tools/winedump/msc.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 1f7f1f305f2..87156041efa 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -309,7 +309,7 @@ union codeview_type short int id; unsigned short int rvtype; unsigned char call; - unsigned char reserved; + unsigned char funcattr; unsigned short int params; unsigned short int arglist; } procedure_v1; @@ -320,7 +320,7 @@ union codeview_type short int id; unsigned int rvtype; unsigned char call; - unsigned char reserved; + unsigned char funcattr; unsigned short int params; unsigned int arglist; } procedure_v2; @@ -333,7 +333,7 @@ union codeview_type unsigned short int class_type; unsigned short int this_type; unsigned char call; - unsigned char reserved; + unsigned char funcattr; unsigned short int params; unsigned short int arglist; unsigned int this_adjust; @@ -347,7 +347,7 @@ union codeview_type unsigned int class_type; unsigned this_type; unsigned char call; - unsigned char reserved; + unsigned char funcattr; unsigned short params; unsigned int arglist; unsigned int this_adjust; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 2155d876696..12229a615f7 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -265,6 +265,25 @@ static const char* get_property(unsigned prop) return tmp; }
+static const char* get_funcattr(unsigned attr) +{ + static char tmp[1024]; + unsigned pos = 0; + + if (!attr) return "none"; +#define X(s) {if (pos) tmp[pos++] = ';'; strcpy(tmp + pos, s); pos += strlen(s);} + if (attr & 0x0001) X("C++ReturnUDT"); + if (attr & 0x0002) X("Ctor"); + if (attr & 0x0004) X("Ctor-w/virtualbase"); + if (attr & 0xfff8) pos += sprintf(tmp, "unk:%x", attr & 0xfff8); +#undef X + + tmp[pos] = '\0'; + assert(pos < sizeof(tmp)); + + return tmp; +} + static const char* get_machine(unsigned m) { const char* machine; @@ -865,27 +884,28 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type
case LF_PROCEDURE_V1: /* FIXME: unknown could be the calling convention for the proc */ - printf("\t%x => Procedure V1 ret_type:%x call:%x (#%u args_type:%x)\n", + printf("\t%x => Procedure V1 ret_type:%x call:%x attr:%s (#%u args_type:%x)\n", curr_type, type->procedure_v1.rvtype, - type->procedure_v1.call, type->procedure_v1.params, - type->procedure_v1.arglist); + type->procedure_v1.call, 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 (#%u args_type:%x)\n", + printf("\t%x => Procedure V2 ret_type:%x unk:%x attr:%s (#%u args_type:%x)\n", curr_type, type->procedure_v2.rvtype, - type->procedure_v2.call, type->procedure_v2.params, - type->procedure_v2.arglist); + type->procedure_v2.call, get_funcattr(type->procedure_v2.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\n" + printf("\t%x => MFunction V2 ret-type:%x call:%x 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, type->mfunction_v2.class_type, type->mfunction_v2.this_type, + get_funcattr(type->mfunction_v2.funcattr), type->mfunction_v2.params, type->mfunction_v2.arglist, type->mfunction_v2.this_adjust);
- 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 b6811ea97f5..25300aa6f90 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1288,7 +1288,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); @@ -1299,7 +1299,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); @@ -1314,7 +1314,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); @@ -1328,7 +1328,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 87156041efa..036c65df0c1 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 12229a615f7..4885bb6e0b0 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),
- now showing decorated name when available
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- tools/winedump/msc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 4885bb6e0b0..8053c79e450 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -256,10 +256,14 @@ static const char* get_property(unsigned prop) if (prop & 0x0040) X("w/casting-methods"); if (prop & 0x0080) X("forward"); if (prop & 0x0100) X("scoped"); + if (prop & 0x0200) X("decorated-name"); + if (prop & 0x0400) X("sealed-name"); + if (prop & 0x1800) pos += sprintf(tmp, "hfa%x", (prop >> 11) & 3); + if (prop & 0x2000) X("intrinsic"); + if (prop & 0xC000) pos += sprintf(tmp, "mocom%x", prop >> 14); #undef X
- if (prop & ~0x01FF) pos += sprintf(tmp, "unk%x", prop & ~0x01FF); - else tmp[pos] = '\0'; + tmp[pos] = '\0'; assert(pos < sizeof(tmp));
return tmp; @@ -853,6 +857,8 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type str, type->struct_v3.n_element, get_property(type->struct_v3.property), type->struct_v3.fieldlist, type->struct_v3.derived, type->struct_v3.vshape, value); + if (type->union_v3.property & 0x200) + printf("\t\tDecorated name:%s\n", str + strlen(str) + 1); break;
case LF_UNION_V1: @@ -878,6 +884,8 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type curr_type, str, type->union_v3.count, get_property(type->union_v3.property), type->union_v3.fieldlist, value); + if (type->union_v3.property & 0x200) + printf("\t\tDecorated name:%s\n", str + strlen(str) + 1); break;
case LF_ENUM_V1: @@ -905,6 +913,8 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type type->enumeration_v3.fieldlist, type->enumeration_v3.count, get_property(type->enumeration_v3.property)); + if (type->union_v3.property & 0x200) + printf("\t\tDecorated name:%s\n", type->enumeration_v3.name + strlen(type->enumeration_v3.name) + 1); break;
case LF_ARGLIST_V1:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/msc.c | 20 ++++++-------------- include/wine/mscvpdb.h | 10 +++++++++- tools/winedump/msc.c | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 25300aa6f90..2712d352a17 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1844,23 +1844,15 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo } } break; + case S_OBJNAME: - TRACE("S-Compiland-V3 %s\n", sym->compiland_v3.name); - if (TRACE_ON(dbghelp_msc)) - { - const char* ptr1 = sym->compiland_v3.name + strlen(sym->compiland_v3.name); - const char* ptr2; - while (*ptr1) - { - ptr2 = ptr1 + strlen(ptr1) + 1; - TRACE("\t%s => %s\n", ptr1, debugstr_a(ptr2)); - ptr1 = ptr2 + strlen(ptr2) + 1; - } - } - break; + TRACE("S-ObjName-V3 %s\n", sym->objname_v3.name); + compiland = symt_new_compiland(msc_dbg->module, 0 /* FIXME */, + source_new(msc_dbg->module, NULL, + sym->objname_v3.name));
case S_OBJNAME_ST: - TRACE("S-ObjName %s\n", terminate_string(&sym->objname_v1.p_name)); + TRACE("S-ObjName-V1 %s\n", terminate_string(&sym->objname_v1.p_name)); compiland = symt_new_compiland(msc_dbg->module, 0 /* FIXME */, source_new(msc_dbg->module, NULL, terminate_string(&sym->objname_v1.p_name))); diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 036c65df0c1..a66334dbc90 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1557,10 +1557,18 @@ union codeview_symbol { short int len; short int id; - char signature[4]; + unsigned signature; struct p_string p_name; } objname_v1;
+ struct + { + short int len; + short int id; + unsigned signature; + char name[1]; + } objname_v3; + struct { short int len; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 8053c79e450..5def00df8ed 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -1352,12 +1352,12 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) break;
case S_OBJNAME: - printf("\tS-Compiland V3 '%s' unknown:%x\n", - sym->compiland_v3.name, sym->compiland_v3.unknown); + printf("\tS-ObjName V3 sig:%x '%s'\n", + sym->objname_v3.signature, sym->objname_v3.name); break;
case S_OBJNAME_ST: - printf("\tS-ObjName V1 sig:%.4s '%s'\n", + printf("\tS-ObjName V1 sig:%x '%s'\n", sym->objname_v1.signature, p_string(&sym->objname_v1.p_name)); break;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/wine/mscvpdb.h | 306 ++++++++++++++++++++++++------------------------ 1 file changed, 153 insertions(+), 153 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index a66334dbc90..d40371f4cef 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -113,13 +113,13 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; } generic;
struct { unsigned short int len; - short int id; + unsigned short int id; short int attribute; short int type; } modifier_v1; @@ -127,7 +127,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; int type; short int attribute; } modifier_v2; @@ -135,7 +135,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int attribute; short int datatype; struct p_string p_name; @@ -144,7 +144,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int datatype; unsigned int attribute; struct p_string p_name; @@ -153,7 +153,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int elemtype; short int idxtype; unsigned short int arrlen; /* numeric leaf */ @@ -165,7 +165,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int elemtype; unsigned int idxtype; unsigned short int arrlen; /* numeric leaf */ @@ -177,7 +177,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int elemtype; unsigned int idxtype; unsigned short int arrlen; /* numeric leaf */ @@ -189,7 +189,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int n_element; short int fieldlist; short int property; @@ -204,7 +204,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int n_element; short int property; unsigned int fieldlist; @@ -219,7 +219,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int n_element; short int property; unsigned int fieldlist; @@ -234,7 +234,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int fieldlist; short int property; @@ -247,7 +247,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int property; unsigned int fieldlist; @@ -260,7 +260,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int property; unsigned int fieldlist; @@ -273,7 +273,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int type; short int fieldlist; @@ -284,7 +284,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int property; unsigned int type; @@ -295,7 +295,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; short int count; short int property; unsigned int type; @@ -306,7 +306,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned short int rvtype; unsigned char callconv; unsigned char funcattr; @@ -317,7 +317,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int rvtype; unsigned char callconv; unsigned char funcattr; @@ -328,7 +328,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned short int rvtype; unsigned short int class_type; unsigned short int this_type; @@ -342,7 +342,7 @@ union codeview_type struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int rvtype; unsigned int class_type; unsigned this_type; @@ -359,20 +359,20 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; } generic;
struct { unsigned short int len; - short int id; + unsigned short int id; unsigned char list[1]; } fieldlist;
struct { unsigned short int len; - short int id; + unsigned short int id; unsigned char nbits; unsigned char bitoff; unsigned short type; @@ -381,7 +381,7 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; unsigned int type; unsigned char nbits; unsigned char bitoff; @@ -390,7 +390,7 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; unsigned short num; unsigned short args[1]; } arglist_v1; @@ -398,7 +398,7 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; unsigned num; unsigned args[1]; } arglist_v2; @@ -406,7 +406,7 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; unsigned short num; unsigned short drvdcls[1]; } derived_v1; @@ -414,7 +414,7 @@ union codeview_reftype struct { unsigned short int len; - short int id; + unsigned short int id; unsigned num; unsigned drvdcls[1]; } derived_v2; @@ -424,12 +424,12 @@ union codeview_fieldtype { struct { - short int id; + unsigned short int id; } generic;
struct { - short int id; + unsigned short int id; short int type; short int attribute; unsigned short int offset; /* numeric leaf */ @@ -437,7 +437,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; unsigned short int offset; /* numeric leaf */ @@ -445,7 +445,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int btype; short int vbtype; short int attribute; @@ -457,7 +457,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int btype; unsigned int vbtype; @@ -469,7 +469,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned short int value; /* numeric leaf */ #if 0 @@ -479,7 +479,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned short int value; /* numeric leaf */ #if 0 @@ -489,14 +489,14 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; struct p_string p_name; } friendfcn_v1;
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; struct p_string p_name; @@ -504,7 +504,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; short int attribute; unsigned short int offset; /* numeric leaf */ @@ -515,7 +515,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; unsigned short int offset; /* numeric leaf */ @@ -526,7 +526,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; unsigned short int offset; /* numeric leaf */ @@ -538,7 +538,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; short int attribute; struct p_string p_name; @@ -546,7 +546,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; struct p_string p_name; @@ -554,7 +554,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; char name[1]; @@ -562,7 +562,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int count; short int mlist; struct p_string p_name; @@ -570,7 +570,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int count; unsigned int mlist; struct p_string p_name; @@ -578,7 +578,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int count; unsigned int mlist; char name[1]; @@ -586,14 +586,14 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; struct p_string p_name; } nesttype_v1;
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; struct p_string p_name; @@ -601,7 +601,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; char name[1]; @@ -609,33 +609,33 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; } vfunctab_v1;
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; } vfunctab_v2;
struct { - short int id; + unsigned short int id; short int type; } friendcls_v1;
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; } friendcls_v2;
struct { - short int id; + unsigned short int id; short int attribute; short int type; struct p_string p_name; @@ -643,7 +643,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; struct p_string p_name; @@ -651,7 +651,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; char name[1]; @@ -659,7 +659,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; short int type; unsigned int vtab_offset; @@ -668,7 +668,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; unsigned int vtab_offset; @@ -677,7 +677,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; unsigned int vtab_offset; @@ -686,14 +686,14 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int type; unsigned int offset; } vfuncoff_v1;
struct { - short int id; + unsigned short int id; short int _pad0; unsigned int type; unsigned int offset; @@ -701,7 +701,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; short int type; struct p_string p_name; @@ -709,7 +709,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; struct p_string p_name; @@ -717,7 +717,7 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int attribute; unsigned int type; struct p_string p_name; @@ -725,13 +725,13 @@ union codeview_fieldtype
struct { - short int id; + unsigned short int id; short int ref; } index_v1;
struct { - short int id; + unsigned short int id; short int unk; unsigned int ref; } index_v2; @@ -1242,14 +1242,14 @@ union codeview_symbol { struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; } generic;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; unsigned short symtype; @@ -1258,8 +1258,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1268,8 +1268,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1278,8 +1278,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int pparent; unsigned int pend; unsigned int next; @@ -1292,8 +1292,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int pparent; unsigned int pend; unsigned int next; @@ -1306,8 +1306,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int pparent; unsigned int pend; unsigned int next; @@ -1323,8 +1323,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int pparent; unsigned int pend; unsigned int next; @@ -1340,8 +1340,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int pparent; unsigned int pend; unsigned int next; @@ -1357,8 +1357,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; unsigned short symtype; @@ -1367,8 +1367,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1377,8 +1377,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1387,8 +1387,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_BPREL32_16t */ + unsigned short int len; + unsigned short int id; /* Always S_BPREL32_16t */ unsigned int offset; /* Stack offset relative to BP */ unsigned short symtype; struct p_string p_name; @@ -1396,8 +1396,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_BPREL32_ST */ + unsigned short int len; + unsigned short int id; /* Always S_BPREL32_ST */ unsigned int offset; /* Stack offset relative to EBP */ unsigned int symtype; struct p_string p_name; @@ -1405,8 +1405,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_BPREL32 */ + unsigned short int len; + unsigned short int id; /* Always S_BPREL32 */ int offset; /* Stack offset relative to BP */ unsigned int symtype; char name[1]; @@ -1414,8 +1414,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_BPREL32 */ + unsigned short int len; + unsigned short int id; /* Always S_BPREL32 */ int offset; /* Stack offset relative to BP */ unsigned int symtype; unsigned short reg; @@ -1424,8 +1424,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_REGISTER */ + unsigned short int len; + unsigned short int id; /* Always S_REGISTER */ unsigned short type; unsigned short reg; struct p_string p_name; @@ -1434,8 +1434,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_REGISTER_ST */ + unsigned short int len; + unsigned short int id; /* Always S_REGISTER_ST */ unsigned int type; /* check whether type & reg are correct */ unsigned short reg; struct p_string p_name; @@ -1444,8 +1444,8 @@ union codeview_symbol
struct { - short int len; /* Total length of this entry */ - short int id; /* Always S_REGISTER */ + unsigned short int len; + unsigned short int id; /* Always S_REGISTER */ unsigned int type; /* check whether type & reg are correct */ unsigned short reg; char name[1]; @@ -1454,8 +1454,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int parent; unsigned int end; unsigned int length; @@ -1466,8 +1466,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int parent; unsigned int end; unsigned int length; @@ -1478,8 +1478,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; unsigned char flags; @@ -1488,8 +1488,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; unsigned char flags; @@ -1498,8 +1498,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned short type; unsigned short cvalue; /* numeric leaf */ #if 0 @@ -1509,8 +1509,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned type; unsigned short cvalue; /* numeric leaf */ #if 0 @@ -1520,8 +1520,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned type; unsigned short cvalue; #if 0 @@ -1531,56 +1531,56 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned short type; struct p_string p_name; } udt_v1;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned type; struct p_string p_name; } udt_v2;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int type; char name[1]; } udt_v3;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned signature; struct p_string p_name; } objname_v1;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned signature; char name[1]; } objname_v3;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int unknown; struct p_string p_name; } compiland_v1;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned unknown1[4]; unsigned short unknown2; struct p_string p_name; @@ -1588,16 +1588,16 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int unknown; char name[1]; } compiland_v3;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; unsigned short symtype; @@ -1606,8 +1606,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1616,8 +1616,8 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int symtype; unsigned int offset; unsigned short segment; @@ -1626,24 +1626,24 @@ union codeview_symbol
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned short segment; } ssearch_v1;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int offset; unsigned int unknown; } security_cookie_v3;
struct { - short int len; - short int id; + unsigned short int len; + unsigned short int id; unsigned int sz_frame; /* size of frame */ unsigned int unknown2; unsigned int unknown3; @@ -1655,12 +1655,12 @@ union codeview_symbol
struct { - unsigned short len; - unsigned short id; - unsigned int offset; - unsigned short sect_idx; - unsigned short inst_len; - unsigned int index; + unsigned short int len; + unsigned short int id; + unsigned int offset; + unsigned short sect_idx; + unsigned short inst_len; + unsigned int index; } heap_alloc_site; };
- updated all definitions
Don't mix up S_COMPILE records with compiland information
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/msc.c | 34 ++++++--------- include/wine/mscvpdb.h | 62 ++++++++++++++++++++++++--- tools/winedump/msc.c | 111 +++++++++++++++++++++++++----------------------- 3 files changed, 127 insertions(+), 80 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 2712d352a17..ff7507c797c 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1826,23 +1826,24 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo break;
case S_COMPILE: - TRACE("S-Compiland-V1 %x %s\n", - sym->compiland_v1.unknown, terminate_string(&sym->compiland_v1.p_name)); + TRACE("S-Compile-V1 machine:%x language:%x %s\n", + sym->compile_v1.machine, sym->compile_v1.flags.language, terminate_string(&sym->compile_v1.p_name)); break;
case S_COMPILE2_ST: - TRACE("S-Compiland-V2 %s\n", terminate_string(&sym->compiland_v2.p_name)); - if (TRACE_ON(dbghelp_msc)) - { - const char* ptr1 = sym->compiland_v2.p_name.name + sym->compiland_v2.p_name.namelen; - const char* ptr2; - while (*ptr1) - { - ptr2 = ptr1 + strlen(ptr1) + 1; - TRACE("\t%s => %s\n", ptr1, debugstr_a(ptr2)); - ptr1 = ptr2 + strlen(ptr2) + 1; - } - } + TRACE("S-Compile-V2 machine:%x language:%x %s\n", + sym->compile2_v2.machine, sym->compile2_v2.flags.iLanguage, terminate_string(&sym->compile2_v2.p_name)); + break; + + case S_COMPILE2: + TRACE("S-Compile-V3 machine:%x language:%x %s\n", sym->compile2_v3.machine, sym->compile2_v3.flags.iLanguage, sym->compile2_v3.name); + break; + + case S_COMPILE3: + TRACE("S-Compile3-V3 machine:%x language:%x %s\n", sym->compile3_v3.machine, sym->compile3_v3.flags.iLanguage, sym->compile3_v3.name); + break; + + case S_ENVBLOCK: break;
case S_OBJNAME: @@ -1983,11 +1984,6 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo break; }
- case S_COMPILE2: /* just to silence a few warnings */ - case S_COMPILE3: - case S_ENVBLOCK: - break; - case S_SSEARCH: TRACE("Start search: seg=0x%x at offset 0x%08x\n", sym->ssearch_v1.segment, sym->ssearch_v1.offset); diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index d40371f4cef..4027441453c 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1573,26 +1573,74 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int unknown; + unsigned char machine; + struct + { + unsigned char language : 8; + unsigned char _dome : 8; /* other missing fields */ + unsigned char pad : 8; + } flags; struct p_string p_name; - } compiland_v1; + } compile_v1;
struct { unsigned short int len; unsigned short int id; - unsigned unknown1[4]; - unsigned short unknown2; + struct { + unsigned int iLanguage : 8; + unsigned int _dome : 9; /* other missing fields */ + unsigned int pad : 15; + } flags; + unsigned short machine; + unsigned short fe_major; + unsigned short fe_minor; + unsigned short fe_build; + unsigned short be_major; + unsigned short be_minor; + unsigned short be_build; struct p_string p_name; - } compiland_v2; + } compile2_v2;
struct { unsigned short int len; unsigned short int id; - unsigned int unknown; + struct { + unsigned int iLanguage : 8; + unsigned int _dome : 9; /* other missing fields */ + unsigned int pad : 15; + } flags; + unsigned short machine; + unsigned short fe_major; + unsigned short fe_minor; + unsigned short fe_build; + unsigned short be_major; + unsigned short be_minor; + unsigned short be_build; + char name[1]; + } compile2_v3; + + struct + { + unsigned short int len; + unsigned short int id; + struct { + unsigned int iLanguage : 8; + unsigned int _dome : 12; /* other missing fields */ + unsigned int pad : 12; + } flags; + unsigned short machine; + unsigned short fe_major; + unsigned short fe_minor; + unsigned short fe_build; + unsigned short fe_qfe; + unsigned short be_major; + unsigned short be_minor; + unsigned short be_build; + unsigned short be_qfe; char name[1]; - } compiland_v3; + } compile3_v3;
struct { diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 5def00df8ed..d2cf7b36d80 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -1330,19 +1330,23 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) break;
case S_COMPILE: - printf("\tS-Compiland V1 '%s' %s %s unk:%x\n", - p_string(&sym->compiland_v1.p_name), - get_machine(sym->compiland_v1.unknown & 0xFF), - get_language((sym->compiland_v1.unknown >> 8) & 0xFF), - sym->compiland_v1.unknown >> 16); + printf("\tS-Compile V1 machine:%s lang:%s _unk:%x '%s'\n", + get_machine(sym->compile_v1.machine), + get_language(sym->compile_v1.flags.language), + sym->compile_v1.flags._dome, + p_string(&sym->compile_v1.p_name)); break;
case S_COMPILE2_ST: - printf("\tS-Compiland V2 '%s'\n", - p_string(&sym->compiland_v2.p_name)); - dump_data((const void*)sym, sym->generic.len + 2, " "); + printf("\tS-Compile2-V2 lang:%s machine:%s _unk:%x front-end:%d.%d.%d back-end:%d.%d.%d '%s'\n", + get_language(sym->compile2_v2.flags.iLanguage), + get_machine(sym->compile2_v2.machine), + sym->compile2_v2.flags._dome, + sym->compile2_v2.fe_major, sym->compile2_v2.fe_minor, sym->compile2_v2.fe_build, + sym->compile2_v2.be_major, sym->compile2_v2.be_minor, sym->compile2_v2.be_build, + p_string(&sym->compile2_v2.p_name)); { - const char* ptr = sym->compiland_v2.p_name.name + sym->compiland_v2.p_name.namelen; + const char* ptr = sym->compile2_v2.p_name.name + sym->compile2_v2.p_name.namelen; while (*ptr) { printf("\t\t%s => ", ptr); ptr += strlen(ptr) + 1; @@ -1351,6 +1355,50 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) } break;
+ case S_COMPILE2: + printf("\tS-Compile2-V3 lang:%s machine:%s _unk:%x front-end:%d.%d.%d back-end:%d.%d.%d '%s'\n", + get_language(sym->compile2_v3.flags.iLanguage), + get_machine(sym->compile2_v3.machine), + sym->compile2_v3.flags._dome, + sym->compile2_v3.fe_major, sym->compile2_v3.fe_minor, sym->compile2_v3.fe_build, + sym->compile2_v3.be_major, sym->compile2_v3.be_minor, sym->compile2_v3.be_build, + sym->compile2_v3.name); + { + const char* ptr = sym->compile2_v3.name + strlen(sym->compile2_v3.name) + 1; + while (*ptr) + { + printf("\t\t%s => ", ptr); ptr += strlen(ptr) + 1; + printf("%s\n", ptr); ptr += strlen(ptr) + 1; + } + } + break; + + case S_COMPILE3: + printf("\tS-Compile3-V3 lang:%s machine:%s _unk:%x front-end:%d.%d.%d back-end:%d.%d.%d '%s'\n", + get_language(sym->compile3_v3.flags.iLanguage), + get_machine(sym->compile3_v3.machine), + sym->compile3_v3.flags._dome, + sym->compile3_v3.fe_major, sym->compile3_v3.fe_minor, sym->compile3_v3.fe_build, + sym->compile3_v3.be_major, sym->compile3_v3.be_minor, sym->compile3_v3.be_build, + sym->compile3_v3.name); + break; + + case S_ENVBLOCK: + { + const char* x1 = (const char*)sym + 4 + 1; + const char* x2; + + printf("\tTool conf V3\n"); + while (*x1) + { + x2 = x1 + strlen(x1) + 1; + if (!*x2) break; + printf("\t\t%s: %s\n", x1, x2); + x1 = x2 + strlen(x2) + 1; + } + } + break; + case S_OBJNAME: printf("\tS-ObjName V3 sig:%x '%s'\n", sym->objname_v3.signature, sym->objname_v3.name); @@ -1433,51 +1481,6 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) p_string(pname)); } break; - case S_COMPILE2: /* info about tool used to create CU */ - { - const unsigned short* ptr = ((const unsigned short*)sym) + 2; - const char* x1; - const char* x2 = (const char*)&ptr[9]; - /* FIXME: what are all those values for ? */ - printf("\tTool V3 unk=%04x%04x%04x front=%d.%d.%d.0 back=%d.%d.%d.0 %s\n", - ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], - ptr[8], x2); - while (*(x1 = x2 + strlen(x2) + 1)) - { - x2 = x1 + strlen(x1) + 1; - if (!*x2) break; - printf("\t\t%s: %s\n", x1, x2); - } - } - break; - - case S_COMPILE3: - { - const unsigned short* ptr = ((const unsigned short*)sym) + 2; - - printf("\tTool info V3: unk=%04x%04x%04x front=%d.%d.%d.%d back=%d.%d.%d.%d %s\n", - ptr[0], ptr[1], ptr[2], - ptr[3], ptr[4], ptr[5], ptr[6], - ptr[7], ptr[8], ptr[9], ptr[10], - (const char*)(ptr + 11)); - } - break; - - case S_ENVBLOCK: - { - const char* x1 = (const char*)sym + 4 + 1; - const char* x2; - - printf("\tTool conf V3\n"); - while (*x1) - { - x2 = x1 + strlen(x1) + 1; - if (!*x2) break; - printf("\t\t%s: %s\n", x1, x2); - x1 = x2 + strlen(x2) + 1; - } - } - break;
case S_ALIGN: /* simply skip it */
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- include/wine/mscvpdb.h | 225 +++++++++++++++++++++++++----------------------- 1 file changed, 116 insertions(+), 109 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 4027441453c..8623f8ed8a3 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -99,7 +99,7 @@ #include "pshpack1.h"
/* ======================================== * - * Type information + * Internal types * ======================================== */
struct p_string @@ -108,6 +108,13 @@ struct p_string char name[1]; };
+typedef unsigned short cv_typ16_t; +typedef unsigned int cv_typ_t; + +/* ======================================== * + * Type information + * ======================================== */ + union codeview_type { struct @@ -121,14 +128,14 @@ union codeview_type unsigned short int len; unsigned short int id; short int attribute; - short int type; + cv_typ16_t type; } modifier_v1;
struct { unsigned short int len; unsigned short int id; - int type; + cv_typ_t type; short int attribute; } modifier_v2;
@@ -145,7 +152,7 @@ union codeview_type { unsigned short int len; unsigned short int id; - unsigned int datatype; + cv_typ_t datatype; unsigned int attribute; struct p_string p_name; } pointer_v2; @@ -154,8 +161,8 @@ union codeview_type { unsigned short int len; unsigned short int id; - short int elemtype; - short int idxtype; + cv_typ16_t elemtype; + cv_typ16_t idxtype; unsigned short int arrlen; /* numeric leaf */ #if 0 struct p_string p_name; @@ -166,8 +173,8 @@ union codeview_type { unsigned short int len; unsigned short int id; - unsigned int elemtype; - unsigned int idxtype; + cv_typ_t elemtype; + cv_typ_t idxtype; unsigned short int arrlen; /* numeric leaf */ #if 0 struct p_string p_name; @@ -178,8 +185,8 @@ union codeview_type { unsigned short int len; unsigned short int id; - unsigned int elemtype; - unsigned int idxtype; + cv_typ_t elemtype; + cv_typ_t idxtype; unsigned short int arrlen; /* numeric leaf */ #if 0 char name[1]; @@ -191,10 +198,10 @@ union codeview_type unsigned short int len; unsigned short int id; short int n_element; - short int fieldlist; + cv_typ16_t fieldlist; short int property; - short int derived; - short int vshape; + cv_typ16_t derived; + cv_typ16_t vshape; unsigned short int structlen; /* numeric leaf */ #if 0 struct p_string p_name; @@ -207,9 +214,9 @@ union codeview_type unsigned short int id; short int n_element; short int property; - unsigned int fieldlist; - unsigned int derived; - unsigned int vshape; + cv_typ_t fieldlist; + cv_typ_t derived; + cv_typ_t vshape; unsigned short int structlen; /* numeric leaf */ #if 0 struct p_string p_name; @@ -222,9 +229,9 @@ union codeview_type unsigned short int id; short int n_element; short int property; - unsigned int fieldlist; - unsigned int derived; - unsigned int vshape; + cv_typ_t fieldlist; + cv_typ_t derived; + cv_typ_t vshape; unsigned short int structlen; /* numeric leaf */ #if 0 char name[1]; @@ -236,7 +243,7 @@ union codeview_type unsigned short int len; unsigned short int id; short int count; - short int fieldlist; + cv_typ16_t fieldlist; short int property; unsigned short int un_len; /* numeric leaf */ #if 0 @@ -250,7 +257,7 @@ union codeview_type unsigned short int id; short int count; short int property; - unsigned int fieldlist; + cv_typ_t fieldlist; unsigned short int un_len; /* numeric leaf */ #if 0 struct p_string p_name; @@ -263,7 +270,7 @@ union codeview_type unsigned short int id; short int count; short int property; - unsigned int fieldlist; + cv_typ_t fieldlist; unsigned short int un_len; /* numeric leaf */ #if 0 char name[1]; @@ -275,8 +282,8 @@ union codeview_type unsigned short int len; unsigned short int id; short int count; - short int type; - short int fieldlist; + cv_typ16_t type; + cv_typ16_t fieldlist; short int property; struct p_string p_name; } enumeration_v1; @@ -287,8 +294,8 @@ union codeview_type unsigned short int id; short int count; short int property; - unsigned int type; - unsigned int fieldlist; + cv_typ_t type; + cv_typ_t fieldlist; struct p_string p_name; } enumeration_v2;
@@ -298,8 +305,8 @@ union codeview_type unsigned short int id; short int count; short int property; - unsigned int type; - unsigned int fieldlist; + cv_typ_t type; + cv_typ_t fieldlist; char name[1]; } enumeration_v3;
@@ -307,35 +314,35 @@ union codeview_type { unsigned short int len; unsigned short int id; - unsigned short int rvtype; + cv_typ16_t rvtype; unsigned char callconv; unsigned char funcattr; unsigned short int params; - unsigned short int arglist; + cv_typ16_t arglist; } procedure_v1;
struct { unsigned short int len; unsigned short int id; - unsigned int rvtype; + cv_typ_t rvtype; unsigned char callconv; unsigned char funcattr; unsigned short int params; - unsigned int arglist; + cv_typ_t arglist; } procedure_v2;
struct { unsigned short int len; unsigned short int id; - unsigned short int rvtype; - unsigned short int class_type; - unsigned short int this_type; + cv_typ16_t rvtype; + cv_typ16_t class_type; + cv_typ16_t this_type; unsigned char callconv; unsigned char funcattr; unsigned short int params; - unsigned short int arglist; + cv_typ16_t arglist; unsigned int this_adjust; } mfunction_v1;
@@ -343,13 +350,13 @@ union codeview_type { unsigned short int len; unsigned short int id; - unsigned int rvtype; - unsigned int class_type; - unsigned this_type; + cv_typ_t rvtype; + cv_typ_t class_type; + cv_typ_t this_type; unsigned char callconv; unsigned char funcattr; unsigned short params; - unsigned int arglist; + cv_typ_t arglist; unsigned int this_adjust; } mfunction_v2; }; @@ -375,14 +382,14 @@ union codeview_reftype unsigned short int id; unsigned char nbits; unsigned char bitoff; - unsigned short type; + cv_typ16_t type; } bitfield_v1;
struct { unsigned short int len; unsigned short int id; - unsigned int type; + cv_typ_t type; unsigned char nbits; unsigned char bitoff; } bitfield_v2; @@ -392,7 +399,7 @@ union codeview_reftype unsigned short int len; unsigned short int id; unsigned short num; - unsigned short args[1]; + cv_typ16_t args[1]; } arglist_v1;
struct @@ -400,7 +407,7 @@ union codeview_reftype unsigned short int len; unsigned short int id; unsigned num; - unsigned args[1]; + cv_typ_t args[1]; } arglist_v2;
struct @@ -408,7 +415,7 @@ union codeview_reftype unsigned short int len; unsigned short int id; unsigned short num; - unsigned short drvdcls[1]; + cv_typ16_t drvdcls[1]; } derived_v1;
struct @@ -416,7 +423,7 @@ union codeview_reftype unsigned short int len; unsigned short int id; unsigned num; - unsigned drvdcls[1]; + cv_typ_t drvdcls[1]; } derived_v2; };
@@ -430,7 +437,7 @@ union codeview_fieldtype struct { unsigned short int id; - short int type; + cv_typ16_t type; short int attribute; unsigned short int offset; /* numeric leaf */ } bclass_v1; @@ -439,15 +446,15 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; unsigned short int offset; /* numeric leaf */ } bclass_v2;
struct { unsigned short int id; - short int btype; - short int vbtype; + cv_typ16_t btype; + cv_typ16_t vbtype; short int attribute; unsigned short int vbpoff; /* numeric leaf */ #if 0 @@ -459,8 +466,8 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int btype; - unsigned int vbtype; + cv_typ_t btype; + cv_typ_t vbtype; unsigned short int vbpoff; /* numeric leaf */ #if 0 unsigned short int vboff; /* numeric leaf */ @@ -490,7 +497,7 @@ union codeview_fieldtype struct { unsigned short int id; - short int type; + cv_typ16_t type; struct p_string p_name; } friendfcn_v1;
@@ -498,14 +505,14 @@ union codeview_fieldtype { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; struct p_string p_name; } friendfcn_v2;
struct { unsigned short int id; - short int type; + cv_typ16_t type; short int attribute; unsigned short int offset; /* numeric leaf */ #if 0 @@ -517,7 +524,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; unsigned short int offset; /* numeric leaf */ #if 0 struct p_string p_name; @@ -528,7 +535,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; unsigned short int offset; /* numeric leaf */ #if 0 unsigned char name[1]; @@ -539,7 +546,7 @@ union codeview_fieldtype struct { unsigned short int id; - short int type; + cv_typ16_t type; short int attribute; struct p_string p_name; } stmember_v1; @@ -548,7 +555,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; struct p_string p_name; } stmember_v2;
@@ -556,7 +563,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; char name[1]; } stmember_v3;
@@ -564,7 +571,7 @@ union codeview_fieldtype { unsigned short int id; short int count; - short int mlist; + cv_typ16_t mlist; struct p_string p_name; } method_v1;
@@ -572,7 +579,7 @@ union codeview_fieldtype { unsigned short int id; short int count; - unsigned int mlist; + cv_typ_t mlist; struct p_string p_name; } method_v2;
@@ -580,14 +587,14 @@ union codeview_fieldtype { unsigned short int id; short int count; - unsigned int mlist; + cv_typ_t mlist; char name[1]; } method_v3;
struct { unsigned short int id; - short int type; + cv_typ16_t type; struct p_string p_name; } nesttype_v1;
@@ -595,7 +602,7 @@ union codeview_fieldtype { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; struct p_string p_name; } nesttype_v2;
@@ -603,41 +610,41 @@ union codeview_fieldtype { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; char name[1]; } nesttype_v3;
struct { unsigned short int id; - short int type; + cv_typ16_t type; } vfunctab_v1;
struct { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; } vfunctab_v2;
struct { unsigned short int id; - short int type; + cv_typ16_t type; } friendcls_v1;
struct { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; } friendcls_v2;
struct { unsigned short int id; short int attribute; - short int type; + cv_typ16_t type; struct p_string p_name; } onemethod_v1;
@@ -645,7 +652,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; struct p_string p_name; } onemethod_v2;
@@ -653,7 +660,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; char name[1]; } onemethod_v3;
@@ -661,7 +668,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - short int type; + cv_typ16_t type; unsigned int vtab_offset; struct p_string p_name; } onemethod_virt_v1; @@ -670,7 +677,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; unsigned int vtab_offset; struct p_string p_name; } onemethod_virt_v2; @@ -679,7 +686,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; unsigned int vtab_offset; char name[1]; } onemethod_virt_v3; @@ -687,7 +694,7 @@ union codeview_fieldtype struct { unsigned short int id; - short int type; + cv_typ16_t type; unsigned int offset; } vfuncoff_v1;
@@ -695,7 +702,7 @@ union codeview_fieldtype { unsigned short int id; short int _pad0; - unsigned int type; + cv_typ_t type; unsigned int offset; } vfuncoff_v2;
@@ -703,7 +710,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - short int type; + cv_typ16_t type; struct p_string p_name; } nesttypeex_v1;
@@ -711,7 +718,7 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; struct p_string p_name; } nesttypeex_v2;
@@ -719,21 +726,21 @@ union codeview_fieldtype { unsigned short int id; short int attribute; - unsigned int type; + cv_typ_t type; struct p_string p_name; } membermodify_v2;
struct { unsigned short int id; - short int ref; + cv_typ16_t ref; } index_v1;
struct { unsigned short int id; - short int unk; - unsigned int ref; + short int _pad0; + cv_typ_t ref; } index_v2; };
@@ -1252,7 +1259,7 @@ union codeview_symbol unsigned short int id; unsigned int offset; unsigned short segment; - unsigned short symtype; + cv_typ16_t symtype; struct p_string p_name; } data_v1;
@@ -1260,7 +1267,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; struct p_string p_name; @@ -1270,7 +1277,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; char name[1]; @@ -1316,7 +1323,7 @@ union codeview_symbol unsigned int debug_end; unsigned int offset; unsigned short segment; - unsigned short proctype; + cv_typ16_t proctype; unsigned char flags; struct p_string p_name; } proc_v1; @@ -1331,7 +1338,7 @@ union codeview_symbol unsigned int proc_len; unsigned int debug_start; unsigned int debug_end; - unsigned int proctype; + cv_typ_t proctype; unsigned int offset; unsigned short segment; unsigned char flags; @@ -1348,7 +1355,7 @@ union codeview_symbol unsigned int proc_len; unsigned int debug_start; unsigned int debug_end; - unsigned int proctype; + cv_typ_t proctype; unsigned int offset; unsigned short segment; unsigned char flags; @@ -1361,7 +1368,7 @@ union codeview_symbol unsigned short int id; unsigned int offset; unsigned short segment; - unsigned short symtype; + cv_typ16_t symtype; struct p_string p_name; } public_v1;
@@ -1369,7 +1376,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; struct p_string p_name; @@ -1379,7 +1386,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; char name[1]; @@ -1390,7 +1397,7 @@ union codeview_symbol unsigned short int len; unsigned short int id; /* Always S_BPREL32_16t */ unsigned int offset; /* Stack offset relative to BP */ - unsigned short symtype; + cv_typ16_t symtype; struct p_string p_name; } stack_v1;
@@ -1399,7 +1406,7 @@ union codeview_symbol unsigned short int len; unsigned short int id; /* Always S_BPREL32_ST */ unsigned int offset; /* Stack offset relative to EBP */ - unsigned int symtype; + cv_typ_t symtype; struct p_string p_name; } stack_v2;
@@ -1408,7 +1415,7 @@ union codeview_symbol unsigned short int len; unsigned short int id; /* Always S_BPREL32 */ int offset; /* Stack offset relative to BP */ - unsigned int symtype; + cv_typ_t symtype; char name[1]; } stack_v3;
@@ -1417,7 +1424,7 @@ union codeview_symbol unsigned short int len; unsigned short int id; /* Always S_BPREL32 */ int offset; /* Stack offset relative to BP */ - unsigned int symtype; + cv_typ_t symtype; unsigned short reg; char name[1]; } regrel_v3; @@ -1426,7 +1433,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; /* Always S_REGISTER */ - unsigned short type; + cv_typ16_t type; unsigned short reg; struct p_string p_name; /* don't handle register tracking */ @@ -1436,7 +1443,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; /* Always S_REGISTER_ST */ - unsigned int type; /* check whether type & reg are correct */ + cv_typ_t type; /* check whether type & reg are correct */ unsigned short reg; struct p_string p_name; /* don't handle register tracking */ @@ -1446,7 +1453,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; /* Always S_REGISTER */ - unsigned int type; /* check whether type & reg are correct */ + cv_typ_t type; /* check whether type & reg are correct */ unsigned short reg; char name[1]; /* don't handle register tracking */ @@ -1500,7 +1507,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned short type; + cv_typ16_t type; unsigned short cvalue; /* numeric leaf */ #if 0 struct p_string p_name; @@ -1511,7 +1518,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned type; + cv_typ_t type; unsigned short cvalue; /* numeric leaf */ #if 0 struct p_string p_name; @@ -1522,7 +1529,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned type; + cv_typ_t type; unsigned short cvalue; #if 0 char name[1]; @@ -1533,7 +1540,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned short type; + cv_typ16_t type; struct p_string p_name; } udt_v1;
@@ -1541,7 +1548,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned type; + cv_typ_t type; struct p_string p_name; } udt_v2;
@@ -1549,7 +1556,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int type; + cv_typ_t type; char name[1]; } udt_v3;
@@ -1648,7 +1655,7 @@ union codeview_symbol unsigned short int id; unsigned int offset; unsigned short segment; - unsigned short symtype; + cv_typ16_t symtype; struct p_string p_name; } thread_v1;
@@ -1656,7 +1663,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; struct p_string p_name; @@ -1666,7 +1673,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - unsigned int symtype; + cv_typ_t symtype; unsigned int offset; unsigned short segment; char name[1];
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/msc.c | 2 +- include/wine/mscvpdb.h | 12 +++++++++++- tools/winedump/msc.c | 22 +++++++++++++++------- 3 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index ff7507c797c..380511d0b55 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2077,7 +2077,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY { symt_new_public(msc_dbg->module, compiland, sym->public_v3.name, - sym->public_v3.symtype == SYMTYPE_FUNCTION, + sym->public_v3.pubsymflags == SYMTYPE_FUNCTION, codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1); } break; diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 8623f8ed8a3..2ed9a9fe192 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1386,7 +1386,7 @@ union codeview_symbol { unsigned short int len; unsigned short int id; - cv_typ_t symtype; + unsigned int pubsymflags; unsigned int offset; unsigned short segment; char name[1]; @@ -1679,6 +1679,16 @@ union codeview_symbol char name[1]; } thread_v3;
+ struct + { + unsigned short int len; + unsigned short int id; + unsigned int sumName; + unsigned int ibSym; + unsigned short imod; + char name[1]; + } refsym2_v3; + struct { unsigned short int len; diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index d2cf7b36d80..7f93f3e7701 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -1142,15 +1142,23 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size) break;
case S_PUB32: - /* not completely sure of those two anyway */ + printf("\tS-Public V3 '%s' %04x:%08x flags%s%s%s%s\n", + get_symbol_str(sym->public_v3.name), + sym->public_v3.segment, sym->public_v3.offset, + (sym->public_v3.pubsymflags & 1) ? "-code" : "", + (sym->public_v3.pubsymflags & 2) ? "-func" : "", + (sym->public_v3.pubsymflags & 4) ? "-manage" : "", + (sym->public_v3.pubsymflags & 8) ? "-msil" : ""); + break; + + case S_DATAREF: case S_PROCREF: case S_LPROCREF: - printf("\tS-Public%s V3 '%s' %04x:%08x type:%08x\n", - sym->generic.id == S_PUB32 ? "" : - (sym->generic.id == S_PROCREF ? "<subkind1" : "<subkind2"), - get_symbol_str(sym->public_v3.name), - sym->public_v3.segment, - sym->public_v3.offset, sym->public_v3.symtype); + printf("\tS-%sref V3 '%s' mod:%04x sym:%08x name:%08x\n", + sym->generic.id == S_DATAREF ? "Data" : + (sym->generic.id == S_PROCREF ? "Proc" : "Lproc"), + get_symbol_str(sym->refsym2_v3.name), + sym->refsym2_v3.imod, sym->refsym2_v3.ibSym, sym->refsym2_v3.sumName); break;
/*