FS#47220 - [gcc][gdb] gdb outputs: "No such file or directory." while debugging
Attached to Project:
Arch Linux
Opened by Ortomala Lokni (ortomala) - Monday, 30 November 2015, 08:39 GMT
Last edited by Allan McRae (Allan) - Saturday, 14 January 2017, 07:33 GMT
Opened by Ortomala Lokni (ortomala) - Monday, 30 November 2015, 08:39 GMT
Last edited by Allan McRae (Allan) - Saturday, 14 January 2017, 07:33 GMT
|
Details
Description:
When debugging hello world, gdb outputs an error: std::operator<< <std::char_traits<char> > (__out=..., __s=0x400864 "Hello") at /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ostream:556 556 /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ostream: No such file or directory. Additional info: * package versions: gcc 5.2.0 and gdb 7.10 Steps to reproduce: 1)Create a tst.cc file: #include <iostream> int main(){ std::cout << "Hello"; } 2)Compile it, with debug symbols: g++ -g -otst tst.cc 3)Run gdb: gdb tst (gdb) break main (gdb) run (gdb) step std::operator<< <std::char_traits<char> > (__out=..., __s=0x400864 "Hello") at /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ostream:556 556 /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ostream: No such file or directory. This doesn't happen with Debian Jessie and gcc 4.9.2 |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 14 January 2017, 07:33 GMT
Reason for closing: Deferred
Additional comments about closing: Waiting on debug symbol packages.
Saturday, 14 January 2017, 07:33 GMT
Reason for closing: Deferred
Additional comments about closing: Waiting on debug symbol packages.
Fedora is being extra fancy and include source files in their debuginfo packages (I believe they also process them a bit and/or change paths slightly) and there the step command will find the "ostream" source file and print the relevant line(s) from it.
In conclusion, I don't think there's anything to be done here (unless maybe Allan wants to look into stripping libstdc++?). This is not an error per se; ostream is considered a source file and it cannot be found since it's not part of the package, but GDB tries to open it since libstdc++ contains debug symbols.
set substitute-path /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include /usr/include/c++/5.2.0
I'm not sure where gdb gets this path from, though.
Absolutely nothing will happen here until Arch gets debug symbol packages. Closing.