[fpc-devel] Re: Debugger for FPC

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Mar 11 15:39:53 CET 2009

Graeme Geldenhuys wrote on wo, 11 mrt 2009:

> On Wed, Mar 11, 2009 at 4:12 PM, Jonas Maebe   
> <jonas.maebe at elis.ugent.be> wrote:
>> With DWARF3, this should also be quite doable.
> So is DWARF3 only supported in the newest (not really released yet)
> GDB?


> Something like the one that apparently comes with Fedora 11?

The one *will* come with Fedora 11 (it's coming out in June).

> I'm currently using GDB that came with Ubuntu 7.10.
> So I guess I'm all out of luck. :-(
> Maybe it's time I update my Ubuntu (though my current one is so nice
> and stable).

Even that won't help, since
a) afaik there is not a single distribution out there at this time  
that ships a GDB built from this branch (I think Fedora 11 will be the  
first, which is not really strange considering that it's mostly people  
from Red Hat working on it)
b) even if you select DWARF3, FPC at this time will not generate any  
useful debug information for absolute variables. That needs to be  
fixed first in FPC.

Once FPC is fixed, you can however easily build that gdb yourself. The  
only thing I had to change was to disable treating warnings as errors  
on Mac OS X (presumably because it's a development branch -- but this  
was not necessary on Linux):

./configure --disable-werror

and then after a while there was a new gdb at ./gdb/gdb. When I built  
it, some of the necessary DWARF3 stuff was still in a sub-branch  
(they're using git with many people working on different things at the  
same time, so there are branches galore), but everything that's  
necessary has been merged into the main archer branch in the mean time.

See http://sourceware.org/gdb/wiki/ProjectArcher for the checkout  

To make FPC generate DWARF3 debug info, use the -gw3 command line  
switch. Note that this is not yet very well tested, and may still  
contain a lot of bugs (with things working with -g and/or -gw2 not  
working with -gw3)


This message was sent using IMP, the Internet Messaging Program.

More information about the fpc-devel mailing list