3 // REQUIRES: target-windows
4 // RUN: %build --compiler=clang-cl -o %t.exe -- %s
5 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- write | FileCheck --check-prefix=WRITE %s
6 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- read | FileCheck --check-prefix=READ %s
10 int access_violation_write(void* addr
) {
16 int access_violation_read(void* addr
) {
17 volatile int ret
= *(int*)addr
;
21 int main(int argc
, char *argv
[]) {
25 if (strcmp(argv
[1], "write") == 0) {
26 return access_violation_write((void*)42);
28 if (strcmp(argv
[1], "read") == 0) {
29 return access_violation_read((void*)42);
35 // WRITE: * thread #1, stop reason = Exception 0xc0000005 encountered at address {{.*}}: Access violation writing location 0x0000002a
37 // READ: * thread #1, stop reason = Exception 0xc0000005 encountered at address {{.*}}: Access violation reading location 0x0000002a