Eric Pouech : winedump: Add more supported languages from .pdb COMPILE records.

Alexandre Julliard julliard at winehq.org
Mon Aug 23 16:24:13 CDT 2021


Module: wine
Branch: master
Commit: fca405402d65da4e88d5ec6c2011aa5244af48e2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fca405402d65da4e88d5ec6c2011aa5244af48e2

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Sat Aug 21 10:22:29 2021 +0200

winedump: Add more supported languages from .pdb COMPILE records.

Update cvconst.h accordingly.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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];




More information about the wine-cvs mailing list