[fpc-devel] Calling virtual methods in GDB
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Sep 27 22:08:25 CEST 2011
On 27 Sep 2011, at 22:00, Martin wrote:
> On 27/09/2011 16:58, Joost van der Sluis wrote:
>>
>> Only problem is that when GDB is in Pascal mode, it won't work. I have
>> written a patch for that
>> (http://cygwin.com/ml/gdb/2011-09/msg00072.html) or you can set GDB to
>> use C, and then call the virtual function.
> Ah, cygwin => I have never tested the gdb from them. I always use the mingw version
The patch is unrelated to cygwin. cygwin.com simply hosts one of the archives of the gdb mailing list.
> But there is another issue to be looked into. I haven't done that yet.
>
> - Breakpoints => if in the executed function, any breakpoints are hit...
Then the execution stops at the breakpoint.
> - Exceptions => I know gdb has some features to restore the stackframe => but I have no idea, if that relies on c-style stuff, or would work with fpc exceptions too.
It does not rely on anything C-specific. However, FPC's exception handling modifies global variables and there is not much gdb can do about that. The proper way to fix this (and many other issues) would be to implement FPC exception handling using DWARF EH-frame information.
Jonas
More information about the fpc-devel
mailing list