https://bugs.winehq.org/show_bug.cgi?id=53935
Bug ID: 53935 Summary: __unDName doesn't support 'G' and 'H' modifiers Product: WineHQ Bugzilla Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: bugzilla-unknown Assignee: wine-bugs@winehq.org Reporter: info@vmpsoft.com CC: austinenglish@gmail.com Distribution: ---
Here is my sources of undname.c:
static void append_extended_modifier(struct parsed_symbol *sym, const char **where, const char *str) { if (!(sym->flags & UNDNAME_NO_MS_KEYWORDS)) { if (str[0] == '_' && str[1] == '_') { if (sym->flags & UNDNAME_NO_LEADING_UNDERSCORES) str += 2; } *where = *where ? str_printf(sym, "%s %s", *where, str) : str; } }
static void get_extended_modifier(struct parsed_symbol *sym, struct datatype_t *xdt) { xdt->left = xdt->right = NULL; xdt->flags = 0; for (;;) { switch (*sym->current) { case 'E': append_extended_modifier(sym, &xdt->right, "__ptr64"); break; case 'F': append_extended_modifier(sym, &xdt->left, "__unaligned"); break; case 'G': append_extended_modifier(sym, &xdt->right, "&"); break; case 'H': append_extended_modifier(sym, &xdt->right, "&&"); break; case 'I': append_extended_modifier(sym, &xdt->right, "__restrict"); break; default: return; } sym->current++; } }
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #1 from Ivan Permyakov info@vmpsoft.com --- Examples of symbols:
?trimmed@QString@@QEHAA?AV1@XZ ?trimmed@QString@@QEGBA?AV1@XZ
https://bugs.winehq.org/show_bug.cgi?id=53935
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|bugzilla-unknown |-unknown Product|WineHQ Bugzilla |Wine
https://bugs.winehq.org/show_bug.cgi?id=53935
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|austinenglish@gmail.com | Component|-unknown |msvcrt
--- Comment #2 from Zeb Figura z.figura12@gmail.com --- Please select the "Wine" component when reporting bugs; you're reporting these against Bugzilla itself.
https://bugs.winehq.org/show_bug.cgi?id=53935
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- On a related, yet unrelated note: winedump fails on demangling at very least multilevel C++ symbols (something like Class::Object()::func()).
https://bugs.winehq.org/show_bug.cgi?id=53935
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #4 from Eric Pouech eric.pouech@gmail.com --- (In reply to Ivan Permyakov from comment #0)
Here is my sources of undname.c:
static void append_extended_modifier(struct parsed_symbol *sym, const char **where, const char *str) { if (!(sym->flags & UNDNAME_NO_MS_KEYWORDS))
- it looks strange that the "&" and "&&" modifiers (plain C++) are tagged under the MS keywords bits
Ivan: would you mind submitting a patch including your modifications to undname.c ? tests are required especially with & without the UNDNAME_MS_KEYBOARD flag
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #5 from Eric Pouech eric.pouech@gmail.com --- (In reply to Rafał Mużyło from comment #3)
On a related, yet unrelated note: winedump fails on demangling at very least multilevel C++ symbols (something like Class::Object()::func()).
yes the code in winedump and the code in msvcrt/undname.c have diverged over time (lots other features are missing from winedump, like templates and other related C++ goodies)
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #6 from Ivan Permyakov info@vmpsoft.com ---
- it looks strange that the "&" and "&&" modifiers (plain C++) are tagged
under the MS keywords bits
You are right: https://github.com/Chuyu-Team/VC-LTL/blob/a879b308d3d68c7d298db0747203937da2...
The "&" and "&" modifiers don't depends on the UNDNAME_NO_MS_KEYWORDS flag
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #7 from Ivan Permyakov info@vmpsoft.com ---
Ivan: would you mind submitting a patch including your modifications to undname.c ? tests are required especially with & without the UNDNAME_MS_KEYBOARD flag
static void append_ms_keyword(struct parsed_symbol *sym, const char **where, const char *str) { if (!(sym->flags & UNDNAME_NO_MS_KEYWORDS)) { if (sym->flags & UNDNAME_NO_LEADING_UNDERSCORES) str += 2; *where = *where ? str_printf(sym, "%s %s", *where, str) : str; } }
static void get_ext_modifier(struct parsed_symbol *sym, struct datatype_t *modifier) { modifier->left = modifier->right = NULL; for (;;) { switch (*sym->current) { case 'E': append_ms_keyword(sym, &modifier->right, "__ptr64"); break; case 'F': append_ms_keyword(sym, &modifier->left, "__unaligned"); break; case 'I': append_ms_keyword(sym, &modifier->right, "__restrict"); break; case 'G': { const char *mod = "&"; if (modifier->right) modifier->right = str_printf(sym, "%s %s", modifier->right, mod); else modifier->right = mod; } break; case 'H': { const char *mod = "&&"; if (modifier->right) modifier->right = str_printf(sym, "%s %s", modifier->right, mod); else modifier->right = mod; } break; default: return; } sym->current++; } }
https://bugs.winehq.org/show_bug.cgi?id=53935
--- Comment #8 from Eric Pouech eric.pouech@gmail.com --- I posted https://gitlab.winehq.org/wine/wine/-/merge_requests/1473 to support the unmangling. As usual, getting the correct white space handling is a pain.
https://bugs.winehq.org/show_bug.cgi?id=53935
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |d1eb78a75deb49cea3b273742b0 | |5362f227c8d22 Resolution|--- |FIXED
--- Comment #9 from Eric Pouech eric.pouech@gmail.com --- should be fixed by d1eb78a75deb49cea3b273742b05362f227c8d22
https://bugs.winehq.org/show_bug.cgi?id=53935
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.22.