简体   繁体   English

在Qt中建立调试版本?

[英]Debug release build in qt?

I'm fairly new to qt, so sorry if this is a dumb question, I'm trying to keep debug symbols in a release build on linux. 我对qt还是很陌生,所以很抱歉,如果这是一个愚蠢的问题,我正在尝试将调试符号保留在Linux上的发行版中。

Most of what I've read has todo with qmake which we dont use. 我读过的大多数内容都与我们不使用的qmake有关。 Our project is a makefile project using clang. 我们的项目是使用clang的makefile项目。 I have the -g in the release build of my makefile, but when a raise() is called, I'm dumped to assembly which is a little hard for me to debug :) And breakpoints just don't work. 我的makefile的发布版本中有-g,但是当调用一次raise()时,我就被转储到了程序集中,这对我来说很难调试:)而且断点根本不起作用。

I've tried from what I've read. 我已经尝试过阅读。

  • In Run - Enable QML 运行中-启用QML
  • In Kits Debugger - Uncheck warn when debugging release builds (this was a tip) 在Kits Debugger中-取消选中在构建调试版本时发出警告(这是一个提示)

What I did first was to add -g to the release part of my makefile, but qt still didn't pickup the debug symbols. 我首先要做的是将-g添加到我的makefile的发行版中,但是qt仍然没有选择调试符号。

So in reverse I added -03 to the debug part of the makefile, which allowed me to debug the optimised code. 因此,相反,我在makefile的调试部分添加了-03 ,这使我可以调试优化的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM