Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Jun 7, 2012, 5:36:07 PM (12 years ago)
- Author:
-
michaelz
- Comment:
-
Updates
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
1 | 1 | = debugging native code in Android. = |
| 2 | |
| 3 | Currently, this does not work. Those steps are just a start to get it working... |
2 | 4 | |
3 | 5 | (setting this up is not needed to do java debugging, you just can't step into native functions.) |
… |
… |
|
7 | 9 | You should at first compile the library yourself. |
8 | 10 | |
9 | | Then, go to the android ndk directory. There should be a file ndk-gdb. Copy it, name the copy ndk-gdb-eclipse, and remove the following, last line: |
10 | | $GDBCLIENT -x `native_path $GDBSETUP` |
| 11 | Then go to your ndk directory and to toolchains/arm-linux-androideabi-4.4.3/prebuilt and copy the gdbserver file you find there to your libs/armeabi directory (there should already be a lot of .so-Files there). |
11 | 12 | |
12 | 13 | == in Eclipse == |
… |
… |
|
14 | 15 | * Add a new Program by double-clicking on Program on the left side. |
15 | 16 | * Select the ndk-gdb-eclipse script you just created. |
| 17 | * As parameter, enter the right path to adb like: |
| 18 | {{{ |
| 19 | --adb=../android-sdk-linux/platform-tools/adb |
| 20 | }}} |
| 21 | * Set the working directory to the directory of your client project. |
16 | 22 | * Select the build tab, and disable Build before launch. |
17 | 23 | * Hit Apply, Close. |
18 | 24 | |
| 25 | Start your application in debug mode and when it is active, start the tool you just created. This will create some files you need for the next steps: |
19 | 26 | |
20 | 27 | * (skip for Testclient) Set android:debuggable="true" in your application definition in the AndroidManifest.xml. |
… |
… |
|
23 | 30 | * This needs to be done in the main tab: |
24 | 31 | * Enter im.pidgin.libpurple as Project name |
25 | | * Enter Android/libim.pidgin.libpurple.so as C/C++ Application name (or just click on Search project... to find it) |
| 32 | * Enter <your app>/libs/armeabi/app_process as C/C++ Application name (or just click on Search project... to find it) |
26 | 33 | * Select Disable auto build |
| 34 | * Disable Run in Background. |
27 | 35 | * Go to the debugger tab. |
28 | 36 | * Select gdbserver as Debugger. |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!