4

I have an Android application with JNI (and SWIG). The application runs fine and I can debug the java and the native code, but I keep having warnings from gdb that I have no idea where they come from, I stripped the code down to a very simple function. I followed various tutorials on how to do that, I tried on Mac OS X 10.6.8 and Linux mint 12, I'm using eclipse (ADT).

That's the warnings I got:

warning: Could not load shared library symbols for 63 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().
[New Thread 17108]
[New Thread 17110]
[New Thread 17112]
[New Thread 17113]
[New Thread 17114]
[New Thread 17115]
[New Thread 17116]
[New Thread 17117]
[New Thread 17118]
[Switching to Thread 17106]

I have no idea which libraries gdb is looking for, any idea??

here is the output of info sharedlibrary

(gdb) info sharedlibrary
From        To          Syms Read   Shared Object Library
0x40003220  0x4000b940  Yes (*)     /home/andrea/workspace/pjsip_app/obj/local/armeabi/linker
0x4002c860  0x4005c07c  Yes (*)     /home/andrea/workspace/pjsip_app/obj/local/armeabi/libc.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          libskia.so
                        No          libandroidfw.so
                        No          libstlport.so
                        No          libnativehelper.so
                        No          libnetutils.so
                        No          libhardware.so
                        No          libsync.so
                        No          libui.so
                        No          libGLES_trace.so
                        No          libEGL.so
                        No          libGLESv2.so
                        No          libgui.so
                        No          libcamera_client.so
                        No          libgabi++.so
                        No          libicuuc.so
                        No          libicui18n.so
                        No          libsqlite.so
                        No          libdvm.so
                        No          libGLESv1_CM.so
                        No          libETC1.so
                        No          libwpa_client.so
                        No          libhardware_legacy.so
                        No          libsonivox.so
                        No          libcrypto.so
                        No          libssl.so
                        No          libstagefright_foundation.so
                        No          libspeexresampler.so
                        No          libaudioutils.so
                        No          libmedia_native.so
                        No          libmedia.so
                        No          libusbhost.so
                        No          libharfbuzz.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          libbcinfo.so
                        No          libbcc.so
                        No          libRS.so
                        No          librs_jni.so
                        No          libandroid.so
                        No          libchromium_net.so
                        No          libwebcore.so
                        No          libwilhelm.so
                        No          libOpenSLES.so
0x47ceb0f8  0x47e7fd98  Yes         /home/andrea/workspace/pjsip_app/obj/local/armeabi/libconnection.so
(*): Shared library is missing debugging information.
Pedru
  • 1,430
  • 1
  • 14
  • 32
  • Add the result of `info sharedlibrary`. The missing symbols are probably form system libraries. Most likely you can ignore the errors as long as debug symbols were found for your library. – Frohnzie Apr 18 '13 at 12:12
  • thanks, I added the output of info sharedlibrary – Pedru Apr 20 '13 at 15:01
  • Looks normal to me. The other libs are Android libs found on the device. Unless you are debugging an Android issue the extra symbols are not needed. – Frohnzie Apr 20 '13 at 20:21
  • Ok, thanks. In fact, I can debug my Native code, this is all I want. Just being curious, where could I get those libraries? Are they somewhere in the android NDK? Or would I have to compile the Android source code? – Pedru Apr 22 '13 at 06:25
  • You should be able to build them from the AOSP. Each platform has a release, engineering, and debug target. – Frohnzie Apr 22 '13 at 15:03
  • Check this question, It could help you: http://stackoverflow.com/questions/21532229/android-gdb-is-not-loading-c-shared-library/21533990#21533990 – Joan P.S Feb 04 '14 at 09:46

0 Answers0