X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcli%2Fcli-dump.c;h=7dce32ac2f529e28ba9fc1d05a4951c9921a3233;hb=d6ad71ba41afb220549d1c7fe61edd6bddd128ad;hp=1b2b5d4d4e67a5c6bf57d15275c289b91843cddf;hpb=5005c8a90ab7a7eb5320d53cf6b8e57ca8f71b2b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 1b2b5d4d4e..7dce32ac2f 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -1,7 +1,6 @@ /* Dump-to-file commands, for GDB, the GNU debugger. - Copyright (c) 2002, 2005, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (c) 2002, 2005, 2007-2012 Free Software Foundation, Inc. Contributed by Red Hat. @@ -33,6 +32,7 @@ #include "readline/readline.h" #include "gdbcore.h" #include "cli/cli-utils.h" +#include "gdb_bfd.h" #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE))) @@ -112,7 +112,7 @@ bfd_openr_with_cleanup (const char *filename, const char *target) { bfd *ibfd; - ibfd = bfd_openr (filename, target); + ibfd = gdb_bfd_ref (bfd_openr (filename, target)); if (ibfd == NULL) error (_("Failed to open %s: %s."), filename, bfd_errmsg (bfd_get_error ())); @@ -132,7 +132,7 @@ bfd_openw_with_cleanup (const char *filename, const char *target, if (*mode == 'w') /* Write: create new file */ { - obfd = bfd_openw (filename, target); + obfd = gdb_bfd_ref (bfd_openw (filename, target)); if (obfd == NULL) error (_("Failed to open %s: %s."), filename, bfd_errmsg (bfd_get_error ()));