This is the mail archive of the gdb@sources.redhat.com 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]

Re: [crash] Section index is uninitialized


Richard Henderson <rth@redhat.com> writes:

> I can provide the binary on request if anyone is curious to poke
> at it.  It is a c++ testsuite test case created by today's cvs gcc.
> 
> Any hints on finding the problem?

No, but i'm positive it's not a mangling problem.
I have a 4 liner patch to libiberty to make it detect the new abi
names and demangle them when AUTO_DEMANGLING is set (our default for
GDB), and it properly demangles them.

This is caused by something else.
I've highlighted the exact cause below:

> 
> r~
> 
> (top-gdb) run ./z
> Starting program: /castro/street/rth/binu/build/axp/gdb/./gdb ./z
> During symbol reading, register number 312 too large (max 66) in symbol buf.
> During symbol reading, PDR for _start, but no symbol.
> GNU gdb 5.0
> Copyright 2000 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 "alphaev6-unknown-linux-gnu"...
> Setting up the environment for debugging gdb.
> .gdbinit:5: Error in sourced command file:
> Function "internal_error" not defined.
> (gdb) run
> Starting program: /castro/street/rth/binu/build/axp/gdb/./z 
> During symbol reading, register number 312 too large (max 66) in symbol buf.
> During symbol reading, PDR for _start, but no symbol.
> During symbol reading, type qualifier 'const' ignored.
> 
> Breakpoint 1, internal_error (
>     string=0x12025f387 "Section index is uninitialized")
>     at ../../../src/gdb/utils.c:734
> 734	  va_start (ap, string);
> (top-gdb) up
> #1  0x12016c770 in new_symbol (die=0x1204af6e0, type=0x0, objfile=0x120307dd0, 
>     cu_header=0x11fffebb8) at ../../../src/gdb/dwarf2read.c:4184
> 4184			      SYMBOL_VALUE_ADDRESS (sym) +=
> (top-gdb) p *sym
> $1 = {ginfo = {name = 0x1206e18f0 "_ZTIP1D", value = {ivalue = 4831863968, 
>       block = 0x1200064a0, bytes = 0x1200064a0 "\206\002", 
>       address = 4831863968, chain = 0x1200064a0}, language_specific = {
>       cplus_specific = {demangled_name = 0x0}, chill_specific = {
>         demangled_name = 0x0}}, language = language_cplus, section =-1,                                                                       ^^

That's the problem.
Why it happens, no idea.

If it helps, Kevin, we never set SYMBOL_SECTION in dwarf2read.

Should we be setting it?
We set it in stabsread.

--Dan


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