summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ced7aac..91b300a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,6 +21,8 @@ double
#define T_strcpy wcscpy
#define T_strcat wcscat
#define T_strstr wcsstr
+#define T_strncmp wcsncmp
+#define T_strtoul wcstoul
#define T_strtod wcstod
#define T_strrchr wcsrchr
#define T_unlink _wremove
@@ -34,6 +36,8 @@ double
#define T_strcpy strcpy
#define T_strcat strcat
#define T_strstr strstr
+#define T_strncmp strncmp
+#define T_strtoul strtoul
#define T_strtod strtod
#define T_strrchr strrchr
#define T_unlink unlink
@@ -120,7 +124,7 @@ int T_main(int argc, TCHAR* argv[])
{
double Dversion = 2.072;
const TCHAR* pdbref = 0;
- bool debug = false;
+ DebugLevel debug = DebugLevel{};
CoInitialize(nullptr);
@@ -138,8 +142,15 @@ int T_main(int argc, TCHAR* argv[])
demangleSymbols = false;
else if (argv[0][1] == 'e')
useTypedefEnum = true;
- else if (argv[0][1] == 'd' && argv[0][2] == 'e' && argv[0][3] == 'b') // deb[ug]
- debug = true;
+ else if (!T_strncmp(&argv[0][1], TEXT("debug"), 5)) // debug[level]
+ {
+ debug = (DebugLevel)T_strtoul(&argv[0][6], 0, 0);
+ if (!debug) {
+ debug = DbgBasic;
+ }
+
+ fprintf(stderr, "Debug set to %x\n", debug);
+ }
else if (argv[0][1] == 's' && argv[0][2])
dotReplacementChar = (char)argv[0][2];
else if (argv[0][1] == 'p' && argv[0][2])
@@ -182,9 +193,8 @@ int T_main(int argc, TCHAR* argv[])
img = &dbg;
}
- CV2PDB cv2pdb(*img);
+ CV2PDB cv2pdb(*img, debug);
cv2pdb.Dversion = Dversion;
- cv2pdb.debug = debug;
cv2pdb.initLibraries();
TCHAR* outname = argv[1];