0

I am running into some issues loading shared library files into gdb. I have tried every permutation I can think of. I have also tried the file command suggested online, but I still can not load the libraries...

(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.
user3326293
  • 817
  • 1
  • 14
  • 37
  • What are you actually trying to achieve? (The commands you've tried don't make sense on their own, without bigger context.) – Employed Russian Sep 23 '15 at 04:15
  • I am trying to follow the instructions here: http://blog.dornea.nu/2015/07/01/debugging-android-native-shared-libraries/ My understanding is that the above command loads the shared libraries required to debug Native C code in an apk. That is my goal to see what is going on in my C code. – user3326293 Sep 23 '15 at 20:55

1 Answers1

0

Perhaps you have already attached to the app process on the phone, with something like target remote :1337, before you used set solib-search-path. Try the set solib-search-path first, and then when you attach with target remote :1337 after that, at that time it will use the specified solib search path and read the symbols from the corresponding files in the specified path. It will then also reflect in the list with info sharedlibrary.

auspicious99
  • 3,902
  • 1
  • 44
  • 58