[fpc-devel] Conditional Breakpoints using FPC and GDB
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Aug 13 11:39:20 CEST 2010
On 13 Aug 2010, at 11:14, Graeme Geldenhuys wrote:
> Does anybody know if there is a way to support Conditional
> Breakpoints in FPC + GDB with string types?
It can be solved without changing anything to either FPC or GDB, by
basically writing extensions for GDB in Pascal. Create a unit with a
bunch of cdecl helpers to deal with types that GDB does not know
about, such as ansistrings (comparison, assignment, ...). Then in the
Pascal IDE,
a) when compiling a debug version, include this unit in the main
program (if it gets standardised, we can include it with FPC and
automatically add it when generating debug information)
b) when one of those types is used in an expression, call the
appropriate helper via GDB (you can include function calls in
expressions).
Jnoas
More information about the fpc-devel
mailing list