[fpc-devel] In FPC written FPC Debugger

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Feb 21 19:10:17 CET 2008

On 21 Feb 2008, at 18:56, Helmut Hartl wrote:

> The advantage i see is that it should be buildable with fpc only, thus
> working on all supported platforms from scratch,

The second part does not follow from the first part. Debugging by  
definition requires interfacing with the OS at a very low level, and  
quite a bit of cpu-specific code.

> I have some general questions to the fpc team:
> What do you think about the idea ?

For Mac OS X (the platform I maintain) I do not consider it worth the  
trouble (regular low level changes in the dynamic linker and available  
debugger api's, a new architecture every couple of years, changes only  
become know/available once a new release is out, ...).

I know that several developers are in favour for it for Linux and  
Windows, however.

> Will some code of FPC be reusable ? (assembling / disassambling)

FPC does not contain a disassembler. You don't need an assembler in a  
debugger (except if you want to support live patching or so). I don't  
think much, if any, code from FPC would be usable (except for maybe  
the symbol table, although I'm not sure how easy it is to rip it out  
and reuse it).

> Any general ideas, proposals, negative emotions ?

One general thing you have to think of is whether you only want to  
support Pascal, or also projects combining Pascal and code written in  
other languages.

> What is the state of Debugging information symbol support ?

Quite good, in general. Some things which are still missing are  
dynamic arrays, and strings are also only a hack (although they work  
well with gdb).

> Are there any resources beside the source ?

The dwarf specs.


More information about the fpc-devel mailing list