[LLDB][NativePDB] Use original struct name when searching for constants #166845
+11
−2
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.
We used to search for constants using the name we parsed. For C++, this would mean using the demangled struct name (from the unique name). This name is not always equal to the one used for the struct's name by the compiler. For example:
We would use the unique name and get to
(anonymous namespace)::Anonymous<struct A::B::C<void>>::D. Then, when finding the constant in the field list, we'd search for(anonymous namespace)::Anonymous<struct A::B::C<void>>::D::StaticMember. This wouldn't yield any results, because the constant will use the demangled name as given by the compiler.With this PR, we use the struct's name as given in the PDB and append the member name.