7

I've installed the Sequoyah Android Native Support, and now, I can execute the debug mode. I have a breakpoint in the same line where I call a native method, so when I execute the debug Java mode, eclipse stops in this line, I execute the 'ndk-gdb', and I lunch the C/C++ debug mode, I see the console do something. But, how can I put C breakpoints? Because my C code is a .so library, so I can't put breakpoints in this file. I have a JNI floder where there are .c and .h files, but don't stops when I put breakpoints. Eclipse log recognizes breakpoints, but prints error.

break-insert com_example_pruebaffmpeg_MainActivity.c:4323 error, msg="No symbol table is loaded. Use the \"file\" command."

beni
  • 3,019
  • 5
  • 35
  • 55
  • Did you compile your C code with the debug info/symbols included? If you are compiling with GCC, make sure you include `-g` option on both compiling and linking steps. – Aleks G Sep 26 '12 at 16:00
  • I don't know what you explain me. I'm using the ndk-build to compile my C code and obtain a .so library. And I run the Android project in Eclipse with the NDK tool. – beni Sep 26 '12 at 16:12
  • 1
    For ndk-build there are other steps that you need to take to build with debugging symbols. Have a look at [this question](http://stackoverflow.com/questions/8934575/debugging-android-ndk-native-apps) – Aleks G Sep 26 '12 at 16:14

1 Answers1

1

Have you tried uninstalling Sequoyah and just using the ADT? As of version 20, the Eclipse ADT plugin can debug NDK projects more easily and reliably than the old Sequoyah way of doing things.

LightStruk
  • 1,451
  • 14
  • 17
  • I've uninstalled the Sequoyah and I've tried to launch the debugger using the ADT, but it doesn't run. Could you explain a little more that or post a link? – beni Sep 27 '12 at 06:58
  • I'm following the instructions on this [link](http://tools.android.com/recent/usingthendkplugin), but the debugger doesn't work – beni Sep 27 '12 at 07:55
  • And console print this error ----> warning: while parsing target library list (at line 2): No segment defined for /system/bin/linker BFD: /home/beni/workspace/Prueba/obj/local/armeabi-v7a/linker: warning: sh_link not set for section `.ARM.exidx' warning: Could not load shared library symbols for 63 libraries, e.g. libstdc++.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? No symbol table is loaded. Use the "file" command. – beni Sep 27 '12 at 08:11
  • If you get the error: **"warning: sh_link not set for section `.ARM.exidx'"** and **"WARNING: Could not load native library: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end"** referenced by [...]" on **Android 4.2.x** try what is written here: http://stackoverflow.com/a/14501998/313113 – Alex Bitek Jan 28 '13 at 06:40