#
76f34ed2 |
| 27-Oct-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[lldb][CPlusPlus] Introduce CPlusPlusLanguage::MethodName::GetReturnType
This patch adds a way to extract the return type out of the `CPlusPlusNameParser`. This will be useful for cases where we wan
[lldb][CPlusPlus] Introduce CPlusPlusLanguage::MethodName::GetReturnType
This patch adds a way to extract the return type out of the `CPlusPlusNameParser`. This will be useful for cases where we want a function's basename *and* the return type but not the function arguments; this is currently not possible (the parser either gives us the full name or just the basename). Since the parser knows how to handle return types already we should just expose this to users that need it.
**Testing**
* Added unit-tests
Differential Revision: https://reviews.llvm.org/D136935
show more ...
|
Revision tags: llvmorg-15.0.3 |
|
#
d4a55ad3 |
| 13-Oct-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[lldb][Breakpoint] Fix setting breakpoints on templates by basename
This patch fixes a regression with setting breakpoints on template functions by name. E.g.,: ``` $ cat main.cpp template<typename
[lldb][Breakpoint] Fix setting breakpoints on templates by basename
This patch fixes a regression with setting breakpoints on template functions by name. E.g.,: ``` $ cat main.cpp template<typename T> struct Foo { template<typename U> void func() {} };
int main() { Foo<int> f; f.func<double>(); }
(lldb) br se -n func ```
This has regressed since `3339000e0bda696c2e29173d15958c0a4978a143` where we started using the `CPlusPlusNameParser` for getting the basename of the function symbol and match it exactly against the name in the breakpoint command. The parser will include template parameters in the basename, so the exact match will always fail
**Testing**
* Added API tests * Added unit-tests
Differential Revision: https://reviews.llvm.org/D135921
show more ...
|
Revision tags: working, llvmorg-15.0.2 |
|
#
e5fd507f |
| 22-Sep-2022 |
Jorge Gorbe Moya <jgorbe@google.com> |
[NFCI] More TypeCategoryImpl refactoring.
The main aim of this patch is to delete the remaining instances of code reaching into the internals of `TypeCategoryImpl`. I made the following changes:
-
[NFCI] More TypeCategoryImpl refactoring.
The main aim of this patch is to delete the remaining instances of code reaching into the internals of `TypeCategoryImpl`. I made the following changes:
- Add some more methods to `TieredFormatterContainer` and `TypeCategoryImpl` to expose functionality that is implemented in `FormattersContainer`.
- Add new overloads of `TypeCategoryImpl::AddTypeXXX` to make it easier to add formatters to categories without reaching into the internal `FormattersContainer` objects.
- Remove the `GetTypeXXXContainer` and `GetRegexTypeXXXContainer` accessors from `TypeCategoryImpl` and update all call sites to use the new methods instead.
Differential Revision: https://reviews.llvm.org/D135399
show more ...
|
Revision tags: llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
91389000 |
| 21-Aug-2022 |
Adrian Vogelsgesang <avogelsgesang@salesforce.com> |
[LLDB] Add data formatter for std::coroutine_handle
This patch adds a formatter for `std::coroutine_handle`, both for libc++ and libstdc++. For the type-erased `coroutine_handle<>`, it shows the `re
[LLDB] Add data formatter for std::coroutine_handle
This patch adds a formatter for `std::coroutine_handle`, both for libc++ and libstdc++. For the type-erased `coroutine_handle<>`, it shows the `resume` and `destroy` function pointers. For a non-type-erased `coroutine_handle<promise_type>` it also shows the `promise` value.
With this change, executing the `v t` command on the example from https://clang.llvm.org/docs/DebuggingCoroutines.html now outputs
``` (task) t = { handle = coro frame = 0x55555555b2a0 { resume = 0x0000555555555a10 (a.out`coro_task(int, int) at llvm-example.cpp:36) destroy = 0x0000555555556090 (a.out`coro_task(int, int) at llvm-example.cpp:36) } } ```
instead of just
``` (task) t = { handle = { __handle_ = 0x55555555b2a0 } } ```
Note, how the symbols for the `resume` and `destroy` function pointer reveal which coroutine is stored inside the `std::coroutine_handle`. A follow-up commit will use this fact to infer the coroutine's promise type and the representation of its internal coroutine state based on the `resume` and `destroy` pointers.
The same formatter is used for both libc++ and libstdc++. It would also work for MSVC's standard library, however it is not registered for MSVC, given that lldb does not provide pretty printers for other MSVC types, either.
The formatter is in a newly added `Coroutines.{h,cpp}` file because there does not seem to be an already existing place where we could share formatters across libc++ and libstdc++. Also, I expect this code to grow as we improve debugging experience for coroutines further.
**Testing**
* Added API test
Differential Revision: https://reviews.llvm.org/D132415
show more ...
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
67038126 |
| 17-Jul-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[LLDB][DataFormatter] Add support for std::__map_const_iterator
This patch adds support for formatting `std::map::const_iterator`. It's just a matter of adding `const_` to the existing regex.
**Tes
[LLDB][DataFormatter] Add support for std::__map_const_iterator
This patch adds support for formatting `std::map::const_iterator`. It's just a matter of adding `const_` to the existing regex.
**Testing**
* Added test case to existing API tests
Differential Revision: https://reviews.llvm.org/D129962
show more ...
|
#
459cfa5e |
| 20-Jul-2022 |
Slava Gurevich <sgurevich@gmail.com> |
[LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan
Improve LLDB reliability by fixing the following "uninitialized variables" static code inspection warnings from scan.coverity.
[LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan
Improve LLDB reliability by fixing the following "uninitialized variables" static code inspection warnings from scan.coverity.com:
1094796 1095721 1095728 1095737 1095741 1095756 1095779 1095789 1095805 1214552 1229457 1232475 1274006 1274010 1293427 1364800 1364802 1364804 1364812 1364816 1374902 1374909 1384975 1399312 1420451 1431704 1454230 1454554 1454615 1454579 1454594 1454832 1457759 1458696 1461909 1467658 1487814 1487830 1487845
Differential Revision: https://reviews.llvm.org/D130098
show more ...
|
#
5cff5142 |
| 16-Jul-2022 |
Kazu Hirata <kazu@google.com> |
Use value instead of getValue (NFC)
|
#
d1e9d0b2 |
| 08-Jul-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[LLDB][DataFormatter] Add data formatter for libcxx std::unordered_map iterator
This patch adds a formatter for libcxx's `std::unordered_map` iterators. The implementation follows a similar appraoch
[LLDB][DataFormatter] Add data formatter for libcxx std::unordered_map iterator
This patch adds a formatter for libcxx's `std::unordered_map` iterators. The implementation follows a similar appraoch to the `std::map` iterator formatter. I was hesistant about coupling the two into a common implementation since the libcxx layouts might change for one of the the containers but not the other.
All `std::unordered_map` iterators are covered with this patch: 1. const/non-const key/value iterators 2. const/non-const bucket iterators
Note that, we currently don't have a formatter for `std::unordered_map`. This patch doesn't change that, we merely add support for its iterators, because that's what Xcode users requested. One can still see contents of `std::unordered_map`, whereas with iterators it's less ergonomic.
**Testing**
* Added API test
Differential Revision: https://reviews.llvm.org/D129364
show more ...
|
#
3b7c3a65 |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
|
#
aa8feeef |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Don't use Optional::hasValue (NFC)
|
Revision tags: llvmorg-14.0.6 |
|
#
ea9ff9fa |
| 13-Jun-2022 |
Adrian Prantl <aprantl@apple.com> |
[LLDB][formatters] Add formatter for libc++'s std::span
This patch adds a libcxx formatter for std::span. The implementation is based on the libcxx formatter for std::vector. The main difference is
[LLDB][formatters] Add formatter for libc++'s std::span
This patch adds a libcxx formatter for std::span. The implementation is based on the libcxx formatter for std::vector. The main difference is the fact that std::span conditionally has a __size member based on whether it has a static or dynamic extent.
Example output of formatted span:
(std::span<const int, 18446744073709551615>) $0 = size=6 { [0] = 0 [1] = 1 [2] = 2 [3] = 3 [4] = 4 [5] = 5 } The second template parameter here is actually std::dynamic_extent, but the type declaration we get back from the TypeSystemClang is the actual value (which in this case is (size_t)-1). This is consistent with diagnostics from clang, which doesn't desugar this value either. E.g.,:
span.cpp:30:31: error: implicit instantiation of undefined template 'Undefined<std::span<int, 18446744073709551615>>' Testing:
Added API-tests
Confirmed manually using LLDB cli that printing spans works in various scenarios
Patch by Michael Buch!
Differential Revision: https://reviews.llvm.org/D127481
show more ...
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
3339000e |
| 12-May-2022 |
Jim Ingham <jingham@apple.com> |
We don't require users to type out the full context of a function, for symbol name matches. Instead, we extract the incoming path's base name, look up all the symbols with that base name, and then co
We don't require users to type out the full context of a function, for symbol name matches. Instead, we extract the incoming path's base name, look up all the symbols with that base name, and then compare the rest of the context that the user provided to make sure it matches. However, we do this comparison using just a strstr. So for instance:
break set -n foo::bar
will match not only "a::foo::bar" but "notherfoo::bar". The former is pretty clearly the user's intent, but I don't think the latter is, and results in breakpoints picking up too many matches.
This change adds a Language::DemangledNameContainsPath API which can do a language aware match against the path provided. If the language doesn't provide this we fall back to the strstr (though that's changed to StringRef::contains in the patch).
Differential Revision: https://reviews.llvm.org/D124579
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
c34698a8 |
| 03-Feb-2022 |
Pavel Labath <pavel@labath.sk> |
[lldb] Rename Logging.h to LLDBLog.h and clean up includes
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging inf
[lldb] Rename Logging.h to LLDBLog.h and clean up includes
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging infrastructure). This worked because Log.h included Logging.h, even though it should.
After the recent refactor, it became impossible the two files include each other in this direction (the opposite inclusion is needed), so this patch removes the workaround that was put in place and cleans up all files to include the right thing. It also renames the file to LLDBLog to better reflect its purpose.
show more ...
|
Revision tags: llvmorg-15-init |
|
#
a007a6d8 |
| 31-Jan-2022 |
Pavel Labath <pavel@labath.sk> |
[lldb] Convert "LLDB" log channel to the new API
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
7244e9c2 |
| 07-Jan-2022 |
Ben Jackson <puremourning@gmail.com> |
[LLDB] libcxx summary formatters for std::string_view
When printing a std::string_view, print the referenced string as the summary. Support string_view, u32string_view, u16string_view and wstring_vi
[LLDB] libcxx summary formatters for std::string_view
When printing a std::string_view, print the referenced string as the summary. Support string_view, u32string_view, u16string_view and wstring_view, as we do for std::string and friends.
This is based on the existing fomratter for std::string, and just extracts the data and length members, pushing them through the existing string formatter.
In testing this, a "FIXME" was corrected for printing of non-ASCII empty values. Previously, the "u", 'U" etc. prefixes were not printed for basic_string<> types that were not char. This is trivial to resolve by printing the prefix before the "".
Differential revision: https://reviews.llvm.org/D112222
show more ...
|
#
cfb07508 |
| 09-Dec-2021 |
Alisamar Husain <zrthxn@gmail.com> |
Unify libstdcpp and libcxx formatters for `std::optional`
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D115178
|
#
6622c141 |
| 06-Dec-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] Add a pointer and reference tests for a list and forward_list formatters for libstdcpp and libcxx
This adds extra tests for libstdcpp and libcxx list and forward_list formatters to chec
[formatters] Add a pointer and reference tests for a list and forward_list formatters for libstdcpp and libcxx
This adds extra tests for libstdcpp and libcxx list and forward_list formatters to check whether formatter behaves correctly when applied on pointer and reference values.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D115137
show more ...
|
#
2ea3c8a5 |
| 03-Dec-2021 |
Walter Erquinigo <wallace@fb.com> |
[formatters] Add a deque formatter for libstdcpp and fix the libcxx one
This adds the formatters for libstdcpp's deque as a python implementation. It adds comprehensive tests for the two different s
[formatters] Add a deque formatter for libstdcpp and fix the libcxx one
This adds the formatters for libstdcpp's deque as a python implementation. It adds comprehensive tests for the two different storage strategies deque uses. Besides that, this fixes a couple of bugs in the libcxx implementation. Finally, both implementation run against the same tests.
This is a minor improvement on top of Danil Stefaniuc's formatter.
show more ...
|
Revision tags: llvmorg-13.0.1-rc1 |
|
#
9a9d9a9b |
| 23-Nov-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] List and forward_list capping_size determination and application
This diff is adding the capping_size determination for the list and forward list, to limit the number of children to be
[formatters] List and forward_list capping_size determination and application
This diff is adding the capping_size determination for the list and forward list, to limit the number of children to be displayed. Also it modifies and unifies tests for libcxx and libstdcpp list data formatter.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D114433
show more ...
|
#
e3dea5cf |
| 22-Nov-2021 |
Walter Erquinigo <wallace@fb.com> |
[formatters] Add a formatter for libstdc++ optional
Besides adding the formatter and the summary, this makes the libcxx tests also work for this case.
This is the polished version of https://review
[formatters] Add a formatter for libstdc++ optional
Besides adding the formatter and the summary, this makes the libcxx tests also work for this case.
This is the polished version of https://reviews.llvm.org/D114266, authored by Danil Stefaniuc.
Differential Revision: https://reviews.llvm.org/D114403
show more ...
|
#
fcd288b5 |
| 22-Nov-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] Add a libstdcpp formatter for for unordered_map, unordered_set, unordered_multimap, unordered_multiset
This diff adds a data formatter and tests for libstdcpp's unordered_map, unordere
[formatters] Add a libstdcpp formatter for for unordered_map, unordered_set, unordered_multimap, unordered_multiset
This diff adds a data formatter and tests for libstdcpp's unordered_map, unordered_set, unordered_multimap, unordered_multiset
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D113760
show more ...
|
#
577c1eec |
| 10-Nov-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] Add a libstdcpp formatter for forward_list and refactor list formatter
This diff adds a data formatter for libstdcpp's forward_list. Besides, it refactors the existing code by extractin
[formatters] Add a libstdcpp formatter for forward_list and refactor list formatter
This diff adds a data formatter for libstdcpp's forward_list. Besides, it refactors the existing code by extracting the common functionality between libstdcpp forward_list and list formatters into the AbstractListSynthProvider class.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D113362
show more ...
|
#
82ed1065 |
| 30-Oct-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] Add a libstdcpp formatter for multiset and unify tests across stdlibs
This diff adds a data formatter for libstdcpp's multiset. Besides, it improves and unifies the tests for multiset f
[formatters] Add a libstdcpp formatter for multiset and unify tests across stdlibs
This diff adds a data formatter for libstdcpp's multiset. Besides, it improves and unifies the tests for multiset for libcxx and libstdcpp for maintainability.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D112785
show more ...
|
#
f869e0be |
| 30-Oct-2021 |
Danil Stefaniuc <danilashtefan@gmail.com> |
[formatters] Add a libstdcpp formatter for multimap and unify modify tests across stdlibs
This diff adds a data formatter for libstdcpp's multimap. Besides, it improves and unifies the tests for mul
[formatters] Add a libstdcpp formatter for multimap and unify modify tests across stdlibs
This diff adds a data formatter for libstdcpp's multimap. Besides, it improves and unifies the tests for multimap for libcxx and libstdcpp for maintainability.
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D112752
show more ...
|
#
ac73f567 |
| 29-Oct-2021 |
Luís Ferreira <contact@lsferreira.net> |
[lldb] Remove forgotten FIXME on CPlusPlus formatters
The patch [1] introduced this FIXME but ended up not being removed when fixed.
[1]: https://github.com/llvm/llvm-project/commit/f68df12fb039d51
[lldb] Remove forgotten FIXME on CPlusPlus formatters
The patch [1] introduced this FIXME but ended up not being removed when fixed.
[1]: https://github.com/llvm/llvm-project/commit/f68df12fb039d5177e34f4541fa242b891949db6
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D112586
show more ...
|