[Lldb-commits] [PATCH] D155135: [lldb][LocateModuleCallback] Fix LocateModuleCallbackTest
Kazuki Sakamoto via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 12 16:02:44 PDT 2023
splhack created this revision.
splhack added reviewers: clayborg, jingham, bulbazord, jasonmolenda, JDevlieghere, mib.
Herald added a project: All.
splhack requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
D153734 <https://reviews.llvm.org/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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155135
Files:
lldb/unittests/Target/LocateModuleCallbackTest.cpp
Index: lldb/unittests/Target/LocateModuleCallbackTest.cpp
===================================================================
--- lldb/unittests/Target/LocateModuleCallbackTest.cpp
+++ 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 @@
class LocateModuleCallbackTest : public testing::Test {
SubsystemRAII<FileSystem, HostInfo, ObjectFileBreakpad, ObjectFileELF,
- PlatformAndroid, SymbolFileBreakpad, SymbolFileSymtab>
+ PlatformAndroid, PlatformLinux, SymbolFileBreakpad,
+ SymbolFileSymtab>
subsystems;
public:
@@ -202,6 +204,9 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155135.539780.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230712/145fd5af/attachment-0001.bin>
More information about the lldb-commits
mailing list