[Lazarus] Debugger backends configuration

Martin Frb lazarus at mfriebe.de
Fri Aug 30 19:34:11 CEST 2019


On 30/08/2019 18:58, Zoë Peterson via lazarus wrote:
> What controls what appears in the "Debugger type and path" dropdown in 
> the Debugger backend preferences?
>
> I have two macOS systems, one running 10.13 and one 10.14 that have 
> different items listed.  The 10.13 one lists fpdebug, GDB, and LLDB 
> based ones (6 total) and I've been successfully using "LLDB debugger 
> (with fpdebug) (Beta)".  The 10.14 one only lists the GDB based ones 
> in the dropdown though.
>
> We have some custom commands in our build scripts, and both FPC and 
> Laz are slightly out of date from trunk, (FPC more so right now).  I'm 
> building on both systems using identical scripts though, and even 
> tried wiping FPC, Lazarus, and their configurations off the system and 
> starting from a fresh FPC 3.04a install.  Currently building Lazarus 
> as 64-bit with the Cocoa widgetset, using Xcode 10.
>
> Where should I look for whatever is going wrong or being excluded?
The pre-defined list drop down? "GNU debugger (gdb)"

Or the editable file-name dropdown "/usr/bin/gdb"?

For 1)
Depends on installed packages.
The lldb package was added to default installed with Lazarus 2.0. If you 
svn up'ed from an earlier version you need to install it yourself.

The package for "lldb with fpdebug" is LazDebuggerFpLldb

There is a package without the "fp" in the name. It is pure Lldb - no 
support for any Pascal syntax, very basic, ...

More details (see the strike through bit)
https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html


For 2)
This is a bit complex.

Originally there was only ONE backend, and you could set that one 
backend to either gdb or lldb or others (and only the properties where 
stored separately.

Now you can have multiply lldb backend with different config.
But they still share ONE history for all of them (all = all backends of 
all classes: gdb, lldb,... mixed).

That history at some point may have to be split, so each class gets its 
own (though some may be better of sharing...).
It is stored in your EnvironmentOptions.xml (primary config path which 
likely is ~/.lazarus)

Each class has a hardcoded list of proposals. IIRC they are used if 
there are no other pathes avail. But if you already have them due to the 
overlap with other classes, I am not sure what happens.

Also if you upgraded, and you had diff classes, then all of them only 
had ONE active path (the rest is path history, in old lazarus you always 
had to change the path, after you change class).
So the upgrade could only use that one path. (and would use it).

If you had a new install, then each class may have imported their 
defaults....

----------
Anyway something like that.

Also no-one has yet upgraded the initial setup dialog. So that dialog 
still proposes gdb, even on Mac.



More information about the lazarus mailing list