5

I'm still with ndk-gdb, now trying to solve the main problem that leaded me to do the other question I self answered xD

ndk-gdb tells me that there is no symbols table for my current lib. This is like the file I'm debugging where not the same as the file the emulator is executting. But i reuploaded the app. It says also "use file command", but file is only when I'am debugging a local program, right? It's not suitable for when I'm debugging remotely like with android.

So What should I do? I'm looking for a solution since 3 days but I'm still clueless. May be I should ask what are the other causes of this message, aside the wrong file problem?

Thanks. Some info: ndk-build and ndk-gdb called in the parent directory of the proyect. android api level 10 (2.3.3) android ndk r7b

Android.mk file content:

MY_LOCAL_PATH := $(call my-dir)
LOCAL_PATH := $(MY_LOCAL_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE := wrapper
LOCAL_SRC_FILES := wrapper.c \
                aes.c \
                password.c \
                sha256.c \
                aescrypt.c
include $(BUILD_SHARED_LIBRARY)
Adrián Pérez
  • 2,186
  • 4
  • 21
  • 33
  • Are you building library with debug information? – Mārtiņš Možeiko Mar 03 '12 at 19:13
  • Yes, I read that if the proyect is set to debuggable in AndroidManifest, the symbols are added. That's the way I debugged the sample proyects without problems. I also tested with NDK_DEBUG flag, and -g / -gdbb in the LOCAL_CFLAGS variable in the Android.mk file. – Adrián Pérez Mar 05 '12 at 13:30
  • Under Cygwin is brilliant inoperable. You can load the JNI - so generated by ndk-build but can't access other .so. set -i 's/\r\n/\n' echoes error in source command so changing line endings did not work, changing it back issues the error only sometime, this thing is broken. – Peter Apr 11 '14 at 09:25

4 Answers4

3
No symbol table is loaded.  Use the "file" command.

This message can occur if the directory path to the workspace has a space in its name, for example, "C:\Documents and Settings\myworkspace", the solution is to use a path without a space, for example, "c:\myworkspace"

Fred F
  • 1,027
  • 1
  • 9
  • 18
3

If you use Eclipse/Sequoyah, check the file obj/local/armeabi/gdb2.setup contains only valid Unix ending-line style <0A>.

With a generated file containing bad ending lines <0D><0D><0A>, I had the message:

No symbol table is loaded. Use the "file" command.

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
zegzav
  • 341
  • 2
  • 3
2

I also encounter this problem as i try to debug the shared library before it is loaded, below is my process although it is written in Chinese, you can use Google translate, good luck!

http://blog.csdn.net/xinfuqizao/article/details/7625886

Jindowin
  • 31
  • 2
0

Another problem that can cause "No symbol table is loaded" is when the ndk-gdb script fails to pull the app_process file from your phone.

This happened to me due to a fringe bug in ndk-gdb.py where its code to check for the presence of "app_process32" erroneously succeeded. Instead of falling back to "app_process" like the script is intended to do it tried to download the non-existent file.

silentorb
  • 2,432
  • 2
  • 18
  • 20