Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions lldb/test/Shell/SymbolFile/PDB/pointers.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,44 @@ REQUIRES: target-windows, msvc
RUN: mkdir -p %t.dir
RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%t.dir/PointerTypeTest.cpp.obj %S/Inputs/PointerTypeTest.cpp
RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%t.dir/PointerTypeTest.cpp.exe %t.dir/PointerTypeTest.cpp.obj
RUN: lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck %s
RUN: lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-F %s
RUN: lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST %s
RUN: lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN %s
RUN: lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=F %s

RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck %s
RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-INT %s
RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-FN %s
RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN %s
RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=F %s

RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck %s
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-INT %s
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-FN %s
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN %s
RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %t.dir/PointerTypeTest.cpp.exe | FileCheck --check-prefix=F %s

CHECK: Module [[MOD:.*]]
CHECK: {{^[0-9A-F]+}}: CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\PointerTypeTest.cpp'

MAIN-ST-F: name = "f"
MAIN-ST-F-SAME: decl = PointerTypeTest.cpp:8
MAIN-ST-F-SAME: compiler_type = {{.*}} int (int)
MAIN-ST-INT-LABEL: name = "ST", size = 4, decl = PointerTypeTest.cpp:6, compiler_type = {{.*}} struct ST {
MAIN-ST-INT: int a;
MAIN-ST-INT-LABEL:}

MAIN-ST: name = "ST", size = 4, decl = PointerTypeTest.cpp:6, compiler_type = {{.*}} struct ST {
MAIN-ST-NEXT: int a;
MAIN-ST-NEXT: int {{.*}}f(int);
MAIN-ST-NEXT:}
MAIN-ST-FN-LABEL: name = "ST", size = 4, decl = PointerTypeTest.cpp:6, compiler_type = {{.*}} struct ST {
MAIN-ST-FN: int {{.*}}f(int);
MAIN-ST-FN-LABEL:}

MAIN: Function{[[FID1:.*]]}, mangled = {{_?}}main
MAIN: Function{[[FID1:.*]]}, {{(de)?}}mangled = {{_?}}main
MAIN-NEXT: Block{[[FID1]]}
MAIN: Variable{{.*}}, name = "array_pointer"
MAIN-SAME: (int (*)[2][4]), scope = local
MAIN: Variable{{.*}}, name = "p_int"
MAIN-SAME: (int *), scope = local
MAIN: Variable{{.*}}, name = "p_member_field"
MAIN-SAME: (int ST::*), scope = local
MAIN-SAME: (int {{(`extern "C" main'::`2'::)?}}ST::*), scope = local
MAIN: Variable{{.*}}, name = "p_member_method"
MAIN-SAME: (int (ST::*)(int){{( __attribute__\(\(thiscall\)\))?}}), scope = local
MAIN-SAME: (int ({{(`extern "C" main'::`2'::)?}}ST::*)(int){{( __attribute__\(\(thiscall\)\))?}}), scope = local

F: Function{[[FID2:.*]]}, demangled = {{.*}}f(int)
F: Function{[[FID2:.*]]}, demangled = {{.*}}main::ST::f
F-NEXT: Block{[[FID2]]}
F: Variable{{.*}}, name = "this"
F-SAME: (ST *), scope = parameter, location = {{(DW_OP.*)|(<empty>)}}, artificial
F-SAME: ({{(`extern "C" main'::`2'::)?}}ST *), scope = parameter, location = {{DW_OP|<empty>|0x00000000}}
F: Variable{{.*}}, name = "x"
F-SAME: (int), scope = parameter, decl = PointerTypeTest.cpp:8
F-SAME: (int), scope = parameter{{(, decl = PointerTypeTest.cpp:8)?}}
Loading