Do not reopen temporary files
[deliverable/binutils-gdb.git] / gdb / xcoffread.c
index a858ffea3e66fb9b9d978eabe1244ffdffebf586..acf095959f0f4a161826b1da6413d437dac935e0 100644 (file)
@@ -1022,6 +1022,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
   int just_started = 1;
   int depth = 0;
   CORE_ADDR fcn_start_addr = 0;
+  enum language pst_symtab_language;
 
   struct coff_symbol fcn_stab_saved = { 0 };
 
@@ -1042,10 +1043,11 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
 
   set_last_source_file (NULL);
   last_csect_name = 0;
+  pst_symtab_language = deduce_language_from_filename (filestring);
 
   start_stabs ();
   start_symtab (objfile, filestring, (char *) NULL, file_start_addr,
-               language_unknown);
+               pst_symtab_language);
   record_debugformat (debugfmt);
   symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum;
   max_symnum =
@@ -1138,8 +1140,8 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
            }
 
          start_stabs ();
-         start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0,
-                       language_unknown);
+         start_symtab (objfile, "_globals_", (char *) NULL,
+                       (CORE_ADDR) 0, pst_symtab_language);
          record_debugformat (debugfmt);
          cur_src_end_addr = first_object_file_end;
          /* Done with all files, everything from here on is globals.  */
@@ -1229,7 +1231,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
                          /* Give all csects for this source file the same
                             name.  */
                          start_symtab (objfile, filestring, NULL,
-                                       (CORE_ADDR) 0, language_unknown);
+                                       (CORE_ADDR) 0, pst_symtab_language);
                          record_debugformat (debugfmt);
                        }
 
@@ -1350,7 +1352,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
 
          start_stabs ();
          start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0,
-                       language_unknown);
+                       pst_symtab_language);
          record_debugformat (debugfmt);
          last_csect_name = 0;
 
@@ -1421,12 +1423,12 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
        case C_BSTAT:
          /* Begin static block.  */
          {
-           struct internal_syment symbol;
+           struct internal_syment static_symbol;
 
-           read_symbol (&symbol, cs->c_value);
-           static_block_base = symbol.n_value;
+           read_symbol (&static_symbol, cs->c_value);
+           static_block_base = static_symbol.n_value;
            static_block_section =
-             secnum_to_section (symbol.n_scnum, objfile);
+             secnum_to_section (static_symbol.n_scnum, objfile);
          }
          break;
 
This page took 0.03062 seconds and 4 git commands to generate.