LLDB - Qt 缺少调试信息
LLDB - Qt missing debug info
我已经通过 macOS 安装程序安装了 Qt 5.10.0。
我目前 运行 OSX El Capitan 10.11.6.
每当我尝试加载任何 Qt 库/框架时,我都会收到以下警告:
warning: (x86_64) /Users/randomuser/Qt/5.10.0/clang_64/lib/QtWidgets.framework/QtWidgets empty dSYM file detected, dSYM was created with an executable with no debug info.
我可以通过 运行 lldb QtWidgets.framework
简单地重现警告
我试过设置 DYLD_IMAGE_SUFFIX=_debug,但似乎不起作用。
此外,运行 otool -L QtWidgets.framework/Versions/5/QtWidgets_debug
报告库链接到 QtCore 和 QtGui 的发布版本。
任何见解将不胜感激,谢谢!
编辑:
为了详细说明我对 DYLD_IMAGE_SUFFIX 的尝试,我尝试了以下方法,但仍然导致上面的警告。
export DYLD_IMAGE_SUFFIX=_debug
lldb
>env DYLD_IMAGE_SUFFIX=_debug
>target create QtWidgets.framework
>warning: (x86_64) /Users/randomuser/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/QtWidgets empty dSYM file detected, dSYM was created with an executable with no debug info.
>Current executable set to 'QtWidgets.framework' (x86_64).
我用Qt5.10.0也有类似的问题
qmake CONFIG+=debug
make
lldb ./debug/qt_test.app/Contents/MacOS/qt_test
(lldb) env DYLD_IMAGE_SUFFIX=_debug
(lldb) image list
...
[ 16] 9A8C46A9-CADB-3DC2-9D5A-E04826477DCB 0x0000000000000000 /Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets
/Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework.dSYM/Contents/Resources/DWARF/QtWidgets
...
dSYM 似乎已加载,但不是针对 Qt 库的 _debug 版本。但是当我 运行 lldb 中的应用程序时:
(lldb) b main
(lldb) r
... lldb breaks on main()...
(lldb) image list
...
[ 9] 1292D5A0-4ADF-37C3-A724-DDB9B199EE8A 0x0000000100296000 /Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets_debug
/Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework.dSYM/Contents/Resources/DWARF/QtWidgets_debug
...
现在它使用带有正确符号的 _debug Qt 库。
调试愉快!
我已经通过 macOS 安装程序安装了 Qt 5.10.0。 我目前 运行 OSX El Capitan 10.11.6.
每当我尝试加载任何 Qt 库/框架时,我都会收到以下警告:
warning: (x86_64) /Users/randomuser/Qt/5.10.0/clang_64/lib/QtWidgets.framework/QtWidgets empty dSYM file detected, dSYM was created with an executable with no debug info.
我可以通过 运行 lldb QtWidgets.framework
我试过设置 DYLD_IMAGE_SUFFIX=_debug,但似乎不起作用。
此外,运行 otool -L QtWidgets.framework/Versions/5/QtWidgets_debug
报告库链接到 QtCore 和 QtGui 的发布版本。
任何见解将不胜感激,谢谢!
编辑:
为了详细说明我对 DYLD_IMAGE_SUFFIX 的尝试,我尝试了以下方法,但仍然导致上面的警告。
export DYLD_IMAGE_SUFFIX=_debug
lldb
>env DYLD_IMAGE_SUFFIX=_debug
>target create QtWidgets.framework
>warning: (x86_64) /Users/randomuser/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/QtWidgets empty dSYM file detected, dSYM was created with an executable with no debug info.
>Current executable set to 'QtWidgets.framework' (x86_64).
我用Qt5.10.0也有类似的问题
qmake CONFIG+=debug
make
lldb ./debug/qt_test.app/Contents/MacOS/qt_test
(lldb) env DYLD_IMAGE_SUFFIX=_debug
(lldb) image list
...
[ 16] 9A8C46A9-CADB-3DC2-9D5A-E04826477DCB 0x0000000000000000 /Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets
/Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework.dSYM/Contents/Resources/DWARF/QtWidgets
...
dSYM 似乎已加载,但不是针对 Qt 库的 _debug 版本。但是当我 运行 lldb 中的应用程序时:
(lldb) b main
(lldb) r
... lldb breaks on main()...
(lldb) image list
...
[ 9] 1292D5A0-4ADF-37C3-A724-DDB9B199EE8A 0x0000000100296000 /Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets_debug
/Users/macmini/Qt5.10.0/5.10.0/clang_64/lib/QtWidgets.framework.dSYM/Contents/Resources/DWARF/QtWidgets_debug
...
现在它使用带有正确符号的 _debug Qt 库。 调试愉快!