-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[LLDB][PDB] Explicitly set DIA plugin in unit test #165592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-lldb Author: nerix (Nerixyz) ChangesFixes the failing DIA unit test (https://lab.llvm.org/buildbot/#/builders/197/builds/10342) after #165363. Now that the native plugin is the default, we need to set the symbol file plugin for DIA via the settings. Full diff: https://github.com/llvm/llvm-project/pull/165592.diff 2 Files Affected:
diff --git a/lldb/unittests/SymbolFile/PDB/CMakeLists.txt b/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
index 8edb352e5a3e1..0bd90fe90d88b 100644
--- a/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
+++ b/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
@@ -9,6 +9,7 @@ add_lldb_unittest(SymbolFilePDBTests
lldbHost
lldbSymbol
lldbPluginObjectFilePECOFF
+ lldbPluginPlatformWindows
lldbPluginSymbolFileDWARF
lldbPluginSymbolFilePDB
lldbPluginTypeSystemClang
diff --git a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
index 858aecd1b9798..90cd4d568f524 100644
--- a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
+++ b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
@@ -16,11 +16,13 @@
#include "llvm/Testing/Support/Error.h"
#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
+#include "Plugins/Platform/Windows/PlatformWindows.h"
#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
#include "Plugins/SymbolFile/PDB/SymbolFilePDB.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "TestingSupport/TestUtilities.h"
#include "lldb/Core/Address.h"
+#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Host/FileSystem.h"
@@ -59,6 +61,13 @@ class SymbolFilePDBTests : public testing::Test {
m_pdb_test_exe = GetInputFilePath("test-pdb.exe");
m_types_test_exe = GetInputFilePath("test-pdb-types.exe");
+
+ ArchSpec arch("x86_64-pc-windows-msvc");
+ Platform::SetHostPlatform(PlatformWindows::CreateInstance(true, &arch));
+ m_debugger_sp = Debugger::CreateInstance();
+ m_debugger_sp->SetPropertyValue(nullptr,
+ lldb_private::eVarSetOperationAssign,
+ "plugin.symbol-file.pdb.reader", "dia");
}
void TearDown() override {
@@ -77,6 +86,7 @@ class SymbolFilePDBTests : public testing::Test {
protected:
std::string m_pdb_test_exe;
std::string m_types_test_exe;
+ lldb::DebuggerSP m_debugger_sp;
bool FileSpecMatchesAsBaseOrFull(const FileSpec &left,
const FileSpec &right) const {
|
|
I'm not sure what to do about the other API test ( |
I'd suggest opening a PR that just XFAILs/skips the test on Windows |
Fixes the failing DIA unit test (https://lab.llvm.org/buildbot/#/builders/197/builds/10342) after llvm#165363. Now that the native plugin is the default, we need to set the symbol file plugin for DIA via the settings.
Fixes the failing DIA unit test (https://lab.llvm.org/buildbot/#/builders/197/builds/10342) after llvm#165363. Now that the native plugin is the default, we need to set the symbol file plugin for DIA via the settings.
Fixes the failing DIA unit test (https://lab.llvm.org/buildbot/#/builders/197/builds/10342) after #165363.
Now that the native plugin is the default, we need to set the symbol file plugin for DIA via the settings.