This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] dwarf2read.c: Fix comment, use bfd name for dwp file name


Hi.
Some minor cleanups to the DWP handling code.

Committed.

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.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.807
diff -u -p -r1.807 dwarf2read.c
--- dwarf2read.c	19 Jun 2013 04:38:51 -0000	1.807
+++ dwarf2read.c	20 Jun 2013 20:08:28 -0000
@@ -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 +9626,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);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]