Skip to content

[native-image] Debug information not usable in gdb #4574

@ctiedt

Description

@ctiedt

Describe the issue
When building a native image binary with the -g flag, the debugging information is not recognized by gdb. The specific error is Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, 4 or 5) [in module /home/clemens/Studium/MA/re22/helloworld].

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. Write a Java program (e.g. just a Hello World) and compile it to bytecode
  2. Compile it to a native binary with native-image -g HelloWorld
  3. Load the binary in gdb: gdb helloworld

Describe GraalVM and your environment:

  • GraalVM version: CE 22.1.0
  • JDK major version: 17
  • OS: Arch Linux
  • Architecture: AMD64
  • gdb: 12.1 (also tested on 10.2 and 11.2)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions