
Initially suggested in https://github.com/llvm/llvm-project/pull/149305#issuecomment-3113413702 - this PR adds the setting `plugin.symbol-file.pdb.use-native-reader`. It doesn't remove support for `LLDB_USE_NATIVE_PDB_READER` to allow some backwards compatibility. This was the suggested way to use the native reader - changing that would mean users who set this, now use the DIA reader. The setting has priority over the environment variable, though. If the default gets flipped on Windows, the environment variable could probably be removed as well. This would make it possible to test both native PDB and DIA PDB in the API tests (see linked PR).
53 lines
2.2 KiB
C++
53 lines
2.2 KiB
C++
// REQUIRES: target-windows
|
|
|
|
// Test plugin.symbol-file.pdb.reader setting
|
|
// RUN: %build -o %t.exe -- %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb %t.exe -o 'target modules dump symfile' | FileCheck --check-prefix=ENV0 %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb %t.exe -o 'target modules dump symfile' | FileCheck --check-prefix=ENV1 %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb \
|
|
// RUN: -o 'settings set plugin.symbol-file.pdb.reader dia' \
|
|
// RUN: -o 'target create %t.exe' \
|
|
// RUN: -o 'target modules dump symfile' \
|
|
// RUN: | FileCheck --check-prefix=ENV0-SET-DIA %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb \
|
|
// RUN: -o 'settings set plugin.symbol-file.pdb.reader dia' \
|
|
// RUN: -o 'target create %t.exe' \
|
|
// RUN: -o 'target modules dump symfile' \
|
|
// RUN: | FileCheck --check-prefix=ENV1-SET-DIA %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb \
|
|
// RUN: -o 'settings set plugin.symbol-file.pdb.reader native' \
|
|
// RUN: -o 'target create %t.exe' \
|
|
// RUN: -o 'target modules dump symfile' \
|
|
// RUN: | FileCheck --check-prefix=ENV0-SET-NATIVE %s
|
|
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb \
|
|
// RUN: -o 'settings set plugin.symbol-file.pdb.reader native' \
|
|
// RUN: -o 'target create %t.exe' \
|
|
// RUN: -o 'target modules dump symfile' \
|
|
// RUN: | FileCheck --check-prefix=ENV1-SET-NATIVE %s
|
|
|
|
// ENV0: (lldb) target modules dump symfile
|
|
// ENV0: Dumping debug symbols for 1 modules.
|
|
// ENV0: SymbolFile pdb
|
|
|
|
// ENV1: (lldb) target modules dump symfile
|
|
// ENV1: Dumping debug symbols for 1 modules.
|
|
// ENV1: SymbolFile native-pdb
|
|
|
|
// ENV0-SET-DIA: (lldb) target modules dump symfile
|
|
// ENV0-SET-DIA: Dumping debug symbols for 1 modules.
|
|
// ENV0-SET-DIA: SymbolFile pdb
|
|
|
|
// ENV1-SET-DIA: (lldb) target modules dump symfile
|
|
// ENV1-SET-DIA: Dumping debug symbols for 1 modules.
|
|
// ENV1-SET-DIA: SymbolFile pdb
|
|
|
|
// ENV0-SET-NATIVE: (lldb) target modules dump symfile
|
|
// ENV0-SET-NATIVE: Dumping debug symbols for 1 modules.
|
|
// ENV0-SET-NATIVE: SymbolFile native-pdb
|
|
|
|
// ENV1-SET-NATIVE: (lldb) target modules dump symfile
|
|
// ENV1-SET-NATIVE: Dumping debug symbols for 1 modules.
|
|
// ENV1-SET-NATIVE: SymbolFile native-pdb
|
|
|
|
int main() {}
|