Skip to content

Commit 62ac791

Browse files
committed
[lldb][test] TestExprLanguageNote.test: require LLD on Windows
Otherwise debug-info is stripped, which influences the language of the current frame. Also, set explicit breakpoint because Windows seems to not obey the debugtrap. Log from failing test on Windows: ``` (lldb) command source -s 0 'lit-lldb-init-quiet' Executing commands in 'D:\test\lit-lldb-init-quiet'. (lldb) command source -C --silent-run true lit-lldb-init (lldb) target create "main.out" Current executable set to 'D:\test\main.out' (x86_64). (lldb) settings set interpreter.stop-command-source-on-error false (lldb) command source -s 0 'with-target.input' Executing commands in 'D:\test\with-target.input'. (lldb) expr blah ^ error: use of undeclared identifier 'blah' note: Falling back to default language. Ran expression as 'Objective C++'. (lldb) run Process 29404 launched: 'D:\test\main.out' (x86_64) Process 29404 stopped * thread #1, stop reason = Exception 0x80000003 encountered at address 0x7ff7b3df7189 frame #0: 0x00007ff7b3df718a main.out -> 0x7ff7b3df718a: xorl %eax, %eax 0x7ff7b3df718c: popq %rcx 0x7ff7b3df718d: retq 0x7ff7b3df718e: int3 (lldb) expr blah ^ error: use of undeclared identifier 'blah' note: Falling back to default language. Ran expression as 'Objective C++'. (lldb) expr -l objc -- blah ^ error: use of undeclared identifier 'blah' note: Expression evaluation in pure Objective-C not supported. Ran expression as 'Objective C++'. (lldb) expr -l c -- blah ^ error: use of undeclared identifier 'blah' note: Expression evaluation in pure C not supported. Ran expression as 'ISO C++'. ```
1 parent 706ffa1 commit 62ac791

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/test/Shell/Expr/TestExprLanguageNote.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# REQUIRES: (system-windows && lld) || !system-windows
2+
13
# RUN: split-file %s %t
24
# RUN: %clang_host -g %t/main.cpp -o %t.out
35
#
@@ -11,7 +13,7 @@
1113

1214
int main() {
1315
int x = 10;
14-
__builtin_debugtrap();
16+
return x;
1517
}
1618

1719
#--- with-target.input
@@ -21,6 +23,7 @@ expr blah
2123
# CHECK-TARGET: (lldb) expr
2224
# CHECK-TARGET: note: Falling back to default language. Ran expression as 'Objective C++'.
2325

26+
b 4
2427
run
2528

2629
expr blah

0 commit comments

Comments
 (0)