[RFC] adding gdb.pascal subdir

Adriaan van Os gpc at microbizz.nl
Wed Jul 18 12:13:10 CEST 2007

Pierre Muller wrote:
>> On Tue, Jul 17, 2007 at 04:22:26PM +0200, Pierre Muller wrote:
>>>   A possible work-around would be to fix breakpoints at specific
>>> positions in the file, but this would require to re-edit hello.exp
>>> each time someone changes hello.pas source. 
>>>   I have no idea if this is acceptable.
>> Take a look at the testsuite function "gdb_get_line_number".  You're
>> exactly right that fixing the breakpoints at specific positions is a
>> bad idea, but this way they can "float" along with the source.
>   I tried to use that and it seems to work partially.
> gpc seems to have problems in setting the correct position
> for a breakpoint.
>   After 'break 10' and 'cont' 
> gdb ends up at line 11 :(
>   I suspect that this is not specific to gpc,
> but it might be related to the fact that default optimizations
> are too high, and that thus the debug information is
> not completely reliable.

It's a known (and unfortunate) problem in gpc that line numbers are wrong.

Adriaan van Os

More information about the Gpc mailing list