Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt Creator 2.7.1和Qt 4.8.4无法远程调试库_Qt_Gdb_Qt Creator_Remote Debugging_Gdbserver - Fatal编程技术网

Qt Creator 2.7.1和Qt 4.8.4无法远程调试库

Qt Creator 2.7.1和Qt 4.8.4无法远程调试库,qt,gdb,qt-creator,remote-debugging,gdbserver,Qt,Gdb,Qt Creator,Remote Debugging,Gdbserver,使用QtCreator 2.7.1和Qt4.8.4,我制作了一个Qt库和一个简单的Qt应用程序,可以动态链接这个库。我试图远程部署和调试我的应用程序,并在调用库函数时进入库函数。我可以成功地设置断点并进行远程调试,但我无法使用调试器(gdb)进入库函数。当我第一次在调试模式下使用QtCreator远程启动应用程序时,遇到以下警告: Could not load shared library symbols for 7 libraries, e.g. libcustom-stuff.so.1. U

使用QtCreator 2.7.1和Qt4.8.4,我制作了一个Qt库和一个简单的Qt应用程序,可以动态链接这个库。我试图远程部署和调试我的应用程序,并在调用库函数时进入库函数。我可以成功地设置断点并进行远程调试,但我无法使用调试器(gdb)进入库函数。当我第一次在调试模式下使用QtCreator远程启动应用程序时,遇到以下警告:

Could not load shared library symbols for 7 libraries, e.g. libcustom-stuff.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
我的调试器是使用QtCreator设置的,如图所示(请注意,我已切换了图3中的“目标路径”和“路径”,但没有帮助:

我的“套件”设置如下:

在Qt Creator内的“调试器日志”中,我输入了“命令”:

info sharedlibrary
对此,我得到了回应:

>~"From        To          Syms Read   Shared Object Library\n"
>~"0x400007e0  0x40011bf0  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/lib/ld-linux.so.3\n"
>~"                        No          libcustom-stuff.so.1\n"
>~"0x4006d018  0x400d7124  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtDBus.so.4\n"
>~"0x401065c4  0x4013dd18  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtXml.so.4\n"
>~"0x40172430  0x4024c1b4  Yes         /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libQtNetwork.so.4\n"
我还确保库和应用程序都是使用以下内容构建的:

CONFIG+=declarative_debug
在库和应用程序的“编译输出”窗格中,我看到了“-g”标志

它们都位于文件系统的同一个目录中,所以发生了什么事!为什么我可以在应用程序中调试和设置断点,但不进入库调用?任何想法都非常感谢

更新:

根据kikeenrique的建议,我尝试从我的Ubuntu主机(而不是ARM目标)加载调试符号:

GNU gdb(Ubuntu/Linaro 7.4-0~69~lucid1)7.4
版权所有(C)2012免费软件基金会。
许可证GPLv3+:GNU GPL版本3或更高版本
这是自由软件:您可以自由更改和重新发布它。
在法律允许的范围内,不提供任何担保。键入“显示复制”
和“显示保修”了解详细信息。
此GDB配置为“i486 linux gnu”。
有关错误报告说明,请参阅:
...
欢迎使用Fluke GDB Init脚本创建QtCreator
从/home/user/proj/output/exported nfs/home/user/libcustom stuff.so.1.0.0读取符号…完成。
(gdb)

GDB似乎至少可以加载符号。

您的远程应用程序是否使用不同的体系结构

如果它们不同,则需要使用相同的gdb服务器和客户机


尝试在项目->构建和运行->构建环境中设置LD_LIBRARY_路径,并将路径设置为库的路径。

是的,远程arch是ARM。我可以在我的主应用程序中调试,但无法通过调试我的主应用程序进入我的库(也是为ARM构建的)。@philbot尝试在gdb中手动加载符号文件(命令符号文件路径/到/您的/库)。libcustom stuff的路径是什么。那么?我可以从我的主机手动加载它们-请参阅上面我编辑的帖子。应用程序和库都位于目标上的/home/user中。@PhilBot您可以尝试在项目->构建和运行->构建环境中设置LD_库路径,并将路径设置为您的库吗?哇-这很有效,我的LD_库路径是wro吴,非常感谢。
GNU gdb (Ubuntu/Linaro 7.4-0~69~lucid1) 7.4
Copyright (C) 2012 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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Welcome to Fluke GDB Init Script for QtCreator
Reading symbols from /home/user/proj/output/exported-nfs/home/user/libcustom-stuff.so.1.0.0...done.
(gdb)