dbghelp: Correctly store the addresses of blocks.

They are stored internally as offsets to the start of the function
which embeds the block.
This commit is contained in:
Eric Pouech 2006-11-24 22:18:35 +01:00 committed by Alexandre Julliard
parent 31f4f1b003
commit 5b61db4161
1 changed files with 4 additions and 2 deletions

View File

@ -1354,7 +1354,8 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
if (!dwarf2_find_attribute(subpgm->ctx, di, DW_AT_high_pc, &high_pc)) high_pc.u.uvalue = 0; if (!dwarf2_find_attribute(subpgm->ctx, di, DW_AT_high_pc, &high_pc)) high_pc.u.uvalue = 0;
block = symt_open_func_block(subpgm->ctx->module, subpgm->func, parent_block, block = symt_open_func_block(subpgm->ctx->module, subpgm->func, parent_block,
low_pc.u.uvalue, high_pc.u.uvalue - low_pc.u.uvalue); subpgm->ctx->module->module.BaseOfImage + low_pc.u.uvalue - subpgm->func->address,
high_pc.u.uvalue - low_pc.u.uvalue);
if (di->abbrev->have_child) /** any interest to not have child ? */ if (di->abbrev->have_child) /** any interest to not have child ? */
{ {
@ -1406,7 +1407,8 @@ static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
high_pc.u.uvalue = 0; high_pc.u.uvalue = 0;
block = symt_open_func_block(subpgm->ctx->module, subpgm->func, parent_block, block = symt_open_func_block(subpgm->ctx->module, subpgm->func, parent_block,
low_pc.u.uvalue, high_pc.u.uvalue - low_pc.u.uvalue); subpgm->ctx->module->module.BaseOfImage + low_pc.u.uvalue - subpgm->func->address,
high_pc.u.uvalue - low_pc.u.uvalue);
if (di->abbrev->have_child) /** any interest to not have child ? */ if (di->abbrev->have_child) /** any interest to not have child ? */
{ {