From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28673 invoked by alias); 24 Aug 2003 16:56:08 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28665 invoked from network); 24 Aug 2003 16:56:07 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 24 Aug 2003 16:56:07 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19qy9v-0004gR-AG for ; Sun, 24 Aug 2003 12:56:07 -0400 Date: Sun, 24 Aug 2003 16:56:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Fix Java PR gdb/1322 (was Re: [rfa/doc] Document pr gdb/1322 in PROBLEMS) Message-ID: <20030824165607.GC17841@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <200308181832.h7IIWKUx004464@duracef.shout.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308181832.h7IIWKUx004464@duracef.shout.net> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00425.txt.bz2 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 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