【问题标题】:LLDB debugger never finishes in QtCreatorLLDB 调试器永远不会在 QtCreator 中完成
【发布时间】:2016-07-13 01:13:23
【问题描述】:

我正在尝试使用 Qt Creator 3.5.1 来调试我编写的一个软件。我注意到在调试我的程序时会在随机点停止,我把这些问题误认为是线程问题。然而,最终我发现,即使我运行了最简单的程序,调试器也会一直运行下去而没有完成。

我正在使用 Qt 5.5.1 和 Xcode 7.3 的 Mac (El Capitan) 上运行。

这是我非常简单的测试程序:

#include <iostream>
int main(int argc, char *argv[])
{
    std::cout << "Howdy, this is a simple test program." << std::endl;
    return 0;
}

当我在 Qt Creator 中以调试模式运行它而不设置任何断点时,它永远不会完成:

Debugging starts
Howdy, this is a simple test program.

只有当我多次按下stop 按钮时,调试器才会返回Debugging has finished

当我查看“调试器日志视图”时,它向我显示了一个 Python 异常崩溃。我不知道如何解决这个问题。

ERROR: Lldb stderr: Exception in thread Thread-1:
Traceback (most recent call last):  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run() 
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs) 
File "/Users/Stan/Qt5.5.1/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py", line 765, in loop 
    self.handleEvent(event) 
File "/Users/Stan/Qt5.5.1/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py", line 1383, in handleEvent
    % self.hexencode(msg))
File "/Users/Stan/Qt5.5.1/Qt Creator.app/Contents/Resources/debugger/dumper.py", line 478, in hex encode
    return s.encode("hex") eAttributeError: 'NoneType' object has no attribute 'encode'

这可能没什么,但我现在面临着相当大的挑战,我宁愿不使用我无法信任的调试器。

谢谢。

【问题讨论】:

  • 我在将 Xcode 更新到 7.3 后遇到了同样的问题。我尝试了几件事:使用 gdb 而不是 LLDB,构建最新版本的 LLDB(Xcode 7.3 不附带),但问题仍然存在。由于目前我真的不需要最新版本的 Xcode,所以我回到了 7.2.1,并且调试器现在在 Qt Creator 中再次工作。
  • 谢谢。昨晚下班回家之前,我已经开始下载 XCode 7.2。很高兴这很可能会成功。自发布此消息以来,我还发现 Qt 错误跟踪器中报告了此问题。

标签: macos qt debugging qt-creator qt5.5


【解决方案1】:

显然,您可以通过在 Qt Creator 的源中应用此补丁来直接解决问题:https://codereview.qt-project.org/#/c/154748/

它对我有用。

【讨论】:

    猜你喜欢
    • 2023-04-08
    • 2016-09-10
    • 1970-01-01
    • 2013-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-27
    • 1970-01-01
    相关资源
    最近更新 更多