title: How to Determine Whether OpenJDK Installed with Debugging Symbols
body: <p>I installed <code>openjdk-devel</code> and <code>openjdk-devel-debuginfo</code> of the same major/minor version for an architecture in RedHat Linux Server 8+. I would like to make sure that the OpenJDK runtime has symbols for debugging. After installation, I ran the followings:</p>
  
  <pre><code>[root@localhost bin]# objdump --syms /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/jre/bin/java
  
  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/jre/bin/java:     file format elf64-x86-64
  
  SYMBOL TABLE:
  0000000000000270 l    d  .interp    0000000000000000              .interp
  0000000000000290 l    d  .note.gnu.property 0000000000000000              .note.gnu.property
  00000000000002b0 l    d  .note.ABI-tag  0000000000000000              .note.ABI-tag
  00000000000002d0 l    d  .note.gnu.build-id 0000000000000000              .note.gnu.build-id
  00000000000002f8 l    d  .hash  0000000000000000              .hash
  0000000000000348 l    d  .gnu.hash  0000000000000000              .gnu.hash
  0000000000000370 l    d  .dynsym    0000000000000000              .dynsym
  ....
  ....
  ....
  
  [root@localhost etc]# file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/jre/bin/java
  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/jre/bin/java: 
  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=613871d1514ba05fa2914c22c10f1dfe01d3d2e8, not stripped
  
  
  [root@localhost bin]# objdump --syms /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/bin/java-1.8.0.242.b08-0.el8_1.x86_64.debug
  
  /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/bin/java-1.8.0.242.b08-0.el8_1.x86_64.debug:     file format elf64-x86-64
  
  SYMBOL TABLE:
  no symbols
  
  [root@localhost bin]# file /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/bin/java-1.8.0.242.b08-0.el8_1.x86_64.debug
  /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el8_1.x86_64/bin/java-1.8.0.242.b08-0.el8_1.x86_64.debug: 
  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter \004, for GNU/Linux 3.2.0, BuildID[sha1]=613871d1514ba05fa2914c22c10f1dfe01d3d2e8, with debug_info, not stripped
  </code></pre>
  
  <p>As the above suggests, I see the <code>objdump</code> for <code>java</code> prints out some sort of symbol table, but I had read that one should also look for <code>.debug*</code> in the output, which I'm not seeing in the remaining of <code>SYMBOL TABLE</code> section (a few dozens of lines omitted from above output for brevity). </p>
  
  <p>I see the <code>file</code> for <code>/usr/lib/debug/..../java...debug</code> says <code>with debug_info</code>, but I need confirmation that the Java installation does have symbols.</p>