summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_haschildren.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2014-12-19 00:06:26 +0100
committerMark Wielaard <[email protected]>2014-12-19 00:06:26 +0100
commitbd0434b61e0317718eb159fe7b5dc9ea870a0b79 (patch)
tree825a373c2233a59b5156b219013e32f8f241aacc /libdw/dwarf_haschildren.c
parente18bf66ce8070f96195880e83a50c9d98006b832 (diff)
parent898ed261444cdd817c2d9b3656209a291eb5e807 (diff)
Merge branch 'master' into portable
Diffstat (limited to 'libdw/dwarf_haschildren.c')
-rw-r--r--libdw/dwarf_haschildren.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/libdw/dwarf_haschildren.c b/libdw/dwarf_haschildren.c
index b2273982..d0ce51ea 100644
--- a/libdw/dwarf_haschildren.c
+++ b/libdw/dwarf_haschildren.c
@@ -1,5 +1,5 @@
/* Return string associated with given attribute.
- Copyright (C) 2003, 2005, 2008 Red Hat, Inc.
+ Copyright (C) 2003, 2005, 2008, 2014 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <[email protected]>, 2003.
@@ -40,25 +40,13 @@ dwarf_haschildren (die)
Dwarf_Die *die;
{
/* Find the abbreviation entry. */
- Dwarf_Abbrev *abbrevp = die->abbrev;
- if (abbrevp != DWARF_END_ABBREV)
- {
- const unsigned char *readp = (unsigned char *) die->addr;
-
- /* First we have to get the abbreviation code so that we can decode
- the data in the DIE. */
- unsigned int abbrev_code;
- get_uleb128 (abbrev_code, readp);
-
- abbrevp = __libdw_findabbrev (die->cu, abbrev_code);
- die->abbrev = abbrevp ?: DWARF_END_ABBREV;
- }
- if (unlikely (die->abbrev == DWARF_END_ABBREV))
+ Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
+ if (unlikely (abbrevp == DWARF_END_ABBREV))
{
__libdw_seterrno (DWARF_E_INVALID_DWARF);
return -1;
}
- return die->abbrev->has_children;
+ return abbrevp->has_children;
}
INTDEF (dwarf_haschildren)