using gdb on fstream of c++ -
i have std::fstream
object in code, std::fstream input
reading values files. how can check status of input inside gdb debugger? tried print input.fail()
, says:
couldn't find method std::ifstream::fail
this because have not installed debug symbols libstdc++ (this std::fstream
resides).
if try print input
variable without debug symbols libstdc++:
(gdb) p input $1 = <incomplete type>
i've reproduced issue on fedora , issue gone (input
variable printed , input.fail()
called) after installed debug info command:
sudo debuginfo-install libstdc++
see similar issue std::stringstream
here:
https://www.reddit.com/r/learnprogramming/comments/5dwtbb/gdb_looking_into_streams/
Comments
Post a Comment