PDA

View Full Version : Setting up LLDB Debugger on Qt 5.4 on MacOSX Darwin Kernel Version 14.3.0



shailesh83
29th April 2015, 13:50
I have installed Qt 5.4 on MacOSX Darwin Kernel Version 14.3.0 and am trying to setup LLDB Debugger as GDB has been depurated from MacOSX (as i didn't found it as default).

When i am trying to setting up debugger option in Build & Run kit in Qt Creator following below steps mentioned in Qt Documentation :

Select Tools > Options > Build & Run > Kits.
Select an automatically created kit in the list, and then select Clone to create a copy of the kit.
In the Debugger field, select an LLDB Engine. If an LLDB Engine is not listed, select Manage to add it in Tools > Options > Build & Run > Debuggers.
For more information, see Adding Debuggers. To use the debugger, add the kit in the Build Settings of the project.

I am setting the Debugger as "/usr/bin/lldb" in the Build&Run Kit. After following all the steps correctly as mentioned various forums when i try to set the breakpoint and run the Qt project in Debug mode it is not hitting the breakpoint.It running as "Run" option Not working like "DEBUG" Mode.

I have one small question or maybe asking for suggestion regarding following error which i resolved but i don't know whether its correct way to do that.

When trying to run an executable I've been sent in Mac OS X, I get the following error

dyld: Library not loaded: libLocalIPC.1.dylib

Referenced from: /Users/"Directory my executable is in"

Reason: image not found. I fixed this issue with setting Environment DYLD_LIBRARY_PATH under Project Settings/Run Environment with the library path which points to debut version of library.So for Building my Application in Release i have to again set the Library Path with Release Library Path.So this solution is not correct.

Another Solution i tried before that was with using otool -L @executable_Path/XXX.exe and checking the path of dylib and changing it with,install_name tool of Xcode but it didn't worked also.

Example: MacOS xxx$ otool -L check abc

libLocalIPC.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libxxx.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libqyyy.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libzzz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/QtWebEngineWidgets (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngine.framework/Versions/5/QtWebEngine (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.1)
After this i set the path to libs libxxx.1.dylib,libyyy.1.dylib & libzzz.1.dylib and again run the otool -L abc

Results :Administrators-Mac-Pro:MacOS spandey$ otool -L abc

abc: /Users/spandey/Desktop/Perforce/launcher/xxx/libxxx.1.dylib (compatibility version 1.0.0, current version 1.0.0)

/Users/spandey/Desktop/Perforce/launcher/ThirdParty/yyy/lib_osx/libqyyy.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Desktop/Perforce/launcher/ThirdParty/zzz/debug_osx/libzzz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/QtWebEngineWidgets (compatibility version 5.4.0, current version 5.4.1
MacOS xxx$ ./abc dyld: Library not loaded: libzzz.1.dylib Referenced from: /Users/spandey/Desktop/Perforce/launcher/xxx/libxxx.1.dylib Reason: image not found Trace/BPT trap: 5

Please can some one help me in both the issues as i am trying this from last 3 days with no success.