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

前端 未结 2 1874
谎友^
谎友^ 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:07

    Without the debugging information it's still possible to debug it, just a whole lot more painful. See here.

    If like me, you just want to break on other calls to the same function without digging any deeper, it's not too difficult to set a breakpoint on the function address obtained from the disassembly with disas.

提交回复
热议问题