Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [crash] Section index is uninitialized
@ 2000-11-30 17:41 Richard Henderson
       [not found] ` <m3wvdk21xf.fsf@dan2.cygnus.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2000-11-30 17:41 UTC (permalink / raw)
  To: gdb

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?


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, 
    bfd_section = 0x120304400}, type = 0x1206e2a48, namespace = VAR_NAMESPACE, 
  aclass = LOC_STATIC, line = 0, aux_value = {basereg = 0}, aliases = 0x0, 
  ranges = 0x0}
(top-gdb) p *sym->ginfo.bfd_section
$2 = {name = 0x120301188 ".rodata", id = 64, index = 14, next = 0x120304660, 
  flags = 595, user_set_vma = 1, reloc_done = 0, linker_mark = 0, gc_mark = 0, 
  segment_mark = 0, vma = 4831863952, lma = 4831863952, _cooked_size = 1638, 
  _raw_size = 1638, output_offset = 0, output_section = 0x0, 
  alignment_power = 4, relocation = 0x0, orelocation = 0x0, reloc_count = 0, 
  filepos = 25744, rel_filepos = 0, line_filepos = 0, userdata = 0x0, 
  contents = 0x0, lineno = 0x0, lineno_count = 0, comdat = 0x0, 
  kept_section = 0x0, moving_line_filepos = 0, target_index = 0, 
  used_by_bfd = 0x120304560, constructor_chain = 0x0, owner = 0x120300a60, 
  symbol = 0x120304500, symbol_ptr_ptr = 0x1203044e0, link_order_head = 0x0, 
  link_order_tail = 0x0}
From dberlin@redhat.com Thu Nov 30 20:36:00 2000
From: Daniel Berlin <dberlin@redhat.com>
To: Richard Henderson <rth@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: [crash] Section index is uninitialized
Date: Thu, 30 Nov 2000 20:36:00 -0000
Message-id: <m3wvdk21xf.fsf@dan2.cygnus.com>
References: <20001130174058.A16314@redhat.com>
X-SW-Source: 2000-11/msg00286.html
Content-length: 2549

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


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

end of thread, other threads:[~2000-12-01  1:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-30 17:41 [crash] Section index is uninitialized Richard Henderson
     [not found] ` <m3wvdk21xf.fsf@dan2.cygnus.com>
2000-11-30 21:41   ` Kevin Buettner
     [not found]     ` <20001130232605.A7627@redhat.com>
     [not found]       ` <1001201085134.ZM28276@ocotillo.lan>
2000-12-01  1:35         ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox