]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: Fix debuginfo search when dwfl_build_id_find_debuginfo closes fd on success.
authorRoland McGrath <roland@redhat.com>
Wed, 30 Jun 2010 08:18:43 +0000 (01:18 -0700)
committerRoland McGrath <roland@redhat.com>
Wed, 30 Jun 2010 08:18:43 +0000 (01:18 -0700)
libdwfl/ChangeLog
libdwfl/find-debuginfo.c

index 5620e23c4d6c6d9d4db982197ad0f145c86f8a04..f0a8529d2d7f9ce6024d059bdfe1a498f4ab4982 100644 (file)
@@ -3,6 +3,8 @@
        * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
        confused by -1 return from dwfl_build_id_find_elf after it opened
        the Elf handle.
+       * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
+       dwfl_build_id_find_debuginfo.
 
 2010-06-16  Roland McGrath  <roland@redhat.com>
 
index 19d5f907d2be689f44911c6a0be69baff3c6bc40..f6f802e25d1aaa49e155c9be80f984ede7ec771a 100644 (file)
@@ -265,7 +265,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
                                                     NULL, NULL, 0,
                                                     NULL, NULL, 0,
                                                     debuginfo_file_name);
-      if (fd >= 0 || errno != 0)
+      if (fd >= 0 || mod->debug.elf != NULL || errno != 0)
        return fd;
     }