title: Get backtrace for AOSP for static binary
body: <p>From several reasons i have to compile my binary as a static.<br>
  I've also created a simple test app, with only two likes of code:</p>
  
  <pre><code>ALOGE(LOG_TAG, "Start");
  ProcessState::self()-&gt;startThreadPool();
  ALOGE(LOG_TAG, "startThreadPool");
  IPCThreadState::self()-&gt;joinThreadPool();
  ALOGE(LOG_TAG, "quit");
  </code></pre>
  
  <p>It seems that if i compile this small app as static, same as i need to compile my production app the <strong>debuggerd</strong> doesn't get triggered on SIGSEGV.  </p>
  
  <p>Also, the only lib that i can link statically in AOSP for backtrace is libunwind. ( CallStack, libcorkscrew and libbacktrace don't have static versions )  </p>
  
  <p>The problem with libunwind is that is get a crash when i call unw_step. A crash that i don't know how to investigate, because i don't have a stacktrace. ( <a href="http://eli.thegreenplace.net/2015/programmatic-access-to-the-call-stack-in-c/" rel="nofollow">http://eli.thegreenplace.net/2015/programmatic-access-to-the-call-stack-in-c/</a> )</p>
  
  <p>So, any hints for getting the stacktrace of a static AOSP arm binary ?</p>