On 03/05/10 00:59, Walter Bright wrote:
Any ideas why?
dwarf.c:1525: infobuf->write32(*++pparamidx); // DW_AT_type
*++pparamidx is 0 (and always seems to be). GDB doesn't like DW_AT_type
being 0, if it has no type there shouldn't be a DW_AT_type at all. This
said, that code looks wrong, as *++pparamidx is always 0 according to
gdb, which it shouldn't be. Replacing it with the old code:
unsigned x = dwarf_typidx(p->Ptype);
infobuf->write32(x); // DW_AT_type
Seems to work most of the time, but breaks when faced with:
void function(void function(void function())) foobar;
And other cases. Simplest solution seems to be to revert the change, but
it's up to you what you do... As long as it's fixed I don't care how
it's done :)