This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: recursive bug in dwarf2read.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: Gaius Mulley <gaius at glam dot ac dot uk>
- Cc: gdb at sourceware dot org
- Date: Wed, 9 Dec 2009 13:51:57 -0500
- Subject: Re: recursive bug in dwarf2read.c
- References: <878wdcto0t.fsf@j228-gm.comp.glam.ac.uk>
On Wed, Dec 09, 2009 at 10:55:30AM +0000, Gaius Mulley wrote:
>
> Hi,
>
> I think there is a bug in dwarf2read.c which can be exposed by
> attempting to set a break point at RealIO_WriteFixed in this
> executable.
>
> I acknowledge the (gnu modula-2 generated executable) could probably
> be at fault, nevertheless it does contain cyclic data structures which
> are not explicitly created in the same way as C. For example:
>
>
> TYPE
> ScanState = PROCEDURE (CHAR, VAR ScanClass, VAR ScanState);
See e.g. this from read_structure_type:
/* We need to add the type field to the die immediately so we don't
infinitely recurse when dealing with pointers to the structure
type within the structure itself. */
set_die_type (die, type, cu);
It looks as if read_subroutine_type does not do that, but now has to.
--
Daniel Jacobowitz
CodeSourcery