C + + Debug Stomp mark in Android NDK

Source: Internet
Author: User
Tags stomp

Rt

C + + debugging in the Android NDK,

GDB debugging is tricky, in ADT Eclipse:

1. Configure the NDK to project plus native support

2. Add Ndk_debug=1 in the compilation

3. Then retrofit the next MK file:

#APP_DEBUG'll be set to ANDROID-NDK if Ndk_debug=1 is Set.ifdef app_debug   ifeq ($ (app_debug), true)      Cflags+=-o0- G  local_cflags+=-d_debug  app_optim: = DEBUG   Else  cflags+=-o2-g   local_cflags+=-dndebug  App_optim: = Release  endifendif

You can debug any breakpoint,

This is the ideal situation, usually there will be a variety of situations, before the experience is more than a few breakpoints on the good,

I've never been too careful.

Today I met a hole, the breakpoint can not be hung up anyway,

After careful study, we found that:

1. The catalogue must not contain spaces, otherwise "no symbol table is loaded." Use the "file" command ", confused, where errors are not known;

2. In the Java code system.loadlibrary plus breakpoints, can be very good to avoid the breakpoint cannot hang on the case (in theory this will not work, java/gdb Two debugger can only start one);

3. A better solution is to use Libandroid_native_app_glue, pure C + + implementation (NDK has an example to refer to);

Time spent very long, tread on the mark, hope to feast on posterity.

C + + Debug Stomp mark in Android NDK

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.