Android gdb debugging and androidgdb debugging

Source: Internet
Author: User

Android gdb debugging and androidgdb debugging
[1]. Set the terminal directory to: proj. android
[2] add-g-ststabs + to the compilation option of the. make file.
[3]. Execute the compilation Script: sh./build_native.sh NDK_DEBUG = 1
[4]. push the generated gdbserver to the mobile phone and find a writable directory: adb push./libs/armeabi/gdbserver data/tmp
[5]. Start the app
[6]. Terminal: adb shell
[7]. Terminal: su
[8]. Terminal: cd data/tmp (to the directory where gdbserver is stored)
[9]. Obtain the app process number: ps com. fun. funm
[10]. Terminal:./gdbserver: 1080 [port]-attach 6280 [process number]
[11]. Switch to the proj. android Terminal
[12]. Terminal: adb forward tcp: 1080 tcp: 1080
[13]. Boot: ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gdb
[14]. Terminal: target remote: 1080 [15]. Open./lib/armeabi/gdb. setup and paste the two commands into the terminal for execution.

Related Article

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.