[fpc-devel] gdb and stopping at the begin line

Marc Weustink marc.weustink at cuperus.nl
Mon Jun 6 16:27:55 CEST 2011


Martin wrote:
> Having just reported http://bugs.freepascal.org/view.php?id=19466
> I started wondering (to late, should have done before the report) and
> googled.
>
> It appears that gdb has a "feature" to skip function prologue and
> epilogue. However I could not find any info on what info gdb uses to
> know what is the prologue.
> So it is possible that something tells gdb that the code on which no
> stop occurs is the proluge.

:)
Thats why we in lazarus query the address of a procedure first and set 
the breakpoint on that address. This way you always get a break on the 
start of the procedure (otherwise it depends on debug symbols beeing 
present or not (for exported functions))

Marc



More information about the fpc-devel mailing list