Fix SYMBOL_LANGUAGE assertion failure on AIX.
authorSangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Fri, 26 Oct 2018 10:01:36 +0000 (15:31 +0530)
committerSangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Fri, 26 Oct 2018 10:01:36 +0000 (15:31 +0530)
gdb/ChangeLog
gdb/xcoffread.c

index b2ed377d42fca04e510da50d88acb255b30ca862..694651bc44ac252047360367b4246515287f5582 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
+
+       * xcoffread.c (read_xcoff_symtab): Pass deduced language to
+       symtab_start instead of always using language_unknown.
+
 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
index 941471a686a85212a9d13406c57d9b2a9f11d599..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;