msvcrt: Add support for $$B datatype description format in unDName.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-01-20 22:01:23 +01:00 committed by Alexandre Julliard
parent 112ad7fc87
commit 6ac2acc34f
2 changed files with 33 additions and 1 deletions

View File

@ -1321,6 +1321,8 @@ static void test_demangle(void)
/* 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"},
/* 130 */ {"??_E?$TStrArray@$$BY0BAA@D$0BA@@@UAEPAXI@Z",
"public: virtual void * __thiscall TStrArray<char [256],16>::`vector deleting destructor'(unsigned int)"},
};
int i, num_test = (sizeof(test)/sizeof(test[0]));
char* name;

View File

@ -991,7 +991,37 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
}
break;
case '$':
if (*sym->current == 'C')
if (*sym->current == 'B')
{
unsigned mark = sym->stack.num;
struct datatype_t sub_ct;
const char* arr = NULL;
sym->current++;
/* multidimensional arrays */
if (*sym->current == 'Y')
{
const char* n1;
int num;
sym->current++;
if (!(n1 = get_number(sym))) goto done;
num = atoi(n1);
while (num--)
arr = str_printf(sym, "%s[%s]", arr, get_number(sym));
}
if (!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE)) goto done;
if (arr)
ct->left = str_printf(sym, "%s %s", sub_ct.left, arr);
else
ct->left = sub_ct.left;
ct->right = sub_ct.right;
sym->stack.num = mark;
}
else if (*sym->current == 'C')
{
const char *ptr, *ptr_modif;