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 (dw2_find_symbol_file): Initialize filename


Hi.
I noticed this while debugging a problem with bad debug info.
There's no guarantee that the die reader function will get called.

Committed.

2013-04-30  Doug Evans  <dje@google.com>

	* dwarf2read.c (dw2_find_symbol_file): Initialize filename before
	calling init_cutu_and_read_dies.

==== //depot/depot2/gcctools/google_vendor_src_branch/gdb/gdb-7.6.x/gdb/dwarf2read.c#4 - /g5/local/ctools/gdb/7.6-gg3/depot2/gcctools/google_vendor_src_branch/gdb/gdb-7.6.x/gdb/dwarf2read.c ====
--- /tmp/g4-67641/cache/depot/depot2/gcctools/google_vendor_src_branch/gdb/gdb-7.6.x/gdb/dwarf2read.c#4	2013-04-26 08:30:21.000000000 -0700
+++ /g5/local/ctools/gdb/7.6-gg3/depot2/gcctools/google_vendor_src_branch/gdb/gdb-7.6.x/gdb/dwarf2read.c	2013-04-30 10:03:57.496562272 -0700
@@ -3479,6 +3479,9 @@
       return per_cu->v.quick->symtab->filename;
     }
 
+  /* Initialize filename in case there's a problem reading the DWARF,
+     dw2_get_primary_filename_reader may not get called.  */
+  filename = NULL;
   init_cutu_and_read_dies (per_cu, NULL, 0, 0,
 			   dw2_get_primary_filename_reader, &filename);
 


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