How to Debug Java -JNI using GDB on linux ?

前端 未结 3 1125

Can anyone guide on how to debug a JNI code on Linux using GDB debugger(if possible please suggest other options).

    -My JNI project when running on Linux          


        
3条回答
  •  醉话见心
    2020-12-14 03:23

    1. Start your java application
    2. Look up the pid using top, ps, ...
    3. Start gdb with this pid
    4. Attach your program code
    5. Debug as usual using gdb

    This blog post explains the whole thing.

提交回复
热议问题