This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: java crash from tom tromey
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: gdb at sources dot redhat dot com, carlton at kealia dot com, tromey at redhat dot com,kettenis at chello dot nl
- Date: Wed, 6 Aug 2003 13:02:48 -0400
- Subject: Re: java crash from tom tromey
- References: <200308061650.h76Gooib012449@duracef.shout.net>
On Wed, Aug 06, 2003 at 12:50:50PM -0400, Michael Elizabeth Chastain wrote:
> Here is a brain dump.
>
> Tom T sent me a reproducible test case and I can reproduce it.
>
> The problem happens with these commands:
>
> break 't::main TAB'
> run
> next next next step fini
> step step step step step
> print str
> run yes
> next
>
> I have appended a backtrace.
>
> My guess at the etiology is:
>
> gdb creates an objfile with name "<<anonymous objfile>>"
> and sect_index_test of -1. I suspect that happens somewhere
> around the "print str" command but I don't really know enough
> about Java to say.
>
> It's essential to re-run the executable in order to blow away
> some sort of frame cache (another guess on my part).
>
> In the second run, gdb builds frames again. It is in the middle
> of frame building when it calls dwarf2_frame_find_fde
> (frame #6 on the stack trace).
>
> dwarf2_frame_find_fde, gdb does this:
>
> ALL_OBJFILES (objfile)
> {
> ...
> offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT(objfile));
> ...
> }
>
> objfile has name "<<anonymous objfile>>" and sect_index_text of -1,
> which triggers the internal error inside the SECT_OFF_TEXT macro.
The correct fix is:
- a patch, posted by Mark Kettenis:
Date: Sun, 13 Jul 2003 19:17:04 +0200 (CEST)
From: Mark Kettenis <kettenis@chello.nl>
Subject: [RFC/RFA] Per-objfile data mechanism
- Then, after that patch, move the check for FDEs in this objfile
before the check for section offsets.
The patch was approved but never checked in. I'm guessing that Mark
has been too busy (or gotten caught up in the FSF's email troubles)
since we haven't heard from him in a few weeks.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer