Re: Android Eclipse C++ Debugger

2,938 views
Skip to first unread message

jeff shanab

unread,
Feb 8, 2013, 7:52:31 AM2/8/13
to andro...@googlegroups.com
I tried everything and could not get it to work or find anyone who cared. Mostly i got the "rewrite in java" speech. 
The C/C++ support has gotten better but there still does not seem to be anyone in charge like there is on ios,windows, or even the upcoming blackberry.
I had to give up and use log statements to make progress and, well, keep my job.
With the need for writing every application for mobile devices multiple times, code sharing is required. It is hard to share Java with the other mobile environments so it is throw-away code.

I think If Android does not get off the Java horse and close this gap, it could be their demise, especially with the 2 newest platforms entering(re-entring) the market.

I will watch this thread closely for a solution! I do love my Droid phone


On Thu, Feb 7, 2013 at 5:45 PM, David Broadhurst <davidbr...@hotmail.com> wrote:

I'm trying to get the eclipse debugger working on windows for C++ files. Here's what I have tried so far

1) Installed adt-bundle-windows-x86_64 + cygwin

2) Installed android-ndk-r8d-windows

3) Installed apache-ant-1.8.4

4) Installed the NDK Eclispe Plugins for https://dl-ssl.google.com/android/eclipse/

5) Built and run the helloJni sample in eclipse and from the command line and debugging Java works as expected with breaks on breakpoints but not in the C++ code

6) Updated the Android.mk file with APP_CFLAGS += -g to add symbols to the .so file

7) Built .so with ndk-build NDK_DEBUG=1 V=1

8) Built .apk with ant debug

Seems like these are the necessary steps but the breakpoints are still not working in the C++ code. I can break in Java but when I resume the C++ break point is just ignored.

Anyone aware of any missing steps?

Thanks

David.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jeff shanab

unread,
Feb 8, 2013, 7:56:09 AM2/8/13
to andro...@googlegroups.com
I should add that it needs to be stable. I did once get it to start breaking in c++ code (not even sure how, I think adding items to BOTH the android.mk and application.mk)
But it crashed the debugger more often than stopping on the breakpoints, so it was of now use :-(

Zoran Angelov

unread,
Feb 8, 2013, 8:00:45 AM2/8/13
to andro...@googlegroups.com
Hi,
nVidia has developed an easy solution for developing/debugging native code on android, but ti requires you to have tegra based android device.
NVPACK has all-in-one android-sdk, android-ndk and eclipse.
First you need to register as tegra developer.

jeff shanab

unread,
Feb 8, 2013, 8:28:29 AM2/8/13
to andro...@googlegroups.com
To bad it only works for a segment of the Android smart phone market :-(

John Gaby

unread,
Feb 8, 2013, 10:04:49 AM2/8/13
to andro...@googlegroups.com
I struggled with getting source code debugging of C++ using eclipse for quite some time.  I did have it working at one point (barely), but once I upgraded to a newer version of the NDK I was never able to get it to work again.  Finally I stumbled on the following:


Note that this is not a free solution and requires that you have Visual Studio (not the express version) to make it work.  However, I can highly recommend it.  It pretty much worked 'out of the box' for me on all of my devices (although it is pretty much useless with the emulator, but then again the emulator is pretty much useless anyway).

Ray Donnelly

unread,
Feb 8, 2013, 12:09:18 PM2/8/13
to andro...@googlegroups.com
There's also wingdb, which when combined with my adb.exe from:

http://mingw-and-ndk.googlecode.com/files/adb-windows-build-src-bin.7z

and my NDK from:

http://mingw-and-ndk.googlecode.com/files/android-ndk-r8d-ma-windows-multiarch.7z

...offers a free, unsupported but pretty good experience.

I hope soon to be able to recommend Qt Creator instead of this, but
it's not quite there yet.

Ray Donnelly

unread,
Feb 8, 2013, 12:11:03 PM2/8/13
to andro...@googlegroups.com
Err, and the most important link...

http://www.wingdb.com/wgMobileEdition.htm

Ray Donnelly

unread,
Feb 8, 2013, 12:22:34 PM2/8/13
to andro...@googlegroups.com
"I think If Android does not get off the Java horse and close this
gap, it could be their demise"

There's increasing millions of counterexamples to your theory every single day:

http://www.businessinsider.com/chart-of-the-day-android-activations-per-day-2012-9

...it's probably easier to accept some small amount of Java in your life.

Fabien R

unread,
Feb 12, 2013, 3:55:25 AM2/12/13
to andro...@googlegroups.com
On 08/02/2013 00:45, David Broadhurst wrote:
>
> I'm trying to get the eclipse debugger working on windows for C++ files.
I used the Sequoyah plugin months ago on older ADT versions.
http://www.eclipse.org/sequoyah/documentation/native_debug.php

Although, it was a burden to setup, it worked pretty well.
I don't know if it is still required with the latest ADT.

-
Fabien

Mathias Giza

unread,
Feb 14, 2013, 3:27:08 AM2/14/13
to andro...@googlegroups.com
The ndk eclipse plugin works only for pure native applications i guess.

Try following this steps:

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

works for me since ndk 5

greets

mathias


2013/2/12 Fabien R <theed...@free.fr>

Fabien R

unread,
Feb 16, 2013, 4:26:39 AM2/16/13
to andro...@googlegroups.com
On 14/02/2013 09:27, Mathias Giza wrote:
> The ndk eclipse plugin works only for pure native applications i guess.
No. I used it to debug JNI apps.
-
Fabien

Fabien R

unread,
Feb 16, 2013, 4:38:21 AM2/16/13
to andro...@googlegroups.com
I meant the Sequoyah plugin of course.

Fabien
Reply all
Reply to author
Forward
0 new messages