diff options
Diffstat (limited to 'lldb/lit')
3 files changed, 45 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp b/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp new file mode 100644 index 00000000000..54d54c0d56a --- /dev/null +++ b/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp @@ -0,0 +1,15 @@ +int g_var = 2222; + +void __fastcall foo(short arg_0, float arg_1) { + char loc_0 = 'x'; + double loc_1 = 0.5678; +} + +int main(int argc, char *argv[]) { + bool loc_0 = true; + int loc_1 = 3333; + + foo(1111, 0.1234); + + return 0; +} diff --git a/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.script b/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.script new file mode 100644 index 00000000000..7058f29ae1c --- /dev/null +++ b/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.script @@ -0,0 +1,16 @@ +breakpoint set --file VariablesLocationsTest.cpp --line 6 + +run + +target variable g_var + +frame variable arg_0 +frame variable arg_1 + +frame variable loc_0 +frame variable loc_1 + +frame select 1 + +frame variable loc_0 +frame variable loc_1 diff --git a/lldb/lit/SymbolFile/PDB/variables-locations.test b/lldb/lit/SymbolFile/PDB/variables-locations.test new file mode 100644 index 00000000000..b70339fa23a --- /dev/null +++ b/lldb/lit/SymbolFile/PDB/variables-locations.test @@ -0,0 +1,14 @@ +REQUIRES: windows +RUN: clang-cl /Zi %S/Inputs/VariablesLocationsTest.cpp /o %t.exe +RUN: %lldb -b -s %S/Inputs/VariablesLocationsTest.script -- %t.exe | FileCheck %s + +CHECK: g_var = 2222 + +CHECK: arg_0 = 1111 +CHECK: arg_1 = 0.123 + +CHECK: loc_0 = 'x' +CHECK: loc_1 = 0.567 + +CHECK: loc_0 = true +CHECK: loc_1 = 3333 |

