[all-commits] [llvm/llvm-project] 419fa1: [lldb][DataFormatter] Surface CalculateNumChildren...

Michael Buch via All-commits all-commits at lists.llvm.org
Wed Apr 16 08:58:12 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 419fa1b06a36336ad85f1c71fc72ffa719ceb659
      https://github.com/llvm/llvm-project/commit/419fa1b06a36336ad85f1c71fc72ffa719ceb659
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
    M lldb/source/ValueObject/ValueObject.cpp
    A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/Makefile
    A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
    A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp

  Log Message:
  -----------
  [lldb][DataFormatter] Surface CalculateNumChildren errors in std::vector summary (#135944)

When the data-formatters happen to break (e.g., due to layout changes in
libc++), there's no clear indicator of them failing from a user's
perspective. E.g., for `std::vector`s we would just show:
```
(std::vector<int>) v = size=0 {}
```
which is highly misleading, especially if `v.size()` returns a non-zero
size.

This patch surfaces the various errors that could occur when calculating
the number of children of a vector.

rdar://146964266



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list