Why can't I step into a C++ cout standard library function in GDB?

前端 未结 2 1887
谎友^
谎友^ 2020-12-19 17:51

I wrote a simple test.cc as follows:

#include 
using namespace std;

int main()
{
  cout << \"Hello world\" << endl;         


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-19 18:21

    If it wasn't linked against a version of the standard library with debugging information, it doesn't know how to step into the library; it can only step over it (that is, run until control returns to the code with the debugging information).

    Consult the documentation for your system to find out how to install the debug version of the standard C and C++ libraries.

提交回复
热议问题