0

I am trying to debug my android application which make use of a library that has native code. I looked at this SO question and configured the ndk debugger as mentioned in it and was able to start the debugger but i am not able to step through the breakpoints i set. And before starting the debugger i get this warning :

Error while mapping shared library sections: `/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjpeg.so': not in executable format: File format not recognized

warning: .dynamic section for "/home/raneez/Documents/android/workspace/SmartCardLibrary/obj/local/armeabi/libcrypto.so" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/home/raneez/Documents/android/workspace/SmartCardLibrary/obj/local/armeabi/libssl.so" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for 120 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 13826]

[New Thread 13827]

[New Thread 13828]

[New Thread 13829]

[New Thread 13833]

[New Thread 13834]

[New Thread 13835]

[New Thread 13837]

[New Thread 13838]

[New Thread 13850]

[New Thread 13852]

Community
  • 1
  • 1
Raneez Ahmed
  • 3,808
  • 3
  • 35
  • 58

1 Answers1

0

The error is on the libjpeg.so file you're using, it's compiled for x86_64 desktop linux but you need a version recompiled for the Android architecture you're running on (armeabi-v7a, x86, etc).

Regarding the other warnings for libcrypto.so and libssl.so libs. The ones used are those from the device, not from your application. You're fine with these.

ph0b
  • 14,353
  • 4
  • 43
  • 41