[fpc-devel] Dwarf type-information for gdb

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Jul 19 21:23:04 CEST 2009


On 19 Jul 2009, at 20:57, Joost van der Sluis wrote:

> The attached patch solves the problem, but I doubt this is the right
> place to do this, since this way the 'DW_TAG_typedef' entry is always
> added, and in some cases double.
>
> How (and where) to fix this properly?

I guess by removing the Darwin check at dbgdwarf.pas:1614, and by  
removing the code at dbgdwarf.pas:2263-2274 (i.e., by making all that  
code active for all targets, not just for Darwin).

> And can someone see if this is a
> problem within gdb, or is it according to the dwarf-specs that this
> entry should be there?

I don't think the DWARF specs say anything particular about this. But  
in a way, it is logical. If you don't have a separate typedef, then it  
is like using something like "var a: record a: longint; end;" in  
Pascal. I.e., there is some kind of inline type definition, but it's  
not defined as a separate entity.

The difference is that in DWARF you can also associate a name with  
such inline type definitions and you can refer multiple times to it  
(for debug info size reasons), but that in itself does not make them  
independent entities that stand on their own.


Jonas



More information about the fpc-devel mailing list