Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native-image] Write debug info in separate file (e.g., .debug) when building with -g #3056

Closed
zakkak opened this issue Dec 10, 2020 · 1 comment

Comments

@zakkak
Copy link
Collaborator

zakkak commented Dec 10, 2020

Feature request

Produce separate .debug file when building with -g (or introduce new flag to make it optional)

Is your feature request related to a problem? Please describe.
In Quarkus objcopy is being used to split the debug info from the executable (which recently resulted into quarkusio/quarkus#13517). This seems like a good approach for other GraalVM users as well. This essentially allows users to deploy their application without the extra debug info, while still enabling them to copy the debug info over in case they need to debug their application.

Describe the solution you'd like.
Invoking native-image -g MyClass should generate an executable myclass without embedded debug info and another myclass.debug file containing the debug info.

Describe who do you think will benefit the most.

  • GraalVM users
  • developers of libraries and frameworks which depend on GraalVM

Describe alternatives you've considered.
The current alternative is to use objcopy --only-keep-debug and objcopy --strip-debug to split the binary after building it.

Additional context.
Quarkus issue that led to the creation of this issue: quarkusio/quarkus#13754

Express whether you'd like to help contributing this feature
Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants