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

[GR-53359] Provide native debugging friendly classloadername based on ClassLoader.nameAndId #8885

Merged
merged 4 commits into from
May 20, 2024

Conversation

graalvmbot
Copy link
Collaborator

The way ClassLoader.nameAndId gets initialized per default causes problems with native debugging in GDB. If the classloader has a name, ClassLoader.nameAndId is initialized with single quotes enclosing it and the name may contain quotes. Escaping quotes does not work properly in the current GDB.
ClassLoader.nameAndId contains the classloaders hash and is used to create the unique name for a classloader. Therefore, if the quotes are dropped in the debug info, the classloader name will still be unique and can be used within GDB.

Additionally, this issue should add the missing feature of autoloading the svmhelpers.py script in GDB. This requires the special debugging section .debug_gdb_scripts to be added to the debug info of a native image, which contains the path to the autoloaded Python file. svmhelpers.py must be placed in the current working directory to be autoloaded.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 7, 2024
@olpaw olpaw requested review from adinn and olpaw May 7, 2024 11:10
@olpaw
Copy link
Member

olpaw commented May 7, 2024

Hi @adinn,

@dominikmascherbauer is currently working on improving the GDB debugging experience with the help of the GDB Python API. I'm already using his work on a different PR as it greatly simplifies native debugging. His work-in-progress can be found at #8886

This PR contains the bits that I'd like to have on master upfront so that I can conveniently already benefit from his work-in-progress on my PR. Please have a look.

Once this PR is on master, #8886 will be rebased to make use of those bits.

@olpaw olpaw added this to To do in Native Image via automation May 7, 2024
@olpaw olpaw moved this from To do to In progress in Native Image May 7, 2024
Copy link
Collaborator

@adinn adinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

dominik.mascherbauer@oracle.com added 4 commits May 20, 2024 17:32
@graalvmbot graalvmbot closed this May 20, 2024
@graalvmbot graalvmbot deleted the doma/GR-53359 branch May 20, 2024 23:41
@graalvmbot graalvmbot merged commit f8659d0 into master May 20, 2024
13 of 25 checks passed
Native Image automation moved this from In progress to Done May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
Native Image
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants