0 Replies Latest reply on Sep 21, 2009 12:23 PM by 843829

    debug JVM with gdb

      I would like to step through the JVM native code with GDB. Currently this only works by first starting the JVM and then attaching gdb to the java process. This makes it impossible to look at the bytecode parsing code.

      If I start the a JVM (jdk 6u18) from within gdb I get the following error:
      silasdm@sdmpc ~/Work/JVM $ gdb ./TEST/build-debug/bin/java
      GNU gdb 6.8
      Copyright (C) 2008 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-pc-linux-gnu"...
      (gdb) set args Test
      (gdb) run
      Starting program: /home/silasdm/Devel/JVM/TEST/build-debug/bin/java Test
      [Thread debugging using libthread_db enabled]
      [New process 2216]
      Executing new program: /home/silasdm/Devel/JVM/TEST/build-debug/bin/java
      warning: Cannot initialize thread debugging library: generic error
      [New process 2216]
      [Thread debugging using libthread_db enabled]
      Segmentation fault
      How can I work around or fix this issue?