Re: [patch] Fix crash on NULL function's TYPE_FIELD_TYPE

Tom Tromey
2010-03-30T17:00:45Z

>>>>> "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