簡體   English   中英

Qt Creator 2.7.1和Qt 4.8.4無法遠程調試庫

[英]Qt Creator 2.7.1 and Qt 4.8.4 Cannot Remotely Debug Library

使用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"?

我的調試器是使用QtCreator設置的,如這些圖像所示(請注意,我已經在圖像#3中切換了“目標路徑”和“路徑”,但它沒有幫助: 在此輸入圖像描述在此輸入圖像描述在此輸入圖像描述

我的“套件”設置如下:

在此輸入圖像描述

在Qt Creator中的'Debugger Log'中,我輸入了'Command':

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'標志。

它們都駐留在文件系統的同一目錄中,所以發生了什么! 如何在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)

似乎GDB可以加載符號至少..

您是否在為遠程應用程序使用不同的架構?

如果它們不同,則需要使用相同的gdb服務器和客戶端arch。

嘗試使用庫的路徑在project-> build&Run-> build環境中設置LD_LIBRARY_PATH。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM