如何配置Qt创建器以显示C ++代码而不是反汇编程序? [英] How to configure qt creator to show C++ code rather than disassembler?

查看:78
本文介绍了如何配置Qt创建器以显示C ++代码而不是反汇编程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我做了很多事情,例如更新GCC,Clang和重新安装Qt Creator.今天,当逐步调试我的代码时,调试器显示的是反汇编而不是我编写的C ++代码.按 F10 F11 ,调试器将移动到汇编代码,而不是我编写的 .cpp .h 文件. F11 只能进入库文件,而不能进入我编写的文件.

Yesterday I had done a lot of things like updating GCC, Clang and reinstalling Qt Creator.Today when debugging my code step by step, the debugger was showing the disassembley rather than the C++ code I wrote. Pressing F10 or F11, the debugger was moving into assembly code not the .cpp nor .h files I wrote. F11 can only go into the library files but never into the files I wrote.

箭头出现在反汇编程序中:

The arrow appeared in disassembler:

而不是在main.cpp中:

Rather than in main.cpp:

如何配置Qt Creator,以便调试箭头跟踪C ++代码中的每一行?

How can I configure Qt Creator such that the debugging arrow tracks each line in the C++ code?

推荐答案

最后,我发现是Clang导致了此问题.将工具包改回使用gcc后,一切正常.但是不确定是Clang的错误还是Qt生成的用于编译的脚本有任何问题.无论如何,只要将答案放在这里,以防其他任何可能遇到相同情况的人.

At last, I found that it was Clang that had caused this problem. After changed the kit back to using gcc, it just worked fine. But not sure whether it's Clang's fault or that the script Qt produced for compiling has any problem. Anyway just put the answer here in case anyone else who might encounter the same situation.

这篇关于如何配置Qt创建器以显示C ++代码而不是反汇编程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆