ndk-gdb后再list为什么会(no debugging symbols found)且报错<<C++-namespaces>>: No such file or directory in <<C++-namespaces>>
in <<C++-namespaces>>
同样的工程代码,在公司电脑里正常,拿回家就报这错.不解!Administrator@tomato-283cf878 /cygdrive/e/Code/Android/VOSkia
$ $NDK/ndk-gdb --start
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome 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=i586-mingw32msvc --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:
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:
libssl.so: No such file or directory.
Error while mapping shared library sections:
libicudata.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:
libsqlite.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:
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:
libui.so: No such file or directory.
Error while mapping shared library sections:
libsurfaceflinger_client.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:
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:
libGLESv1_CM.so: No such file or directory.
Error while mapping shared library sections:
libskiagl.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:
libGLESv2.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:
libmedia.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:
libexif.so: No such file or directory.
Error while mapping shared library sections:
libdrm1.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:
libopencore_common.so: No such file or directory.
Error while mapping shared library sections:
libopencore_net_support.so: No such file or directory.
Error while mapping shared library sections:
libopencore_player.so: No such file or directory.
Error while mapping shared library sections:
libomx_sharedlibrary.so: No such file or directory.
Error while mapping shared library sections:
libomx_amrenc_sharedlibrary.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_avc_common.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_color_conversion.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:
libmedia_jni.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:
libwebcore.so: No such file or directory.
Error while mapping shared library sections:
libvtl.so: No such file or directory.
Error while mapping shared library sections:
libgeoslite.so: No such file or directory.
Error while mapping shared library sections:
libvboost.so: No such file or directory.
Error while mapping shared library sections:
libjnigraphics.so: No such file or directory.
Error while mapping shared library sections:
gralloc.default.so: No such file or directory.
(no debugging symbols found)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0xaf705ec0 in ?? ()
(gdb) l
1 <<C++-namespaces>>: No such file or directory.
in <<C++-namespaces>>
(gdb) x
0x0: Cannot access memory at address 0x0
(gdb) x 50
0x32: Cannot access memory at address 0x32
(gdb) p bitmap
No symbol "bitmap" in current context.
(gdb) x
0x36: Cannot access memory at address 0x36
(gdb) l
1 in <<C++-namespaces>>
(gdb) c
Continuing.
in <<C++-namespaces>>
同样的工程代码,在公司电脑里正常,拿回家就报这错.不解!Administrator@tomato-283cf878 /cygdrive/e/Code/Android/VOSkia
$ $NDK/ndk-gdb --start
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome 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=i586-mingw32msvc --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:
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:
libssl.so: No such file or directory.
Error while mapping shared library sections:
libicudata.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:
libsqlite.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:
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:
libui.so: No such file or directory.
Error while mapping shared library sections:
libsurfaceflinger_client.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:
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:
libGLESv1_CM.so: No such file or directory.
Error while mapping shared library sections:
libskiagl.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:
libGLESv2.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:
libmedia.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:
libexif.so: No such file or directory.
Error while mapping shared library sections:
libdrm1.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:
libopencore_common.so: No such file or directory.
Error while mapping shared library sections:
libopencore_net_support.so: No such file or directory.
Error while mapping shared library sections:
libopencore_player.so: No such file or directory.
Error while mapping shared library sections:
libomx_sharedlibrary.so: No such file or directory.
Error while mapping shared library sections:
libomx_amrenc_sharedlibrary.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_avc_common.so: No such file or directory.
Error while mapping shared library sections:
libstagefright_color_conversion.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:
libmedia_jni.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:
libwebcore.so: No such file or directory.
Error while mapping shared library sections:
libvtl.so: No such file or directory.
Error while mapping shared library sections:
libgeoslite.so: No such file or directory.
Error while mapping shared library sections:
libvboost.so: No such file or directory.
Error while mapping shared library sections:
libjnigraphics.so: No such file or directory.
Error while mapping shared library sections:
gralloc.default.so: No such file or directory.
(no debugging symbols found)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0xaf705ec0 in ?? ()
(gdb) l
1 <<C++-namespaces>>: No such file or directory.
in <<C++-namespaces>>
(gdb) x
0x0: Cannot access memory at address 0x0
(gdb) x 50
0x32: Cannot access memory at address 0x32
(gdb) p bitmap
No symbol "bitmap" in current context.
(gdb) x
0x36: Cannot access memory at address 0x36
(gdb) l
1 in <<C++-namespaces>>
(gdb) c
Continuing.
我有很多.cpp文件,有很多类,当然他们都有成员函数,我该如何给一个特定类的特定成员函数设置断点呢?谢过先
然后运行APK.停在断点处,再$NDK/ndk-gdb.等启动完毕后,输入
b cpp文件全称 :函数名(不需要括号)
回车用c命令.
最后再在JAVA端释放断点,然后就可以跟进你的本地C代码函数了.
我试了一下,您的方法可以给cpp文件里的全局函数设置断点,但是给本类的成员函数 设置断点就会有问题。
timer.cpp文件里的两个函数
void toDeleteDebugFuncIn_timer_cpp()
{
...
}
CPTimer::CPTimer(pTimerCallback pObserver)
{
...
}
用您的方法
(gdb) b timer.cpp:toDeleteDebugFuncIn_timer_cpp
Breakpoint 1 at 0x8092c9a0
(gdb) b timer.cpp:CPTimer::CPTimer
Can't find member of namespace, class, struct, or union named "timer.cpp:CPTim
er::CPTimer"
Hint: try 'timer.cpp:CPTimer::CPTimer<TAB> or 'timer.cpp:CPTimer::CPTime
r<ESC-?>
(Note leading single quote.)
请楼主指点,小弟谢过先
你需要先进入全局函数,再用你说的那种方式就可以了.
比如.
先 ndk-gdb后
b tiros_gis_vos_SkView.cpp :Java_tiros_gis_vos_SkView_showMap
待进入Java_tiros_gis_vos_SkView_showMap这个全局函数的断点后.
再设某一类的函数为断点.比如:b CVOSStr::Init
就OK了.
我的就是这么做的.不知是不是你要的答案.
list命令 报错<<C++-namespaces>>无所谓,继续使用调试命令就行了.
小弟想问您说“(no debugging symbols found)” 那您是怎样查看栈信息的呢,
小弟的程序崩溃后就没办法查看栈信息了,只是简单的几句,如“
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 728]
0xafd0cda4 in memcpy ()
from E:/android-ndk-r5b/apps/mango_d/project/obj/local/armeabi/libc.so”
不知道您是怎样查看栈信息的,请指点,小弟谢过先
用back stracke
或bt命令