brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 98a77ca Raw
77 lines · plain
1# RUN: %clang_host %p/Inputs/stop-hook.c -g -o %t2# Test setting stop-hook per-function3# RUN: %lldb -b -s %p/Inputs/stop-hook-1.lldbinit -s %s -f %t \4# RUN:      | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FUNC %s5# Test setting stop-hook per-line range6# RUN: %lldb -b -s %p/Inputs/stop-hook-2.lldbinit -s %s -f %t | FileCheck %s7# Test setting stop-hook with multi-line expression8# RUN: %lldb -b -s %p/Inputs/stop-hook-3.lldbinit -s %s -f %t | FileCheck %s9# This test is not "unsupported" on Windows, but it fails because "expr ptr"10# does not evaluate correctly. However, the error message contains the expected11# string, so the test "passes" despite the fact that the commands failed12# llvm.org/pr4011913# UNSUPPORTED: system-windows14 15break set -f stop-hook.c -p "// Set breakpoint here to test target stop-hook"16break set -f stop-hook.c -p "// Another breakpoint which is outside of the stop-hook range"17target stop-hook list18 19# CHECK: Hook: 120# CHECK-NEXT:  State: enabled21# CHECK-NEXT:  Specifier:22# CHECK-FUNC-NEXT:    Function: b.23# CHECK-NEXT:  Commands: 24# CHECK-NEXT:    expr ptr25 26target stop-hook disable27 28target stop-hook list29# CHECK: Hook: 130# CHECK-NEXT:  State: disabled31# CHECK-NEXT:  Specifier:32# CHECK-FUNC-NEXT:    Function: b.33# CHECK-NEXT:  Commands: 34# CHECK-NEXT:    expr ptr35 36target stop-hook enable37 38target stop-hook list39# CHECK: Hook: 140# CHECK-NEXT:  State: enabled41# CHECK-NEXT:  Specifier:42# CHECK-FUNC-NEXT:    Function: b.43# CHECK-NEXT:  Commands: 44# CHECK-NEXT:    expr ptr45 46run47# Stopping inside of the stop hook range48# CHECK: (lldb) run49# CHECK-NEXT: (void *) ${{.*}} = 0x50 51thread step-over52# Stepping inside of the stop hook range53# CHECK: (lldb) thread step-over54# CHECK-NEXT: (void *) ${{.*}} = 0x55# CHECK: ->{{.*}} // We should stop here after stepping.56 57process continue58# Stopping outside of the stop hook range59# CHECK: (lldb) process continue60# CHECK-NOT: (void *)61# CHECK: ->{{.*}} // Another breakpoint which is outside of the stop-hook range.62 63thread step-over64# Stepping inside of the stop hook range65# CHECK: (lldb) thread step-over66# CHECK-NOT: (void *)67 68settings set auto-confirm true69target stop-hook delete70 71target stop-hook list72# CHECK: (lldb) target stop-hook list73# CHECK-NOT: Hook: 174# CHECK: No stop hooks75# CHECK-NOT: Hook: 176 77