Commit Graph

249 Commits

Author SHA1 Message Date
Zequan Wu
e269c2b5fa [lldb] Show value for libcxx and libstdcxx summary and remove pointer value in libcxx container summary (#125294)
This has two changes:
1. Set show value for libcxx and libstdcxx summary provider. This will
print the pointer value for both pointer type and reference type.
2. Remove pointer value printing in libcxx container summary.

Discussion:

https://discourse.llvm.org/t/lldb-hides-raw-pointer-value-for-libcxx-and-libstdcxx-pointer-types-in-summary-string/84226
2025-02-03 14:34:20 -05:00
Dave Lee
aba0476f23 [lldb] Delete lldbutil.PrintableRegex (NFC)
Use of this class wasn't making use of the original regex string. Note that `re.Pattern`
has a `pattern` property to access the original regex.
2025-01-25 09:58:52 -08:00
Greg Clayton
b7722fbcab [lldb] Fix std::unordered_* synthetic children when typedefs are used. (#123125)
There was a bug in both the GNU and libc++ library synthetic child
providers when a typedef was used in the type of the variable. Previous
code was looking at the top level typename to try and determine if
std::unordered_ was a map or set and this failed when typedefs were
being used. This patch fixes both C++ library synthetic child providers
with updated tests.
2025-01-15 16:30:45 -08:00
jimingham
7c165f7fcc The _code field in an NSError is signed, not unsigned. (#119764)
The NSError summary provider was fetching and printing the `_code` field
as an unsigned integer, but it's defined to be an NSInteger, which is
signed.
2025-01-13 10:08:50 -08:00
Michael Buch
e0a79eeca2 [lldb] Remove references to llvm-gcc (#120225)
The `llvm-gcc` front-end has been EOL'd at least since 2011 (based on
some `git` archeology). And Clang/LLVM has been removing references to
it ever since.

This patch removes the remaining references to it from LLDB. One benefit
of this is that it will allow us to remove the code checking for
`DW_AT_decl_file_attributes_are_invalid` and
`Supports_DW_AT_APPLE_objc_complete_type`.
2024-12-17 13:23:13 +00:00
Adrian Prantl
f22cff7675 [lldb] Support zero-padding in formatter sections (#119934) 2024-12-13 16:09:31 -08:00
Adrian Prantl
87659a17d0 Reland: [lldb] Implement a formatter bytecode interpreter in C++
Compared to the python version, this also does type checking and error
handling, so it's slightly longer, however, it's still comfortably
under 500 lines.

Relanding with more explicit type conversions.
2024-12-10 16:37:53 -08:00
Sylvestre Ledru
a2fb70523a Revert "[lldb] Add cast to fix compile error on 32-bit platforms"
This reverts commit f6012a209d.

Revert "[lldb] Add cast to fix compile error on 32-but platforms"

This reverts commit d300337e93.

Revert "[lldb] Improve log message to include missing strings"

This reverts commit 0be3348485.

Revert "[lldb] Add comment"

This reverts commit e2bb47443d.

Revert "[lldb] Implement a formatter bytecode interpreter in C++"

This reverts commit 9a9c1d4a61.
2024-12-11 00:00:44 +01:00
Adrian Prantl
e2bb47443d [lldb] Add comment 2024-12-10 09:39:51 -08:00
Adrian Prantl
9a9c1d4a61 [lldb] Implement a formatter bytecode interpreter in C++
Compared to the python version, this also does type checking and error
handling, so it's slightly longer, however, it's still comfortably
under 500 lines.
2024-12-10 09:36:38 -08:00
Dave Lee
1a650fde4a [lldb] Load embedded type summary section (#7859) (#8040)
Add support for type summaries embedded into the binary.

These embedded summaries will typically be generated by Swift macros,
but can also be generated by any other means.

rdar://115184658
2024-12-10 09:36:38 -08:00
Jonas Devlieghere
4714215efb [lldb] Support true/false in ValueObject::SetValueFromCString (#115780)
Support "true" and "false" (and "YES" and "NO" in Objective-C) in
ValueObject::SetValueFromCString.

Fixes #112597
2024-11-12 21:18:22 -08:00
Michael Buch
eee8718e26 [lldb][test] TestDataFormatterLibcxxOptionalSimulator.py: skip on Clang-17
A Clang change introduced in this version breaks this test. Said
change was reverted in `52a9ba7ca4fb9427706c28bb3ca15f7a56eecf3f`
in newer versions of Clang.
2024-11-04 11:23:11 +00:00
Adrian Prantl
eac2c182c6 Remove a flaky and unnecessary check (#114251)
The order in which the libraries appear is not always stable and even if
it were, this test is not the right place to check for this.
2024-10-30 08:59:08 -07:00
Michael Buch
5e7cc37422 [lldb][test] TestDataFormatterLibcxxOptionalSimulator.py: don't use __builtin_printf
This caused Windows CI to fail with:
```
Build Command Output:

make: Entering directory 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/optional/TestDataFormatterLibcxxOptionalSimulator.test_r0'

"C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang++.exe"  -std=c++11 -gdwarf -O0   -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb/include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info    -fno-exceptions -D_HAS_EXCEPTIONS=0 -fms-compatibility-version=19.0 -std=c++14  -DREVISION=0 -std=c++14 --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional/main.cpp

C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe main.o -gdwarf -O0   -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb/include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info     -fuse-ld=lld  --driver-mode=g++ -o "a.out"

lld-link: error: undefined symbol: printf

>>> referenced by main.o:(main)

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [Makefile.rules:515: a.out] Error 1

make: Leaving directory 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/optional/TestDataFormatterLibcxxOptionalSimulator.test_r0'
```
2024-10-07 17:38:14 +02:00
Pavel Labath
0e2970f0ad [lldb] Make libc++ simulator tests compatible with category-based ski… (#111353)
…pping, which works by setting a field on the function object. This
doesn't work on a functools.partial object. Use a real function instead.
2024-10-07 16:53:26 +02:00
Michael Buch
a1c0ba1646 [lldb][test] TestDataFormatterLibcxxOptionalSimulator.py: change order of ifdefs
The current layout *does* have `removecv_t`. So change
the ifdefs to reflect that.
2024-10-07 11:12:01 +01:00
Michael Buch
66713a0f82 [lldb][test] Add libcxx-simulators test for std::optional (#111133)
Follow-up to the LLDB std::optional data-formatter test failure caused
by https://github.com/llvm/llvm-project/pull/110355.

Two formats are supported:
1. `__val_` has type `value_type`
2. `__val_`'s type is wrapped in `std::remove_cv_t`
2024-10-07 11:01:56 +01:00
Michael Buch
d148548779 Reland "[lldb][test] TestDataFormatterLibcxxStringSimulator.py: add new padding layout" (#111123)
Relands https://github.com/llvm/llvm-project/pull/108375 which had to be
reverted because it was failing on the Windows buildbot. Trying to
reland this with `msvc::no_unique_address` on Windows.
2024-10-07 10:58:57 +01:00
Michael Buch
ee4dd147ba Revert "[lldb][test] TestDataFormatterLibcxxStringSimulator.py: add new padding layout (#108375)"
This reverts commit d5f6e886ff.

Caused failure on Windows CI. Following test failed:
```
Config=aarch64-C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe

======================================================================

FAIL: test_r5_c2_ALTERNATE_LAYOUT (TestDataFormatterLibcxxStringSimulator.LibcxxStringDataFormatterSimulatorTestCase.test_r5_c2_ALTERNATE_LAYOUT)

    partial(func, *args, **keywords) - new function with partial application

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\string\TestDataFormatterLibcxxStringSimulator.py", line 23, in _run_test

    self.expect_var_path("longstring", summary='"I am a very long string"')

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\lldbtest.py", line 2552, in expect_var_path

    value_check.check_value(self, eval_result, str(eval_result))

  File "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\lldbtest.py", line 321, in check_value

    test_base.assertEqual(

AssertionError: '"I am a very long string"' != '""'

- "I am a very long string"

+ ""

 : (std::__lldb::string) longstring = ""

Checking SBValue: (std::__lldb::string) longstring = ""
```

We may need to use `msvc::no_unique_address` around the simulators.
2024-10-03 14:59:47 +01:00
Michael Buch
d5f6e886ff [lldb][test] TestDataFormatterLibcxxStringSimulator.py: add new padding layout (#108375)
Depends on https://github.com/llvm/llvm-project/pull/108362 and
https://github.com/llvm/llvm-project/pull/108343.

Adds new layout for https://github.com/llvm/llvm-project/pull/105865.
2024-10-03 12:53:28 +01:00
Michael Buch
765e106fb1 [lldb][test] Add a new __compressed_pair layout to libcxx simulator tests (#99012)
This is a follow-up to https://github.com/llvm/llvm-project/pull/98330
for the upcoming `__compressed_pair` refactor in
https://github.com/llvm/llvm-project/issues/93069

This patch just adds the 2 new copies of `_LIBCPP_COMPRESSED_PAIR`
layouts to the simulator tests.
2024-09-16 13:46:19 +01:00
Michael Buch
9e9b1178ca [lldb] Support new libc++ __compressed_pair layout (#96538)
This patch is in preparation for the `__compressed_pair` refactor in
https://github.com/llvm/llvm-project/pull/76756.

This is mostly reviewable now. With the new layout we no longer need to
unwrap the `__compressed_pair`. Instead, we just need to look for child
members. E.g., to get to the underlying pointer of `std::unique_ptr` we
no longer do,
```
GetFirstValueOfCXXCompressedPair(GetChildMemberWithName("__ptr_"))

```
but instead do
```
GetChildMemberWithName("__ptr_")
```

We need to be slightly careful because previously the
`__compressed_pair` had a member called `__value_`, whereas now
`__value_` might be a member of the class that used to hold the
`__compressed_pair`. So before unwrapping the pair, we added checks for
`isOldCompressedLayout` (not sure yet whether folding this check into
`GetFirstValueOfCXXCompressedPair` is better).
2024-09-16 10:11:49 +01:00
Michael Buch
4ca8fb1812 [lldb][test] TestDataFormatterLibcxxStringSimulator.py: fix padding for current layout (#108362)
IIUC, the history of `std::string`'s `__short` structure in the
alternate ABI layout (as recorded by the simulator test) looks as
follows:
* First layout ( `SUBCLASS_PADDING` is defined):
```
     struct __short                                          
     {                                                       
         value_type __data_[__min_cap];                      
        struct                                              
            : __padding<value_type>                         
        {                                                   
            unsigned char __size_;                          
        };
     };                                      
```
* Then:
```
     struct __short                                         
     {                                                      
        value_type __data_[__min_cap];                                                               
        unsigned char __padding[sizeof(value_type) - 1];   
        unsigned char __size_;                             
     };
```
* Then, post-`BITMASKS`:
```
     struct __short                                         
     {                                                      
        value_type __data_[__min_cap];                                                               
        unsigned char __padding[sizeof(value_type) - 1];   
        unsigned char __size_ : 7;
        unsigned char __is_long_ : 1;                             
     };
```

Which is the one that's [on
top-of-tree](89c10e27d8/libcxx/include/string (L854-L859)).

But for `REVISION > 1`, `BITMASKS` is never set, so for those tests we
lose the `__padding` member.

This patch fixes this by splitting out the `SUBCLASS_PADDING` out of the
ifdef.

Drive-by:
* Also run expression evaluator on the string to provide is with some
extra coverage.
2024-09-13 11:01:25 +01:00
Vladislav Dzhidzhoev
44fc987ed1 [lldb][test] Toolchain detection rewrite in Python (#102185)
This fix is based on a problem with cxx_compiler and cxx_linker macros
on Windows.
There was an issue with compiler detection in paths containing "icc". In
such case, Makefile.rules thought it was provided with icc compiler.

To solve that, utilities detection has been rewritten in Python.
The last element of compiler's path is separated, taking into account
the platform path delimiter, and compiler type is extracted, with regard
of possible cross-toolchain prefix.

---------

Co-authored-by: Pavel Labath <pavel@labath.sk>
2024-09-11 16:04:01 +03:00
Michael Buch
19f604edfc [lldb][test] Add test for printing std::string through expression evaluator
This would've caught the failures in
https://github.com/llvm/llvm-project/pull/105865 in the libc++
data-formatter CI.
2024-09-11 08:58:03 +01:00
Pavel Labath
a5f03b4adc [lldb] Support "dereferencing" std::optional in frame var (#107077) 2024-09-03 13:22:31 +02:00
Jason Molenda
c1e401f362 [lldb] Change the two remaining SInt64 settings in Target to uint (#105460)
TargetProperties.td had a few settings listed as signed integral values,
but the Target.cpp methods reading those values were reading them as
unsigned. e.g. target.max-memory-read-size, some accesses of
target.max-children-count, still today, previously
target.max-string-summary-length.

After Jonas' change to use templates to read these values in
https://reviews.llvm.org/D149774, when the code tried to fetch these
values, we'd eventually end up calling OptionValue::GetAsUInt64 which
checks that the value is actually a UInt64 before returning it; finding
that it was an SInt64, it would drop the user setting and return the
default value. This manifested as a bug that target.max-memory-read-size
is never used for memory read.

target.max-children-count is less straightforward, where one read of
that setting was fetching it as an int64_t, the other as a uint64_t.

I suspect all of these settings were originally marked as SInt64 so a
user could do -1 for "infinite", getting it static_cast to a UINT64_MAX
value along the way. I can't find any documentation for this behavior,
but it seems like something Greg would have done. We've partially lost
that behavior already via
https://github.com/llvm/llvm-project/pull/72233 for
target.max-string-summary-length, and this further removes it.

We're still fetching UInt64's and returning them as uint32_t's but I'm
not overly pressed about someone setting a count/size limit over 4GB.

I added a simple API test for the memory read setting limit.
2024-08-22 10:10:15 -07:00
Leandro Lupori
93d38d7f08 [lldb][test] Fix simulator test for std::unique_ptr (#99357)
libcxx-simulators/unique_ptr/main.cpp uses __builtin_printf, that
maps to printf on Windows. Include stdio.h to avoid linker errors
on Windows.
See https://lab.llvm.org/buildbot/#/builders/141/builds/853
2024-07-17 14:49:22 -03:00
Michael Buch
27d961dab3 [lldb][DataFormatter][test] Move std::string simulator to common libc++ simulators directory 2024-07-16 05:24:30 +01:00
Michael Buch
56c4ec9202 [lldb][test] Add a layout simulator test for std::unique_ptr (#98330)
This is motivated by the upcoming refactor of libc++'s
`__compressed_pair` in https://github.com/llvm/llvm-project/pull/76756

As this will require changes to numerous LLDB libc++ data-formatters
(see early draft https://github.com/llvm/llvm-project/pull/96538), it
would be nice to have a test-suite that will actually exercise both the
old and new layout. We have a matrix bot that tests old versions of
Clang (but currently those only date back to Clang-15). Having them in
the test-suite will give us quicker signal on what broke.

We have an existing test that exercises various layouts of `std::string`
over time in `TestDataFormatterLibcxxStringSimulator.py`, but that's the
only STL type we have it for. This patch proposes a new
`libcxx-simulators` directory which will take the same approach for all
the STL types that we can feasibly support in this way (as @labath
points out, for some types this might just not be possible due to their
implementation complexity). Nonetheless, it'd be great to have a record
of how the layout of libc++ types changed over time.

Some related discussion:
*
https://github.com/llvm/llvm-project/pull/97568#issuecomment-2213426804
2024-07-16 05:21:01 +01:00
Dave Lee
10f3f06d86 [lldb] Improve summary string handling of dollar chars (#98190)
This improves the handling of `$` (dollar) characters in summary strings in the 
following ways:

1. When a `$` is not followed by an open paren (`{`), it should be treated as a literal 
character and preserved in the output. Previously, the dollar would be consumed by the 
parser and not shown in the output.
2. When a `$` is the last character of a format string, this change eliminates the 
infinite loop lldb would enter into.

rdar://131392446
2024-07-09 13:35:34 -07:00
Michael Buch
9dca3ac2ef [lldb][DataFormatter] Simplify libc++ std::map::iterator formatter (#97713)
Depends on https://github.com/llvm/llvm-project/pull/97687

Similar to https://github.com/llvm/llvm-project/pull/97579, this patch
simplifies the way in which we retrieve the key/value pair of a
`std::map` (in this case of the `std::map::iterator`).

We do this for the same reason: not only was the old logic hard to
follow, and encoded the libc++ layout in non-obvious ways, it was also
fragile to alignment miscalculations
(https://github.com/llvm/llvm-project/pull/97443); this would break once
the new layout of std::map landed as part of
https://github.com/llvm/llvm-project/issues/93069.

Instead, this patch simply casts the `__iter_pointer` to the
`__node_pointer` and uses a straightforward
`GetChildMemberWithName("__value_")` to get to the key/value we care
about.

We can eventually re-use the core-part of the `std::map` and
`std::map::iterator` formatters. But it will be an easier to change to
review once both simplifications landed.
2024-07-08 15:56:05 +01:00
Michael Buch
da827d0896 [lldb][DataFormatter] Simplify std::unordered_map::iterator formatter (#97754)
Depends on https://github.com/llvm/llvm-project/pull/97752

This patch changes the way we retrieve the key/value pair in the
`std::unordered_map::iterator` formatter (similar to how we are changing
it for `std::map::iterator` in
https://github.com/llvm/llvm-project/pull/97713, the motivations being
the same).

The old logic was not very easy to follow, and encoded the libc++ layout
in non-obvious ways. But mainly it was also fragile to alignment
miscalculations (https://github.com/llvm/llvm-project/pull/97443); this
would break once the new layout of `std::unordered_map` landed as part
of https://github.com/llvm/llvm-project/issues/93069.

Instead, this patch simply casts the `__hash_iterator` to a
`__node_pointer` (which is what libc++ does too) and uses a
straightforward `GetChildMemberWithName("__value_")` to get to the
key/value we care about.

The `std::unordered_map` already does it this way, so we align the
iterator counterpart to do the same. We can eventually re-use the
core-part of the `std::unordered_map` and `std::unordered_map::iterator`
formatters. But it will be an easier to change to review once both
simplifications landed.
2024-07-08 14:38:58 +01:00
Pavel Labath
5ce9a86110 [lldb] Make variant formatter work with libstdc++-14 (#97568)
In this version the internal data member has grown an additional
template parameter (bool), which was throwing the summary provider off.

This patch uses the type of the entire variant object. This is part of
the API/ABI, so it should be more stable, but it means we have to
explicitly strip typedefs and references to get to the interesting bits,
which is why I've extended the test case with examples of those.
2024-07-08 12:06:10 +02:00
Dmitry Vasilyev
23b8f59f09 [lldb] Gracefully down TestCoroutineHandle test in case the 'coroutine' feature is missing (#94903)
Do not let the compiler gets failed in case the target platform does not
support the 'coroutine' C++ features. Just compile without it and let
lldb know about missed/unsupported feature.
2024-06-10 13:02:55 +04:00
Pavel Labath
763b96c86d [lldb] Avoid (unlimited) GetNumChildren calls when printing values (#93946)
For some data formatters, even getting the number of children can be an
expensive operations (e.g., needing to walk a linked list to determine
the number of elements). This is then wasted work when we know we will
be printing only small number of them.

This patch replaces the calls to GetNumChildren (at least those on the
"frame var" path) with the calls to the capped version, passing the
value of `max-children-count` setting (plus one)
2024-06-03 10:34:44 +02:00
Dmitry Vasilyev
2217d1706a [lldb][Windows] Fixed LibcxxChronoTimePointSecondsSummaryProvider() (#92701)
This patch fixes #92574. It is a replacement for #92575.
2024-05-20 13:44:52 +04:00
Dave Lee
8530b1c464 [lldb] Support custom LLVM formatting for variables (#91868)
Re-apply https://github.com/llvm/llvm-project/pull/81196, with a fix that handles the 
absence of llvm formatting: 
https://github.com/llvm/llvm-project/pull/91868/commits/3ba650e91eded3543764f37921dcce3b
b47d425f
2024-05-15 14:44:42 -07:00
Dave Lee
0f628fdb1a Revert "[lldb] Support custom LLVM formatting for variables (#81196)"
This reverts commit 7a8d15e919.
2024-04-30 16:15:19 -07:00
Dave Lee
7a8d15e919 [lldb] Support custom LLVM formatting for variables (#81196)
Adds support for applying LLVM formatting to variables.

The reason for this is to support cases such as the following.

Let's say you have two separate bytes that you want to print as a
combined hex value. Consider the following summary string:

```
${var.byte1%x}${var.byte2%x}
```

The output of this will be: `0x120x34`. That is, a `0x` prefix is
unconditionally applied to each byte. This is unlike printf formatting
where you must include the `0x` yourself.

Currently, there's no way to do this with summary strings, instead
you'll need a summary provider in python or c++.

This change introduces formatting support using LLVM's formatter system.
This allows users to achieve the desired custom formatting using:

```
${var.byte1:x-}${var.byte2:x-}
```

Here, each variable is suffixed with `:x-`. This is passed to the LLVM
formatter as `{0:x-}`. For integer values, `x` declares the output as
hex, and `-` declares that no `0x` prefix is to be used. Further, one
could write:

```
${var.byte1:x-2}${var.byte2:x-2}
```

Where the added `2` results in these bytes being written with a minimum
of 2 digits.

An alternative considered was to add a new format specifier that would
print hex values without the `0x` prefix. The reason that approach was
not taken is because in addition to forcing a `0x` prefix, hex values
are also forced to use leading zeros. This approach lets the user have
full control over formatting.
2024-04-30 10:45:10 -07:00
Mark de Wever
a34887550b [LLDB][libc++] Adds valarray proxy data formatters. (#88613)
These proxies are returned by operator[](...). These proxies all
"behave" the same. They store a pointer to the data of the valarray they
are a proxy for and they have an internal array of indices. This
internal array is considered its contents.
2024-04-15 18:46:58 +02:00
Mark de Wever
e481f56528 [lldb][libc++] Adds local_t clock data formatters. (#88178) 2024-04-13 11:50:02 +02:00
Mark de Wever
56d45b09dc [lldb][libc++] Adds slice_array data formatters. (#85544)
Co-authored-by: Michael Buch <michaelbuch12@gmail.com>
2024-03-17 14:56:35 +01:00
Danial Klimkin
ce1fd92817 Update test past bdbad0d07b (#84889) 2024-03-12 11:19:48 +01:00
Jordan Rupprecht
9c2468821e [lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).

For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.
2024-02-21 13:02:30 -06:00
Jonas Devlieghere
80fcecb13c [lldb] Replace assertEquals with assertEqual (NFC) (#82073)
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.
2024-02-16 20:58:50 -08:00
Jonas Devlieghere
096c530ab3 [lldb] Fix Python test formatting (NFC) 2024-02-15 22:54:00 -08:00
Mark de Wever
5e9eaf87b3 [lldb][libc++] Adds valarray data formatters. (#80609)
The code is heavily based on the vector data formatter.
2024-02-10 20:44:14 +01:00
Adrian Prantl
99446df3f5 Bump the minimum LLVM version for chrono datatformatters tests 2024-02-09 08:13:24 -08:00