[Lldb-commits] [lldb] [lldb] Add MSVC STL formatter for std::valarray (PR #217242)

via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 21 09:03:35 PDT 2026


Nerixyz wrote:

> tracking down the required fields throughout the data layout (like for vector, you're looking for 3 pointers in specific order, but you don't assume anything about how their nested).
> And then show the raw data layout if you can't find what you are looking for.

I think that's too generic. For example in `std::vector`'s case, you can either implement it as 3 pointers or (pointer, size, capacity). libc++ can do both. So we need some way to distinguish them. 

What I'm thinking about is related to the building blocks for Microsoft's natvis. For `std::valarray`, the natvis is nine lines long (five of which are just XML tags) and it covers both the summary and children. It's (like many things) a tradeoff between simplicity and expressiveness.

https://github.com/llvm/llvm-project/pull/217242


More information about the lldb-commits mailing list