llvm-project/lldb/test/Shell/Commands/command-stop-hook-output.test
Jim Ingham 1b1d981598 Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""
This reverts commit f775fe59640a2e837ad059a8f40e26989d4f9831.

I fixed a return type error in the original patch that was causing a test failure.
Also added a REQUIRES: python to the shell test so we'll skip this for
people who build lldb w/o Python.
Also added another test for the error printing.
2020-09-29 12:01:14 -07:00

20 lines
533 B
Plaintext

# REQUIRES: python
# RUN: %clang_host -g %S/Inputs/main.c -o %t
# RUN: %lldb %t -O 'command script import %S/Inputs/stop_hook.py' -s %s -o exit | FileCheck %s
b main
# CHECK-LABEL: b main
# CHECK: Breakpoint 1: where = {{.*}}`main
target stop-hook add -P stop_hook.stop_handler
# CHECK-LABEL: target stop-hook add -P stop_hook.stop_handler
# CHECK: Stop hook #1 added.
run
# CHECK-LABEL: run
# CHECK: I did indeed run
# CHECK: Process {{.*}} stopped
# CHECK: stop reason = breakpoint 1
# CHECK: frame #0: {{.*}}`main at main.c