Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(842)

Unified Diff: gdb/bfd-target.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/bfd-target.h ('k') | gdb/bfin-linux-tdep.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/bfd-target.c
diff --git a/gdb/bfd-target.c b/gdb/bfd-target.c
index 6728800461e5707009fd53319b3caebc75da6b7b..8d09831c8182f9d51edccd78506e1f84713869c1 100644
--- a/gdb/bfd-target.c
+++ b/gdb/bfd-target.c
@@ -1,6 +1,6 @@
/* Very simple "bfd" target, for GDB, the GNU debugger.
- Copyright (C) 2003, 2005, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,6 +21,7 @@
#include "target.h"
#include "bfd-target.h"
#include "exec.h"
+#include "gdb_bfd.h"
/* The object that is stored in the target_ops->to_data field has this
type. */
@@ -66,11 +67,11 @@ target_bfd_get_section_table (struct target_ops *ops)
}
static void
-target_bfd_xclose (struct target_ops *t, int quitting)
+target_bfd_xclose (struct target_ops *t)
{
struct target_bfd_data *data = t->to_data;
- bfd_close (data->bfd);
+ gdb_bfd_unref (data->bfd);
xfree (data->table.sections);
xfree (data);
xfree (t);
@@ -84,6 +85,7 @@ target_bfd_reopen (struct bfd *abfd)
data = XZALLOC (struct target_bfd_data);
data->bfd = abfd;
+ gdb_bfd_ref (abfd);
build_section_table (abfd, &data->table.sections, &data->table.sections_end);
t = XZALLOC (struct target_ops);
@@ -94,6 +96,7 @@ target_bfd_reopen (struct bfd *abfd)
t->to_xfer_partial = target_bfd_xfer_partial;
t->to_xclose = target_bfd_xclose;
t->to_data = data;
+ t->to_magic = OPS_MAGIC;
return t;
}
« no previous file with comments | « gdb/bfd-target.h ('k') | gdb/bfin-linux-tdep.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698