brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 900e10b Raw
40 lines · cpp
1// Purpose:2//    \DexStepFunction smoke test. Only steps in a and c should be logged.3//4// This command is only implemented for debuggers with DAP support.5// UNSUPPORTED: system-windows6//7// RUN: %dexter_regression_test_cxx_build %s -o %t8// RUN: %dexter_regression_test_run -v --binary %t -- %s 2>&1 | FileCheck %s9 10int g = 0;11int c(int) {12  ++g;13  return 0;14}15 16int b(int) {17  ++g;18  return c(g);19}20 21int a(int) {22  ++g;23  return b(g);24}25 26int main() {27  return a(g);28}29 30// DexStepFunction('a')31// DexStepFunction('c')32 33// CHECK:      ## BEGIN ##34// CHECK-NEXT:.   [0, "a(int)", "{{.*}}dex_step_function.cpp", 22, 3, "StopReason.BREAKPOINT", "StepKind.FUNC", []]35// CHECK-NEXT:.   [1, "a(int)", "{{.*}}dex_step_function.cpp", 23, 12, "StopReason.STEP", "StepKind.VERTICAL_FORWARD", []]36// CHECK-NEXT:.   .   .   [2, "c(int)", "{{.*}}dex_step_function.cpp", 12, 3, "StopReason.BREAKPOINT", "StepKind.FUNC", []]37// CHECK-NEXT:.   .   .   [3, "c(int)", "{{.*}}dex_step_function.cpp", 13, 3, "StopReason.STEP", "StepKind.VERTICAL_FORWARD", []]38// CHECK-NEXT:.   [4, "a(int)", "{{.*}}dex_step_function.cpp", 23, 3, "StopReason.STEP", "StepKind.HORIZONTAL_BACKWARD", []]39// CHECK-NEXT: ## END (5 steps) ##40