summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_getsrclines.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2013-03-12 12:02:51 +0100
committerMark Wielaard <[email protected]>2013-03-12 12:25:25 +0100
commitf1b06b5c1d9837832e74a61e19220ad5670bbc40 (patch)
treee45813697c3f90e13b2677ab526125e6fcc3110a /libdw/dwarf_getsrclines.c
parenta58951b183fb3e051870b19c95d8082a3efa3ddb (diff)
libdw and libdwfl srcfiles and srclines fixes for partial_units.
dwfl_getsrclines would always fail, even when lines were found. dwarf_decl_file, and other functions relying on srcfiles or srclines would fail for DIEs in partial_units because stmt_lists on partial_units were ignored. Note that dwz contained a bug which makes things fail in __libdw_formptr for DW_AT_stmt_list with a bogus DW_FORM even with these fixes. https://bugzilla.redhat.com/show_bug.cgi?id=919755 Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdw/dwarf_getsrclines.c')
-rw-r--r--libdw/dwarf_getsrclines.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c
index 0758023f..c24aebb5 100644
--- a/libdw/dwarf_getsrclines.c
+++ b/libdw/dwarf_getsrclines.c
@@ -1,5 +1,5 @@
/* Return line number information of CU.
- Copyright (C) 2004-2010 Red Hat, Inc.
+ Copyright (C) 2004-2010, 2013 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <[email protected]>, 2004.
@@ -69,7 +69,8 @@ int
dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines)
{
if (unlikely (cudie == NULL
- || INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit))
+ || (INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit
+ && INTUSE(dwarf_tag) (cudie) != DW_TAG_partial_unit)))
return -1;
int res = -1;