[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)
Petr Hosek via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 25 21:38:42 PDT 2024
petrhosek wrote:
I attempted a fix forward in https://github.com/llvm/llvm-project/commit/68a1593a59c3d50aff43ef4f82ded224fc6a25db but the test is still failing, although with a slightly different error now:
```
======================================================================
FAIL: test_backtrace (TestStdFunctionRecognizer.LibCxxStdFunctionRecognizerTestCase.test_backtrace)
Test that std::function implementation details are hidden in bt
----------------------------------------------------------------------
Traceback (most recent call last):
File "/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/std-function-recognizer/TestStdFunctionRecognizer.py", line 23, in test_backtrace
self.expect(
File "/b/s/w/ir/x/w/llvm-llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2464, in expect
self.fail(log_msg)
AssertionError: Ran command:
"thread backtrace"
Got output:
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
* frame #0: 0x000056243befb40a a.out`foo(x=1, y=1) at main.cpp:4:10
frame #1: 0x000056243befb819 a.out`decltype(std::declval<int (*&)(int, int)>()(std::declval<int>(), std::declval<int>())) std::__2::__invoke[abi:ne200000]<int (*&)(int, int), int, int>(__f=0x00007fff84d3db50, __args=0x00007fff84d3dac4, __args=0x00007fff84d3dac0) at invoke.h:149:25
frame #2: 0x000056243befb7e5 a.out`int std::__2::__invoke_void_return_wrapper<int, false>::__call[abi:ne200000]<int (*&)(int, int), int, int>(__args=0x00007fff84d3db50, __args=0x00007fff84d3dac4, __args=0x00007fff84d3dac0) at invoke.h:216:12
frame #4: 0x000056243befb75b a.out`int std::__2::__function::__policy_invoker<int (int, int)>::__call_impl[abi:ne200000]<std::__2::__function::__default_alloc_func<int (*)(int, int), int (int, int)>>(__buf=0x00007fff84d3db50, __args=1, __args=1) at function.h:610:12
frame #6: 0x000056243befb4f3 a.out`std::__2::function<int (int, int)>::operator()(this=0x00007fff84d3db50, __arg=1, __arg=1) const at function.h:989:10
frame #7: 0x000056243befb45b a.out`main(argc=1, argv=0x00007fff84d3dc78) at main.cpp:9:10
frame #8: 0x00007fc200d2ed0a libc.so.6`__libc_start_main + 234
frame #9: 0x000056243befb36a a.out`_start + 42
Not expecting regex pattern: "frame.*std::__.*::__function" (was found, matched "frame #4: 0x000056243befb75b a.out`int std::__2::__function::__policy_invoker<int (int, int)>::__call_impl[abi:ne200000]<std::__2::__function")
Config=x86_64-/b/s/w/ir/x/w/llvm_build/bin/clang
----------------------------------------------------------------------
```
https://github.com/llvm/llvm-project/pull/104523
More information about the lldb-commits
mailing list