-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[GR-47755] Refactor dwarf constants #7081
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
Conversation
c903dbc to
cab0c76
Compare
|
This is a first step towards factoring out common DWARF management routines as requested in feature request issue #6207. |
14dff63 to
74dc839
Compare
|
@olpaw @fniephaus I pushed a new change to use enums instead of interfaces for the different categories of DWARF constant. So, this is ready for review again (the remaining gate style problem is unrelated to the patch). |
...tevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/DwarfLineSectionImpl.java
Outdated
Show resolved
Hide resolved
|
Once again, the gate failure is a spurious error unrelated to this patch. |
fniephaus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
It seems you were still working on an older commit. We've fixed this some time ago with 56671ad. Rebasing to the latest master commit would've fixed the gate in your PR. But no need to waste free computing resources, I try to get it merged the way it is :) |
|
Aaargh, so the problem snuck back into my commit. Do you want me to push a fix? |
|
No, it's fine. I've edited your commits to speed things up. |
olpaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace all the individual import static of enum values with single regular imports of the respective enum classes.
...evm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfAccess.java
Outdated
Show resolved
Hide resolved
...m/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfEncoding.java
Outdated
Show resolved
Hide resolved
...m.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfExpressionOpcode.java
Outdated
Show resolved
Hide resolved
...atevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfFlag.java
Outdated
Show resolved
Hide resolved
...atevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfForm.java
Outdated
Show resolved
Hide resolved
...src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfLineOpcode.java
Outdated
Show resolved
Hide resolved
...rc/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfSectionName.java
Outdated
Show resolved
Hide resolved
...ratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfTag.java
Outdated
Show resolved
Hide resolved
...vm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/constants/DwarfVersion.java
Outdated
Show resolved
Hide resolved
substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/dwarf/DwarfSectionImpl.java
Outdated
Show resolved
Hide resolved
|
I have pushed a patch that 1) makes all the enum values private and 2) removes all static enum value imports, instead resorting to enum type qualified mentions at the point of use. I think that addresses all the review comments. |
90f489b to
5d7352a
Compare
|
Rebased over latest master |
Thanks! |
|
Merged via #7158 (comment). |
This pull request factors out into interface
DwarfConstantsall the constant values defined in the DWARF spec that are used by the debug info generator code driven via theDebugInfoProviderAPI. This is to allow those same constants to be reused by code that needs to manage DWARF info but is not driven viaDebugInfoProvider.The change also cleans up some of the code in the current
DebugInfoProviderDWARF backend, removing prefixDW_from a few constants that are not defined by the DWARF spec and adopting an enum type for the abbreviation codes used to tag DWARF DIEs.