This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 18 Aug 2003 18:18:00 -0000
- Subject: Re: gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
- Reply-to: Michael Elizabeth Chastain <mec at shout dot net>
The following reply was made to PR java/1322; it has been noted by GNATS.
From: Michael Elizabeth Chastain <mec@shout.net>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/1322: "internal-error: sect_index_text not initialized" after printing a java type
Date: Mon, 18 Aug 2003 14:15:36 -0400
This patch from Tom Tromey fixes the problem with gdb 6.0
by skipping over the anonymous objfile for Java classes.
It works for me, but I don't know if there are any side effects.
It's not as good as Daniel Jacobowitz's suggested fix,
but it is short and neat.
For people who are debugging Java programs and seeing this bug,
I recommend trying this patch.
Michael C
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.7.4.2
diff -c -3 -p -r1.7.4.2 dwarf2-frame.c
*** dwarf2-frame.c 21 Jul 2003 14:28:28 -0000 1.7.4.2
--- dwarf2-frame.c 18 Aug 2003 18:00:10 -0000
*************** dwarf2_frame_find_fde (CORE_ADDR *pc)
*** 1021,1026 ****
--- 1021,1030 ----
struct dwarf2_fde *fde;
CORE_ADDR offset;
+ /* Skip the Java anonymous objfile. */
+ if (objfile->sect_index_text == -1)
+ continue;
+
offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
fde = objfile->sym_private;