如何在Eclipse中调试时看到android SDK系统库的符号?

时间:2013-11-05 17:01:09

标签: android eclipse debugging android-ndk symbols

我有ADT(Eclipse + ADT插件)+ CDT + NDK + Android SDK。 我正在调试一个Android应用程序,使用“Debug as” - >“Android Native Application”,它运行正常,并加载我的符号,但只加载它们。

如何在堆栈跟踪中查看系统函数名称(符号)?

我是从gdb获得的:

warning: Could not load shared library symbols for 73 libraries, e.g. /system/bin/linker.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will retry eventurally.  Meanwhile, it is likely
that GDB is unable to debug shared library initializers
or resolve pending breakpoints after dlopen().

执行info sharedlibrary时输出为:

From        To          Syms Read   Shared Object Library
                        No          /system/bin/linker
0x400339b8  0x40062a38  Yes         /<path_to_my_local_folder>/mylib1.so
                        No          libstdc++.so
                        No          libm.so
                        No          liblog.so
                        No          libcutils.so
                        No          libgccdemangle.so
                        No          libcorkscrew.so
                        No          libz.so
                        No          libutils.so
                        No          libbinder.so
                        No          libemoji.so
                        No          libjpeg.so
                        No          libexpat.so
                        No          libstlport.so
                        No          libGLES_trace.so
                        No          libEGL.so
                        No          libGLESv2.so
                        No          libskia.so
                        No          libandroidfw.so
                        No          libnativehelper.so
                        No          libnetutils.so
                        No          libhardware.so
                        No          libsync.so
                        No          libui.so
                        No          libgui.so
                        No          libcamera_metadata.so
                        No          libcamera_client.so
                        No          libgabi++.so
                        No          libicuuc.so
                        No          libicui18n.so
                        No          libsqlite.so
                        No          libselinux.so
                        No          libdvm.so
                        No          libGLESv1_CM.so
                        No          libETC1.so
                        No          libwpa_client.so
                        No          libhardware_legacy.so
                        No          libsonivox.so
0x40997a38  0x40a05ac8  Yes         <path_to_my_local_folder>/mylib2.so
0x40a47ec0  0x40a5cca0  Yes         <path_to_my_local_folder>/mylib3.so
                        No          libstagefright_foundation.so
                        No          libspeexresampler.so
                        No          libaudioutils.so
                        No          libmedia.so
                        No          libusbhost.so
                        No          libharfbuzz_ng.so
                        No          libLLVM.so
                        No          libbcinfo.so
                        No          libbcc.so
                        No          libRS.so
                        No          libRScpp.so
                        No          libhwui.so
                        No          libandroid_runtime.so
                        No          libjavacore.so
                        No          libdrmframework.so
                        No          libdrmframework_jni.so
                        No          libstagefright_omx.so
                        No          libstagefright_yuv.so
                        No          libvorbisidec.so
                        No          libstagefright_enc_common.so
                        No          libstagefright_avc_common.so
                        No          libstagefright.so
                        No          libmtp.so
                        No          libexif.so
                        No          libstagefright_amrnb_common.so
                        No          libmedia_jni.so
                        No          libexif_jni.so
                        No          libsoundpool.so
                        No          librs_jni.so
                        No          libandroid.so
                        No          libchromium_net.so
                        No          libharfbuzz.so
                        No          libwebcore.so
0x4c715e90  0x4c778798  Yes         <path_to_my_local_folder>/mylib4.so
0x4c79459c  0x4c79c7dc  Yes         <path_to_my_local_folder>/mylib5.so
0x4c7af118  0x4c830994  Yes         <path_to_my_local_folder>/mylib6.so
0x4c905a50  0x4c989c10  Yes         <path_to_my_local_folder>/mylib7.so
                        No          libchromium.so
                        No          libstagefright_chromium_http.so

1 个答案:

答案 0 :(得分:1)

不,你不能用你没有来源的设备做到这一点。如果从源树构建系统,则可以包含所有符号。