* [rfa/doc] Document pr gdb/1322 in PROBLEMS
@ 2003-08-18 18:32 Michael Elizabeth Chastain
2003-08-24 16:56 ` Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) Daniel Jacobowitz
2003-08-25 15:56 ` [rfa/doc] Document pr gdb/1322 in PROBLEMS Andrew Cagney
0 siblings, 2 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2003-08-18 18:32 UTC (permalink / raw)
To: eliz, gdb-patches
This patch adds pr gdb/1322 to PROBLEMS. It describes the problem
and offers a workaround and a link to a patch.
OK to apply to gdb HEAD?
OK to apply to gdb gdb_6_0-branch?
Michael C
2003-08-18 Michael Chastain <mec@shout.net>
* PROBLEMS: Document pr gdb/1322, the Java anonymous
objfile bug.
Index: PROBLEMS
===================================================================
RCS file: /cvs/src/src/gdb/PROBLEMS,v
retrieving revision 1.14.30.2
diff -c -3 -p -r1.14.30.2 PROBLEMS
*** PROBLEMS 26 Jun 2003 16:25:53 -0000 1.14.30.2
--- PROBLEMS 18 Aug 2003 18:28:19 -0000
*************** gcc 3.x generates these multiple object
*** 19,21 ****
--- 19,35 ----
implement virtual base classes. gcc 2.x generated just one object code
function with a hidden parameter, but gcc 3.x conforms to a multi-vendor
ABI for C++ which requires multiple object code functions.
+
+ gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
+
+ When gdb debugs a Java program which uses shared libraries, it can
+ generate this internal error.
+
+ If you get this error when debugging Java, you can try working around
+ the problem by relinking your program with no shared libraries at all
+ (even the standard C library). With the GNU linker, use the "-static"
+ argument to do this.
+
+ You can also try this patch for gdb:
+
+ http://sources.redhat.com/ml/gdb-prs/2003-q3/msg00190.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS)
2003-08-18 18:32 [rfa/doc] Document pr gdb/1322 in PROBLEMS Michael Elizabeth Chastain
@ 2003-08-24 16:56 ` Daniel Jacobowitz
2003-08-24 19:42 ` Mark Kettenis
2003-08-25 15:56 ` [rfa/doc] Document pr gdb/1322 in PROBLEMS Andrew Cagney
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-08-24 16:56 UTC (permalink / raw)
To: gdb-patches
On Mon, Aug 18, 2003 at 02:32:20PM -0400, Michael Elizabeth Chastain wrote:
> +
> + gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
> +
> + When gdb debugs a Java program which uses shared libraries, it can
> + generate this internal error.
> +
> + If you get this error when debugging Java, you can try working around
> + the problem by relinking your program with no shared libraries at all
> + (even the standard C library). With the GNU linker, use the "-static"
> + argument to do this.
> +
> + You can also try this patch for gdb:
> +
> + http://sources.redhat.com/ml/gdb-prs/2003-q3/msg00190.html
How about we fix it instead? This patch depends on Mark K's
per-objfile-data patch, but only because it touches the same area, I
think.
Dwarf maintainers, is this OK? Could someone test that it fixes the
Java problems on HEAD?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-08-24 Daniel Jacobowitz <drow@mvista.com>
PR gdb/1322
* dwarf2-frame.c (dwarf2_frame_find_fde): Check whether any FDEs are
available before calling SECT_OFF_TEXT.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.11
diff -u -p -r1.11 dwarf2-frame.c
--- dwarf2-frame.c 21 Aug 2003 22:35:33 -0000 1.11
+++ dwarf2-frame.c 24 Aug 2003 16:52:24 -0000
@@ -1024,9 +1024,12 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
struct dwarf2_fde *fde;
CORE_ADDR offset;
- offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-
fde = objfile_data (objfile, dwarf2_frame_data);
+ if (fde == NULL)
+ continue;
+
+ offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+
while (fde)
{
if (*pc >= fde->initial_location + offset
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS)
2003-08-24 16:56 ` Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) Daniel Jacobowitz
@ 2003-08-24 19:42 ` Mark Kettenis
2003-08-26 3:09 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2003-08-24 19:42 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
Daniel Jacobowitz <drow@mvista.com> writes:
> On Mon, Aug 18, 2003 at 02:32:20PM -0400, Michael Elizabeth Chastain wrote:
> > +
> > + gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
> > +
> > + When gdb debugs a Java program which uses shared libraries, it can
> > + generate this internal error.
> > +
> > + If you get this error when debugging Java, you can try working around
> > + the problem by relinking your program with no shared libraries at all
> > + (even the standard C library). With the GNU linker, use the "-static"
> > + argument to do this.
> > +
> > + You can also try this patch for gdb:
> > +
> > + http://sources.redhat.com/ml/gdb-prs/2003-q3/msg00190.html
>
> How about we fix it instead? This patch depends on Mark K's
> per-objfile-data patch, but only because it touches the same area, I
> think.
>
> Dwarf maintainers, is this OK? Could someone test that it fixes the
> Java problems on HEAD?
I'm not exactly a DWARF maintainer, but since I wrote the code in that
file I assume I can approve your patch :-). I'll do so if you'll add a
gdb_assert (objfile->section_offsets);
just before the
offset = ANOFFSET (...
to check the assumption you're making that the section offsets will be
available when we have DWARF2 CFI.
Oh, and change the PR first line of the ChangeLog into java/1322 such
that GNATS will notice your patch. I believe it will ignore it if you
use gdb/1322.
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS)
2003-08-24 19:42 ` Mark Kettenis
@ 2003-08-26 3:09 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-08-26 3:09 UTC (permalink / raw)
To: gdb-patches
On Sun, Aug 24, 2003 at 09:42:16PM +0200, Mark Kettenis wrote:
> Daniel Jacobowitz <drow@mvista.com> writes:
>
> > On Mon, Aug 18, 2003 at 02:32:20PM -0400, Michael Elizabeth Chastain wrote:
> > > +
> > > + gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
> > > +
> > > + When gdb debugs a Java program which uses shared libraries, it can
> > > + generate this internal error.
> > > +
> > > + If you get this error when debugging Java, you can try working around
> > > + the problem by relinking your program with no shared libraries at all
> > > + (even the standard C library). With the GNU linker, use the "-static"
> > > + argument to do this.
> > > +
> > > + You can also try this patch for gdb:
> > > +
> > > + http://sources.redhat.com/ml/gdb-prs/2003-q3/msg00190.html
> >
> > How about we fix it instead? This patch depends on Mark K's
> > per-objfile-data patch, but only because it touches the same area, I
> > think.
> >
> > Dwarf maintainers, is this OK? Could someone test that it fixes the
> > Java problems on HEAD?
>
> I'm not exactly a DWARF maintainer, but since I wrote the code in that
> file I assume I can approve your patch :-). I'll do so if you'll add a
>
> gdb_assert (objfile->section_offsets);
>
> just before the
>
> offset = ANOFFSET (...
>
> to check the assumption you're making that the section offsets will be
> available when we have DWARF2 CFI.
>
> Oh, and change the PR first line of the ChangeLog into java/1322 such
> that GNATS will notice your patch. I believe it will ignore it if you
> use gdb/1322.
Thanks. I've checked this in on HEAD. In a couple of days, if all
goes well, I'll move it to the branch.
I removed it from PROBLEMS too, since hopefully it's no longer a
problem.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS
2003-08-18 18:32 [rfa/doc] Document pr gdb/1322 in PROBLEMS Michael Elizabeth Chastain
2003-08-24 16:56 ` Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) Daniel Jacobowitz
@ 2003-08-25 15:56 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-08-25 15:56 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: eliz, gdb-patches
> 2003-08-18 Michael Chastain <mec@shout.net>
>
> * PROBLEMS: Document pr gdb/1322, the Java anonymous
> objfile bug.
>
Yes, can't hurt.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS)
@ 2003-08-24 19:48 Michael Elizabeth Chastain
0 siblings, 0 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2003-08-24 19:48 UTC (permalink / raw)
To: drow, gdb-patches
drow> Could someone test that it fixes the Java problems on HEAD?
It works for me. It passes the "continue to exit" test
in gdb.java/jmisc1.exp. (That's the specific test for this bug).
I didn't do a full before-and-after with this patch, my system is busy
today. But it looks like it could not possibly cause any regressions,
It's really just changing the order of two tests that already happen:
an fde==NULL test and the test inside the SECT_OFF_TEXT macro.
Recommended for approval in gdb HEAD.
Michael C
* dwarf2-frame.c (dwarf2_frame_find_fde): Check whether any FDEs are
available before calling SECT_OFF_TEXT.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-08-26 3:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 18:32 [rfa/doc] Document pr gdb/1322 in PROBLEMS Michael Elizabeth Chastain
2003-08-24 16:56 ` Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) Daniel Jacobowitz
2003-08-24 19:42 ` Mark Kettenis
2003-08-26 3:09 ` Daniel Jacobowitz
2003-08-25 15:56 ` [rfa/doc] Document pr gdb/1322 in PROBLEMS Andrew Cagney
2003-08-24 19:48 Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) 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