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

Do not GC DW_AT_declaration DW_TAG_subprograms #9578

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Nov 6, 2024

Declarations must be consistent across compilation units for any given type. This is the same situation as with, e. g., class member variables (fields).

Furthermore, even for ordinary C declarations, deleting them can theoretically mess up the expression evaluator (since a function that was supposed to be in scope no longer is). This is mostly a theoretical concern, however, as calling functions in the context of translated DWARF is currently deeply broken anyway.

Fixes #9512.

I've also tweaked the dumping of DIE offsets for easier cross-referencing with llvm-dwarfump.

@SingleAccretion SingleAccretion marked this pull request as ready for review November 6, 2024 22:33
@SingleAccretion SingleAccretion requested a review from a team as a code owner November 6, 2024 22:33
@SingleAccretion SingleAccretion requested review from alexcrichton and removed request for a team November 6, 2024 22:33
For easier correlation to llvm-dwarfdump's output.
Declarations must be consistent across compilation units.
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Nov 6, 2024
Merged via the queue into bytecodealliance:main with commit a126152 Nov 6, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Class member function declarations lost in translation to native DWARF (leading to debugger failures)
2 participants