Bionix1441
Bionix1441

Reputation: 2319

How to Debug openjdk using gdb?

I have built openJDK the debugging version with the following configuration options in README-builds

 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.

Upvotes: 1

Views: 2079

Answers (1)

Bionix1441
Bionix1441

Reputation: 2319

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.

Upvotes: 3

Related Questions