... external debug info
it's possible I had that checkbox ticked at some time
I am not sure if the dSYM folder gets removed when you uncheck it.
In any case whenever you stop using it, make sure that you delete the *.dSYM folder.
I was simply following the Delphi 'rules'. If you start a DLL in Delphi in debug mode using the run parameters (ie. with a host application) you can debug the DLL, ie. set breakpoints etc etc
"Run params" is the way.
But there is a flaw, in our debugger(s).
To get exception catching working, a breakpoint is needed on fpc_raiseexception.
The IDE tells lldb (and gdb) to set this. This is done right after launching the app. So if you load the dll later (with openlibrary, or whatever it is called), then the library does not have that breakpoint.
If the dll is statically linked, and loaded by the OS, it may already be loaded... Or not. I did tests with gdb, and gdb can keep the request, but it depends on the correct mix of debug info between launcher app and library.
I did not do tests with lldb. But it is possible lldb is handling this smart enough.
You will know, if the debugger tells you when your app or library is raising an exception.
Btw, same goes for breakpoints that are set before you launch the debugger. If they work => good.
That is to say, you are the first to test the lldb based debugger with libraries.
If that's not available in Lazarus (and I tried and it didn't seem to work), then can you suggest how I might debug a DLL/DYLIB other than just putting in a gazillion WriteLog/ShowMessage statements?
As for normal breakpoints. If they do not work.
Start the app with only breakpoints in your app, but not in the library.
Have one breakpoint that is hit in your app, after the library was loaded. Once this is reached, you should be able to set breakpoints in the dll.
I know this is not very useful, if you need a lot of breakpoints...
It may be that disabling them at launch-time, and enabling them at the helper-breakpoint does the trick.
I havent tested any of this.
Most of the work so far was to get the debugger to work at all (for the main app).
I'll see if i can dig a bit deeper, but that may take some time.