1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Multi-Source C Test
# Tests debugging across multiple source files
name: "C Multi-Source Project Test"
description: "Verifies debugging works with multi-file C projects"
setup:
# Compile multi-source project: all sources in single command
- shell: "gcc -g tests/fixtures/multi_source/main.c tests/fixtures/multi_source/utils.c -o tests/fixtures/multi_source/test_multi"
target:
program: "../fixtures/multi_source/test_multi"
stop_on_entry: true
steps:
# Set breakpoint in utils.c (separate file from main)
# Use function name since file paths can be tricky with relative resolution
- action: command
command: "break helper_add"
expect:
success: true
# Continue to breakpoint in helper function
- action: command
command: "continue"
# Should stop in utils.c at helper_add
- action: await
timeout: 10
expect:
reason: "breakpoint"
file: "utils.c"
line: 6
# Inspect locals in utils.c context
- action: inspect_locals
asserts:
- name: "a"
value: "5"
- name: "b"
value: "10"
# Inspect stack - should show main.c -> utils.c call chain
- action: inspect_stack
asserts:
- index: 0
function: "helper_add"
file: "utils.c"
- index: 1
function: "main"
file: "main.c"
# Continue to exit
- action: command
command: "continue"
- action: await
timeout: 10
expect:
reason: "exited"