brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 33b02e2 Raw
37 lines · plain
1REQUIRES: target-windows, msvc2RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe %S/Inputs/ExpressionsTest.cpp3RUN: env LLDB_USE_NATIVE_PDB_READER=0 not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s4RUN: env LLDB_USE_NATIVE_PDB_READER=1 not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s5 6// Check the variable value through `expression`7CHECK: (lldb) expression result8CHECK: (char) $0 = '\x1c'9 10// Call the function just like in the code11CHECK: (lldb) expression N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1))12CHECK: (char) $1 = '\x1c'13 14// Try the relaxed namespaces search15CHECK: (lldb) expression N1::sum(N1::buf1, sizeof(N1::buf1))16CHECK: (char) $2 = '\x1c'17 18// Try the relaxed variables and functions search19CHECK: (lldb) expression sum(buf1, sizeof(buf1))20CHECK: (char) $3 = '\x1c'21 22// Make a crash during expression calculation23CHECK: (lldb) expression sum(buf1, 1000000000)24CHECK: The process has been returned to the state before expression evaluation.25 26// Make one more crash27CHECK: (lldb) expression sum(buf0, 1)28CHECK: The process has been returned to the state before expression evaluation.29 30// Check if the process state was restored succesfully31CHECK: (lldb) expression sum(buf0, result - 28)32CHECK: (char) $4 = '\0'33 34// Call the function with arbitrary parameters35CHECK: (lldb) expression sum(buf1 + 3, 3)36CHECK: (char) $5 = '\f'37