public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* SYMBOL_LANGUAGE assertion failure on AIX
@ 2018-10-15 12:56 Sangamesh Mallayya
  2018-10-18 15:16 ` Ulrich Weigand
  0 siblings, 1 reply; 5+ messages in thread
From: Sangamesh Mallayya @ 2018-10-15 12:56 UTC (permalink / raw)
  To: gdb-patches, Ulrich Weigand

[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]

Hi All,

Lot of gdb testcases are failing due assertion failures on AIX with the 
error below. 

(gdb) br main
Breakpoint 1 at 0x1000075c: file 
/home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c, line 67.
(gdb) r
Starting program: 
/home/gdb_build/binutils-gdb/gdb/testsuite/outputs/gdb.base/savedregs/savedregs 


Breakpoint 1, main ()
    at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:67
67        signal (SIGILL, catcher);
(gdb) s
dictionary.c:690: internal-error: void insert_symbol_hashed(dictionary*, 
symbol*): Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE 
(dict)->la_language' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y


This error seems to be happening after the fix 
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5ffa0793690b42b2a0c1c21dbb5e64634e58fa00


Attached patch resolves the assertion failure and  gdb is able to debug 
the program further.

(gdb) br main
Breakpoint 1 at 0x1000075c: file 
/home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c, line 67.
(gdb) r
Starting program: 
/home/gdb_build/binutils-gdb/gdb/testsuite/outputs/gdb.base/savedregs/savedregs 


Breakpoint 1, main ()
    at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:67
67        signal (SIGILL, catcher);
(gdb) s
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

68        signal (SIGSEGV, catcher);
(gdb) s
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

warning: (Internal error: pc 0x10000804 in read in psymtab, but not in 
symtab.)

69        thrower ();
(gdb) s
thrower ()
    at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:49
49        *(char *)0 = 0;
(gdb) 



Please let me know the comments.



Thanks,
Sangamesh

[-- Attachment #2: aix_assertion_failure.patch --]
[-- Type: application/octet-stream, Size: 1582 bytes --]

--- ./gdb/xcoffread.c_orig	2018-10-15 04:03:45 +0000
+++ ./gdb/xcoffread.c	2018-10-15 06:44:59 +0000
@@ -1022,6 +1022,7 @@
   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 @@
 
   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 @@
 	    }
 
 	  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 @@
 			  /* 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 @@
 
 	  start_stabs ();
 	  start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0,
-			language_unknown);
+			pst_symtab_language);
 	  record_debugformat (debugfmt);
 	  last_csect_name = 0;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-26 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 12:56 SYMBOL_LANGUAGE assertion failure on AIX Sangamesh Mallayya
2018-10-18 15:16 ` Ulrich Weigand
2018-10-23 12:09   ` [PATCH] " Sangamesh Mallayya
2018-10-24 18:04     ` Ulrich Weigand
2018-10-26 10:37       ` Sangamesh Mallayya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).