This is the mail archive of the gdb-cvs@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]

[binutils-gdb] Fix SYMBOL_LANGUAGE assertion failure on AIX.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b971899198607b844f5a37e39dc561766c3b331a

commit b971899198607b844f5a37e39dc561766c3b331a
Author: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Date:   Fri Oct 26 15:31:36 2018 +0530

    Fix SYMBOL_LANGUAGE assertion failure on AIX.

Diff:
---
 gdb/ChangeLog   |  5 +++++
 gdb/xcoffread.c | 12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b2ed377..694651b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 941471a..acf0959 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -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;


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