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

* Re: [crash] Section index is uninitialized
       [not found] ` <m3wvdk21xf.fsf@dan2.cygnus.com>
@ 2000-11-30 21:41   ` Kevin Buettner
       [not found]     ` <20001130232605.A7627@redhat.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2000-11-30 21:41 UTC (permalink / raw)
  To: Daniel Berlin, Richard Henderson; +Cc: gdb

On Nov 30, 11:36pm, Daniel Berlin wrote:

> > 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.

The call to fixup_symbol_section() (which is one line before the line
indicated above) should be setting section to the section associated
with the minimal symbol.  I think we need to find out why
fixup_symbol_section() is failing to do this.  (Obviously, it could be
failing if if fails to locate the minimal symbol.  If this is the
case, we need to find out if symbol simply doesn't exist in the minimal
symbol table or if it's a demangling problem...  Or possibly there's
another reason why the symbol wouldn't be found.)

Kevin
From yxw@chinacluster.com Thu Nov 30 22:27:00 2000
From: Yu Xuanwei <yxw@chinacluster.com>
To: gdb@sources.redhat.com
Subject: Remote Debugging
Date: Thu, 30 Nov 2000 22:27:00 -0000
Message-id: <3A274495.FD07A793@chinacluster.com>
X-SW-Source: 2000-11/msg00288.html
Content-length: 364

Hi, Folks:

I am a rookie. I want to know something about remote debugging:

1. On target: The gdbserver manipulates target application, which is
stripped.

2. On host: GDB run "target remote ..." to customize the target.

Then where is the symbol file for target application? Should I native
compile the target application on host? Or ...?

Sincerely,

Kenny Yu


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

* Re: [crash] Section index is uninitialized
       [not found]       ` <1001201085134.ZM28276@ocotillo.lan>
@ 2000-12-01  1:35         ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2000-12-01  1:35 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: Daniel Berlin, gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 6905 bytes --]

On Fri, Dec 01, 2000 at 01:51:35AM -0700, Kevin Buettner wrote:
> 	* elfread.c (record_minimal_symbol_and_info): Don't guess
> 	at the section index to use; just use bfd's index.

That did it.  Thanks.


r~
From cadamuro@lit.cpdtt.cefetpr.br Fri Dec 01 07:40:00 2000
From: João Cadamuro Junior <cadamuro@lit.cpdtt.cefetpr.br>
To: gdb <gdb@sources.redhat.com>
Subject: GDB for powerpc-eabi under cygwin
Date: Fri, 01 Dec 2000 07:40:00 -0000
Message-id: <3A27C7CC.F75AE735@lit.cpdtt.cefetpr.br>
X-SW-Source: 2000-12/msg00002.html
Content-length: 6350

Hello GDB,

I have a little questions about debugging powerpc targets and I'll be
grateful for any help...

I'm using gdb+insight to debug my PowerPC target. The debugger was built
using option "--target=powerpc-eabi" and under cygwin (Pentium III
machine with Windows2000 (SP 1) Operating System).

The last successful built for me was 2000-08-16. After this version I
tryied to build a certain number of snapshots without success.

I have two reasons for build a newer gdb version:

1. PowerPC simulator don't work for snapshot 2000-08-16.

If you compile a simple "Hello Word" for the simulator and try to debug
it with GDB, you'll be "ejected"...

2. Sometimes when the target reports a breakpoint to GDB host with a
Breakpoint Signal (SDS monitor target...) gdb "eject" me too. The point
here is that target stop execution, repots the breakpoint signal, and
GDB crashes receiving this signal. Because this problem is not
deterministic, I cannot fix it...

With this problems, my last try to build gdb+insight was 2000-11-30
snapshot, under cygwin-1.1.6 .

Attempting to build it, I get the same errors as reported by earlier
versions, in gdb/gdb directory:

rm -f gdb.exe
gcc -g -O2        -Wl,--subsystem,console -o gdb.exe main.o libgdb.a
../sim/ppc/libsim.a ../bfd/libbfd.a ../readline/libreadline.a
../opcodes/libopcodes.a ./../intl/libintl.a ../libiberty/libiberty.a `if
test -r ../libtermcap/libtermcap.a; then echo
../libtermcap/libtermcap.a; else echo -ltermcap; fi`
../libgui/src/libgui.a -L/tmp/build-ppc/gdb/itcl/itcl/win -litcl30
-L/tmp/build-ppc/gdb/itcl/itk/win -litk30
-L/tmp/build-ppc/gdb/tix/win/tcl8.0 -ltix4180
-L/tmp/build-ppc/gdb/tk/win -ltk80 -L/tmp/build-ppc/gdb/tcl/win
-ltcl80      -lm -lm  ../libiberty/libiberty.a -luser32 -lshell32
-lgdi32 -lcomdlg32 -ladvapi32
../readline/libreadline.a(display.o): In function `rl_redisplay':
/src/gdb/insight+dejagnu-20001130/readline/display.c:695: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function `update_line':
/src/gdb/insight+dejagnu-20001130/readline/display.c:952: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function
`rl_move_cursor_relative':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1175: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function `rl_move_vert':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1225: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1241: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o):/src/gdb/insight+dejagnu-20001130/readline/display.c:1454:
more undefined references to `_imp__tputs' follow
../readline/libreadline.a(display.o): In function `insert_some_chars':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1502: undefined
reference to `_imp__tgoto'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1503: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1512: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1519: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1528: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function `delete_chars':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1545: undefined
reference to `_imp__tgoto'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1546: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1552: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function `cr':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1600: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o): In function
`rl_redisplay_after_sigwinch':
/src/gdb/insight+dejagnu-20001130/readline/display.c:1650: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/display.c:1658: undefined
reference to `_imp__tputs'
../readline/libreadline.a(display.o):/src/gdb/insight+dejagnu-20001130/readline/display.c:1662:
more undefined references to `_imp__tputs' follow
../readline/libreadline.a(terminal.o): In function `rl_get_screen_size':

/src/gdb/insight+dejagnu-20001130/readline/terminal.c:199: undefined
reference to `_imp__tgetnum'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:215: undefined
reference to `_imp__tgetnum'
../readline/libreadline.a(terminal.o): In function
`get_term_capabilities':
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:309: undefined
reference to `_imp__tgetstr'
../readline/libreadline.a(terminal.o): In function
`rl_init_terminal_io':
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:360: undefined
reference to `_imp__tgetent'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:419: undefined
reference to `_imp__tgetflag'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:419: undefined
reference to `_imp__tgetflag'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:431: undefined
reference to `_imp__tgetflag'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:431: undefined
reference to `_imp__tgetflag'
../readline/libreadline.a(terminal.o): In function `rl_backspace':
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:528: undefined
reference to `_imp__tputs'
../readline/libreadline.a(terminal.o): In function `ding':
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:566: undefined
reference to `_imp__tputs'
../readline/libreadline.a(terminal.o): In function `rl_enable_meta_key':

/src/gdb/insight+dejagnu-20001130/readline/terminal.c:592: undefined
reference to `_imp__tputs'
../readline/libreadline.a(terminal.o): In function `rl_control_keypad':
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:602: undefined
reference to `_imp__tputs'
/src/gdb/insight+dejagnu-20001130/readline/terminal.c:604: undefined
reference to `_imp__tputs'
collect2: ld returned 1 exit status
make[1]: *** [gdb.exe] Error 1
make[1]: Leaving directory `/tmp/build-ppc/gdb/gdb'
make: *** [all-gdb] Error 2
make: Leaving directory `/tmp/build-ppc/gdb'


Someone has some suggestion to build a newer version, or what's the
problem with my old debugger snapshot version???


Thanks in advance,

João Cadamuro Junior
LIT / CPDTT / CEFET-PR
URL.: http://www.lit.cpdtt.cefetpr.br


^ 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