summaryrefslogtreecommitdiffstats
path: root/libdwfl
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2010-06-30 01:18:43 -0700
committerRoland McGrath <[email protected]>2010-06-30 01:18:43 -0700
commit82a6336fd0b128ee213e03f4e35c73bee91d5c01 (patch)
tree81b58479fc029afba88e7003bfc8f871addd2c93 /libdwfl
parentcedd299acd4b42f88a0a5bf800f3d87f8225fce7 (diff)
libdwfl: Fix debuginfo search when dwfl_build_id_find_debuginfo closes fd on success.
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog2
-rw-r--r--libdwfl/find-debuginfo.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 5620e23c..f0a8529d 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -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 <[email protected]>
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
index 19d5f907..f6f802e2 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -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;
}