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 comp.windows.x FAQ: “Where can I get an X-based debugger?” at:
http://www.faqs.org/faqs/x-faq/part6/section-2.html

Some useful frontends include: XXGDB, tGDB and XWPE. See:
http://www.ee.ryerson.ca:8080/~elf/xapps/Q-IV.html

Very nice, but resource consuming is the Motif based DDD:
http://sol.ibr.cs.tu-bs.de/softech/ddd/

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