当应用程序正在运行时,我启动了ndk-gdb,结果是gdb失去了与设备的连接,设备上的应用程序崩溃了.
设备(三星galaxy 10.1)和模拟器都发生了同样的事情.
主机运行的是Mac OS X.应用程序的本机部分由多个.so库组成,使用ndk-build clean构建所有NDK_DEBUG = 1
我已经在下面附加了gdb输出.
任何帮助将不胜感激.
编辑:问题可能是’cp’命令失败?空的“使用gdb setup init:”行?
$NDK/ndk-gdb --verboseAndroID NDK installation path: /Users/flavio/documents/androID-sdk-mac_x86/ndk/androID-ndk-r7Using default adb command: /Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adbADB version found: AndroID DeBUG BrIDge version 1.0.29Using final ADB command: '/Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adb'Using auto-detected project path: /Users/flavio/MacDevel/nTrack/trunk/n-Track_EX/AndroID/AndroIDTestingFound package name: com.ntrack.ntrackABIs targetted by application: armeabiDevice API Level: 12Device cpu ABIs: armeabi-v7a armeabiCompatible device ABI: armeabiFound deBUGgable flag: falseFound gdbserver under libs/armeabi,assuming app was built with NDK_DEBUG=1Found device gdbserver: /data/data/com.ntrack.ntrack/lib/gdbserverUsing gdb setup init: Using toolchain prefix: /Users/flavio/documents/androID-sdk-mac_x86/ndk/androID-ndk-r7/toolchains/arm-linux-androIDeabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androIDeabi-Using app out directory: ./obj/local/armeabiFound data directory: '/data/data/com.ntrack.ntrack'Found running PID: 2302Launched gdbserver succesfully.Setup network redirection## COMMAND: /Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adb forward tcp:5039 localfilesystem:/data/data/com.ntrack.ntrack/deBUG-socket## COMMAND: /Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adb shell run-as com.ntrack.ntrack lib/gdbserver +deBUG-socket --attach 2302## COMMAND: /Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adb pull /system/bin/app_process ./obj/local/armeabi/app_processAttached; pID = 2302Listening on sockaddr socket deBUG-socket1269 KB/s (9828 bytes in 0.007s)Pulled app_process from device/emulator.## COMMAND: /Users/flavio/documents/androID-sdk-mac_x86/platform-tools/adb pull /system/lib/libc.so ./obj/local/armeabi/libc.so2988 KB/s (275874 bytes in 0.090s)Pulled libc.so from device/emulator.usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directoryGNU gdb 6.6copyright (C) 2006 Free Software Foundation,Inc.GDB is free software,covered by the GNU General Public license,and you arewelcome to change it and/or distribute copIEs of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB. Type "show warranty" for details.This GDB was configured as "--host=i686-apple-darwin --target=arm-elf-linux".(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: Undefined error: 0.Error while mapPing shared library sections:libstdc++.so: Undefined error: 0.Error while mapPing shared library sections:libm.so: Undefined error: 0.Error while mapPing shared library sections:liblog.so: Undefined error: 0.Error while mapPing shared library sections:libcutils.so: Undefined error: 0.Error while mapPing shared library sections:libz.so: Undefined error: 0.Error while mapPing shared library sections:libutils.so: Undefined error: 0.Error while mapPing shared library sections:libbinder.so: Undefined error: 0.Error while mapPing shared library sections:libexpat.so: Undefined error: 0.Error while mapPing shared library sections:libcrypto.so: Undefined error: 0.Error while mapPing shared library sections:libicuuc.so: Undefined error: 0.Error while mapPing shared library sections:libicui18n.so: Undefined error: 0.Error while mapPing shared library sections:libsqlite.so: Undefined error: 0.Error while mapPing shared library sections:libssl.so: Undefined error: 0.Error while mapPing shared library sections:libstlport.so: Undefined error: 0.Error while mapPing shared library sections:libnativehelper.so: Undefined error: 0.Error while mapPing shared library sections:libnetutils.so: Undefined error: 0.Error while mapPing shared library sections:libEGL.so: Undefined error: 0.Error while mapPing shared library sections:libwpa_clIEnt.so: Undefined error: 0.Error while mapPing shared library sections:libharDWare_legacy.so: Undefined error: 0.Error while mapPing shared library sections:libpixelflinger.so: Undefined error: 0.Error while mapPing shared library sections:libharDWare.so: Undefined error: 0.Error while mapPing shared library sections:libemoji.so: Undefined error: 0.Error while mapPing shared library sections:libjpeg.so: Undefined error: 0.Error while mapPing shared library sections:libquramimagecodec.so: Undefined error: 0.Error while mapPing shared library sections:libskia.so: Undefined error: 0.Error while mapPing shared library sections:libui.so: Undefined error: 0.Error while mapPing shared library sections:libGLESv2.so: Undefined error: 0.Error while mapPing shared library sections:libsurfaceflinger_clIEnt.so: Undefined error: 0.Error while mapPing shared library sections:libgui.so: Undefined error: 0.Error while mapPing shared library sections:libcamera_clIEnt.so: Undefined error: 0.Error while mapPing shared library sections:libdvm.so: Undefined error: 0.Error while mapPing shared library sections:libGLESv1_CM.so: Undefined error: 0.Error while mapPing shared library sections:libETC1.so: Undefined error: 0.Error while mapPing shared library sections:libsecril-clIEnt.so: Undefined error: 0.Error while mapPing shared library sections:libsisodrm.so: Undefined error: 0.Error while mapPing shared library sections:libsonivox.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright_foundation.so: Undefined error: 0.Error while mapPing shared library sections:libmedia.so: Undefined error: 0.Error while mapPing shared library sections:libnfc_ndef.so: Undefined error: 0.Error while mapPing shared library sections:libusbhost.so: Undefined error: 0.Error while mapPing shared library sections:libhwui.so: Undefined error: 0.Error while mapPing shared library sections:libbluedroID.so: Undefined error: 0.Error while mapPing shared library sections:libdbus.so: Undefined error: 0.Error while mapPing shared library sections:libandroID_runtime.so: Undefined error: 0.Error while mapPing shared library sections:libvorbisIDec.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright_yuv.so: Undefined error: 0.Error while mapPing shared library sections:libdrmframework.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright_amrnb_common.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright_enc_common.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright_avc_common.so: Undefined error: 0.Error while mapPing shared library sections:libstagefright.so: Undefined error: 0.Error while mapPing shared library sections:libmtp.so: Undefined error: 0.Error while mapPing shared library sections:libmedia_jni.so: Undefined error: 0.Error while mapPing shared library sections:libbcc.so: Undefined error: 0.Error while mapPing shared library sections:libRS.so: Undefined error: 0.Error while mapPing shared library sections:librs_jni.so: Undefined error: 0.Error while mapPing shared library sections:libharfbuzz.so: Undefined error: 0.Error while mapPing shared library sections:libwebcore.so: Undefined error: 0.Error while mapPing shared library sections:libnvos.so: Undefined error: 0.Error while mapPing shared library sections:libnvrm.so: Undefined error: 0.Error while mapPing shared library sections:libnvrm_channel.so: Undefined error: 0.Error while mapPing shared library sections:libnvddk_2d_v2.so: Undefined error: 0.Error while mapPing shared library sections:gralloc.tegra.so: Undefined error: 0.Error while mapPing shared library sections:libnTrackFramework.so: Undefined error: 0.Error while mapPing shared library sections:libnTrackWinOnMac.so: Undefined error: 0.Error while mapPing shared library sections:libnTrackDSPDll.so: Undefined error: 0.Error while mapPing shared library sections:libnTrackNativeControls.so: Undefined error: 0.Error while mapPing shared library sections:libnTrackEngine.so: Undefined error: 0.Error while mapPing shared library sections:libgl2jni.so: Undefined error: 0.warning: Unable to find dynamic linker breakpoint function.GDB will be unable to deBUG shared library initializersand track explicitly loaded dynamic code.warning: shared library handler Failed to enable breakpoint0xaff0c174 in ?? ()gdb: Unable to get location for thread creation breakpoint: requested event is not supported(no deBUGging symbols found)gdb: Unable to get location for thread creation breakpoint: requested event is not supportedgdb: Unable to get location for thread creation breakpoint: requested event is not supportedKilling inferior/Users/flavio/MacDevel/nTrack/trunk/n-Track_EX/AndroID/AndroIDTesting/jnI/Obj/local/armeabi/gdb.setup:4: Error in sourced command file:Remote communication error: Connection reset by peer.解决方法 我遇到了同样的问题.原来问题是我在$PROJECT_DIR / jni文件夹中执行ndk-gdb.向上移动一个级别并从$PROJECT_DIR执行修复了断开连接. 总结
以上是内存溢出为你收集整理的无法在Android和NDK下使用gdb进行调试,启动Gdb会崩溃App全部内容,希望文章能够帮你解决无法在Android和NDK下使用gdb进行调试,启动Gdb会崩溃App所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)