2009-12-02 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 2 Dec 2009 11:44:35 +0000 (11:44 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 2 Dec 2009 11:44:35 +0000 (11:44 +0000)
* symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in
prototype.
* dwarf2read.c (dwarf2_build_psymtabs): Remove mainline paramter in
definition, simplify code assuming it is always 0.
* coffread.c (coff_symfile_read): Adjust call.
* elfread.c (elf_symfile_read): Ditto.
* machoread.c (macho_symfile_read): Explicitely calls
init_psymbol_list if mainline is set.

gdb/ChangeLog
gdb/coffread.c
gdb/dwarf2read.c
gdb/elfread.c
gdb/machoread.c
gdb/symfile.h

index a90c40aa49984382653b3fc703f54955fe30b658..2bce66796b00d0fc6823ed043534c952beaa9ab1 100644 (file)
@@ -1,3 +1,14 @@
+2009-12-02  Tristan Gingold  <gingold@adacore.com>
+
+       * symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in
+       prototype.
+       * dwarf2read.c (dwarf2_build_psymtabs): Remove mainline paramter in
+       definition, simplify code assuming it is always 0.
+       * coffread.c (coff_symfile_read): Adjust call.
+       * elfread.c (elf_symfile_read): Ditto.
+       * machoread.c (macho_symfile_read): Explicitely calls
+       init_psymbol_list if mainline is set.
+
 2009-12-02  Tristan Gingold  <gingold@adacore.com>
 
        * dwarf2read.c (dwarf2_build_psymtabs_easy): Remove mainline parameter.
index d66312b8b07beac584e8a81799666e8c39ff363d..84edfc55ecc1007bd1c6285f6db19fdd3b1cd1cb 100644 (file)
@@ -641,7 +641,7 @@ coff_symfile_read (struct objfile *objfile, int mainline)
   if (dwarf2_has_info (objfile))
     {
       /* DWARF2 sections.  */
-      dwarf2_build_psymtabs (objfile, mainline);
+      dwarf2_build_psymtabs (objfile);
     }
 
   dwarf2_build_frame_info (objfile);
index 0fa63a5c42afc8b98caf25670b2cc81ac3e05445..a92d9233aefb25cc0d32629e50f0933a2ff0339e 100644 (file)
@@ -1448,7 +1448,7 @@ dwarf2_get_section_info (struct objfile *objfile, const char *section_name,
 /* Build a partial symbol table.  */
 
 void
-dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
+dwarf2_build_psymtabs (struct objfile *objfile)
 {
   dwarf2_read_section (objfile, &dwarf2_per_objfile->info);
   dwarf2_read_section (objfile, &dwarf2_per_objfile->abbrev);
@@ -1461,9 +1461,7 @@ dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
   dwarf2_read_section (objfile, &dwarf2_per_objfile->eh_frame);
   dwarf2_read_section (objfile, &dwarf2_per_objfile->frame);
 
-  if (mainline
-      || (objfile->global_psymbols.size == 0
-         && objfile->static_psymbols.size == 0))
+  if (objfile->global_psymbols.size == 0 && objfile->static_psymbols.size == 0)
     {
       init_psymbol_list (objfile, 1024);
     }
index b9e156858b3e0d638e34a5330284b84412e86262..d143e63d2ba30acbf1c3f81c19e684493d2dde7f 100644 (file)
@@ -743,7 +743,7 @@ elf_symfile_read (struct objfile *objfile, int mainline)
   if (dwarf2_has_info (objfile))
     {
       /* DWARF 2 sections */
-      dwarf2_build_psymtabs (objfile, mainline);
+      dwarf2_build_psymtabs (objfile);
     }
 
   /* FIXME: kettenis/20030504: This still needs to be integrated with
index ebd90c61c8da0329d3b251573999effad97b592c..5e0a658f5c15a54ecab5157cb39b6be3b04fcad1 100644 (file)
@@ -649,10 +649,15 @@ macho_symfile_read (struct objfile *objfile, int mainline)
        }
     }
 
+  /* If we are reinitializing, or if we have never loaded syms yet,
+     set table to empty.  */
+  if (mainline)
+    init_psymbol_list (objfile, 0);
+
   if (dwarf2_has_info (objfile))
     {
       /* DWARF 2 sections */
-      dwarf2_build_psymtabs (objfile, mainline);
+      dwarf2_build_psymtabs (objfile);
     }
 
   /* Do not try to read .eh_frame/.debug_frame as they are not relocated
index f73d22d4eb4daf6f3b9e450d028a60480c050cf7..40f7db7176c79c6a2b6becf93cbe16e1c28ea66c 100644 (file)
@@ -380,7 +380,7 @@ void free_symfile_segment_data (struct symfile_segment_data *data);
 
 extern int dwarf2_has_info (struct objfile *);
 
-extern void dwarf2_build_psymtabs (struct objfile *, int);
+extern void dwarf2_build_psymtabs (struct objfile *);
 extern void dwarf2_build_frame_info (struct objfile *);
 
 void dwarf2_free_objfile (struct objfile *);
This page took 0.042622 seconds and 4 git commands to generate.