dbghelp: dwarf: Added support for function labels.

This commit is contained in:
Eric Pouech 2006-06-18 21:31:49 +02:00 committed by Alexandre Julliard
parent 6cee154b23
commit 686237e043
1 changed files with 24 additions and 0 deletions

View File

@ -972,6 +972,22 @@ static void dwarf2_parse_subprogram_parameter(dwarf2_parse_context_t* ctx,
if (di->abbrev->have_child) FIXME("Unsupported children\n"); 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, static void dwarf2_parse_subprogram_block(dwarf2_parse_context_t* ctx,
dwarf2_debug_info_t* di, dwarf2_debug_info_t* di,
struct symt_function* func); struct symt_function* func);
@ -1015,6 +1031,11 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_parse_context_t* ctx,
/* FIXME */ /* FIXME */
dwarf2_parse_inlined_subroutine(ctx, child); dwarf2_parse_inlined_subroutine(ctx, child);
break; break;
case DW_TAG_label:
/* FIXME
* dwarf2_parse_subprogram_label(ctx, func, child);
*/
break;
default: default:
FIXME("Unhandled Tag type 0x%lx at %s, for %s\n", FIXME("Unhandled Tag type 0x%lx at %s, for %s\n",
child->abbrev->tag, dwarf2_debug_ctx(ctx), dwarf2_debug_di(di)); child->abbrev->tag, dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
@ -1131,6 +1152,9 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_parse_context_t* ctx,
* skip it for now * skip it for now
*/ */
break; break;
case DW_TAG_label:
dwarf2_parse_subprogram_label(ctx, func, child);
break;
case DW_TAG_class_type: case DW_TAG_class_type:
case DW_TAG_structure_type: case DW_TAG_structure_type:
case DW_TAG_union_type: case DW_TAG_union_type: