[Lldb-commits] [lldb] fb087c1 - [lldb][LocateModuleCallback] Fix LocateModuleCallbackTest
Kazuki Sakamoto via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 12 16:51:12 PDT 2023
Author: Kazuki Sakamoto
Date: 2023-07-12T16:49:45-07:00
New Revision: fb087c17c82309404fe0ebf3505c186642a719f7
URL: https://github.com/llvm/llvm-project/commit/fb087c17c82309404fe0ebf3505c186642a719f7
DIFF: https://github.com/llvm/llvm-project/commit/fb087c17c82309404fe0ebf3505c186642a719f7.diff
LOG: [lldb][LocateModuleCallback] Fix LocateModuleCallbackTest
D153734 forgot to call `Platform::SetHostPlatform` before
`Debugger::CreateInstance`. Copy similar code.
https://github.com/llvm/llvm-project/blob/5007c78ce0936824972ec6ba3cfa598192087ee1/lldb/unittests/Expression/DWARFExpressionTest.cpp#L371-L374
Differential Revision: https://reviews.llvm.org/D155135
Added:
Modified:
lldb/unittests/Target/LocateModuleCallbackTest.cpp
Removed:
################################################################################
diff --git a/lldb/unittests/Target/LocateModuleCallbackTest.cpp b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
index cd5eb4473473bb..42a0790bca58f2 100644
--- a/lldb/unittests/Target/LocateModuleCallbackTest.cpp
+++ b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
@@ -22,6 +22,7 @@
using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::platform_android;
+using namespace lldb_private::platform_linux;
using namespace lldb_private::breakpad;
using namespace testing;
@@ -190,7 +191,8 @@ ProcessSP MockProcessCreateInstance(TargetSP target_sp, ListenerSP listener_sp,
class LocateModuleCallbackTest : public testing::Test {
SubsystemRAII<FileSystem, HostInfo, ObjectFileBreakpad, ObjectFileELF,
- PlatformAndroid, SymbolFileBreakpad, SymbolFileSymtab>
+ PlatformAndroid, PlatformLinux, SymbolFileBreakpad,
+ SymbolFileSymtab>
subsystems;
public:
@@ -202,6 +204,9 @@ class LocateModuleCallbackTest : public testing::Test {
m_test_dir);
// Create Debugger.
+ ArchSpec host_arch("i386-pc-linux");
+ Platform::SetHostPlatform(
+ platform_linux::PlatformLinux::CreateInstance(true, &host_arch));
m_debugger_sp = Debugger::CreateInstance();
EXPECT_TRUE(m_debugger_sp);
More information about the lldb-commits
mailing list