title: How to get ndk-gdb working on Android?
body: <p>I'm trying to get the NDK debugger working but with no success so far.</p>
  
  <p>To make sure my debug symbols are present and valid, I use the compiler options -O0 and -g, and the ndk-build parameter NDK_DEBUG=1.</p>
  
  <p>The ndk-gdb script runs with out issues and launches GDB. When do a "sharedlibrary" command, I get this:</p>
  
  <pre><code>Symbols already loaded for /bla/bla/libMySharedLib.so
  </code></pre>
  
  <p>However when I try breaking execution or e.g. adding a segfault to test, I never get any of the symbols from that library in the call stack. The only symbols I've gotten are from libc, if I break execution while it's waiting for a mutex for instance. Also tried adding breakpoints with no luck. GDB lets me add the breakpoints, and the code runs fine, but the breakpoints are never triggered.</p>
  
  <p>I'm using API level 8 as I need to support Android 2.2 (Froyo).</p>