History log of /llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (Results 1 – 25 of 154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3
# b852fb1e 25-Oct-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Move ValueObject into its own library (NFC) (#113393)

ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-

[lldb] Move ValueObject into its own library (NFC) (#113393)

ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-time) circular
dependency between lldbCore and lldbValueObject, which is unfortunate
but probably unavoidable because so many things in LLDB rely on
ValueObject. We already have cycles and these libraries are never built
as dylibs so while this doesn't improve the situation, it also doesn't
make things worse.

The header includes were updated with the following command:

```
find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;
```

show more ...


Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 2a1ea151 01-Jun-2024 Kazu Hirata <kazu@google.com>

Use StringRef::starts_with (NFC) (#94112)


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# a3488755 15-Apr-2024 Mark de Wever <koraq@xs4all.nl>

[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 the

[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.

show more ...


# e481f565 13-Apr-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds local_t clock data formatters. (#88178)


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2
# 56d45b09 17-Mar-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds slice_array data formatters. (#85544)

Co-authored-by: Michael Buch <michaelbuch12@gmail.com>


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 5e9eaf87 10-Feb-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds valarray data formatters. (#80609)

The code is heavily based on the vector data formatter.


Revision tags: llvmorg-18.1.0-rc2
# 0c02ea05 05-Feb-2024 Dave Lee <davelee.com@gmail.com>

[lldb] Cleanup regex in libcxx formatters (NFC) (#80618)

I noticed a number of regex for libcxx formatters use an unnecessary regex grouping.
This change removes those parentheses.


Revision tags: llvmorg-18.1.0-rc1
# 074630e8 26-Jan-2024 Dave Lee <davelee.com@gmail.com>

[lldb] Remove unnecessary suffix from libc++ type name patterns (NFC) (#79644)

The `(( )?&)?` appears to match types which are references. However lldb
can load the
correct data formatters without

[lldb] Remove unnecessary suffix from libc++ type name patterns (NFC) (#79644)

The `(( )?&)?` appears to match types which are references. However lldb
can load the
correct data formatters without having to pattern match against a `&`
suffix.

The suffix may have been needed at one point, but it's no longer needed.

show more ...


Revision tags: llvmorg-19-init
# bfd12f39 22-Jan-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds system_clock data formatters. (#78609)


# f4ede08c 18-Jan-2024 Zequan Wu <zequanwu@google.com>

[lldb][Format] Fix missing inlined function names in frame formatting. (#78494)

This fixes missing inlined function names when formatting frame and the
`Block` in `SymbolContext` is a lexical block

[lldb][Format] Fix missing inlined function names in frame formatting. (#78494)

This fixes missing inlined function names when formatting frame and the
`Block` in `SymbolContext` is a lexical block (e.g.
`DW_TAG_lexical_block` in Dwarf).

show more ...


# e3fde348 13-Jan-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds missing C++20 calendar data formatters. (#77954)

This is a followup of #76983 and adds the libc++ data formatters for
- weekday,
- weekday_indexed,
- weekday_last,
- month_we

[lldb][libc++] Adds missing C++20 calendar data formatters. (#77954)

This is a followup of #76983 and adds the libc++ data formatters for
- weekday,
- weekday_indexed,
- weekday_last,
- month_weekday,
- month_weekday_last,
- year_month,
- year_month_day_last
- year_month_weekday, and
- year_month_weekday_last.

show more ...


# b5f2db94 09-Jan-2024 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds some C++20 calendar data formatters. (#76983)

This adds a subset of the C++20 calendar data formatters:
- day,
- month,
- year,
- month_day,
- month_day_last, and
- year_mo

[lldb][libc++] Adds some C++20 calendar data formatters. (#76983)

This adds a subset of the C++20 calendar data formatters:
- day,
- month,
- year,
- month_day,
- month_day_last, and
- year_month_day.

A followup patch will add the missing calendar data formatters:
- weekday,
- weekday_indexed,
- weekday_last,
- month_weekday,
- month_weekday_last,
- year_month,
- year_month_day_last
- year_month_weekday, and
- year_month_weekday_last.

show more ...


# 744f3891 16-Dec-2023 Kazu Hirata <kazu@google.com>

[lldb] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,end

[lldb] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# 7fbd427f 31-Oct-2023 Greg Clayton <gclayton@fb.com>

Add the ability to get a C++ vtable ValueObject from another ValueObj… (#67599)

Add the ability to get a C++ vtable ValueObject from another
ValueObject.

This patch adds the ability to ask a Val

Add the ability to get a C++ vtable ValueObject from another ValueObj… (#67599)

Add the ability to get a C++ vtable ValueObject from another
ValueObject.

This patch adds the ability to ask a ValueObject for a ValueObject that
represents the virtual function table for a C++ class. If the
ValueObject is not a C++ class with a vtable, a valid ValueObject value
will be returned that contains an appropriate error. If it is successful
a valid ValueObject that represents vtable will be returned. The
ValueObject that is returned will have a name that matches the demangled
value for a C++ vtable mangled name like "vtable for <class-name>". It
will have N children, one for each virtual function pointer. Each
child's value is the function pointer itself, the summary is the
symbolication of this function pointer, and the type will be a valid
function pointer from the debug info if there is debug information
corresponding to the virtual function pointer.

The vtable SBValue will have the following:
- SBValue::GetName() returns "vtable for <class>"
- SBValue::GetValue() returns a string representation of the vtable
address
- SBValue::GetSummary() returns NULL
- SBValue::GetType() returns a type appropriate for a uintptr_t type for
the current process
- SBValue::GetLoadAddress() returns the address of the vtable adderess
- SBValue::GetValueAsUnsigned(...) returns the vtable address
- SBValue::GetNumChildren() returns the number of virtual function
pointers in the vtable
- SBValue::GetChildAtIndex(...) returns a SBValue that represents a
virtual function pointer

The child SBValue objects that represent a virtual function pointer has
the following values:
- SBValue::GetName() returns "[%u]" where %u is the vtable function
pointer index
- SBValue::GetValue() returns a string representation of the virtual
function pointer
- SBValue::GetSummary() returns a symbolicated respresentation of the
virtual function pointer
- SBValue::GetType() returns the function prototype type if there is
debug info, or a generic funtion prototype if there is no debug info
- SBValue::GetLoadAddress() returns the address of the virtual function
pointer
- SBValue::GetValueAsUnsigned(...) returns the virtual function pointer
- SBValue::GetNumChildren() returns 0
- SBValue::GetChildAtIndex(...) returns invalid SBValue for any index

Examples of using this API via python:

```
(lldb) script vtable = lldb.frame.FindVariable("shape_ptr").GetVTable()
(lldb) script vtable
vtable for Shape = 0x0000000100004088 {
[0] = 0x0000000100003d20 a.out`Shape::~Shape() at main.cpp:3
[1] = 0x0000000100003e4c a.out`Shape::~Shape() at main.cpp:3
[2] = 0x0000000100003e7c a.out`Shape::area() at main.cpp:4
[3] = 0x0000000100003e3c a.out`Shape::optional() at main.cpp:7
}
(lldb) script c = vtable.GetChildAtIndex(0)
(lldb) script c
(void ()) [0] = 0x0000000100003d20 a.out`Shape::~Shape() at main.cpp:3
```

show more ...


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 0e4264ab 29-Aug-2023 Mark de Wever <koraq@xs4all.nl>

[lldb][libc++] Adds chrono data formatters.

This adds the data formatters for chrono duration typedefs.

Reviewed By: Michael137

Differential Revision: https://reviews.llvm.org/D159127


# 1ec4330f 03-Oct-2023 jeffreytan81 <jeffreytan@meta.com>

Implement data formatters for LibStdC++ std::variant (#68012)

This patch implements the data formatters for LibStdC++ `std::variant`.

---------

Co-authored-by: jeffreytan81 <jeffreytan@fb.com>


# 56b148aa 20-Sep-2023 Dave Lee <davelee.com@gmail.com>

[lldb] Fix stdcpp type summary mistakenly marked as regex (NFC) (#66949)

`std::basic_string<char>` is not a regex, and treating it as such could
unintentionally
cause a formatter to substring match

[lldb] Fix stdcpp type summary mistakenly marked as regex (NFC) (#66949)

`std::basic_string<char>` is not a regex, and treating it as such could
unintentionally
cause a formatter to substring match a template type parameter, for
example:
`std::vector<std::basic_string<char>>`.

Differential Revision: https://reviews.llvm.org/D158663

show more ...


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6
# 65ceb42d 05-Jun-2023 Fangrui Song <i@maskray.me>

Replace deprecated startswith_insensitive with starts_with_insensitive


Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 0e22b8cb 11-Apr-2023 Alex Langford <alangford@apple.com>

[lldb] Change formatter helper function parameter list to remove ConstString

All of these functions take a ConstString for the type_name,
but this isn't really needed for two reasons:
1.) This param

[lldb] Change formatter helper function parameter list to remove ConstString

All of these functions take a ConstString for the type_name,
but this isn't really needed for two reasons:
1.) This parameter is always constructed from a static c-string
constant.
2.) They are passed along to to `AddTypeSummary` as a StringRef anyway.

Differential Revision: https://reviews.llvm.org/D148050

show more ...


Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 8200848c 07-Mar-2023 Michael Buch <michaelbuch12@gmail.com>

Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvide

Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvider`.

This turns,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```
into
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3)
```

Differential Revision: https://reviews.llvm.org/D145242

show more ...


# 6e3f2ded 07-Mar-2023 Michael Buch <michaelbuch12@gmail.com>

Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

Reverted because Windows buildbot started failing

This reverts commit 6bd46e713c6d8deda7bdae8

Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers"

Reverted because Windows buildbot started failing

This reverts commit 6bd46e713c6d8deda7bdae8b1efadb99c88b4443.

show more ...


# 6bd46e71 03-Mar-2023 Michael Buch <michaelbuch12@gmail.com>

[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers

With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvider`.

This

[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers

With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvider`.

This turns,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```
into
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3)
```

Differential Revision: https://reviews.llvm.org/D145242

show more ...


Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 9464bd8c 17-Dec-2022 Fangrui Song <i@maskray.me>

[lldb] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in some older Xcode. The call sites block std::optional migr

[lldb] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in some older Xcode. The call sites block std::optional migration.

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4
# 77b22052 25-Oct-2022 Michael Buch <michaelbuch12@gmail.com>

[lldb][DataFormatter] Add std::ranges::ref_view formatter

This patch adds a formatter for `std::ranges::ref_view<T>`.
It simply holds a `T*`, so all this formatter does is dereference
this pointer a

[lldb][DataFormatter] Add std::ranges::ref_view formatter

This patch adds a formatter for `std::ranges::ref_view<T>`.
It simply holds a `T*`, so all this formatter does is dereference
this pointer and format it as `T` would be.

**Testing**

* Added API tests

Differential Revision: https://reviews.llvm.org/D138558

show more ...


# 031096d0 27-Oct-2022 Michael Buch <michaelbuch12@gmail.com>

[lldb][CPlusPlus] Implement CPlusPlusLanguage::GetFunctionDisplayName

This patch implements the `GetFunctionDisplayName` API which gets
used by the frame-formatting code to decide how to print a
fun

[lldb][CPlusPlus] Implement CPlusPlusLanguage::GetFunctionDisplayName

This patch implements the `GetFunctionDisplayName` API which gets
used by the frame-formatting code to decide how to print a
function name.

Currently this API trivially returns `false`, so we try to parse
the demangled function base-name by hand. We try find the closing
parenthesis by doing a forward scan through the demangled name. However,
for arguments that contain parenthesis (e.g., function pointers)
this would leave garbage in the frame function name.

By re-using the `CPlusPlusLanguage` parser for this we offload the
need to parse function names to a component that knows how to do this
already.

We leave the existing parsing code in `FormatEntity` since it's used
in cases where a language-plugin is not available (and is not
necessarily C++ specific).

**Example**

For following function:
```
int foo(std::function<int(void)> const& func) { return 1; }
```

Before patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() )> const&) at sample.cpp:11:49
```

After patch:
```
frame #0: 0x000000010000151c a.out`foo(func= Function = bar() ) at sample.cpp:11:49
```

**Testing**

* Added shell test

show more ...


1234567