diff options
Diffstat (limited to 'elfutils/libdw/dwarf_offabbrev.c')
-rw-r--r-- | elfutils/libdw/dwarf_offabbrev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/elfutils/libdw/dwarf_offabbrev.c b/elfutils/libdw/dwarf_offabbrev.c index 17978fbc..97370d60 100644 --- a/elfutils/libdw/dwarf_offabbrev.c +++ b/elfutils/libdw/dwarf_offabbrev.c @@ -1,5 +1,5 @@ /* Get abbreviation at given offset. - Copyright (C) 2004 Red Hat, Inc. + Copyright (C) 2004, 2005 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2004. This program is Open Source software; you can redistribute it and/or @@ -26,5 +26,11 @@ dwarf_offabbrev (Dwarf *dbg, Dwarf_Off offset, size_t *lengthp, if (dbg == NULL) return -1; - return __libdw_getabbrev (dbg, NULL, offset, lengthp, abbrevp) == NULL; + Dwarf_Abbrev *abbrev = __libdw_getabbrev (dbg, NULL, offset, lengthp, + abbrevp); + + if (abbrev == NULL) + return -1; + + return abbrev == DWARF_END_ABBREV ? 1 : 0; } |