aboutsummaryrefslogtreecommitdiff
path: root/gdb/minidebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/minidebug.c')
-rw-r--r--gdb/minidebug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index ae58c26..d4687dd 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -256,11 +256,11 @@ lzma_stat (struct bfd *abfd,
If we find one we create a iovec based bfd that decompresses the
object data on demand. If we don't find one, return NULL. */
-bfd *
+gdb_bfd_ref_ptr
find_separate_debug_file_in_section (struct objfile *objfile)
{
asection *section;
- bfd *abfd;
+ gdb_bfd_ref_ptr abfd;
if (objfile->obfd == NULL)
return NULL;
@@ -275,16 +275,14 @@ find_separate_debug_file_in_section (struct objfile *objfile)
if (abfd == NULL)
return NULL;
- if (!bfd_check_format (abfd, bfd_object))
+ if (!bfd_check_format (abfd.get (), bfd_object))
{
warning (_("Cannot parse .gnu_debugdata section; not a BFD object"));
- gdb_bfd_unref (abfd);
return NULL;
}
#else
warning (_("Cannot parse .gnu_debugdata section; LZMA support was "
"disabled at compile time"));
- abfd = NULL;
#endif /* !HAVE_LIBLZMA */
return abfd;