Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's say that logcat show you the following crash log (this is from one of my projects):</p> <pre><code>I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 31): Build fingerprint: 'generic/sdk/generic:2.3/GRH55/79397:eng/test-keys' I/DEBUG ( 31): pid: 378, tid: 386 &gt;&gt;&gt; com.example.gltest &lt;&lt;&lt; I/DEBUG ( 31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000 I/DEBUG ( 31): r0 001dbdc0 r1 00000001 r2 00000000 r3 00000000 I/DEBUG ( 31): r4 00000000 r5 40a40000 r6 4051a480 r7 42ddbee8 I/DEBUG ( 31): r8 43661b24 r9 42ddbed0 10 42ddbebc fp 41e462d8 I/DEBUG ( 31): ip 00000001 sp 436619d0 lr 83a12f5d pc 8383deb4 cpsr 20000010 I/DEBUG ( 31): #00 pc 0003deb4 /data/data/com.example.gltest/lib/libnativemaprender.so I/DEBUG ( 31): #01 pc 00039b76 /data/data/com.example.gltest/lib/libnativemaprender.so I/DEBUG ( 31): #02 pc 00017d34 /system/lib/libdvm.so </code></pre> <p>Look at the last 3 lines; this is your callstack. 'pc' is the program counter, and the pc for stack frame #00 gives you the address where the crash occurred. This is the number to pass to addr2line.</p> <p>I'm using NDK r5, so the executable I'm using is located at <code>$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin</code>; make sure that is in your <code>$PATH</code>. The command to use looks like</p> <pre><code>arm-linux-androideabi-addr2line -C -f -e obj/local/armeabi/libXXX.so &lt;address&gt; </code></pre> <p>Or, for the case above:</p> <pre><code>arm-linux-androideabi-addr2line -C -f -e obj/local/armeabi/libnativemaprender.so 0003deb4 </code></pre> <p>Which gives you the location of the crash.</p> <p>Note:</p> <ul> <li>The -C flag is to demangle C++ code</li> <li>Use the .so file under obj/local/armeabi, since this is the non-stripped version</li> </ul> <p>Also, when using NDK r5 with a 2.3 AVD, it is actually possible to debug multithreaded code.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload