diff options
author | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2010-08-08 08:37:12 (GMT) |
---|---|---|
committer | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2010-08-08 08:37:12 (GMT) |
commit | 59dc1509092a46bb18e08f54ac5c4f859ca0ffa8 (patch) | |
tree | 44b893a9c077e1f531e87ac7bb9953a46e254548 /src/demangle.cpp | |
parent | 81f3ca8636f863d32f0da61c214077305f28ccfc (diff) | |
download | cv2pdb-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/demangle.cpp')
-rw-r--r-- | src/demangle.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/demangle.cpp b/src/demangle.cpp index ef5dec6..6c1ff30 100644 --- a/src/demangle.cpp +++ b/src/demangle.cpp @@ -202,8 +202,26 @@ public: case 'W': // Windows function
case 'V': // Pascal function
case 'R': // C++ function
- { char mc = name[ni - 1];
+ {
+ char mc = name[ni - 1];
string args;
+ string prop;
+ while(name[ni] == 'N')
+ {
+ switch(name[ni+1])
+ {
+ case 'a': prop += "pure "; break;
+ case 'b': prop += "nothrow "; break;
+ case 'c': prop += "ref "; break;
+ case 'd': prop += "@property "; break;
+ case 'e': prop += "@trusted "; break;
+ case 'f': prop += "@safe "; break;
+ default:
+ goto no_prop;
+ }
+ ni += 2;
+ }
+ no_prop:
while (1)
{
@@ -260,9 +278,9 @@ public: default: assert(0);
}
p += parseType() + " " + identifier + "(" + args + ")";
- return p;
+ return prop + p;
}
- p = parseType() +
+ p = prop + parseType() +
(isdelegate ? " delegate(" : " function(") + args + ")";
isdelegate = 0;
goto L1;
@@ -504,7 +522,7 @@ void unittest() bool d_demangle(const char* name, char* demangled, int maxlen, bool plain)
{
-#ifdef _DEBUG
+#if 0 // && def _DEBUG
static bool once; if(!once) { once = true; unittest(); }
#endif
|