[all-commits] [llvm/llvm-project] dd060b: [lldb] Add frame recognizers for libc++ `std::invo...

Adrian Vogelsgesang via All-commits all-commits at lists.llvm.org
Tue Aug 27 10:16:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd060bdede8edec18ad5ca122e15cc24a821e3fe
      https://github.com/llvm/llvm-project/commit/dd060bdede8edec18ad5ca122e15cc24a821e3fe
  Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
  Date:   2024-08-27 (Tue, 27 Aug 2024)

  Changed paths:
    M lldb/include/lldb/Target/StackFrameRecognizer.h
    M lldb/source/Commands/CommandObjectFrame.cpp
    M lldb/source/Commands/Options.td
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    M lldb/source/Plugins/SystemRuntime/MacOSX/AbortWithPayloadFrameRecognizer.cpp
    M lldb/source/Target/AssertFrameRecognizer.cpp
    M lldb/source/Target/StackFrameRecognizer.cpp
    M lldb/source/Target/VerboseTrapFrameRecognizer.cpp
    M lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py
    M lldb/test/API/functionalities/completion/TestCompletion.py
    M lldb/test/API/lang/cpp/std-function-recognizer/TestStdFunctionRecognizer.py
    A lldb/test/API/lang/cpp/std-invoke-recognizer/Makefile
    A lldb/test/API/lang/cpp/std-invoke-recognizer/TestStdInvokeRecognizer.py
    A lldb/test/API/lang/cpp/std-invoke-recognizer/main.cpp
    M lldb/unittests/Target/StackFrameRecognizerTest.cpp

  Log Message:
  -----------
  [lldb] Add frame recognizers for libc++ `std::invoke` (#105695)

With this commit, we also hide the implementation details of
`std::invoke`. To do so, the `LibCXXFrameRecognizer` got a couple more
regular expressions.

The regular expression passed into `AddRecognizer` became problematic,
as it was evaluated on the demangled name. Those names also included
result types for C++ symbols. For `std::__invoke` the return type is a
huge `decltype(...)`, making the regular expresison really hard to
write.

Instead, I added support to `AddRecognizer` for matching on the
demangled names without result type and argument types.

By hiding the implementation details of `invoke`, also the back traces
for `std::function` become even nicer, because `std::function` is using
`__invoke` internally.

Co-authored-by: Adrian Prantl <aprantl at apple.com>



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