我遇到了将共享库文件加载到gdb中的一些问题。我试过了我能想到的每一种排列。我也尝试过在线建议的文件命令,但我仍然无法加载库...
(gdb) file app/src/main/obj/local/armeabi/libUseTBT.so
Reading symbols from app/src/main/obj/local/armeabi/libUseTBT.so...done.
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) file ~/system_lib/
/home/sansari/system_lib/: Success.
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path system_lib/:app/src/main/obj/local/armeabi/
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path ~/system_lib/:app/src/main/obj/local/armeabi/
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path app/src/main/obj/local/armeabi/
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path system_lib/:app/src/main/obj/local/armeabi/
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path system_lib/:app/src/main/obj/local/armeabi/libUseTBT.so
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path ~/system_lib/:app/src/main/obj/local/armeabi/libUseTBT.so
(gdb) info sharedlibrary
No shared libraries loaded at this time.
答案 0 :(得分:0)
也许您在使用 target remote :1337
之前已经在手机上附加了应用进程,例如 set solib-search-path
。先试试set solib-search-path
,之后再用target remote :1337
附加时,此时会使用指定的solib搜索路径,从指定路径的对应文件中读取符号。然后它也会用 info sharedlibrary
反映在列表中。