[PATCH 0/1] MR10397: dbghelp: {dwarf} Properly ignore Dwarf-5 compilation units.
Signed-off-by: Eric Pouech <epouech@codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10397
From: Eric Pouech <epouech@codeweavers.com> Signed-off-by: Eric Pouech <epouech@codeweavers.com> --- dlls/dbghelp/dwarf.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 470beb843e9..1dce6ba0df3 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -4215,13 +4215,20 @@ static BOOL dwarf2_load_CU_module(dwarf2_parse_module_context_t* module_ctx, str mod_ctx.end_data = mod_ctx.data + sections[section_debug].size; while (mod_ctx.data < mod_ctx.end_data) { - dwarf2_parse_context_t **punit_ctx = vector_add(&module_ctx->unit_contexts, &module_ctx->module->pool); + dwarf2_parse_context_t* unit; - if (!(*punit_ctx = pool_alloc(&module_ctx->module->pool, sizeof(dwarf2_parse_context_t)))) + if (!(unit = pool_alloc(&module_ctx->module->pool, sizeof(dwarf2_parse_context_t)))) return FALSE; - (*punit_ctx)->module_ctx = module_ctx; - dwarf2_parse_compilation_unit_head(*punit_ctx, &mod_ctx); + unit->module_ctx = module_ctx; + if (dwarf2_parse_compilation_unit_head(unit, &mod_ctx)) + { + dwarf2_parse_context_t **punit_ctx = vector_add(&module_ctx->unit_contexts, &module_ctx->module->pool); + if (!punit_ctx) return FALSE; + *punit_ctx = unit; + } + else + pool_free(&module_ctx->module->pool, unit); } /* phase2: load content of all CU -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10397
participants (2)
-
Eric Pouech -
eric pouech (@epo)