This is most likely an issue with g++
/gdb
/other, but an indirect issue within Emacs nonetheless.
Whilst debugging, I would like for Emacs to step into the standard library implementation of the overloaded << operator function called from object std::cout
.
As is shown in the series of screenshots when the current source file (in the source file window) switches from main.cpp
to funct.cpp
when function funct()
is called:
Screenshot 1
Just starting the debugging session.
Screenshot 2
One step
taken; thus changing the source file I'm looking at.
Screenshot 3
One step
taken; std::cout << "ok\n";
is completely stepped over; when I would like to be directed to another source file.
The command I used to compile the files:
g++ -g -std=c++11 main.cpp funct.cpp
If someone could guide me through step-by-step of how they got this to work, that would be a great example to learn from; or if any more information is needed (whether it be the system I'm using, file-paths, etc.), please ask away.
-Og -ggdb
, to ensure that you have the maximum amount of debugging information available.