Phi*_*Bot 5 qt gdb remote-debugging qt-creator gdbserver
使用Qt Creator 2.7.1和Qt 4.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"?
Run Code Online (Sandbox Code Playgroud)
我的调试器是使用QtCreator设置的,如这些图像所示(注意我在图像#3中切换了'目标路径'和'路径',但它没有帮助:

我的"套件"设置如下:

在Qt Creator中的'Debugger Log'中,我输入了'Command':
info sharedlibrary
Run Code Online (Sandbox Code Playgroud)
我收到了回复:
>~"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"
Run Code Online (Sandbox Code Playgroud)
我还确保库和应用程序都是用以下内容构建的:
CONFIG+=declarative_debug
Run Code Online (Sandbox Code Playgroud)
在库和应用程序的"编译输出"窗格中,我看到'-g'标志.
它们都驻留在文件系统的同一目录中,所以发生了什么!如何在App中调试和设置断点,但不能进入库调用?任何想法都非常感谢.
更新:
根据kikeenrique的建议,我尝试从我的Ubuntu主机(而不是ARM目标)加载调试符号:
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)
Run Code Online (Sandbox Code Playgroud)
似乎GDB可以加载符号至少..
您是否在为远程应用程序使用不同的架构?
如果它们不同,则需要使用相同的gdb服务器和客户端arch.
尝试使用库的路径在project-> build&Run-> build环境中设置LD_LIBRARY_PATH.
| 归档时间: |
|
| 查看次数: |
4744 次 |
| 最近记录: |