[Lldb-commits] [PATCH] D60962: [NativePDB] Extend .pdb files search folders

Mikhail Senkov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 23 05:50:55 PDT 2019


zloyrobot updated this revision to Diff 196226.
zloyrobot added a comment.

Add test case for searching .pdb file in the same folder as .exe file


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60962/new/

https://reviews.llvm.org/D60962

Files:
  lldb/lit/SymbolFile/NativePDB/pdb-file-lookup.cpp


Index: lldb/lit/SymbolFile/NativePDB/pdb-file-lookup.cpp
===================================================================
--- /dev/null
+++ lldb/lit/SymbolFile/NativePDB/pdb-file-lookup.cpp
@@ -0,0 +1,31 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can find .pdb file in _NT_SYMBOL_PATH folder. 
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s 
+// RUN: mkdir -p %t
+// RUN: mv %t.pdb %t/pdb-file-lookup.cpp.tmp.pdb
+// RUN: env _NT_SYMBOL_PATH=%t LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN:     %p/Inputs/pdb-file-lookup.lldbinit | FileCheck %s
+//
+// Test that we can find .pdb file in folder containing .exe file.
+// RUN: mv %t.exe %t/pdb-file-lookup.cpp.tmp.exe
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f \
+// RUN:     %t/pdb-file-lookup.cpp.tmp.exe -s \
+// RUN:     %p/Inputs/pdb-file-lookup.lldbinit | FileCheck %s
+
+
+
+int main(int argc, char **argv) {
+  // Here are some comments.
+  return 0;
+}
+
+// CHECK: (lldb) source list -n main
+// CHECK: File: {{.*}}pdb-file-lookup.cpp
+// CHECK:    18
+// CHECK:    19   int main(int argc, char **argv) {
+// CHECK:    20     // Here are some comments.
+// CHECK:    21     return 0;
+// CHECK:    22   }
+// CHECK:    23


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60962.196226.patch
Type: text/x-patch
Size: 1243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190423/db364f22/attachment.bin>


More information about the lldb-commits mailing list