msvcrt: Add support for member function pointers demangling in unDName function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b9a0fe18e3
commit
112ad7fc87
|
@ -1318,6 +1318,9 @@ static void test_demangle(void)
|
|||
/* 128 */ {"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z",
|
||||
"class std::complex<float> & std::operator*=(class std::complex<float> &,class std::complex<float> const &)",
|
||||
"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", 2},
|
||||
/* 129 */ {"??$run@XVTask_Render_Preview@@@QtConcurrent@@YA?AV?$QFuture@X@@PEAVTask_Render_Preview@@P82@EAAXXZ@Z",
|
||||
"class QFuture<void> __cdecl QtConcurrent::run<void,class Task_Render_Preview>(class Task_Render_Preview * __ptr64,void (__cdecl Task_Render_Preview::*)(void) __ptr64)",
|
||||
"??$run@XVTask_Render_Preview@@@QtConcurrent@@YA?AV?$QFuture@X@@PEAVTask_Render_Preview@@P82@EAAXXZ@Z"},
|
||||
};
|
||||
int i, num_test = (sizeof(test)/sizeof(test[0]));
|
||||
char* name;
|
||||
|
|
|
@ -859,14 +859,55 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
|||
case 'P': /* Pointer */
|
||||
if (isdigit(*sym->current))
|
||||
{
|
||||
/* FIXME: P6 = Function pointer, others who knows.. */
|
||||
if (*sym->current++ == '6')
|
||||
/* FIXME:
|
||||
* P6 = Function pointer
|
||||
* P8 = Member function pointer
|
||||
* others who knows.. */
|
||||
if (*sym->current == '8')
|
||||
{
|
||||
char* args = NULL;
|
||||
const char* call_conv;
|
||||
const char* exported;
|
||||
struct datatype_t sub_ct;
|
||||
unsigned mark = sym->stack.num;
|
||||
const char* class;
|
||||
const char* modifier;
|
||||
const char* ptr_modif;
|
||||
|
||||
sym->current++;
|
||||
|
||||
if (!(class = get_class_name(sym)))
|
||||
goto done;
|
||||
if (!get_modifier(sym, &modifier, &ptr_modif))
|
||||
goto done;
|
||||
if (modifier)
|
||||
modifier = str_printf(sym, "%s %s", modifier, ptr_modif);
|
||||
else if(ptr_modif[0])
|
||||
modifier = str_printf(sym, " %s", ptr_modif);
|
||||
if (!get_calling_convention(*sym->current++,
|
||||
&call_conv, &exported,
|
||||
sym->flags & ~UNDNAME_NO_ALLOCATION_LANGUAGE))
|
||||
goto done;
|
||||
if (!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE))
|
||||
goto done;
|
||||
|
||||
args = get_args(sym, pmt_ref, TRUE, '(', ')');
|
||||
if (!args) goto done;
|
||||
sym->stack.num = mark;
|
||||
|
||||
ct->left = str_printf(sym, "%s%s (%s %s::*",
|
||||
sub_ct.left, sub_ct.right, call_conv, class);
|
||||
ct->right = str_printf(sym, ")%s%s", args, modifier);
|
||||
}
|
||||
else if (*sym->current == '6')
|
||||
{
|
||||
char* args = NULL;
|
||||
const char* call_conv;
|
||||
const char* exported;
|
||||
struct datatype_t sub_ct;
|
||||
unsigned mark = sym->stack.num;
|
||||
|
||||
sym->current++;
|
||||
|
||||
if (!get_calling_convention(*sym->current++,
|
||||
&call_conv, &exported,
|
||||
|
|
Loading…
Reference in New Issue