[PATCH 18/31] [DbgHelp]: dwarf & labels
Eric Pouech
eric.pouech at wanadoo.fr
Sun Jun 18 14:31:49 CDT 2006
- added support for functions label
A+
---
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 b88ea86..97a6210 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:
More information about the wine-patches
mailing list