54 lines · plain
1# XFAIL: target-windows2 3# Test the ${function.formatted-arguments} frame-format variable.4 5# RUN: split-file %s %t6# RUN: %clangxx_host -g -gdwarf %t/main.cpp -o %t.out7# RUN: %lldb -x -b -s %t/commands.input %t.out -o exit 2>&1 \8# RUN: | FileCheck %s9#10# RUN: %clangxx_host -O0 %t/main.cpp -o %t-nodebug.out11# RUN: %lldb -x -b -s %t/commands.input %t-nodebug.out -o exit 2>&1 \12# RUN: | FileCheck %s --check-prefix=CHECK-NODEBUG13 14#--- main.cpp15struct Foo {16 void func() {}17};18 19void bar() {20 Foo{}.func();21}22 23void foo(int, int x) {24 bar();25}26 27void myFunc(char const * str,28 void (*fptr)(int, int)) {29 fptr(5, 10);30}31 32int main(int argc, char const *argv[]) {33 myFunc("hello", &foo);34 return 0;35}36 37#--- commands.input38settings set -f frame-format "custom-frame '${function.formatted-arguments}'\n"39break set -n func40 41run42bt43 44# CHECK: custom-frame '(this={{.*}})'45# CHECK: custom-frame '()'46# CHECK: custom-frame '({{.*}}=5, x=10)'47# CHECK: custom-frame '(str="hello", fptr=({{.*}}.out`{{.*}}foo(int,{{.*}}int) at main.cpp:{{[0-9]+}}))'48# CHECK: custom-frame '(argc=1, argv={{.*}})'49 50# CHECK-NODEBUG: custom-frame '()'51# CHECK-NODEBUG: custom-frame '()'52# CHECK-NODEBUG: custom-frame '(int, int)'53# CHECK-NODEBUG: custom-frame '(char const*, void (*)(int, int))'54