This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gdb crashes
- From: Elias Athanasopoulos <eathan at otenet dot gr>
- To: gdb at sources dot redhat dot com
- Date: Mon, 4 Nov 2002 21:11:18 +0200
- Subject: gdb crashes
Hi all,
Can anyone reproduce this:
[anteater@neutrino test]$ cat foo.c
int main (void) { bar (); return 1; }
[anteater@neutrino test]$ cat bar.c
int bar (void) { int i; i = 42; return 1;}
[anteater@neutrino test]$ gcc foo.c bar.c -gdwarf-2 -o foo
Now, running gdb.
GNU gdb 2002-11-03-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-pc-linux-gnu"...^^^^ foo.c
^^^^ bar.c
(gdb) break bar
warning: (Internal error: pc 0x8048328 in read in psymtab, but not in symtab.)
Breakpoint 1 at 0x804832e
(gdb) run
Starting program: /home/anteater/test/foo
warning: (Internal error: pc 0x8048328 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x8048328 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x8048328 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x8048328 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x804832f in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
Breakpoint 1, warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
0x0804832e in bar ()
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
(gdb) where
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
#0 0x0804832e in bar ()
warning: (Internal error: pc 0x804832e in read in psymtab, but not in symtab.)
Segmentation fault (core dumped)
By inspecting the core, the crash seems to be here:
#0 end_symtab (end_addr=134513448, objfile=0x840de00, section=11)
at buildsym.c:964
964 linetablesize = sizeof (struct linetable) +
(gdb)
I'm still looking at it, but I would like a confirmation that it's a gdb
bug and not my configuration. I have verified this using gcc 2.96 and
gcc from CVS.
Elias