title: why gdb cannot find source file
body: <p>I compiled a dynamic lib named <code>libsuperdmgr.so</code>.
  When I debug this lib using gdb, it cannot link to the source file.
  Like the following: In frame 3 and 4 it can show the detailed line of source file, but when it come to my lib in frame 2 and frame 1, it does not show the detailed line number.</p>
  
  <pre><code>#0  std::operator&lt;&lt; &lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; (__os=..., __str=...)
  at /root/gcc/gcc-4.5.1/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h:2605
  #1  0x00007fffc9ba67db in DmgrWrapper::AddDataStorage(NIODataStorage*, int) () from /home/shawu/infra/wqsim/arch/x86_64_Linux/wqsim_shawu/infra/libsuperdmgr.so
  #2  0x00007fffc9ba6eb0 in NIODataStorageTester::Initialize(int, char const*, WQSim_Config::Element const*) ()
  from /home/shawu/infra/wqsim/arch/x86_64_Linux/wqsim_shawu/infra/libsuperdmgr.so
  #3  0x00007ffff543f527 in WQSim_DataRegistry::Handle (this=&lt;value optimized out&gt;, handle=&lt;value optimized out&gt;, cfg=&lt;value optimized out&gt;)
  at wqsim/framework/WQSim_dataregistry.cc:618
  #4  0x00007ffff588eea1 in WQSim_ModuleHandler::LoadModules (this=&lt;value optimized out&gt;) at wqsim/framework/WQSim_modulehandler.cc:125
  #5  0x00007ffff7593586 in wqsim_main_init (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at wqsim/modules/WQSim_main.cc:1016
  </code></pre>
  
  <p>Why is this??? Do I lost something in compile?</p>