Fix SYMBOL_LANGUAGE assertion failure on AIX.

This commit is contained in:
Sangamesh Mallayya 2018-10-26 15:31:36 +05:30
parent 0b0eff8b1d
commit b971899198
2 changed files with 12 additions and 5 deletions

View 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

View 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;