1

I want to understand the practical working of G1 garbage collector in JDK14 for that I want to set up a debugger in which I can understand the code step by step. I have configured the jdk14 code with following flags:

./configure --with-target-bits=64 --with-debug-level=slowdebug --disable-warnings-as-errors --with-native-debug-symbols=internal

and to compile:

make all

Further, I am trying to debug using gdb with the following command:

gdb --args /path/to/java helloWorld

gdb gives a segmentation fault.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5cb1700 (LWP 272288)]

Thread 2 "java-slowdebug" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5cb1700 (LWP 272288)]
0x00007fffe100064d in ?? ()

Code for helloworld.java.

class helloworld{
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}

But when running the program using /path/to/java helloworld, it works fine.

Please suggest the tools and procedure to set up the debugging environment for JDK14.

underhood31
  • 115
  • 7

0 Answers0