title: Android ARM C++ exception debugging
body: <p>I've got a backtrace stack of my program (running on Android ARM), like this:</p>
  
  <pre><code>#00 pc 0001d796 /system/lib/libc.so (abort+57) [armeabi-v7a]
  #01 pc 0004f663 libxx.so (__gnu_cxx::__verbose_terminate_handler()+226) [armeabi-v7a]
  #02 pc 00024709 libxx.so (__cxxabiv1::__terminate(void (*)())+4) [armeabi-v7a]
  #03 pc 0002477d libxx.so (std::terminate()+8) [armeabi-v7a]
  #04 pc 0058f3d3 libxxx_sdk.so [armeabi-v7a]
  #05 pc 00065ac7 /system/lib/libc.so (__pthread_start(void*)+22) [armeabi-v7a]
  #06 pc 0001e9ad /system/lib/libc.so (__start_thread+32) [armeabi-v7a]
  </code></pre>
  
  <p>This was probably cased by an exception, but I can't figure out the right place in <code>libxxx_sdk.so</code> threw this exception.</p>
  
  <p>So, is there any thing I can do to make the backtrace more valuable for me to figure out the right issue?</p>
  
  <h2>Note:</h2>
  
  <ul>
  <li>I don't have the coredump file, the system only report the backtrace info.</li>
  <li>This issue can't recur locally.</li>
  <li>This issue is rarely occur when the program running on users' Android phone.</li>
  </ul>
  
  <h2>Update 1</h2>
  
  <p>I used <code>objdump -Cd</code> to dump the <code>libxxx_sdk.so</code>, and located the address near by <code>0058f3d3</code>, but still can't know who called the <code>__pointer_catch</code> below:</p>
  
  <pre><code>0055c290 &lt;__cxxabiv1::__pointer_type_info::__pointer_catch(__cxxabiv1::__pbase_type_info const*, void**, unsigned int) const&gt;:
  ~~~
  ...
  ~~~
    58f3c0:       e7d7            b.n     58f372 &lt;__cxxabiv1::__pointer_type_info::__pointer_catch(__cxxabiv1::__pbase_type_info const*, void**, unsigned int) const+0x330e2&gt;
    58f3c2:       2901            cmp     r1, #1
    58f3c4:       d103            bne.n   58f3ce &lt;__cxxabiv1::__pointer_type_info::__pointer_catch(__cxxabiv1::__pbase_type_info const*, void**, unsigned int) const+0x3313e&gt;
    58f3c6:       f7ed e486       blx     17ccd4 &lt;__cxa_begin_catch@plt&gt;
    58f3ca:       f7ed e73c       blx     17d244 &lt;__cxa_rethrow@plt&gt;
    58f3ce:       f7ed e482       blx     17ccd4 &lt;__cxa_begin_catch@plt&gt;
    58f3d2:       f7ee e136       blx     17d640 &lt;std::terminate()@plt&gt;
    58f3d6:       f7ed e484       blx     17cce0 &lt;__cxa_end_catch@plt&gt;
    58f3da:       b114            cbz     r4, 58f3e2 &lt;__cxxabiv1::__pointer_type_info::__pointer_catch(__cxxabiv1::__pbase_type_info const*, void**, unsigned int) const+0x33152&gt;
    58f3dc:       4620            mov     r0, r4
  ...
  ~~~
  </code></pre>
  
  <hr>
  
  <p>Thanks!</p>