[fpc-devel] win debugging in gdb

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Oct 27 10:55:43 CEST 2010


On 27 Oct 2010, at 01:28, Dimitri Smits wrote:

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

a) as has been mentioned before, gdb does support assembler stepping
b) to step through FillChar's assembler code, you don't need assembler  
stepping because the code was written in inline assembler. That means  
that FPC generates Pascal-level debug information for each line of  
assembler from that routine, and regular stepping will step through  
that code one assembler statement at a time

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


Maybe I should write a tutorial on the wiki, because there aren't that  
many commands you have to know, along with a few gotchas. Time, time...


Jonas



More information about the fpc-devel mailing list