Gdb debug the native (not jni) program on android

前端 未结 1 1069
天涯浪人
天涯浪人 2021-02-04 19:38

I failed to debug the native program with NDK toolchain. Follows are my detailed steps and output.

Env Setting:

NDK_ROOT=/opt/android/ndk
SYSROOT=$NDK_RO         


        
1条回答
  •  长发绾君心
    2021-02-04 20:27

    I don't know why gdb works with the binary by ndk-build, but use file command instead of symbol-file command, it might work. gdb needs to know the image of the remote executed program.

    (gdb) file hello
    

    0 讨论(0)
提交回复
热议问题