# XFAIL: target-windows # Test the ${function.return-left} and ${function.return-right} # frame-format variables. # RUN: split-file %s %t # RUN: %clangxx_host -g -gdwarf %t/main.cpp -o %t.out # RUN: %lldb -x -b -s %t/commands.input %t.out -o exit 2>&1 \ # RUN: | FileCheck %s # # RUN: %clangxx_host -O0 %t/main.cpp -o %t-nodebug.out # RUN: %lldb -x -b -s %t/commands.input %t-nodebug.out -o exit 2>&1 \ # RUN: | FileCheck %s #--- main.cpp namespace ns::ns2 { template struct Foo {}; template Foo qux(int) { return {}; } template Foo (*bar(Foo))(int) { qux(5); return qux; } struct Bar { template Foo (* (*foo(int) const &&)(Foo))(int) { bar(Foo{}); return bar; } }; } int main(int argc, char const *argv[]) { ns::ns2::Bar{}.foo(5); return 0; } #--- commands.input settings set -f frame-format "custom-frame '${function.return-left}'\n" break set -n qux run bt # CHECK: custom-frame 'ns::ns2::Foo ' # CHECK: custom-frame 'ns::ns2::Foo (*' # CHECK: custom-frame 'ns::ns2::Foo (* (*' settings set -f frame-format "other-frame '${function.return-right}'\n" bt # CHECK: other-frame '' # CHECK: other-frame ')(int)' # CHECK: other-frame ')(ns::ns2::Foo))(int)'