60 lines · plain
1# Not run on Windows because we are not able to break on all the required functions.2# Even if we could, function.name* formatting also does not work correctly:3# https://github.com/llvm/llvm-project/issues/1431494# UNSUPPORTED: system-windows5 6# Test different name formats.7 8# RUN: %build %S/Inputs/names.cpp --std c++17 -o %t.out9# RUN: split-file %s %t10 11#--- name_with_args.input12# RUN: %lldb -b -s %t/name_with_args.input %t.out | FileCheck %s --check-prefix=NAME_WITH_ARGS13settings set -f frame-format "frame ${function.name-with-args}\n"14break set -n foo15break set -n operator<<16break set -n returns_func_ptr17break set -n inlined_foo18run19# NAME_WITH_ARGS: frame int ns::foo<int ()>(t={{.*}})20c21# NAME_WITH_ARGS: frame int ns::foo<int ()>(str="bar")22c23# NAME_WITH_ARGS: frame int ns::foo<(anonymous namespace)::$_0>(t=(anonymous namespace)::(unnamed class) @ {{.*}})24c25# NAME_WITH_ARGS: frame int ns::foo<int (*)()>(t=({{.*}}`(anonymous namespace)::anon_bar() at {{.*}}))26c27# NAME_WITH_ARGS: frame int ns::foo<void (Foo::*)(int (*)(int)) const noexcept>(str="method")28c29# NAME_WITH_ARGS: frame detail::Quux<double> (* (*ns::returns_func_ptr<int>((null)={{.*}}))(int))(float)30c31# NAME_WITH_ARGS: frame void Foo::foo<int (*)()>(this={{.*}}, arg=({{.*}}`(anonymous namespace)::anon_bar() at {{.*}}))32c33# NAME_WITH_ARGS: frame void Foo::operator<<<1>(this={{.*}}, (null)=0)34c35# NAME_WITH_ARGS: frame detail::Quux<double> (* (*Foo::returns_func_ptr<int>(this={{.*}}, (null)={{.*}}))(int))(float) const36c37# NAME_WITH_ARGS: frame inlined_foo(str="bar")38q39 40#--- name.input41# RUN: %lldb -b -s %t/name.input %t.out | FileCheck %s --check-prefix=NAME42settings set -f frame-format "frame ${function.name}\n"43break set -n inlined_foo44run45# NAME: frame inlined_foo(char const*)46 47#--- name_without_args.input48# RUN: %lldb -b -s %t/name_without_args.input %t.out | FileCheck %s --check-prefix=NAME_WITHOUT_ARGS49settings set -f frame-format "frame ${function.name-without-args}\n"50break set -n inlined_foo51run52# NAME_WITHOUT_ARGS: frame inlined_foo53 54#--- mangled_name.input55# RUN: %lldb -b -s %t/mangled_name.input %t.out | FileCheck %s --check-prefix=MANGLED_NAME56settings set -f frame-format "frame ${function.mangled-name}\n"57break set -n inlined_foo58run59# MANGLED_NAME: frame _Z11inlined_fooPKc60