diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-14 17:26:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-14 17:26:11 +0000 |
commit | 516ba659387ce98c4ff28b88a7f00f5003cac9eb (patch) | |
tree | c896f42701f1bd92109ca4e91a8ad59c2077374d /gdb/exec.c | |
parent | 048d532d6e774418e2e7b40b645b4c249f636aa4 (diff) | |
download | gdb-516ba659387ce98c4ff28b88a7f00f5003cac9eb.zip gdb-516ba659387ce98c4ff28b88a7f00f5003cac9eb.tar.gz gdb-516ba659387ce98c4ff28b88a7f00f5003cac9eb.tar.bz2 |
* objfiles.h (gdb_bfd_close_or_warn): Declare.
* objfiles.c (gdb_bfd_close_or_warn): New.
* corelow.c: Include objfiles.h
(core_close): Use gdb_bfd_close_or_warn.
* elfread.c (build_id_verify): Ditto.
* exec.c (exec_close, exec_close_1): Ditto.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -101,9 +101,7 @@ exec_close (void) bfd *abfd = exec_bfd; char *name = bfd_get_filename (abfd); - if (!bfd_close (abfd)) - warning (_("cannot close \"%s\": %s"), - name, bfd_errmsg (bfd_get_error ())); + gdb_bfd_close_or_warn (abfd); xfree (name); /* Removing target sections may close the exec_ops target. @@ -141,9 +139,7 @@ exec_close_1 (int quitting) } else if (vp->bfd != exec_bfd) /* FIXME-leak: We should be freeing vp->name too, I think. */ - if (!bfd_close (vp->bfd)) - warning (_("cannot close \"%s\": %s"), - vp->name, bfd_errmsg (bfd_get_error ())); + gdb_bfd_close_or_warn (vp->bfd); xfree (vp); } |