Skip to content

Conversation

@Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Oct 29, 2025

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.

@Nerixyz Nerixyz requested a review from Michael137 October 29, 2025 16:34
@Nerixyz Nerixyz requested a review from JDevlieghere as a code owner October 29, 2025 16:34
@llvmbot llvmbot added the lldb label Oct 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 29, 2025

@llvm/pr-subscribers-lldb

Author: nerix (Nerixyz)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/165592.diff

2 Files Affected:

  • (modified) lldb/unittests/SymbolFile/PDB/CMakeLists.txt (+1)
  • (modified) lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp (+10)
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 {

@Nerixyz
Copy link
Contributor Author

Nerixyz commented Oct 29, 2025

I'm not sure what to do about the other API test (TestMultipleSlides.py). This fails because the native plugin sets the size of symbols to 0. However, the test shouldn't run with PDB in the first place.

@Michael137
Copy link
Member

I'm not sure what to do about the other API test (TestMultipleSlides.py). This fails because the native plugin sets the size of symbols to 0. However, the test shouldn't run with PDB in the first place.

I'd suggest opening a PR that just XFAILs/skips the test on Windows

@Nerixyz Nerixyz merged commit 957598f into llvm:main Oct 29, 2025
12 checks passed
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants