name: "C Attach Process Test"
description: "Verifies debugger can attach to a running process and set breakpoints"
setup:
- shell: "gcc -g tests/fixtures/attach_target.c -o tests/fixtures/test_attach_c"
- shell: "timeout 30 tests/fixtures/test_attach_c > /tmp/attach_output.txt 2>&1 & echo $! > /tmp/attach_pid.txt"
- shell: "sleep 1"
target:
program: "../fixtures/test_attach_c"
mode: "attach"
pid_file: "/tmp/attach_pid.txt"
adapter: "lldb"
steps:
- action: command
command: "break tests/fixtures/attach_target.c:15"
expect:
success: true
- action: command
command: "continue"
- action: await
timeout: 10
expect:
reason: "breakpoint"
file: "attach_target.c"
line: 15