C++ GDB找不到源文件

C++ GDB找不到源文件,c++,c,linux,debugging,gdb,C++,C,Linux,Debugging,Gdb,我使用GDB和“Open-On-Chip-Debugger”项目来调试远程MIPs目标的交叉编译项目,由于某些原因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) 201

我使用GDB和“Open-On-Chip-Debugger”项目来调试远程MIPs目标的交叉编译项目,由于某些原因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)
此时,我键入target remote命令进行连接

(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)
命令中使用
dir
命令。提示。

阅读有关的部分。您需要在
(gdb)
命令中使用
dir
命令。提示。

事实证明,在发出“target remote localhost:3333”命令后,当调试远程目标时,我需要发出“load”命令将映像加载到目标,因为我没有在目标上运行gdbserver。装载后,它工作正常Bruce Lavoie刚才

事实证明,在发出“target remote localhost:3333”命令后调试远程目标时,我需要发出“load”命令将映像加载到目标,因为我没有在目标上运行gdbserver。装载后,它工作正常Bruce Lavoie刚刚证明,在发出“target remote localhost:3333”命令后,当调试远程目标时,我需要发出“load”命令将映像加载到目标,因为我没有在目标上运行gdbserver。加载后,它工作正常。事实证明,在发出“target remote localhost:3333”命令后,当调试远程目标时,我需要发出“load”命令将映像加载到目标,因为我没有在目标上运行gdbserver。装载后,工作正常。