From eabeb1da5c088dda065ebd3f0d0eae96b7ebe6a1 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sun, 26 Sep 2021 14:46:49 +0200 Subject: [PATCH] dbghelp/dwarf: Pass cuhead to loc_compute_frame. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/dbghelp/dwarf.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 785f6651f11..5f4ff8ad5d3 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -2821,20 +2821,15 @@ static const dwarf2_cuhead_t* get_cuhead_from_func(const struct symt_function* f static enum location_error loc_compute_frame(struct process* pcs, const struct module_format* modfmt, const struct symt_function* func, - DWORD_PTR ip, struct location* frame) + DWORD_PTR ip, const dwarf2_cuhead_t* head, + struct location* frame) { struct symt** psym = NULL; struct location* pframe; dwarf2_traverse_context_t lctx; enum location_error err; unsigned int i; - const dwarf2_cuhead_t* head = get_cuhead_from_func(func); - if (!head) - { - FIXME("Shouldn't happen\n"); - return loc_err_internal; - } for (i=0; ivchildren); i++) { psym = vector_at(&func->vchildren, i); @@ -3663,7 +3658,7 @@ static void dwarf2_location_compute(struct process* pcs, /* instruction pointer relative to compiland's start */ ip = pcs->ctx_frame.InstructionOffset - ((struct symt_compiland*)func->container)->address; - if ((err = loc_compute_frame(pcs, modfmt, func, ip, &frame)) == 0) + if ((err = loc_compute_frame(pcs, modfmt, func, ip, head, &frame)) == 0) { switch (loc->kind) {