4 Commits

Author SHA1 Message Date
Nerixyz
dddd2b706e
[LLDB] Prevent division by zero in MSVC deque formatter (#175842)
To look up an item in a `std::deque` we do
d69335bac9/lldb/source/Plugins/Language/CPlusPlus/MsvcStlDeque.cpp (L71-L73)

This will crash on if `m_block_size` or `m_map_size` is zero. We didn't
check that these aren't zero. With this PR, we do.

When running the MSVC STL smoke test, `m_map_size` was randomly zero
(the test breaks before the variables are initialized) and the test
failed, because LLDB crashed.
2026-01-14 19:11:34 +01:00
Nerixyz
292a77c475
[LLDB][NFC] Remove excessive use of auto from MSVC STL formatters (#175019)
Some MSVC STL formatters made excessive use of `auto`, especially the
`std::deque` one
(https://github.com/llvm/llvm-project/pull/172360#pullrequestreview-3639850321).
This PR replaces the uses with the concrete type.
2026-01-08 18:13:48 +01:00
Nerixyz
255f173139
[LLDB] Run MSVC STL deque tests with PDB (#172360)
Similar to the other PRs, this looks up the type from a member variable.
Here, we can use the type of `_Mapptr`. On its own, that's enough to
pass the test with clang-cl.
2026-01-08 17:19:54 +01:00
nerix
d5c8303af8
[LLDB] Add formatters for MSVC STL std::deque (#150097)
This PR adds synthetic children for std::deque from MSVC's STL.

Similar to libstdc++ and libc++, the elements are in a `T**`, so we need
to "subscript" twice. The [NatVis for
deque](313964b78a/stl/debugger/STL.natvis (L1103-L1112))
uses `_EEN_DS` which contains the block size. We can't access this, but
we can access the [constexpr
`_Block_size`](313964b78a/stl/inc/deque (L641)).

Towards #24834.
2025-07-23 16:19:47 +01:00