Debugger interaction in FP IDE and Lazarus

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugger interaction in FP IDE and Lazarus

leledumbo
Administrator
FP IDE needs to link to libgdb and all of its dependencies in order to have debugger support. OTOH, Lazarus interacts to gdb via TProcess. FP IDE approach would be faster but also inextensible and less maintainable. When there's a problem with the libgdb (i.e. the library is buggy), the whole IDE needs to be recompiled using the bug-free library. In Lazarus case, changing the program path to the bug-free one is enough. What if FP IDE uses the same approach as Lazarus? Any cons you can think of other than speed?
Reply | Threaded
Open this post in threaded view
|

Re: Debugger interaction in FP IDE and Lazarus

Martin Schreiber
On Wednesday 03 September 2008 04.42:49 leledumbo wrote:
> FP IDE needs to link to libgdb and all of its dependencies in order to have
> debugger support. OTOH, Lazarus interacts to gdb via TProcess. FP IDE
> approach would be faster but also inextensible and less maintainable. When
> there's a problem with the libgdb (i.e. the library is buggy), the whole
> IDE needs to be recompiled using the bug-free library. In Lazarus case,
> changing the program path to the bug-free one is enough. What if FP IDE
> uses the same approach as Lazarus? Any cons you can think of other than
> speed?

The gdb mi-interface is not finished. Many commands fail with "Missing
implementation" and must be replaced by regular command line calls with the
problematic parsing of the result which format tends to change from version
to version. It is difficult to separate the output stream of gdb and the
debuggee, sometimes it is even impossible. Implementing a pipe based gdb
interface is a nightmare...

Martin
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Debugger interaction in FP IDE and Lazarus

Peter Vreman
In reply to this post by leledumbo
>
> FP IDE needs to link to libgdb and all of its dependencies in order to have
> debugger support. OTOH, Lazarus interacts to gdb via TProcess. FP IDE
> approach would be faster but also inextensible and less maintainable. When
> there's a problem with the libgdb (i.e. the library is buggy), the whole IDE
> needs to be recompiled using the bug-free library. In Lazarus case, changing
> the program path to the bug-free one is enough. What if FP IDE uses the same
> approach as Lazarus? Any cons you can think of other than speed?

The idea to implement this and reuse some Lazarus code has been around for a couple of years. But
it is not an easy task after a couple of quick investigations. That is also the reason why it has
not been started yet. You are welcome to implement such an interface and remove the libgdb
dependency.

Peter


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Debugger interaction in FP IDE and Lazarus

leledumbo
Administrator
Peter Vreman wrote
The idea to implement this and reuse some Lazarus code has been around for a couple of years. But
it is not an easy task after a couple of quick investigations. That is also the reason why it has
not been started yet. You are welcome to implement such an interface and remove the libgdb
dependency.
Before I start something stupid, can you describe the result of that quick investigation?
Reply | Threaded
Open this post in threaded view
|

Re: Debugger interaction in FP IDE and Lazarus

Marc Weustink
leledumbo wrote:

>
> Peter Vreman wrote:
>> The idea to implement this and reuse some Lazarus code has been around for
>> a couple of years. But
>> it is not an easy task after a couple of quick investigations. That is
>> also the reason why it has
>> not been started yet. You are welcome to implement such an interface and
>> remove the libgdb
>> dependency.
>>
> Before I start something stupid, can you describe the result of that quick
> investigation?

Initially the lazarus interface to GDB was visual component free (no LCL
controls). In time some some got added. IIRC, mostly dialogs. If those
get "changed" to a notify event that part is cleaned.

IIRC there was another issue. That is that the FP ide is object based
and the lazarus interface class based. (I never looked at the fpide
code, so I'm not sure here)

Marc


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal