summaryrefslogtreecommitdiffstats
path: root/src/cvutil.h
diff options
context:
space:
mode:
authorsagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2010-08-08 08:37:12 (GMT)
committersagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2010-08-08 08:37:12 (GMT)
commit59dc1509092a46bb18e08f54ac5c4f859ca0ffa8 (patch)
tree44b893a9c077e1f531e87ac7bb9953a46e254548 /src/cvutil.h
parent81f3ca8636f863d32f0da61c214077305f28ccfc (diff)
downloadcv2pdb-59dc1509092a46bb18e08f54ac5c4f859ca0ffa8.zip
cv2pdb-59dc1509092a46bb18e08f54ac5c4f859ca0ffa8.tar.gz
cv2pdb-59dc1509092a46bb18e08f54ac5c4f859ca0ffa8.tar.bz2
Version 0.15
* thanks to patches by Z3N, the resulting pdb is now usable by more debuggers * now uses shared file access to executable * incomplete structs/classes are now added as user defined types to avoid confusing debugger for following symbols * fixed name demangling of very long names * added name demangling support for @safe/@trusted/@property/pure/nothrow/ref * base classes are added to D/cpp-interfaces to allow viewing the virtual function table pointer * structs, classes and interfaces now have an internal qualifier attached that allows the preview in autoexp.dat to show better info for structs and interfaces
Diffstat (limited to 'src/cvutil.h')
-rw-r--r--src/cvutil.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/cvutil.h b/src/cvutil.h
new file mode 100644
index 0000000..83b0939
--- /dev/null
+++ b/src/cvutil.h
@@ -0,0 +1,51 @@
+// Convert DMD CodeView debug information to PDB files
+// Copyright (c) 2009-2010 by Rainer Schuetze, All Rights Reserved
+//
+// License for redistribution is given by the Artistic License 2.0
+// see file LICENSE for further details
+
+#ifndef __CVUTIL_H__
+#define __CVUTIL_H__
+
+#include "cv2pdb.h"
+#include "symutil.h"
+
+#define OBJECT_SYMBOL "object@Object"
+#define IFACE_SYMBOL "DInterface"
+#define CPPIFACE_SYMBOL "CppInterface"
+
+#define P_OBJECT_SYMBOL ((const BYTE*)("\x0d" OBJECT_SYMBOL))
+
+#define CLASSTYPEENUM_TYPE "__ClassType"
+#define CLASSTYPEENUM_NAME "__classtype"
+
+enum
+{
+ kClassTypeObject = 1,
+ kClassTypeIface = 2,
+ kClassTypeCppIface = 3,
+ kClassTypeStruct = 4
+};
+
+// class properties (also apply to struct,union and enum)
+static const int kPropPacked = 0x01;
+static const int kPropHasCtorDtor = 0x02;
+static const int kPropHasOverOps = 0x04;
+static const int kPropIsNested = 0x08;
+static const int kPropHasNested = 0x10;
+static const int kPropHasOverAsgn = 0x20;
+static const int kPropHasCasting = 0x40;
+static const int kPropIncomplete = 0x80;
+static const int kPropScoped = 0x100;
+
+bool isStruct(const codeview_type* cvtype);
+int getStructProperty(const codeview_type* cvtype);
+int getStructFieldlist(const codeview_type* cvtype);
+bool isCompleteStruct(const codeview_type* type, const BYTE* name, bool cstr);
+
+const BYTE* getStructName(const codeview_type* cvtype, bool &cstr);
+bool cmpStructName(const codeview_type* cvtype, const BYTE* name, bool cstr);
+
+int numeric_leaf(int* value, const void* leaf);
+
+#endif // __CVUTIL_H__