[all-commits] [llvm/llvm-project] ef7adb: Reland "[lldb][TypeSystemClang] Format pointers to...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Mar 7 11:46:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef7adbe2b7bcdb1fca88f77a7d4da2a8dea63699
      https://github.com/llvm/llvm-project/commit/ef7adbe2b7bcdb1fca88f77a7d4da2a8dea63699
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    M lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp

  Log Message:
  -----------
  Reland "[lldb][TypeSystemClang] Format pointers to member functions as eFormatHex"

Before this patch, LLDB used to format pointers to members, such as,
```
void (Foo::*pointer_to_member_func)() = &Foo::member_func;
```
as `eFormatBytes`. E.g.,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00
```

This patch makes sure we format pointers to member functions the same
way we do regular function pointers.

After this patch we format member pointers as:
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```

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


  Commit: 8200848c4125f2307abe38801ce9ca1288ea3081
      https://github.com/llvm/llvm-project/commit/8200848c4125f2307abe38801ce9ca1288ea3081
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Symbol/CompilerType.h
    M lldb/include/lldb/Symbol/TypeSystem.h
    M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/source/Symbol/CompilerType.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py

  Log Message:
  -----------
  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


Compare: https://github.com/llvm/llvm-project/compare/ca8faf8f4659...8200848c4125


More information about the All-commits mailing list