[LLDB][Test] Fix the test case of listing verbose break info on Windows #85200
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.
I noticed a failure of running LLDB test suites on Windows AArch64. The failed test case is about
checking output of command
breakpoint list -v -L c++
, and an mismatch on the demangledname of a function occurred. The test case expects
ns::func(void)
, but on Windows it isint ns::func(void)
.It results from the different mangling scheme used by MSVC, and the comparison is as follows:
?func@ns@@YAHXZ
int __cdecl ns::func(void)
_ZN2ns4funcEv
ns::func()
According to the current use of MSVC demangling,
llvm-project/lldb/source/Core/Mangled.cpp
Lines 128 to 143 in 8f68022
the
__cdecl
specifier is not part of the name. However, the function's parameter types should be presentas
llvm::MSDF_NoVariableType
does not affect a symbol for functions.Therefore, it is inappropriate to assume the demangled name are the same on all platforms. Instead of tweaking the
existing code of demangling to get the same (demangled) name, I think it is more reasonable to modify the test case.