From: Eric Pouech Subject: [PATCH 4/9] dbghelp/dwarf: dwarf4 integrates some tweaks in high / low pc attritbutes Message-Id: <163186761876.96492.13078416407062745040.stgit@euterpe> Date: Fri, 17 Sep 2021 10:33:39 +0200 In-Reply-To: <163186755659.96492.14807608023276147451.stgit@euterpe> References: <163186755659.96492.14807608023276147451.stgit@euterpe> Signed-off-by: Eric Pouech --- dlls/dbghelp/dwarf.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 16ebd5dbf65..6eb7bbf1337 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -1244,6 +1244,24 @@ static BOOL dwarf2_read_range(dwarf2_parse_context_t* ctx, const dwarf2_debug_in return FALSE; *plow = low_pc.u.uvalue; *phigh = high_pc.u.uvalue; + if (ctx->head.version >= 4) + switch (high_pc.form) + { + case DW_FORM_addr: + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_sdata: + case DW_FORM_udata: + /* From dwarf4 on, when FORM's class is contant, high_pc is an offset from low_pc */ + *phigh += *plow; + break; + default: + FIXME("Unsupported class for high_pc\n"); + break; + } return TRUE; } }