diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 7843e679330..e5617c334bd 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -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); diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 34d00b2a021..c322a62c45a 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -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;