Module: wine Branch: refs/heads/master Commit: 686237e043236f97759b26be1516c6f082761840 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=686237e043236f97759b26be...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Sun Jun 18 21:31:49 2006 +0200
dbghelp: dwarf: Added support for function labels.
---
dlls/dbghelp/dwarf.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index f0d4ea0..4cffd0a 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -972,6 +972,22 @@ static void dwarf2_parse_subprogram_para if (di->abbrev->have_child) FIXME("Unsupported children\n"); }
+static void dwarf2_parse_subprogram_label(dwarf2_parse_context_t* ctx, + struct symt_function* func, + dwarf2_debug_info_t* di) +{ + union attribute name; + union attribute low_pc; + + TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di)); + + if (!dwarf2_find_attribute(di, DW_AT_low_pc, &low_pc)) low_pc.uvalue = 0; + dwarf2_find_name(ctx, di, &name, "label"); + + symt_add_function_point(ctx->module, func, SymTagLabel, + ctx->module->module.BaseOfImage + low_pc.uvalue, name.string); +} + static void dwarf2_parse_subprogram_block(dwarf2_parse_context_t* ctx, dwarf2_debug_info_t* di, struct symt_function* func); @@ -1015,6 +1031,11 @@ static void dwarf2_parse_inlined_subrout /* FIXME */ dwarf2_parse_inlined_subroutine(ctx, child); break; + case DW_TAG_label: + /* FIXME + * dwarf2_parse_subprogram_label(ctx, func, child); + */ + break; default: FIXME("Unhandled Tag type 0x%lx at %s, for %s\n", child->abbrev->tag, dwarf2_debug_ctx(ctx), dwarf2_debug_di(di)); @@ -1131,6 +1152,9 @@ static struct symt* dwarf2_parse_subprog * skip it for now */ break; + case DW_TAG_label: + dwarf2_parse_subprogram_label(ctx, func, child); + break; case DW_TAG_class_type: case DW_TAG_structure_type: case DW_TAG_union_type: