X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Flttng-utils%2Fbin-info.c;h=c3e16cec9b97c3ff38ec5c8315f4acc548f27360;hb=1fc491bde9c3d7da2ad06752aa9438a52bd19cd5;hp=c810f8c6f8e738bcdf7ba57218b4d71169be95e8;hpb=af1bd95dca54b7f583bd5b2d494f050d84ed05f0;p=deliverable%2Fbabeltrace.git diff --git a/plugins/lttng-utils/bin-info.c b/plugins/lttng-utils/bin-info.c index c810f8c6f..c3e16cec9 100644 --- a/plugins/lttng-utils/bin-info.c +++ b/plugins/lttng-utils/bin-info.c @@ -1218,22 +1218,37 @@ int bin_info_child_die_has_address(struct bt_dwarf_die *die, uint64_t addr, bool } do { - int tag; - - ret = bt_dwarf_die_get_tag(die, &tag); + ret = bt_dwarf_die_contains_addr(die, addr, &_contains); if (ret) { goto error; } - if (tag == DW_TAG_inlined_subroutine) { - ret = bt_dwarf_die_contains_addr(die, addr, &_contains); + if (_contains) { + /* + * The address is within the range of the current DIE + * or its children. + */ + int tag; + + ret = bt_dwarf_die_get_tag(die, &tag); if (ret) { goto error; } - if (_contains) { + if (tag == DW_TAG_inlined_subroutine) { + /* Found the tracepoint. */ goto end; } + + if (bt_dwarf_die_has_children(die)) { + /* + * Look for the address in the children DIEs. + */ + ret = bt_dwarf_die_child(die); + if (ret) { + goto error; + } + } } } while (bt_dwarf_die_next(die) == 0);