我根据http://wiki.eclipse.org/Sequoyah/ndk_guide设置了Sequoyah。 我正在使用NDK附带的hello-jni样本进行测试。没有调试的东西,它工作正常,直到指南告诉你运行ndk-gdb的步骤。但是,当我尝试在Eclipse中运行C调试部分时,它会说
(no debugging symbols found)
(no debugging symbols found)
Error while mapping shared library sections:
/system/bin/linker: No such file or directory.
Error while mapping shared library sections:
libc.so: No such file or directory.
Error while mapping shared library sections:
libstdc++.so: No such file or directory.
Error while mapping shared library sections:
libm.so: No such file or directory.
Error while mapping shared library sections:
liblog.so: No such file or directory.
Error while mapping shared library sections:
libcutils.so: No such file or directory.
Error while mapping shared library sections:
libz.so: No such file or directory.
Error while mapping shared library sections:
libutils.so: No such file or directory.
Error while mapping shared library sections:
libbinder.so: No such file or directory.
Error while mapping shared library sections:
libexpat.so: No such file or directory.
Error while mapping shared library sections:
libcrypto.so: No such file or directory.
Error while mapping shared library sections:
libgabi++.so: No such file or directory.
Error while mapping shared library sections:
libicuuc.so: No such file or directory.
Error while mapping shared library sections:
libicui18n.so: No such file or directory.
Error while mapping shared library sections:
libssl.so: No such file or directory.
Error while mapping shared library sections:
libstlport.so: No such file or directory.
Error while mapping shared library sections:
libnativehelper.so: No such file or directory.
Error while mapping shared library sections:
libnetutils.so: No such file or directory.
Error while mapping shared library sections:
libGLESv2_dbg.so: No such file or directory.
Error while mapping shared library sections:
libEGL.so: No such file or directory.
Error while mapping shared library sections:
libwpa_client.so: No such file or directory.
Error while mapping shared library sections:
libhardware_legacy.so: No such file or directory.
Error while mapping shared library sections:
libpixelflinger.so: No such file or directory.
Error while mapping shared library sections:
libhardware.so: No such file or directory.
Error while mapping shared library sections:
libemoji.so: No such file or directory.
Error while mapping shared library sections:
libjpeg.so: No such file or directory.
Error while mapping shared library sections:
libskia.so: No such file or directory.
Error while mapping shared library sections:
libui.so: No such file or directory.
Error while mapping shared library sections:
libGLESv2.so: No such file or directory.
Error while mapping shared library sections:
libgui.so: No such file or directory.
Error while mapping shared library sections:
libcamera_client.so: No such file or directory.
Error while mapping shared library sections:
libsqlite.so: No such file or directory.
Error while mapping shared library sections:
libdvm.so: No such file or directory.
Error while mapping shared library sections:
libGLESv1_CM.so: No such file or directory.
Error while mapping shared library sections:
libETC1.so: No such file or directory.
Error while mapping shared library sections:
libsonivox.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_foundation.so: No such file or directory.
Error while mapping shared library sections:
libmedia.so: No such file or directory.
Error while mapping shared library sections:
libnfc_ndef.so: No such file or directory.
Error while mapping shared library sections:
libusbhost.so: No such file or directory.
Error while mapping shared library sections:
libharfbuzz.so: No such file or directory.
Error while mapping shared library sections:
libbluedroid.so: No such file or directory.
Error while mapping shared library sections:
libdbus.so: No such file or directory.
Error while mapping shared library sections:
libandroid_runtime.so: No such file or directory.
Error while mapping shared library sections:
libvorbisidec.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_yuv.so: No such file or directory.
Error while mapping shared library sections:
libdrmframework.so: No such file or directory.
Error while mapping shared library sections:
libchromium_net.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_amrnb_common.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_enc_common.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_avc_common.so: No such file or directory.
Error while mapping shared library sections:
libstagefright.so: No such file or directory.
Error while mapping shared library sections:
libmtp.so: No such file or directory.
Error while mapping shared library sections:
libexif.so: No such file or directory.
Error while mapping shared library sections:
libmedia_jni.so: No such file or directory.
Error while mapping shared library sections:
libbcc.so: No such file or directory.
Error while mapping shared library sections:
libbcinfo.so: No such file or directory.
Error while mapping shared library sections:
libRS.so: No such file or directory.
Error while mapping shared library sections:
librs_jni.so: No such file or directory.
Error while mapping shared library sections:
libandroid.so: No such file or directory.
Error while mapping shared library sections:
libwebcore.so: No such file or directory.
Error while mapping shared library sections:
libhello-jni.so: No such file or directory.
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
Cannot access memory at address 0x1
No symbol table is loaded. Use the "file" command.
Function "Java_com_example_hellojni_HelloJni_stringFromJNI" not defined.
所以最后几行似乎是问题,但它很奇怪,因为它正常运行时工作正常,但调试器由于某种原因无法找到它。
Error while mapping shared library sections:
libhello-jni.so: No such file or directory.
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
Cannot access memory at address 0x1
No symbol table is loaded. Use the "file" command.
Function "Java_com_example_hellojni_HelloJni_stringFromJNI" not defined.
答案 0 :(得分:0)
事实证明,当我从教程中说的gdb2.setup中删除该行时,它改变了行结尾。当我意外地用Visual Studio打开文件时我注意到了它,它问我是否要将行结束标准化。所以我刚才用Unix LF选项
做了