From d3e819815acd7b1b075bc0c7029dc07dd935f3d2 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 26 Sep 2013 01:08:35 +0000 Subject: [PATCH] * objfiles.c (allocate_objfile): Move comment to better place. --- gdb/ChangeLog | 2 ++ gdb/objfiles.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 47c28d6d443..d89e56629b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2013-09-25 Doug Evans + * objfiles.c (allocate_objfile): Move comment to better place. + New option "set debug symfile on". * NEWS: Mention "set debug symfile". * Makefile.in (SFILES): Add symfile-debug.c. diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 59ab632f737..b10f803540f 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -280,10 +280,6 @@ allocate_objfile (bfd *abfd, const char *name, int flags) objfile_alloc_data (objfile); - /* Update the per-objfile information that comes from the bfd, ensuring - that any data that is reference is saved in the per-objfile data - region. */ - if (name == NULL) { gdb_assert (abfd == NULL); @@ -292,6 +288,10 @@ allocate_objfile (bfd *abfd, const char *name, int flags) objfile->original_name = obstack_copy0 (&objfile->objfile_obstack, name, strlen (name)); + /* Update the per-objfile information that comes from the bfd, ensuring + that any data that is reference is saved in the per-objfile data + region. */ + objfile->obfd = abfd; gdb_bfd_ref (abfd); if (abfd != NULL) -- 2.30.2