简体   繁体   English

如何使用gdb调试openjdk?

[英]How to Debug openjdk using gdb?

I have built openJDK the debugging version with the following configuration options in README-builds 我已经在README-builds中使用以下配置选项构建了openJDK调试版本

 bash ./configure ---with-debug-level=slowdebug --with-target-bits=64

However I cannot set any breakpoints or to be correct there are no symbols, doing some reseach on google I have found out that I should extract .diz ( libjvm.diz ) files in lib folder, but this does not seem to work. 但是我不能设置任何断点或者说没有符号正确,在google上做一些研究我发现我应该在lib文件夹中提取.dizlibjvm.diz )文件,但这似乎不起作用。

I will answer this for other people, after you get the sources Follow the steps: 在您获得消息来源后,我将为其他人回答这个问题。按照步骤操作:

  1. bash ./configure --with-debug-level=slowdebug --with-target-bits=64 --disable-zip-debug-info
  2. make all

An information worth mentioning that finally when you start the debugging session with gdb and you run the program you may see a SEGFAULT ignore it and continue till gdb stops at your breakpoint. 一个值得一提的信息,最后当您使用gdb启动调试会话并运行程序时,您可能会看到SEGFAULT忽略它并继续直到gd​​b在您的断点处停止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM