编译Qt应用程序以获得更好的调试信息(Linux)
Compiling a Qt application in order to get better debuginfos (Linux)
我下载了FabariaGest源代码,然后要编译它,你必须运行:
在qt 4系统上:
cmake -DMAKE_INSTALL_PREFIX=directory -DWANT_QT4=ON -DWANT_QWT=ON
在qt5系统上:
cmake -DMAKE_INSTALL_PREFIX=directory -DWANT_QT5=ON -DWANT_QWTQT5=ON
当它完成时,你运行
# make install
当我启动软件时,我得到一个分段错误,我试图运行
cd /opt/fabaria_gest
gdb fabaria_gest
run
backtrace
但是我只得到
[user@localhost fabaria_gest]$ gdb fabaria_gest
GNU gdb (GDB) Fedora 7.9.1-19.fc22
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from fabaria_gest...(no debugging symbols found)...done.
(gdb) run
Starting program: /opt/fabaria_gest/fabaria_gest
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 7246.
[New Thread 0x7fffe0798700 (LWP 7244)]
Program received signal SIGSEGV, Segmentation fault.
0x00000000004f568c in QBasicAtomicInteger<int>::load() const ()
(gdb) backtrace
#0 0x00000000004f568c in QBasicAtomicInteger<int>::load() const ()
#1 0x0000000000502a92 in QtPrivate::RefCount::ref() ()
#2 0x0000000000502e37 in QString::QString(QString const&) ()
#3 0x00000000006b9709 in _ZL13getSystemInfov ()
#4 0x00000000006bc29f in main ()
(gdb)
#0 0x00
为了获得更好的调试信息,我能做些什么来重新编译软件?在GDB中设置set follow-fork-mode
没有帮助
使用
cmake -DCMAKE_BUILD_TYPE=Debug ...
将指示cmake生成调试信息,这应该使反向跟踪更容易阅读。
相关文章:
- 调试符号中缺少 QObject 类信息(编辑但存在其他 Qt 类)
- 创建进行生产构建并创建调试信息的C++生成文件的最佳方法?
- 在源文件中包含额外的调试信息,以便在代码::块中使用gdb进行调试
- Boost tread 代码在 VC++ 下编译,但不在 GCC 下编译:如何获得更好的调试信息
- 错误 VSP1011:无法获取调试信息.与 /配置文件链接器开关链接
- 在没有 -g 选项的情况下编译,但我想获得更详细的调试信息
- cmake/cpack 组件调试信息 rpm 包未出现
- LLDB - Qt 缺少调试信息
- C++ ATIOGLXX.pdb 包含查找模块 ATIOGLXX.dll 源代码所需的调试信息
- 如何将调试信息附加到LLVM通行证中的指令中
- 由procexp(MS process explorer)创建的VC10调试转储文件-只有堆栈信息,没有变量值
- 从LLVM IR获取精确的行/列调试信息
- Visual Studio-使用PDB进行调试,但缺少类型信息
- 二进制不是使用 Visual Studio 2008 中的调试信息构建的
- 如何使dumpObjectInfo打印调试信息
- 找不到"mpiexec"的调试信息或不匹配。找不到或打开 PDB 文件
- g++未在调试信息中进行编译
- visualstudio可以使用gcc生成的调试信息吗
- 使用Visual C++在单独的文件中提取调试信息
- 警告LNK4206:找不到预编译类型信息; 未链接或覆盖;链接对象,就好像没有调试信息一样