dbghelp: Enhance support for constant values in dwarf debug information.

This commit is contained in:
Eric Pouech 2009-10-03 13:15:43 +02:00 committed by Alexandre Julliard
parent dcf68254bd
commit 6a1b2a9ca5
2 changed files with 14 additions and 1 deletions

View File

@ -1393,12 +1393,24 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
v.n1.n2.n3.byref = pool_strdup(&subpgm->ctx->module->pool, value.u.string);
break;
case DW_FORM_data8:
case DW_FORM_block:
case DW_FORM_block1:
case DW_FORM_block2:
case DW_FORM_block4:
v.n1.n2.vt = VT_I4;
switch (value.u.block.size)
{
case 1: v.n1.n2.n3.lVal = *(BYTE*)value.u.block.ptr; break;
case 2: v.n1.n2.n3.lVal = *(USHORT*)value.u.block.ptr; break;
case 4: v.n1.n2.n3.lVal = *(DWORD*)value.u.block.ptr; break;
default:
v.n1.n2.vt = VT_I1 | VT_BYREF;
v.n1.n2.n3.byref = pool_alloc(&subpgm->ctx->module->pool, value.u.block.size);
memcpy(v.n1.n2.n3.byref, value.u.block.ptr, value.u.block.size);
}
break;
case DW_FORM_data8:
default:
FIXME("Unsupported form for const value %s (%lx)\n",
name.u.string, value.form);

View File

@ -703,6 +703,7 @@ static void symt_fill_sym_info(const struct module_pair* pair,
case VT_UI2: sym_info->Value = (ULONG)data->u.value.n1.n2.n3.uiVal; break;
case VT_UI1: sym_info->Value = (ULONG)data->u.value.n1.n2.n3.bVal; break;
case VT_I1 | VT_BYREF: sym_info->Value = (ULONG)data->u.value.n1.n2.n3.byref; break;
case VT_EMPTY: sym_info->Value = 0; break;
default:
FIXME("Unsupported variant type (%u)\n", data->u.value.n1.n2.vt);
sym_info->Value = 0;