How to Use arm-linux-androideabi-addr2line how to use arm-linux-androideabi-addr2line reproduced address: http://blog.csdn.net/yanzheng1113/article/details/8148091
1. Add the path of the arm-linux-androideabi-addr2line executable file in ndk to the configuration file ~ /. Bashrc, for example:
Export Path = $ path :~ /Dlna/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
2. Make the configuration take effect: Source ~ /. Bashrc
3. Use tools. Example: arm-linux-androideabi-addr2line-C-f-e ~ /Workspace/dlna/libs/armeabi/libctrlpt. So 0003deb4
Where, 0003deb4 is the Pc value in the stack information.
Debugging method for Android application crash
There are two methods to analyze the stack information of crash.
1 Google provides a Python script from
Http://code.google.com/p/android-ndk-stacktrace-analyzer/
Download the Python script and use ADB logcat-D> logfile to export the crash log,
Use arm-Eabi-objdump to be located under build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
Convert so or EXE to assembly code, for example, arm-Eabi-objdump-s mylib. So> mylib. ASM,
Script
Python parse_stack.py <ASM-File> <logcat-File>
2 directly use the arm-linux-androideabi-addr2line below ndk
(D: \ android-ndk-r8 \ toolchains \ arm-Linux-
Androideabi-4.4.3 \ prebuilt \ windows \ bin \ arm-linux-androideabi-addr2line.exe)
Example: arm-linux-androideabi-addr2line-C-f-e libxxx. So 0x ##### (address)
Android debugging tool addr2line
Use addr2line to track bugs in its own dynamic library (so file:
Solved ?? : 0. The number of lines in the source code cannot be displayed.
In the Android. mk file:
Java code
- Local_cflags: =-d1_stdc_constant_macros-wl,-map = test. Map-G
Add two compilation parameters-wl,-map = test. Map-G.
Added GCC warning and debugging flag
Arm-linux-androideabi-addr2line-C-f-e/project directory/obj/local/armeabi/libfaa_jni.so 0024362e
Tip: 1. Note that the debugging file is located in the OBJ directory, not the so file generated in the libs directory.
2. 0024362e indicates the location of the error mechanism.
Also:
Add the application. mk file in the JNI/directory, change it to debug mode, and debug app_optim: = debug
For specific application. mk file configuration, see: http://blog.csdn.net/weidawei0609/article/details/6561280
There are two methods to analyze the stack information of crash.
1 Google provides a Python script from
Http://code.google.com/p/android-ndk-stacktrace-analyzer/
Download the Python script and use ADB logcat-D> logfile to export the crash log,
Use arm-Eabi-objdump to be located under build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
Convert so or EXE to assembly code, for example, arm-Eabi-objdump-s mylib. So> mylib. ASM,
Script
Python parse_stack.py <ASM-File> <logcat-File>
2 directly use the arm-linux-androideabi-addr2line below ndk
(D: \ android-ndk-r8 \ toolchains \ arm-Linux-
Androideabi-4.4.3 \ prebuilt \ windows \ bin \ arm-linux-androideabi-addr2line.exe)
Example: arm-linux-androideabi-addr2line-C-f-e libxxx. So 0x ##### (address)