Verify that Android Tombstone is working

Source: Internet
Author: User

Refer to http://blog.csdn.net/span76/article/details/44225415, write an inevitable crash program


#include <stdio.h>void f () {  char *c=0;    *c=0;} int main (void) {  printf ("Hello World");  f ();  return 0;}

After compiling, copy to System/bin below


The ADB shell then logs on to the device to run, and the System Reports segmentation fault (core dumped)


ADB log print the information below

03-31 02:27:19.533 I Debug:backtrace:
03-31 02:27:19.533 I DEBUG: #00 pc 00000514 /SYSTEM/BIN/PNP5
03-31 02:27:19.533 I DEBUG: #01 pc 00017c94/system/lib/libc.so (__libc_init+84)
..


Execute the following command to navigate to the source

prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/i686-linux-android-addr2line -E out/target/ PRODUCT/PRODUCT1/SYMBOLS/SYSTEM/BIN/PNP50x00000514

The results are as follows and the positioning is accurate

/home/payne/zjb/pnp5/jni/main.c:5


Verify that Android Tombstone is working

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.