[fpc-devel] Dwarf type-information for gdb

Joost van der Sluis joost at cnoc.nl
Sun Jul 19 20:57:31 CEST 2009


Hi all,

I discovered that when you use a type in a program, and this type is not
defined in a unit for which debug-info is generated, there is no
DW_TAG_typedef entry generated for the dwarf-debuginfo.

The result is that gdb doesn't recognise the type. Using 'ptype
<typename>' will result in the message that the type is not found.

When you use 'info type' the type is in the list, but not in the form

type longing=longint

but only:

longint=longint
(this is the dw_tag_reference_type entry in the dwarf-debuginfo)

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

Joost.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf_always_add_typedef.diff
Type: text/x-patch
Size: 539 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20090719/c1f5035b/attachment.bin>


More information about the fpc-devel mailing list