We're looking at using GNU Pascal to replace a proprietary Pascal compiler developed internally. One of the issues with the users is debugging. They would like good source-level debugging capability.
GDB seems to work quite well with GNU Pascal but it could be enhanced. I propose to make some changes to it to better support Pascal debugging:
- a real Pascal mode, which would be associated with Pascal source file extensions so the debugger would automatically do into Pascal mode when debugging .pas or .p files
- evaluation of Pascal expressions (initially I would just copy the modula-2 mode expression parser). The main features here are proper array subscripting and pointer expressions. I plan to add support for sets.
- look at making matching of identifiers case-insensitive, so for example, the user could set a breakpoint on a routine called "FOO", "foo", or "Foo" and have it match with what the compiler generated symbol was.
- look at allowing the user to set a breakpoint on a program's begin...end block, i.e. have the debugger know that program "FOO" starts at label "program_Foo". Similarly, handle the pseduo-variable used for function return values from the debugger expression evaluator. Currently the user needs to know that for function "FOO" the return value variable is called "retval_Foo".
Would these changes be worthwhile? Is anyone already working on them? Are there any other debugging features that would be useful?