Next: , Previous: Components, Up: Installing GPC

3.2.3 How do I debug my Pascal programs?

To debug your programs, (a) GNU Pascal must be able to generate executables with debug info for your platform, and (b) you must have a debugger which understands this.

The bottom line: if you can debug GCC compiled programs, you should be able to do this with GPC too.

The GNU debugger (gdb) currently does not have a “Pascal” mode, so it is unable to display certain Pascal structures etc. When debugging, please note that the Initial Letter In Each Identifier Is In Upper Case And The Rest Are In Lower Case. If you want to display variable foo in the debugger, type show Foo or display Foo instead.

Although gdb is an excellent debugger, it's user interface is not everybody's preference. If you like to debug under X11, please refer to the FAQ: “Where can I get an X-based debugger?” at:

Some useful frontends include: XXGDB, tGDB and XWPE. See:

Very nice, but resource consuming is the Motif based DDD:

Furthermore, RHIDE (see IDE) contains built-in debugging suport, similar to the IDE of BP.