From: Sangamesh Mallayya Date: Fri, 26 Oct 2018 10:01:36 +0000 (+0530) Subject: Fix SYMBOL_LANGUAGE assertion failure on AIX. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b971899198607b844f5a37e39dc561766c3b331a;p=binutils-gdb.git Fix SYMBOL_LANGUAGE assertion failure on AIX. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b2ed377d42f..694651bc44a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-10-26 Sangamesh Mallayya + + * xcoffread.c (read_xcoff_symtab): Pass deduced language to + symtab_start instead of always using language_unknown. + 2018-10-26 Andrew Burgess * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 941471a686a..acf095959f0 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;