aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-06-20 21:58:58 +0000
committerDoug Evans <dje@google.com>2013-06-20 21:58:58 +0000
commit9341788208d6959fe67b357e348883a15ac4482d (patch)
tree831473287aaba46d97ddf158cd486643b6279807 /gdb
parente3e06db30cd44fa751ba3cf7bbdfbbc96cac943d (diff)
downloadgdb-9341788208d6959fe67b357e348883a15ac4482d.zip
gdb-9341788208d6959fe67b357e348883a15ac4482d.tar.gz
gdb-9341788208d6959fe67b357e348883a15ac4482d.tar.bz2
* dwarf2read.c (struct dwp_file): Fix comment.
(open_and_init_dwp_file): Set dwp_file->name to bfd's file name.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/dwarf2read.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 29ab625..9aaeedf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2013-06-20 Doug Evans <dje@google.com>
+ * dwarf2read.c (struct dwp_file): Fix comment.
+ (open_and_init_dwp_file): Set dwp_file->name to bfd's file name.
+
* source.c (openp): Document OPF_TRY_CWD_FIRST+OPF_SEARCH_IN_PATH
better.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 555698a..32d33f0 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -813,7 +813,7 @@ struct dwp_file
/* Name of the file. */
const char *name;
- /* The bfd, when the file is open. Otherwise this is NULL. */
+ /* The bfd. */
bfd *dbfd;
/* Section info for this file. */
@@ -9596,8 +9596,7 @@ open_and_init_dwp_file (void)
return NULL;
}
dwp_file = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwp_file);
- dwp_file->name = obstack_copy0 (&objfile->objfile_obstack,
- dwp_name, strlen (dwp_name));
+ dwp_file->name = bfd_get_filename (dbfd);
dwp_file->dbfd = dbfd;
do_cleanups (cleanups);