JDK9 Hotspot debug using gdb, causing SIGSEGV Segmentation fault in eclipse/Ubuntu terminal

怎甘沉沦 提交于 2019-12-04 15:51:23

The HotSpot JVM uses the SEGV signal internally for a few different things (NullPointerException, safepoints, ...) so this is most likely not an error. When debugging HotSpot, it is useful to tell gdb to let the application handle the SEGV signal:

handle SIGSEGV pass noprint nostop

When you are already paused because gdb received the signal, you can resume execution with

continue

You can also use those commands in the debugger console of eclipse.

It might be useful to create a .gdbinit file that contains that command. In Eclipse you can then point your run configuration to that file ("GDB command file" under "Debugger" in the run configuration). That way you don't need to type that command on every HotSpot debugging session.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!