簡體   English   中英

GDB找不到源文件

[英]GDB can not locate source files

我將 GDB 與“Open On-Chip Debugger”項目一起使用來調試遠程 MIP 目標的交叉編譯項目,但由於某種原因,GDB 無法找到源文件。

在這里,我在目標 elf 文件上調用了 GDB。

development@ubuntu:~/vitessesdk/CEServices/build$ mipsel-vtss-elf-gdb obj/CEServices.elf
GNU gdb (crosstool-NG 1.20.0 - vtss-eCos-toolchain-v2) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
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 "--host=x86_64-build_unknown-linux-gnu --target=mipsel-vtss-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
****Reading symbols from obj/CEServices.elf...done.****
(gdb)

此時我輸入目標遠程命令進行連接

(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0xa0000000 in ?? ()
(gdb) step

找不到當前函數的邊界

(gdb) list
78  /home/development/vitesseSDK/CEServices/build/../third_party/eCos/packages/language/c/libc/startup/current/src/main.cxx: No such file or directory.
(gdb) 

我將列出目錄和文件。

development@ubuntu:~/vitessesdk/CEServices/build$ ls ../third_party/eCos/packages/language/c/libc/startup/current/src/main.cxx
../third_party/eCos/packages/language/c/libc/startup/current/src/main.cxx
development@ubuntu:~/vitessesdk/CEServices/build$

關於為什么會發生這種情況的任何想法?

閱讀有關GDB 中源路徑的部分。 您需要在(gdb)命令中使用dir命令。 迅速的。

事實證明,在發出“目標遠程本地主機:3333”后調試遠程目標時,我需要發出“加載”以將圖像加載到目標,因為我沒有在目標上運行 gdbserver。 加載后,它工作正常。 – 布魯斯·拉沃伊(Bruce Lavoie)剛才

暫無
暫無

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

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