title: step into system, CRTL functions with Eclipse in Linux
body: <p>I'm a whiz with Visual C++, but Linux development is new to me.  In Visual Studio, it's easy to trace into any code implemented by the C run time libraries. I just need to make sure the sources are installed and I can step right into any function I'd like -- malloc(), cout::operator&lt;&lt;(), whatever.</p>
  
  <p>I'm trying to develop using Eclipse's C++ package. How can I step into C run time routines there? Since Linux is open-source, how do I step into operating system routines? Seems like it should e possible -- am I missing debug information, source code, or both? Something in my configuration?</p>
  
  <p>I'm using Ubuntu 12.10 at the moment. I'm using g++. I believe I'm using the Eclipse build system as I never imported a makefile project; I just started with a simple "Hello World" project from the C++ project wizard in Eclipse.</p>
  
  <p><strong>After hacking at this a bit:</strong></p>
  
  <p>I've installed the libstdc++6-4.2-dbg package thinking it would be debug symbols for the libstdc library:</p>
  
  <pre><code>sudo apt-get install libstdc++6-4.2-dbg
  </code></pre>
  
  <p>I've also installed dpkg-dev, since the next step said I needed it:</p>
  
  <pre><code>sudo apt-get install dpkg-dev
  </code></pre>
  
  <p>I tried installing libc6 sources into a directory under my home:</p>
  
  <pre><code>apt-get source libc6
  </code></pre>
  
  <p>At this point, trying to step into printf() tells me that printf.c is missing. I can't step into malloc or strlen, which suggests that I don't understand how the C runtime libraries are factored in Linux. How are libc, glib, and libstdc++ different? Which packages do I need?</p>
  
  <p>If I ask Eclipse to open the printf.c file I do have (at ~/eglibc-2.15/stdio-common/printf.c), it doesn't open the file (doesn't adjust the debugging window to show the source) and repaints the window that shows the error message about not being able to find the file. (Can't find a source file at "printf.c" Locate the file or edit the source lookup path to include its location.)</p>