[WIP][lldb][Expression] More reliable function call resolution#114529
Closed
Michael137 wants to merge 2 commits into
Closed
[WIP][lldb][Expression] More reliable function call resolution#114529Michael137 wants to merge 2 commits into
Michael137 wants to merge 2 commits into
Conversation
Michael137
commented
Nov 1, 2024
| D->getAttr<StructorMangledNamesAttr>()) { | ||
| CXXConstructorDecl const *Ctor = dyn_cast<CXXConstructorDecl>(D); | ||
| CXXDestructorDecl const *Dtor = dyn_cast<CXXDestructorDecl>(D); | ||
| assert(Ctor || Dtor); |
Member
Author
There was a problem hiding this comment.
Ideally this won't look like this. But shows where I intend the mangler changes to go for the new attribute.
6b3b5ef to
7f18d96
Compare
Implements all the parts of following RFC: https://discourse.llvm.org/t/rfc-lldb-handling-abi-tagged-constructors-destructors-in-expression-evaluator/82816 Main changes: 1. Instead of relying on linkage names to resolve function symbols, encode the exact function DIE and module in the `AsmLabelAttr` 2. Teach the LLDB symbol resolve about (1) 3. Introduce new Clang attribute to allow specifying multiple `asm` labels for ctors/dtors (one for each variant) 4. Attach the new attribute in (3), where the mangled names use the format from (1). To determine which variant a DIE corresponds to we add a new API to the `ItaniumPartialDemangler` (though could be made into a DWARF attribute for quicker determination).
7f18d96 to
9337e17
Compare
3f761bf to
752676b
Compare
Member
Author
|
Landed in #148877 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Naive implementation of all the parts of following RFC:
https://discourse.llvm.org/t/rfc-lldb-handling-abi-tagged-constructors-destructors-in-expression-evaluator/82816
Main changes:
AsmLabelAttr. Currently we just put theModulepointer value into the label, which may be not sufficient if those could disappear under the expression evaluator's feet.asmlabels for ctors/dtors (one for each variant)ItaniumPartialDemangler(though could be made into a DWARF attribute for quicker determination).Example constructor decl would look like the following: