[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

Adrian Vogelsgesang via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 25 15:32:06 PDT 2024


================
@@ -53,10 +54,32 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer {
 
 public:
   LibCXXFrameRecognizer()
-      : m_hidden_function_regex(
-            R"(^std::__1::(__function.*::operator\(\)|__invoke))"
-            R"((\[.*\])?)"    // ABI tag.
-            R"(( const)?$)"), // const.
+      : m_hidden_regex{
+            // internal implementation details of std::function
+            //    std::__1::__function::__alloc_func<void (*)(), std::__1::allocator<void (*)()>, void ()>::operator()[abi:ne200000]
+            //    std::__1::__function::__func<void (*)(), std::__1::allocator<void (*)()>, void ()>::operator()
+            //    std::__1::__function::__value_func<void ()>::operator()[abi:ne200000]() const
+            RegularExpression{""
+              R"(^std::__[0-9]*::)" // Namespace.
+              R"(__function::.*::operator\(\))"
+              R"((\[.*\])?)"    // ABI tag.
+              R"(( const)?$)"}, // const.
+            // internal implementation details of std::invoke
+            //   std::__1::__invoke[abi:ne200000]<void (*&)()>
+            RegularExpression{
+              R"(^std::__[0-9]*::)" // Namespace.
+              R"(__invoke)"
----------------
vogelsgesang wrote:

I would like to defer switching to `^std::__[0-9]*::__.*` in a follow-up commit, if that's fine by you.

I am pretty sure that this commit here works without unintended side effects, but I am not sure if `^std::__[0-9]*::__.*` would regress debugability in unforeseen ways

https://github.com/llvm/llvm-project/pull/105695


More information about the lldb-commits mailing list