Imported Upstream version 0.160
[platform/upstream/elfutils.git] / libdw / dwarf_getsrcfiles.c
index d026820..4bfc34b 100644 (file)
@@ -1,5 +1,5 @@
 /* Return source file information of CU.
-   Copyright (C) 2004, 2005 Red Hat, Inc.
+   Copyright (C) 2004, 2005, 2013 Red Hat, Inc.
    This file is part of elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -40,7 +40,8 @@ int
 dwarf_getsrcfiles (Dwarf_Die *cudie, Dwarf_Files **files, size_t *nfiles)
 {
   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;