This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix crash on NULL function's TYPE_FIELD_TYPE
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 30 Mar 2010 11:00:34 -0600
- Subject: Re: [patch] Fix crash on NULL function's TYPE_FIELD_TYPE
- References: <20100330083821.GA8227@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> 2010-03-30 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan> Fix crash on reading wrong function declaration DWARF.
Jan> * dwarf2read.c (read_subroutine_type): New variable void_type.
Jan> Pre-fill all TYPE_FIELD_TYPEs. Move nparams and iparams initialization
Jan> more close to their use.
Jan> 2010-03-30 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan> * gdb.dwarf2/dw2-bad-parameter-type.exp,
Jan> gdb.dwarf2/dw2-bad-parameter-type.S: New.
I guess this is fallout from moving the call to set_die_type earlier in
the function.
This is ok.
I'm not super happy about this change, since it seems so ad hoc. Is it
really only the field type that must be set? Or are there other things
as well? But at the same time it is hard to see what else we could do.
thanks,
Tom