Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* dbxread.c:1771: internal-error: sect_index_data not initialized
@ 2003-09-17 15:02 Neal E. Coombes
  2003-09-17 17:54 ` Jim Blandy
  0 siblings, 1 reply; 11+ messages in thread
From: Neal E. Coombes @ 2003-09-17 15:02 UTC (permalink / raw)
  To: gdb

A colleague of mine has found this bug (which I will also make a bug 
report for).  I'm really writing to this list because I'd like to help 
however I can to make gdb 6 suitable for us.

Currently in our development environtment all versions of gdb 5.0 and 
greater have show stopping bugs for us, and gdb 4 doesn't support gcc 3 
(and we don't want to switch back to gcc 2).

We've frozen our compiler at gcc 3.2.3 as it seems stable and able to do 
everything we need.  We'd like to freeze our debugger, but haven't been 
able to yet.  Please help me help gdb by giving me guidance on what more 
I can do.

Before I file the bug report, look below and let me know what other 
information may be relevant.  I'll try in the mean time to write a small 
program that still demonstrates the bug.

Thanks for all help,

Neal E. Coombes

Bug follows:

gdb 5.3.92 compiled with gcc 3.2.3 configured as i386-pc-solaris2.8
This bug only seems to occur with programs using gtkmm and gtkmm-2.0

GNU gdb 5.3.92
Copyright 2003 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 "i386-pc-solaris2.8"...

(gdb)
(gdb) b main
Breakpoint 1 at 0x81c8315: file main.C, line 133.
(gdb) r
Starting program: /home/lex/HEAD/apps/strategyViewer/strategyViewer
dbxread.c:1771: internal-error: sect_index_data not initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-17 15:02 dbxread.c:1771: internal-error: sect_index_data not initialized Neal E. Coombes
@ 2003-09-17 17:54 ` Jim Blandy
  2003-09-17 18:17   ` Andrew Cagney
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Blandy @ 2003-09-17 17:54 UTC (permalink / raw)
  To: Neal E. Coombes; +Cc: gdb


This has already been reported and fixed, but the fix was too late to
be included in 6.0.

Bug 1241 in the GDB bug database has a patch (get the second patch,
not the first): http://sources.redhat.com/cgi-bin/gnatsweb.pl

"Neal E. Coombes" <nealc@trdlnk.com> writes:

> A colleague of mine has found this bug (which I will also make a bug
> report for).  I'm really writing to this list because I'd like to help
> however I can to make gdb 6 suitable for us.
> 
> Currently in our development environtment all versions of gdb 5.0 and
> greater have show stopping bugs for us, and gdb 4 doesn't support gcc
> 3 (and we don't want to switch back to gcc 2).
> 
> We've frozen our compiler at gcc 3.2.3 as it seems stable and able to
> do everything we need.  We'd like to freeze our debugger, but haven't
> been able to yet.  Please help me help gdb by giving me guidance on
> what more I can do.
> 
> Before I file the bug report, look below and let me know what other
> information may be relevant.  I'll try in the mean time to write a
> small program that still demonstrates the bug.
> 
> Thanks for all help,
> 
> Neal E. Coombes
> 
> Bug follows:
> 
> gdb 5.3.92 compiled with gcc 3.2.3 configured as i386-pc-solaris2.8
> This bug only seems to occur with programs using gtkmm and gtkmm-2.0
> 
> GNU gdb 5.3.92
> Copyright 2003 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 "i386-pc-solaris2.8"...
> 
> (gdb)
> (gdb) b main
> Breakpoint 1 at 0x81c8315: file main.C, line 133.
> (gdb) r
> Starting program: /home/lex/HEAD/apps/strategyViewer/strategyViewer
> dbxread.c:1771: internal-error: sect_index_data not initialized
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-17 17:54 ` Jim Blandy
@ 2003-09-17 18:17   ` Andrew Cagney
  2003-09-17 20:16     ` Neal E. Coombes
  2003-09-18 22:34     ` Jim Blandy
  0 siblings, 2 replies; 11+ messages in thread
From: Andrew Cagney @ 2003-09-17 18:17 UTC (permalink / raw)
  To: Jim Blandy; +Cc: Neal E. Coombes, gdb

> This has already been reported and fixed, but the fix was too late to
> be included in 6.0.

In July?

> Bug 1241 in the GDB bug database has a patch (get the second patch,
> not the first): http://sources.redhat.com/cgi-bin/gnatsweb.pl

It can at least be pulled into the branch after 6.0 is released.

Andrew



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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-17 18:17   ` Andrew Cagney
@ 2003-09-17 20:16     ` Neal E. Coombes
  2003-09-18 22:41       ` Jim Blandy
  2003-09-18 22:34     ` Jim Blandy
  1 sibling, 1 reply; 11+ messages in thread
From: Neal E. Coombes @ 2003-09-17 20:16 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Jim Blandy, gdb

Andrew Cagney wrote:
>> This has already been reported and fixed, but the fix was too late to
>> be included in 6.0.
> 
> In July?
> 
>> Bug 1241 in the GDB bug database has a patch (get the second patch,
>> not the first): http://sources.redhat.com/cgi-bin/gnatsweb.pl
> 
> It can at least be pulled into the branch after 6.0 is released.

Thank you all very much, works very nicely.  I encourage you to pull it 
into the source as soon as you can.

We modified the patch to do the change at the ?root? of the problem 
instead of in the specific section.  Please let me know if this will 
have any ill effects (since we certainly don't know as much about gdb as 
the rest of you).

Thanks,

Neal

src/gdb/objfiles.h

638c639,641
<       ? (internal_error (__FILE__, __LINE__, "sect_index_data not 
initialized"), -1) \
---
 >       ? ((objfile->sect_index_bss == -1) \
 >          ? (internal_error (__FILE__, __LINE__, "sect_index_data not 
initialized"), -1) \
 >          : objfile->sect_index_bss) \


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-17 18:17   ` Andrew Cagney
  2003-09-17 20:16     ` Neal E. Coombes
@ 2003-09-18 22:34     ` Jim Blandy
  2003-09-18 22:57       ` Andrew Cagney
  1 sibling, 1 reply; 11+ messages in thread
From: Jim Blandy @ 2003-09-18 22:34 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Neal E. Coombes, gdb


Andrew Cagney <ac131313@redhat.com> writes:
> > This has already been reported and fixed, but the fix was too late to
> > be included in 6.0.
> 
> In July?

The reporter said it worked for him in July, but I didn't commit the
patch to the trunk until Sep 8, so it didn't get the exercise needed
for inclusion on the branch.

> > Bug 1241 in the GDB bug database has a patch (get the second patch,
> > not the first): http://sources.redhat.com/cgi-bin/gnatsweb.pl
> 
> It can at least be pulled into the branch after 6.0 is released.

I'll do my best to remember to do that...


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-17 20:16     ` Neal E. Coombes
@ 2003-09-18 22:41       ` Jim Blandy
  2003-09-19 14:04         ` Neal E. Coombes
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Blandy @ 2003-09-18 22:41 UTC (permalink / raw)
  To: Neal E. Coombes; +Cc: gdb


"Neal E. Coombes" <nealc@trdlnk.com> writes:
> We modified the patch to do the change at the ?root? of the problem
> instead of in the specific section.  Please let me know if this will
> have any ill effects (since we certainly don't know as much about gdb
> as the rest of you).

(Please post patches in either unified form or context form.  Diff's
default output mode is not useful if the file has changed elsewhere
since the diff was made --- which is often the case here.)

Unfortunately, this revision isn't right.  

Falling back to the .bss section's offset when no .data offset is
available makes sense (sort of) when we're not really sure which
section contains the object whose address we're relocating.  If there
is no .data section, the object certainly isn't there, so it's a
decent guess that it belongs in .bss.

But there are other cases where we know for sure that the symbol is in
the .data section, not the .bss section.  In those cases, if we have
no .data section offset, then GDB is in an inconsistent state, and
should crash.  It's not correct to fall back to the .bss section.


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-18 22:34     ` Jim Blandy
@ 2003-09-18 22:57       ` Andrew Cagney
  2003-09-18 23:12         ` Jim Blandy
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Cagney @ 2003-09-18 22:57 UTC (permalink / raw)
  To: Jim Blandy; +Cc: Neal E. Coombes, gdb

> Andrew Cagney <ac131313@redhat.com> writes:
> 
>> > This has already been reported and fixed, but the fix was too late to
>> > be included in 6.0.
> 
>> 
>> In July?
> 
> 
> The reporter said it worked for him in July, but I didn't commit the
> patch to the trunk until Sep 8, so it didn't get the exercise needed
> for inclusion on the branch.

Since I'm waiting on some FSF admin stuff I unfroze the branch.  With 
some real use under its belt, the patch might now be ready?

Andrew



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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-18 22:57       ` Andrew Cagney
@ 2003-09-18 23:12         ` Jim Blandy
  2003-09-19 19:45           ` Andrew Cagney
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Blandy @ 2003-09-18 23:12 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Neal E. Coombes, gdb

Andrew Cagney <ac131313@redhat.com> writes:

> > Andrew Cagney <ac131313@redhat.com> writes:
> >
> >> > This has already been reported and fixed, but the fix was too late to
> >> > be included in 6.0.
> >
> >> In July?
> > The reporter said it worked for him in July, but I didn't commit the
> > patch to the trunk until Sep 8, so it didn't get the exercise needed
> > for inclusion on the branch.
> 
> Since I'm waiting on some FSF admin stuff I unfroze the branch.  With
> some real use under its belt, the patch might now be ready?

Ten days?  I don't think it's a very high-risk patch; it should be
fine.


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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-18 22:41       ` Jim Blandy
@ 2003-09-19 14:04         ` Neal E. Coombes
  0 siblings, 0 replies; 11+ messages in thread
From: Neal E. Coombes @ 2003-09-19 14:04 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb

Jim Blandy wrote:
 >
 > Unfortunately, this revision isn't right.
 >
 > Falling back to the .bss section's offset when no .data offset is
 > available makes sense (sort of) when we're not really sure which
 > section contains the object whose address we're relocating.  If there
 > is no .data section, the object certainly isn't there, so it's a
 > decent guess that it belongs in .bss.
 >
 > But there are other cases where we know for sure that the symbol is in
 > the .data section, not the .bss section.  In those cases, if we have
 > no .data section offset, then GDB is in an inconsistent state, and
 > should crash.  It's not correct to fall back to the .bss section.

Thanks for the explanation.  I'll pass it on to my co-worker and rebuild 
our gdb!

Neal



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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
  2003-09-18 23:12         ` Jim Blandy
@ 2003-09-19 19:45           ` Andrew Cagney
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Cagney @ 2003-09-19 19:45 UTC (permalink / raw)
  To: Jim Blandy; +Cc: Neal E. Coombes, gdb

> Andrew Cagney <ac131313@redhat.com> writes:
> 
> 
>> > Andrew Cagney <ac131313@redhat.com> writes:
>> >
> 
>> >> > This has already been reported and fixed, but the fix was too late to
>> >> > be included in 6.0.
> 
>> >
> 
>> >> In July?
> 
>> > The reporter said it worked for him in July, but I didn't commit the
>> > patch to the trunk until Sep 8, so it didn't get the exercise needed
>> > for inclusion on the branch.
> 
>> 
>> Since I'm waiting on some FSF admin stuff I unfroze the branch.  With
>> some real use under its belt, the patch might now be ready?
> 
> 
> Ten days?  I don't think it's a very high-risk patch; it should be
> fine.

Can you pull it up then.  Should make some people very happy.

Andrew



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

* Re: dbxread.c:1771: internal-error: sect_index_data not initialized
@ 2003-09-17 17:54 Michael Elizabeth Chastain
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Elizabeth Chastain @ 2003-09-17 17:54 UTC (permalink / raw)
  To: gdb, nealc

neal> Before I file the bug report, look below and let me know what other 
neal> information may be relevant.  I'll try in the mean time to write a small 
neal> program that still demonstrates the bug.

Thanks for asking!

It does not matter very much what version of gcc was used to
compile gdb.  It matters much more what version of gcc was used
to compile the *test program*, because that determines the
information in the executable program which gcc actually reads.

Also the version of binutils matters (ld --version or as --version).

gdb 5.3.92 / gcc 3.2.3 is a fine configuration to file bug reports
against.

Your script excerpt is perfect for a bug report.

It helps to attach a copy of the test program executable.
In fact this is even more useful than the source code of the
test program.

Please run 'ldd' and report the shared libraries that your test
program uses in the body of the bug report.

If there is a lot of info in the bug report, you can make a directory
on your machine.  Drop in your source code, executable file,
a Makefile (if you want), typescript files, README's, whatever.
Then make a tarball of that and use that for an attachment.

Thanks,

Michael C
GDB QA Guy


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

end of thread, other threads:[~2003-09-19 19:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-17 15:02 dbxread.c:1771: internal-error: sect_index_data not initialized Neal E. Coombes
2003-09-17 17:54 ` Jim Blandy
2003-09-17 18:17   ` Andrew Cagney
2003-09-17 20:16     ` Neal E. Coombes
2003-09-18 22:41       ` Jim Blandy
2003-09-19 14:04         ` Neal E. Coombes
2003-09-18 22:34     ` Jim Blandy
2003-09-18 22:57       ` Andrew Cagney
2003-09-18 23:12         ` Jim Blandy
2003-09-19 19:45           ` Andrew Cagney
2003-09-17 17:54 Michael Elizabeth Chastain

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