http://bugs.winehq.org/show_bug.cgi?id=34501
Bug #: 34501 Summary: __unDName doen't support templates with vtordispex Product: Wine Version: 1.7.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: info@vmpsoft.com Classification: Unclassified
Here is an example: ?_dispatch@_impl_Engine@SalomeApp@@$R4CE@BA@PPPPPPPM@7AE_NAAVomniCallHandle@@@Z
http://bugs.winehq.org/show_bug.cgi?id=34501
Ivan Permyakov info@vmpsoft.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|__unDName doen't support |__unDName doesn't support |templates with vtordispex |templates with vtordispex
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #1 from Ivan Permyakov info@vmpsoft.com 2013-09-12 22:13:42 CDT --- Here is my version:
static BOOL handle_method(struct parsed_symbol* sym, BOOL cast_op) { char accmem; const char* access = NULL; const char* member_type = NULL; struct datatype_t ct_ret; const char* call_conv; const char* modifier = NULL; const char* exported; const char* args_str = NULL; const char* name = NULL; BOOL ret = FALSE; unsigned mark; struct array array_pmt; unsigned short flags = 0;
/* FIXME: why 2 possible letters for each option? * 'A' private: * 'B' private: * 'C' private: static * 'D' private: static * 'E' private: virtual * 'F' private: virtual * 'G' private: thunk * 'H' private: thunk * 'I' protected: * 'J' protected: * 'K' protected: static * 'L' protected: static * 'M' protected: virtual * 'N' protected: virtual * 'O' protected: thunk * 'P' protected: thunk * 'Q' public: * 'R' public: * 'S' public: static * 'T' public: static * 'U' public: virtual * 'V' public: virtual * 'W' public: thunk * 'X' public: thunk * 'Y' * 'Z' * "$0" private: thunk vtordisp * "$1" private: thunk vtordisp * "$2" protected: thunk vtordisp * "$3" protected: thunk vtordisp * "$4" public: thunk vtordisp * "$5" public: thunk vtordisp * "$R0" private: thunk vtordispex * "$R1" private: thunk vtordispex * "$R2" protected: thunk vtordispex * "$R3" protected: thunk vtordispex * "$R4" public: thunk vtordispex * "$R5" public: thunk vtordispex */
enum { FLAG_PRIVATE = 0x1, FLAG_PROTECTED = 0x2, FLAG_PUBLIC = 0x4, FLAG_STATIC = 0x8, FLAG_VIRTUAL = 0x10, FLAG_THUNK = 0x20, FLAG_THIS = 0x40, FLAG_VTORDISP = 0x80, FLAG_VTORDISPEX = 0x100, };
accmem = *sym->current++; if (accmem == '$') { accmem = *sym->current++; if (accmem == 'R') { flags |= FLAG_VTORDISPEX; accmem = *sym->current++; } if ((accmem >= '0' && accmem <= '5')) { flags |= FLAG_THUNK | FLAG_THIS; if ((flags & FLAG_VTORDISPEX) == 0) flags |= FLAG_VTORDISP; switch ((accmem - '0') & 6) { case 0: flags |= FLAG_PRIVATE; break; case 2: flags |= FLAG_PROTECTED; break; case 4: flags |= FLAG_PUBLIC; break; } } else goto done; } else if (accmem >= 'A' && accmem <= 'Z') { switch ((accmem - 'A') / 8) { case 0: flags |= FLAG_PRIVATE; break; case 1: flags |= FLAG_PROTECTED; break; case 2: flags |= FLAG_PUBLIC; break; } if (accmem <= 'X') { switch ((accmem - 'A') & 6) { case 2: flags |= FLAG_STATIC; break; case 4: flags |= FLAG_VIRTUAL | FLAG_THIS; break; case 6: flags |= FLAG_THUNK | FLAG_THIS; break; } } } else goto done;
if ((sym->flags & UNDNAME_NO_ACCESS_SPECIFIERS) == 0) { if (flags & FLAG_PRIVATE) access = "private: "; else if (flags & FLAG_PROTECTED) access = "protected: "; else if (flags & FLAG_PUBLIC) access = "public: "; }
if ((sym->flags & UNDNAME_NO_MEMBER_TYPE) == 0) { if (flags & FLAG_STATIC) member_type = "static "; else if (flags & (FLAG_VIRTUAL | FLAG_THUNK)) member_type = "virtual "; }
name = get_class_string(sym, 0);
if (flags & FLAG_THUNK) { access = str_printf(sym, "[thunk]:%s", access); if (flags & FLAG_VTORDISPEX) { const char *num1; const char *num2; const char *num3; const char *num4; if (!(num1 = get_number(sym))) goto done; if (!(num2 = get_number(sym))) goto done; if (!(num3 = get_number(sym))) goto done; if (!(num4 = get_number(sym))) goto done; name = str_printf(sym, "%s`vtordispex{%s,%s,%s,%s}' ", name, num1, num2, num3, num4); } else if (flags & FLAG_VTORDISP) { const char *num1; const char *num2; if (!(num1 = get_number(sym))) goto done; if (!(num2 = get_number(sym))) goto done; name = str_printf(sym, "%s`vtordisp{%s,%s}' ", name, num1, num2); } else { name = str_printf(sym, "%s`adjustor{%s}' ", name, get_number(sym)); } }
if (flags & FLAG_THIS) { const char *ptr_modif; /* Implicit 'this' pointer */ /* If there is an implicit this pointer, const modifier follows */ if (!get_modifier(sym, &modifier, &ptr_modif)) goto done; if (sym->flags & UNDNAME_NO_THISTYPE) modifier = NULL; else if (modifier || ptr_modif) modifier = str_printf(sym, "%s %s", modifier, ptr_modif); }
...
Please check it
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2013-09-12 22:28:06 CDT --- Please don't post sources, instead just specify a set of arguments and expected result.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #3 from Ivan Permyakov info@vmpsoft.com 2013-09-12 23:10:33 CDT --- I posted my sources for your developers to show how can to solve this bug.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2013-09-12 23:14:27 CDT --- (In reply to comment #3)
I posted my sources for your developers to show how can to solve this bug.
The problem is where this comes from, after you admitted you disassembled native modules.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #5 from Ivan Permyakov info@vmpsoft.com 2013-09-12 23:16:42 CDT --- Don't worry - it's my own sources.
http://bugs.winehq.org/show_bug.cgi?id=34501
Ivan Permyakov info@vmpsoft.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|__unDName doesn't support |__unDName doesn't support |templates with vtordispex |thunks with vtordispex
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2013-09-13 03:19:57 CDT --- We can't use your own sources now that you looked at the disassembly.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #7 from Ivan Permyakov info@vmpsoft.com 2013-09-13 07:04:41 CDT --- Look at the disassembly - it's my job. Anyway, it helps to solve bugs in your software.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2013-09-13 07:13:08 CDT --- (In reply to comment #7)
Look at the disassembly - it's my job. Anyway, it helps to solve bugs in your software.
No it doesn't. Looking at the disassembly is not a legitimate way to find bugs.
http://bugs.winehq.org/show_bug.cgi?id=34501
--- Comment #9 from Ivan Permyakov info@vmpsoft.com 2013-09-13 07:16:45 CDT --- No problems, guys.
http://bugs.winehq.org/show_bug.cgi?id=34501
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0aa72d880a9d6a3a72252f4e0d7 | |5cab4608185dd Status|UNCONFIRMED |RESOLVED CC| |piotr.caban@gmail.com Resolution| |FIXED
--- Comment #10 from Piotr Caban piotr.caban@gmail.com 2013-10-07 15:42:03 CDT --- It works now. Marking as fixed.
http://bugs.winehq.org/show_bug.cgi?id=34501
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org 2013-10-11 12:31:00 CDT --- Closing bugs fixed in 1.7.4.