Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7936241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:09:13+00:00 2026-06-03T22:09:13+00:00

I have set up debugging in Eclipse for native code using the Android NDK

  • 0

I have set up debugging in Eclipse for native code using the Android NDK (on Windows XP, with Cygwin) to the stage where I can set breakpoints in both Java and native code and the debugger will break at them correctly. My issue is that when stepping through the native code, I will often get segmentation faults/SIGILLs that do not occur when continuing past the breakpoint instead.

  • My application is debuggable as defined in AndroidManifest.xml
  • I have altered the (NDK)/build/core/build-binary.mk to prevent it from stripping out debug symbols when APP_OPTIM is defined as debug, which it is in the Application.mk file in my jni directory
  • I have defined LOCAL_CFLAGS := -g -O0 in the Android.mk file, and I have also tried each of these flags individually

I have read that this problem is to do with the optimised code generated, but turning optimisation off with -O0 has no impact on my issue. I have also come across using the NDK_BUILD=1 flag when building, but defining debuggable=true in AndroidManifest.xml apparently has the same effect.

I have tried this both on an emulator (running 2.3.3) and on a device (running 2.2 – which surprisingly didn’t have the thread issues I expected), with similar results (although if I remember correctly, the failures happened at different points in code).

Does anyone have any insight into possible fixes/steps I could try, and/or have been able to successfully step through native code with no issues?

Thanks very much


Edit: This was never really solved, but for anyone who wants to take a look at my guide for NDK debugging, you can find it here.

Edit 2: The answers I got to this question came once new versions of the NDK had come out, and this question may now be redundant. My guide may still work, but I haven’t been using the NDK for a while so I cannot vouch for its continued correctness. I have accepted the answer I have as all three basically say the same thing, and that was the first one to be submitted.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:09:15+00:00Added an answer on June 3, 2026 at 10:09 pm

    If it works for armeabi and not for armeabi-v7a, this should be a build issue. Unzip the apk file in the bin directory and check the library files in both the armeabi and armeabi-v7a are the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to set up debugging using XDebug in Eclipse for the
I am using eclipse to develop Android apps.I have not found a way to
I have been successfully debugging several projects using Eclipse 3.4.1 with Zend Debugger and
I have set up Eclipse Indigo to do line debugging with CFEclipse over port
I have enabled USB debugging on my phone and have set the Debuggable permission
Does NetBeans have something akin to Set Next Statement/Instruction when debugging in Java?
We have set up a SharePoint meeting workspace (using WSS 3.0) for our weekly
I have set up Team Foundation Server - Team Web Access SP1. I can
I have set up a grid and bound it to a collection. I can
I have a eclipse workspace with 3 subprojects myMp3TagBusineslogic (lib that can be used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.