msvcrt: Handle data types B,R,S in C++ symbol demangling
Michael Stefaniuc
mstefani at redhat.de
Mon Feb 6 18:22:57 CST 2006
Hello,
found while trying to demangle some mfc42 symbols. Tested against native
msvcrt with my small demangle.exe tool.
bye
michael
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
__unDname: handle the data types B, R, S
Thanks to http://sparcs.kaist.ac.kr/~tokigun/article/vcmangle.html
---
dlls/msvcrt/undname.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
4dff776dc02a96feca55f20a1e87c095792a3589
diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c
index 222ce7e..5c2f47f 100644
--- a/dlls/msvcrt/undname.c
+++ b/dlls/msvcrt/undname.c
@@ -374,8 +374,11 @@ static const char* get_modified_type(str
switch (modif)
{
case 'A': str_modif = " &"; break;
+ case 'B': str_modif = " & volatile"; break;
case 'P': str_modif = " *"; break;
case 'Q': str_modif = " * const"; break;
+ case 'R': str_modif = " * volatile"; break;
+ case 'S': str_modif = " * const volatile"; break;
case '?': str_modif = ""; break;
default: return NULL;
}
@@ -645,11 +648,14 @@ static BOOL demangle_datatype(struct par
/* not all the time is seems */
if (!(ct->left = get_modified_type(sym, '?'))) goto done;
break;
- case 'A':
- if (!(ct->left = get_modified_type(sym, 'A'))) goto done;
- break;
- case 'Q':
- if (!(ct->left = get_modified_type(sym, in_args ? 'Q' : 'P'))) goto done;
+ case 'A': /* reference */
+ case 'B': /* volatile reference */
+ if (!(ct->left = get_modified_type(sym, dt))) goto done;
+ break;
+ case 'Q': /* const pointer */
+ case 'R': /* volatile pointer */
+ case 'S': /* const volatile pointer */
+ if (!(ct->left = get_modified_type(sym, in_args ? dt : 'P'))) goto done;
break;
case 'P': /* Pointer */
if (isdigit(*sym->current))
--
1.1.4
More information about the wine-patches
mailing list