Skip to content

Add debug info feature to CE native image generator #1917

Closed
@adinn

Description

@adinn

Red hat would like to work with the GraalVM project to add debug info to the native image generator for use by command line debuggers and IDEs. The generated debug info should include:

  • symbols for primitive, object and interface types
  • symbols for methods
  • size and numeric type info for Java primitive data
  • size and layout info for Java object data
  • address ranges for method code
  • file and line number info for specific code addresses within methods
  • method frame layouts at end of method prologue and at specific addresses within calls
  • parameter and local var type and location info (register/stack/memory) at end of method prologue and at specific addresses within calls
  • address and type for Java primitive and object values located in the heap region

We believe it should be possible to use this info to support the following iniital debugging functionality:

  • break points configured by file and line or by method name
  • single stepping by line including both into and over function calls
  • stack backtraces (not necessarily including frames detailing inlined code)
  • structured display of primitive values and objects
  • including display of data accessed through object networks via path expressions

Debug info should cover both app code and JDK Runtime/SubstrateVM code and types.

The current plan is to implement a working version for ELF/Linux using DWARF info. This will be verified using gdb as the target debugger. This will proof the idea and also identify a model for plugging in the capability as a Native Image Generator feature. A follow up task will attempt to provide equivalent debug info to support denbugging for Windows/PECOFF and MacOS/MACHO images.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions