[fpc-devel] win debugging in gdb

Dimitri Smits smitco at telenet.be
Wed Oct 27 01:28:55 CEST 2010


was Re: [fpc-devel] AnsiString in DWARF2 vs DWARF3 

----- "Anton Kavalenka" <anton.k at tut.by> schreef: 
> На 26.10.2010 13:33, Felipe Monteiro de Carvalho напісаў(ла): 

On Tue, Oct 26, 2010 at 12:08 PM, Anton Kavalenka <anton.k at tut.by> wrote: 

I know at least two developers who stand - the only thing preventing them of
using FPC is GDB. Windows-only developers?

Or else I don't know another compiler which will offer better
debugging in the rest of the platforms. Yes, windows only. 
> But they fully understand bonuses from FPC and Lazarus but really hate GDB. 
> Their last argument - we need assembly-line stepping debugger like in Delphi. 
> 

I count myself in that category as well. Assembler stepping is maybe not for everyone, but if you want some fine grained control, you sometimes need to delve deeper into the internals. This is especially so with compiler-code or RTL speedups. 

I've been trying to see if I could write a better/faster FillChar last weekend. My asm was a bit rusty (and I definately have some learning curve to go through with gasm AT&T syntax), so I wanted to test something out looking at registers. For that (and the include-file mess in RTL that needs some getting used to), I needed to see the compiled version of a regular FPC FillChar for Win32. I suspected it to be in i386.inc, but wasn't sure. 

In lazarus => complete fail. 
lots of tries to get debuginfo/mapfiles generated. Nothing usefull came out for use in a debugger. 
I didn't try the build with asm files of the RTL, as I inherently evolved past makefiles years ago (Delphi/ant/want/VisualStudio build systems are more in my current skillset). 
tried a disassembler like PE Explorer (trial) => no exported methods, so I got a somewhat 'guess where everything is' -asm. 
fpc-ide on vista => no fullscreen support, so practically unusable in too high res, but finally managed to asm-step and confirm. 

While I get that gdb is a powerfull debugger (and cross-architecture/platform), it too has a steep learning curve. 

So, aside from the build-system, most of the "complaints" I have about missing features are not inherent to fpc, but more to the tools around it (like lazarus with it's subpar debugging compared to D7). 

I guess it's time to put my code where my mouth is, but some of the issues above make it nearly a catch 22. 

kind regards, 
Dimitri Smits 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20101027/9484fe75/attachment.html>


More information about the fpc-devel mailing list