Files
Will Hawkins f5b9995172 [lldb] Fix Broken Test For Embedded Source in Binary (#197040)
A previous change to fix a regression when displaying source of programs
that embed their source code into their debugging information (using,
e.g., DW_LNCT_LLVM_source) should display included a test that was not
appropriately robust to all platforms.

Disable the regression on Windows systems and make the CHECKs robust
against output generated on different platforms.
2026-05-11 23:32:53 -05:00

32 lines
899 B
Plaintext

# Test automatically listing source on break for binary with embedded source.
# When a program with embedded source being debugged reaches a breakpoint, its
# source code should be listed. This test prevents a regression identified in #191801.
# UNSUPPORTED: system-windows
# RUN: split-file %s %t
# RUN: %clang_host -g -gdwarf-5 -gembed-source %t/main.c -o %t.out
# RUN: %lldb -x -b -s %t/commands %t.out -o exit 2>&1 \
# RUN: | FileCheck %s
#--- main.c
int main() {
return 0;
}
#--- commands
break set -n main
# CHECK-LABEL: break set -n main
# CHECK-NEXT: Breakpoint 1: where = {{.*}}`main
run
# CHECK-LABEL: run
# CHECK-NEXT: Process [[PID:.*]] launched
# CHECK-NEXT: Process [[PID]] stopped
# CHECK-NEXT: stop reason = breakpoint 1.1
# CHECK-NEXT: frame #0: {{.*}}`main at main.c:2:3
# CHECK-NEXT: 1 int main() {
# CHECK-NEXT: -> 2 return 0;
# CHECK-NEXT 3 }