的Eclipse / Cygwin的
Eclipse / Cygwin
NDK 8C
生成共享库
我不能让gdbserver的要切换到armeabi-V7A之后再启动。我在网上搜索了几个小时,但找不到专门处理armeabi-V7A调试问题的话题。
I can't get gdbserver to start anymore after switching to armeabi-v7a. I've searched online for hours but can't find a topic that deals specifically with armeabi-v7a debugging issues.
我没有选择,切换到armeabi-V7A由于使用取决于其第三方库。没有它,我得到这类错误的:
I have no choice to switch to armeabi-v7a due to using a third party library which depends on it. Without it, I get these kind of errors:
D:\TEMP\ccnnGAqD.s:10427: Error: selected processor does not support Thumb mode `ldrex r6,[r3]'
D:\TEMP\ccnnGAqD.s:10429: Error: selected processor does not support Thumb mode `strex r4,r5,[r3]'
这是所有罚款armeabi,使用此设置工作之前:http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/
我所做的唯一变化就是把它添加到Application.mk:
The only change I've made is to add this to Application.mk:
APP_ABI := armeabi-v7a
在共享库Android.mk我说这的最底层:
At the very bottom of the shared library Android.mk I added this:
$(info TARGET_ARCH = $(TARGET_ARCH))
$(info TARGET_ARCH_ABI = $(TARGET_ARCH_ABI))
$(info TARGET_ABI = $(TARGET_ABI))
它输出以下内容:
which outputs the following:
TARGET_ARCH = arm
TARGET_ARCH_ABI = armeabi-v7a
TARGET_ABI = android-14-armeabi-v7a
我已经卸载使用的应用程序
I've uninstalled the app using
adb uninstall com.example.game
AndroidManifest.xml中确实有机器人:可调试=真正的财产
AndroidManifest.xml does have the android:debuggable="true" property.
完成Eclipse的一个干净所有,并手动删除./libs和./obj文件夹。然后,NDK,生成输出到正确的文件夹(OBJ /本地/ armeabi-V7A和库/ armeabi-V7A)和OBJ /本地/ armeabi和库/ armeabi 不存在。
Done a "clean all" in Eclipse, and manually deleted the ./libs and ./obj folders. Then, ndk-build outputs to the right folders (obj/local/armeabi-v7a and libs/armeabi-v7a), and obj/local/armeabi and libs/armeabi do not exist.
不过,这里是当我运行NDK-gdb的会发生什么:
However, here's what happens when I run ndk-gdb:
user@MACHINENAME /cygdrive/e/projects/game
$ ndk-gdb-eclipse --force --verbose
Android NDK installation path: /cygdrive/e/projects/sdks/android-ndk
Using default adb command: /cygdrive/e/projects/sdks/android-sdk/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.31
Using ADB flags:
Using auto-detected project path: .
Found package name: com.example.game
ABIs targetted by application: armeabi
Device API Level: 15
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi
Using gdb setup init: ./libs/armeabi/gdb.setup
Using toolchain prefix: /cygdrive/e/projects/sdks/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi
Found debuggable flag: true
ERROR: Could not find gdbserver binary under ./libs/armeabi
This usually means you modified your AndroidManifest.xml to set
the android:debuggable flag to 'true' but did not rebuild the
native binaries. Please call 'ndk-build' to do so,
*then* re-install to the device!
注意使用了错误的armeabi的按应用针对性的ABI。以下是有关部分NDK-gdb的:
Notice the "ABIs targetted by application" using the wrong 'armeabi'. Here's the relevant part of ndk-gdb:
get_build_var ()
{
if [ -z "$GNUMAKE" ] ; then
GNUMAKE=make
fi
$GNUMAKE --no-print-dir -f $ANDROID_NDK_ROOT/build/core/build-local.mk -C $PROJECT DUMP_$1 | tail -1
}
APP_ABIS=`get_build_var APP_ABI`
if [ "$APP_ABIS" != "${APP_ABIS%%all*}" ] ; then
# replace first "all" with all available ABIs
ALL_ABIS=`get_build_var NDK_ALL_ABIS`
APP_ABIS_FRONT="${APP_ABIS%%all*}"
APP_ABIS_BACK="${APP_ABIS#*all}"
APP_ABIS="${APP_ABIS_FRONT}${ALL_ABIS}${APP_ABIS_BACK}"
fi
log "ABIs targetted by application: $APP_ABIS"
我清楚地APP_ABI为armeabi-V7A在Application.mk,所以这是在NDK中的错误?还是我失去了一些东西?
I clearly set APP_ABI to armeabi-v7a in Application.mk, so is this a bug in the NDK? Or am I missing something?
我有同样的问题。我配置日食下面这篇文章: 的http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/ 然后,我从armeabi到armeabi-V7A改变。然后,我不能调试。
I had the same issue. I configured eclipse following this article: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ Then I change from armeabi to armeabi-v7a. Then I couldn't debug.
我解决了这个问题: 1)您必须修复调试配置
I fixed this issue: 1) You must fix the folders in "Debug configurations"
在主要选项卡中的变化... OBJ /本地/ armeabi / app_process到... OBJ /本地/ armeabi-V7A / app_process 在调试器标签的变化... OBJ /本地/ armeabi / gdb2.setup到obj /本地/ armeabi-V7A / gdb2.setup 在调试器标签的变化... /工具链/ ARM-Linux的androideabi-4.4.3 / prebuilt / Linux的-x86_64的/ bin中/ ARM-Linux的androideabi-gdb来工具链/ ARM-Linux的androideabi-4.6 / prebuilt / Linux的-x86_64的/ bin中/ ARM-Linux的androideabi-GDB2)可能这是解决办法,但它的工作原理。在调试配置 - > Debugger->共享库添加/ OBJ /本地/ armeabi-V7A,并检查负载共享库符号自动
2) May be this is workaround but it works. In "Debug configurations" ->Debugger->Shared Libraries add /obj/local/armeabi-v7a and check "Load shared library symbols automatically"