title: Why can't I step into a C++ cout standard library function in GDB?
body: <p>I wrote a simple <code>test.cc</code> as follows:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
    cout &lt;&lt; "Hello world" &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  
  <p>And I compiled with:</p>
  
  <pre><code>g++ -g test.cc -o test.o
  </code></pre>
  
  <p>I ran <code>gdb</code> and put a breakpoint at the <code>"Hello world"</code> line:</p>
  
  <pre><code>$ gdb test.o
  (gdb) b 7
  (gdb) c
  </code></pre>
  
  <p>Then <code>gdb</code> stops at the <code>"Hello world"</code> line, but when I run</p>
  
  <pre><code>(gdb) s
  </code></pre>
  
  <p>It fails to step into the <code>cout</code> function. So my question is, how can I step into the <code>cout</code> function?</p>