4

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

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

我从 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
4

1 回答 1

1

不,您不能使用没有资源的设备来执行此操作。如果从源代码树构建系统,则可以拥有所有符号。

于 2013-11-11T18:35:01.960 回答