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 6997849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:20:08+00:00 2026-05-27T20:20:08+00:00

I am to create a shared library for Android OS. Although I have done

  • 0

I am to create a shared library for Android OS. Although I have done some Android apps in Eclipse I decided to start my native development with Visual Studio and vs-Android add-on:

http://code.google.com/p/vs-android/

I am really familiar with VS and Google found that add-on as one of the first results. I have gone through the whole setup procedure, installed JDK, NDK, Ant, set system variables and finally got a working project. It works like a charm! But there is a BIG drawback. I am not able to debug the native code.

I know there is NDK-GDB tool, but I am constantly failing when trying to setup it. I have read NDK-GDB.html document, threw away the initial vs-Android solution and successfully gone through the following tutorial:

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/

but now I am stuck again when trying to go through the:

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/

http://mhandroid.wordpress.com/2011/01/23/using-cgdb-with-ndk-debug-and-cgdb-tutorial/

I also tried WinGDB – just imported working Eclipse project containing both native and Java code, but it doesn’t even compile.

In short, there are many pieces of the puzzle, but I am still missing some of them. I am afraid that I am missing the whole idea of debugging code with a command line tool like NDK-GDB is.

Can someone provide me some explanation and clear steps how to debug native libraries (doesn’t matter if with vs-android or Eclipse or whatever else)? Please be aware I am not a Linux guru and also not familiar with cygwin or gdbserver.

  • 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-05-27T20:20:08+00:00Added an answer on May 27, 2026 at 8:20 pm

    The steps I take to be able to debug using ndk-gdb

    To build

    Set the -g compiler flag in jnk/Android.mk to build the gdb-server

    LOCAL_CFLAGS := -g
    

    Build the native lib for debugging NDK_DEBUG=1

    ndk-build NDK_DEBUG=1
    

    Set the application debuggable in the manifest.

    android:debuggable=true
    

    Open cygwin and cd to the project path. Set the path to adb.

    export PATH=$PATH:/path_to_android_sdk/platform-tools
    

    And then start gdb

    ndk-gdb --verbose --adb=adb.exe
    

    You will have to type continue when you have connected to the gdb-server

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

Sidebar

Related Questions

Given some source file test.cpp I would like to create a shared library libtest.so
I want to add a non-native shared library to Android so every application on
I'm doing some test to learn how to create shared library. The template for
I'm trying to create a shared library on ubuntu using gcc I just have
when I tried to create a shared library file using the cl command in
Is there some way to create a custom (WoW64) shared registry key? By default
I have a shared project that I'd like to split up in Eclipse. It's
I'm using GCC on Linux to create a shared library. The library itself has
What I want to do is to create a new shared library called libxxx
When I create a new shared iOS library CoreServices then there is a class

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.