summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Language/CPlusPlus/MsvcStlSmartPointer.cpp
AgeCommit message (Collapse)Author
2025-07-14[LLDB] Add formatters for MSVC STL std::unique_ptr (#148248)nerix
This PR adds a summary and synthetic children for `std::unique_ptr` from MSVC's STL ([NatVis](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L285-L303)). As with libc++, the deleter is only shown if it's non-empty. Tested both the shared_ptr and unique_ptr tests on Windows. Towards #24834.
2025-07-11[LLDB] Use non synthetic value for MSVC smart ptr check (#148176)nerix
I forgot to use the non-synthetic value to check for the `_Ptr` member. Fixes the test failure from #147575. --------- Co-authored-by: Michael Buch <michaelbuch12@gmail.com>
2025-07-11[LLDB] Add formatters for MSVC STL std::shared_ptr (#147575)nerix
This PR adds formatters for `std::shared_ptr` and `std::weak_ptr`. They are similar to the ones from libc++ and libstdc++. [Section from MSVC STL NatVis](https://github.com/microsoft/STL/blob/313964b78a8fd5a52e7965e13781f735bcce13c5/stl/debugger/STL.natvis#L512-L578). To support debugging with PDB debug info, I had to add an early exit in `GetDesugaredSmartPointerValue`, because with PDB, LLDB doesn't know about template types. This isn't an issue here, since the typedef type is already resolved there, so no casting is needed. The tests don't check for PDB - maybe this should be changed? I don't know a good way to do this. PDB has the downside that it resolves typedefs. Here in particular, the test for `element_type` would need to be replaced with `User` and `std::string` with `std::basic_string<char,std::char_traits<char>,std::allocator<char> >`. Towards #24834.