static lldb::PlatformSP GetHostPlatform();
static lldb::PlatformSP
- GetPlatformForArchitecture(const ArchSpec &arch, ArchSpec *platform_arch_ptr);
+ GetPlatformForArchitecture(const ArchSpec &arch,
+ const ArchSpec &process_host_arch = {},
+ ArchSpec *platform_arch_ptr = nullptr);
static const char *GetHostPlatformName();
static lldb::PlatformSP Create(ConstString name, Status &error);
static lldb::PlatformSP Create(const ArchSpec &arch,
+ const ArchSpec &process_host_arch,
ArchSpec *platform_arch_ptr, Status &error);
/// Augments the triple either with information from platform or the host
/// Get the platform's supported architectures in the order in which they
/// should be searched.
- virtual std::vector<ArchSpec> GetSupportedArchitectures() = 0;
+ virtual std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) = 0;
virtual size_t GetSoftwareBreakpointTrapOpcode(Target &target,
BreakpointSite *bp_site);
/// Lets a platform answer if it is compatible with a given architecture and
/// the target triple contained within.
virtual bool IsCompatibleArchitecture(const ArchSpec &arch,
+ const ArchSpec &process_host_arch,
bool exact_arch_match,
ArchSpec *compatible_arch_ptr);
if (!m_platform_name.empty()) {
platform_sp = Platform::Create(ConstString(m_platform_name.c_str()), error);
if (platform_sp) {
- if (platform_arch.IsValid() &&
- !platform_sp->IsCompatibleArchitecture(arch, false, &platform_arch)) {
+ if (platform_arch.IsValid() && !platform_sp->IsCompatibleArchitecture(
+ arch, {}, false, &platform_arch)) {
error.SetErrorStringWithFormatv("platform '{0}' doesn't support '{1}'",
platform_sp->GetPluginName(),
arch.GetTriple().getTriple());
}
}
} else if (arch.IsValid()) {
- platform_sp = Platform::Create(arch, &platform_arch, error);
+ platform_sp = Platform::Create(arch, {}, &platform_arch, error);
}
if (platform_sp) {
}
}
-std::vector<ArchSpec> PlatformFreeBSD::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformFreeBSD::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
if (m_remote_platform_sp)
- return m_remote_platform_sp->GetSupportedArchitectures();
+ return m_remote_platform_sp->GetSupportedArchitectures(process_host_arch);
return m_supported_architectures;
}
void GetStatus(Stream &strm) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override;
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
bool CanDebugProcess() override;
}
}
-std::vector<ArchSpec> PlatformLinux::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformLinux::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
if (m_remote_platform_sp)
- return m_remote_platform_sp->GetSupportedArchitectures();
+ return m_remote_platform_sp->GetSupportedArchitectures(process_host_arch);
return m_supported_architectures;
}
void GetStatus(Stream &strm) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override;
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override;
}
#endif
-std::vector<ArchSpec> PlatformAppleSimulator::GetSupportedArchitectures() {
+std::vector<ArchSpec> PlatformAppleSimulator::GetSupportedArchitectures(
+ const ArchSpec &process_host_arch) {
std::vector<ArchSpec> result(m_supported_triples.size());
llvm::transform(m_supported_triples, result.begin(),
[](llvm::StringRef triple) { return ArchSpec(triple); });
StreamString arch_names;
llvm::ListSeparator LS;
ArchSpec platform_arch;
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ for (const ArchSpec &arch : GetSupportedArchitectures({})) {
resolved_module_spec.GetArchitecture() = arch;
// Only match x86 with x86 and x86_64 with x86_64...
lldb_private::Target &target,
lldb_private::Status &error) override;
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
lldb_private::Status ResolveExecutable(
const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
return {};
}
-std::vector<ArchSpec> PlatformDarwinKernel::GetSupportedArchitectures() {
+std::vector<ArchSpec> PlatformDarwinKernel::GetSupportedArchitectures(
+ const ArchSpec &process_host_arch) {
std::vector<ArchSpec> result;
#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
ARMGetSupportedArchitectures(result);
llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules,
bool *did_create_ptr) override;
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
bool SupportsModules() override { return false; }
return {};
}
-std::vector<ArchSpec> PlatformMacOSX::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformMacOSX::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
std::vector<ArchSpec> result;
#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
// macOS for ARM64 support both native and translated x86_64 processes
return PlatformDarwin::GetFile(source, destination);
}
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
lldb_private::ConstString
GetSDKDirectory(lldb_private::Target &target) override;
return "Remote BridgeOS platform plug-in.";
}
-std::vector<ArchSpec> PlatformRemoteAppleBridge::GetSupportedArchitectures() {
+std::vector<ArchSpec> PlatformRemoteAppleBridge::GetSupportedArchitectures(
+ const ArchSpec &process_host_arch) {
return {ArchSpec("arm64-apple-bridgeos")};
}
llvm::StringRef GetDescription() override { return GetDescriptionStatic(); }
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
protected:
llvm::StringRef GetDeviceSupportDirectoryName() override;
return "Remote Apple TV platform plug-in.";
}
-std::vector<ArchSpec> PlatformRemoteAppleTV::GetSupportedArchitectures() {
+std::vector<ArchSpec> PlatformRemoteAppleTV::GetSupportedArchitectures(
+ const ArchSpec &process_host_arch) {
ArchSpec system_arch(GetSystemArchitecture());
const ArchSpec::Core system_core = system_arch.GetCore();
llvm::StringRef GetDescription() override { return GetDescriptionStatic(); }
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
protected:
llvm::StringRef GetDeviceSupportDirectoryName() override;
PlatformRemoteAppleWatch::PlatformRemoteAppleWatch()
: PlatformRemoteDarwinDevice() {}
-std::vector<ArchSpec> PlatformRemoteAppleWatch::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformRemoteAppleWatch::GetSupportedArchitectures(const ArchSpec &host_info) {
ArchSpec system_arch(GetSystemArchitecture());
const ArchSpec::Core system_core = system_arch.GetCore();
// lldb_private::Platform functions
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
protected:
llvm::StringRef GetDeviceSupportDirectoryName() override;
// the correct order) and see if we can find a match that way
StreamString arch_names;
llvm::ListSeparator LS;
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ ArchSpec process_host_arch;
+ for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
resolved_module_spec.GetArchitecture() = arch;
error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
nullptr, nullptr, nullptr);
return PlatformSP();
}
-std::vector<ArchSpec> PlatformRemoteMacOSX::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformRemoteMacOSX::GetSupportedArchitectures(const ArchSpec &host_info) {
// macOS for ARM64 support both native and translated x86_64 processes
std::vector<ArchSpec> result;
ARMGetSupportedArchitectures(result, llvm::Triple::MacOSX);
const lldb_private::UUID *uuid_ptr,
lldb_private::FileSpec &local_file) override;
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
protected:
llvm::StringRef GetDeviceSupportDirectoryName() override;
PlatformRemoteiOS::PlatformRemoteiOS()
: PlatformRemoteDarwinDevice() {}
-std::vector<ArchSpec> PlatformRemoteiOS::GetSupportedArchitectures() {
+std::vector<ArchSpec> PlatformRemoteiOS::GetSupportedArchitectures(
+ const ArchSpec &process_host_arch) {
std::vector<ArchSpec> result;
ARMGetSupportedArchitectures(result, llvm::Triple::IOS);
return result;
// lldb_private::PluginInterface functions
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
- std::vector<lldb_private::ArchSpec> GetSupportedArchitectures() override;
+ std::vector<lldb_private::ArchSpec> GetSupportedArchitectures(
+ const lldb_private::ArchSpec &process_host_arch) override;
protected:
bool CheckLocalSharedCache() const override;
}
}
-std::vector<ArchSpec> PlatformNetBSD::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformNetBSD::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
if (m_remote_platform_sp)
- return m_remote_platform_sp->GetSupportedArchitectures();
+ return m_remote_platform_sp->GetSupportedArchitectures(process_host_arch);
return m_supported_architectures;
}
void GetStatus(Stream &strm) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override;
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override;
}
}
-std::vector<ArchSpec> PlatformOpenBSD::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformOpenBSD::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
if (m_remote_platform_sp)
- return m_remote_platform_sp->GetSupportedArchitectures();
+ return m_remote_platform_sp->GetSupportedArchitectures(process_host_arch);
return m_supported_architectures;
}
void GetStatus(Stream &strm) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override;
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
bool CanDebugProcess() override;
return nullptr;
}
-std::vector<ArchSpec> PlatformQemuUser::GetSupportedArchitectures() {
+std::vector<ArchSpec>
+PlatformQemuUser::GetSupportedArchitectures(const ArchSpec &process_host_arch) {
llvm::Triple triple = HostInfo::GetArchitecture().GetTriple();
triple.setEnvironment(llvm::Triple::UnknownEnvironment);
triple.setArchName(GetGlobalProperties().GetArchitecture());
return HostInfo::GetUserIDResolver();
}
- std::vector<ArchSpec> GetSupportedArchitectures() override;
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
Debugger &debugger, Target &target,
lldb_private::Target *target,
lldb_private::Status &error) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override {
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override {
return m_supported_architectures;
}
// target, else use existing one
Status &error) override;
- std::vector<ArchSpec> GetSupportedArchitectures() override {
+ std::vector<ArchSpec>
+ GetSupportedArchitectures(const ArchSpec &process_host_arch) override {
return m_supported_architectures;
}
return platform_sp;
}
-PlatformSP Platform::Create(const ArchSpec &arch, ArchSpec *platform_arch_ptr,
- Status &error) {
+PlatformSP Platform::Create(const ArchSpec &arch,
+ const ArchSpec &process_host_arch,
+ ArchSpec *platform_arch_ptr, Status &error) {
lldb::PlatformSP platform_sp;
if (arch.IsValid()) {
// Scope for locker
// First try exact arch matches across all platforms already created
std::lock_guard<std::recursive_mutex> guard(GetPlatformListMutex());
for (const auto &platform_sp : GetPlatformList()) {
- if (platform_sp->IsCompatibleArchitecture(arch, true,
+ if (platform_sp->IsCompatibleArchitecture(arch, process_host_arch, true,
platform_arch_ptr))
return platform_sp;
}
// Next try compatible arch matches across all platforms already created
for (const auto &platform_sp : GetPlatformList()) {
- if (platform_sp->IsCompatibleArchitecture(arch, false,
- platform_arch_ptr))
+ if (platform_sp->IsCompatibleArchitecture(arch, process_host_arch,
+ false, platform_arch_ptr))
return platform_sp;
}
}
if (create_callback) {
platform_sp = create_callback(false, &arch);
if (platform_sp &&
- platform_sp->IsCompatibleArchitecture(arch, true,
+ platform_sp->IsCompatibleArchitecture(arch, process_host_arch, true,
platform_arch_ptr)) {
std::lock_guard<std::recursive_mutex> guard(GetPlatformListMutex());
GetPlatformList().push_back(platform_sp);
if (create_callback) {
platform_sp = create_callback(false, &arch);
if (platform_sp &&
- platform_sp->IsCompatibleArchitecture(arch, false,
- platform_arch_ptr)) {
+ platform_sp->IsCompatibleArchitecture(arch, process_host_arch,
+ false, platform_arch_ptr)) {
std::lock_guard<std::recursive_mutex> guard(GetPlatformListMutex());
GetPlatformList().push_back(platform_sp);
return platform_sp;
// architectures that we should be using (in the correct order) and see
// if we can find a match that way
ModuleSpec arch_module_spec(module_spec);
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ ArchSpec process_host_arch;
+ for (const ArchSpec &arch :
+ GetSupportedArchitectures(process_host_arch)) {
arch_module_spec.GetArchitecture() = arch;
error = ModuleList::GetSharedModule(arch_module_spec, exe_module_sp,
module_search_paths_ptr, nullptr,
// correct order) and see if we can find a match that way
StreamString arch_names;
llvm::ListSeparator LS;
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ ArchSpec process_host_arch;
+ for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
resolved_module_spec.GetArchitecture() = arch;
error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
module_search_paths_ptr, nullptr,
ArchSpec compatible_arch;
ArchSpec raw_arch(triple);
- if (!IsCompatibleArchitecture(raw_arch, false, &compatible_arch))
+ if (!IsCompatibleArchitecture(raw_arch, {}, false, &compatible_arch))
return raw_arch;
if (!compatible_arch.IsValid())
lldb::PlatformSP
Platform::GetPlatformForArchitecture(const ArchSpec &arch,
+ const ArchSpec &process_host_arch,
ArchSpec *platform_arch_ptr) {
lldb::PlatformSP platform_sp;
Status error;
if (arch.IsValid())
- platform_sp = Platform::Create(arch, platform_arch_ptr, error);
+ platform_sp =
+ Platform::Create(arch, process_host_arch, platform_arch_ptr, error);
return platform_sp;
}
/// Lets a platform answer if it is compatible with a given
/// architecture and the target triple contained within.
bool Platform::IsCompatibleArchitecture(const ArchSpec &arch,
+ const ArchSpec &process_host_arch,
bool exact_arch_match,
ArchSpec *compatible_arch_ptr) {
// If the architecture is invalid, we must answer true...
ArchSpec platform_arch;
auto match = exact_arch_match ? &ArchSpec::IsExactMatch
: &ArchSpec::IsCompatibleMatch;
- for (const ArchSpec &platform_arch : GetSupportedArchitectures()) {
+ for (const ArchSpec &platform_arch :
+ GetSupportedArchitectures(process_host_arch)) {
if ((arch.*match)(platform_arch)) {
if (compatible_arch_ptr)
*compatible_arch_ptr = platform_arch;
bool *did_create_ptr) {
// Get module information from a target.
ModuleSpec resolved_module_spec;
+ ArchSpec process_host_arch;
bool got_module_spec = false;
if (process) {
+ process_host_arch = process->GetSystemArchitecture();
// Try to get module information from the process
if (process->GetModuleSpec(module_spec.GetFileSpec(),
module_spec.GetArchitecture(),
// architectures that we should be using (in the correct order) and see if
// we can find a match that way
ModuleSpec arch_module_spec(module_spec);
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
arch_module_spec.GetArchitecture() = arch;
error = ModuleList::GetSharedModule(arch_module_spec, module_sp, nullptr,
nullptr, nullptr);
// switch architectures.
PlatformSP platform_sp(GetTarget().GetPlatform());
assert(platform_sp);
+ ArchSpec process_host_arch = GetSystemArchitecture();
if (platform_sp) {
const ArchSpec &target_arch = GetTarget().GetArchitecture();
if (target_arch.IsValid() &&
- !platform_sp->IsCompatibleArchitecture(target_arch, false, nullptr)) {
+ !platform_sp->IsCompatibleArchitecture(target_arch, process_host_arch,
+ false, nullptr)) {
ArchSpec platform_arch;
- platform_sp =
- platform_sp->GetPlatformForArchitecture(target_arch, &platform_arch);
+ platform_sp = platform_sp->GetPlatformForArchitecture(
+ target_arch, process_host_arch, &platform_arch);
if (platform_sp) {
GetTarget().SetPlatform(platform_sp);
GetTarget().SetArchitecture(platform_arch);
// if we can find a match that way
StreamString arch_names;
llvm::ListSeparator LS;
- for (const ArchSpec &arch : GetSupportedArchitectures()) {
+ ArchSpec process_host_arch;
+ for (const ArchSpec &arch :
+ GetSupportedArchitectures(process_host_arch)) {
resolved_module_spec.GetArchitecture() = arch;
error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
module_search_paths_ptr, nullptr, nullptr);
if (other.IsValid()) {
auto platform_sp = GetPlatform();
if (!platform_sp ||
- !platform_sp->IsCompatibleArchitecture(other, false, nullptr)) {
+ !platform_sp->IsCompatibleArchitecture(other, {}, false, nullptr)) {
ArchSpec platform_arch;
auto arch_platform_sp =
- Platform::GetPlatformForArchitecture(other, &platform_arch);
+ Platform::GetPlatformForArchitecture(other, {}, &platform_arch);
if (arch_platform_sp) {
SetPlatform(arch_platform_sp);
if (platform_arch.IsValid())
// the selected platform otherwise.
if (platform_sp) {
if (platform_sp->IsCompatibleArchitecture(
- module_spec.GetArchitecture(), false, nullptr)) {
+ module_spec.GetArchitecture(), {}, false, nullptr)) {
platforms.push_back(platform_sp);
continue;
}
(!platform_sp ||
host_platform_sp->GetName() != platform_sp->GetName())) {
if (host_platform_sp->IsCompatibleArchitecture(
- module_spec.GetArchitecture(), false, nullptr)) {
+ module_spec.GetArchitecture(), {}, false, nullptr)) {
platforms.push_back(host_platform_sp);
continue;
}
// executable file.
PlatformSP fallback_platform_sp(
Platform::GetPlatformForArchitecture(
- module_spec.GetArchitecture(), nullptr));
+ module_spec.GetArchitecture()));
if (fallback_platform_sp) {
platforms.push_back(fallback_platform_sp);
}
// If we have a valid architecture, make sure the current platform is
// compatible with that architecture.
if (!prefer_platform_arch && arch.IsValid()) {
- if (!platform_sp->IsCompatibleArchitecture(arch, false, nullptr)) {
- platform_sp = Platform::GetPlatformForArchitecture(arch, &platform_arch);
+ if (!platform_sp->IsCompatibleArchitecture(arch, {}, false, nullptr)) {
+ platform_sp =
+ Platform::GetPlatformForArchitecture(arch, {}, &platform_arch);
if (platform_sp)
debugger.GetPlatformList().SetSelectedPlatform(platform_sp);
}
// If "arch" isn't valid, yet "platform_arch" is, it means we have an
// executable file with a single architecture which should be used.
ArchSpec fixed_platform_arch;
- if (!platform_sp->IsCompatibleArchitecture(platform_arch, false, nullptr)) {
- platform_sp = Platform::GetPlatformForArchitecture(platform_arch,
+ if (!platform_sp->IsCompatibleArchitecture(platform_arch, {}, false,
+ nullptr)) {
+ platform_sp = Platform::GetPlatformForArchitecture(platform_arch, {},
&fixed_platform_arch);
if (platform_sp)
debugger.GetPlatformList().SetSelectedPlatform(platform_sp);
if (arch.IsValid()) {
if (!platform_sp ||
- !platform_sp->IsCompatibleArchitecture(arch, false, nullptr))
- platform_sp = Platform::GetPlatformForArchitecture(specified_arch, &arch);
+ !platform_sp->IsCompatibleArchitecture(arch, {}, false, nullptr))
+ platform_sp =
+ Platform::GetPlatformForArchitecture(specified_arch, {}, &arch);
}
if (!platform_sp)
ASSERT_TRUE(platform_sp);
int num_arches = 0;
- for (auto arch : platform_sp->GetSupportedArchitectures()) {
+ for (auto arch : platform_sp->GetSupportedArchitectures({})) {
EXPECT_EQ(arch.GetTriple().getEnvironment(), llvm::Triple::Simulator);
num_arches++;
}
arch.GetTriple().setEnvironment(llvm::Triple::Simulator);
Status error;
- auto platform_sp = Platform::Create(arch, nullptr, error);
+ auto platform_sp = Platform::Create(arch, {}, nullptr, error);
EXPECT_TRUE(platform_sp);
}
}
MOCK_METHOD0(GetDescription, llvm::StringRef());
MOCK_METHOD0(GetPluginName, llvm::StringRef());
- MOCK_METHOD0(GetSupportedArchitectures, std::vector<ArchSpec>());
+ MOCK_METHOD1(GetSupportedArchitectures,
+ std::vector<ArchSpec>(const ArchSpec &process_host_arch));
MOCK_METHOD4(Attach,
ProcessSP(ProcessAttachInfo &, Debugger &, Target *, Status &));
MOCK_METHOD0(CalculateTrapHandlerSymbolNames, void());
MOCK_METHOD0(GetDescription, llvm::StringRef());
MOCK_METHOD0(GetPluginName, llvm::StringRef());
- MOCK_METHOD0(GetSupportedArchitectures, std::vector<ArchSpec>());
+ MOCK_METHOD1(GetSupportedArchitectures,
+ std::vector<ArchSpec>(const ArchSpec &process_host_arch));
MOCK_METHOD4(Attach,
ProcessSP(ProcessAttachInfo &, Debugger &, Target *, Status &));
MOCK_METHOD0(CalculateTrapHandlerSymbolNames, void());
ModuleSP expected_executable(new Module(executable_spec));
RemoteAwarePlatformTester platform(false);
- EXPECT_CALL(platform, GetSupportedArchitectures())
+ static const ArchSpec process_host_arch;
+ EXPECT_CALL(platform, GetSupportedArchitectures(process_host_arch))
.WillRepeatedly(Return(std::vector<ArchSpec>()));
EXPECT_CALL(platform, ResolveRemoteExecutable(_, _))
.WillRepeatedly(Return(std::make_pair(Status(), expected_executable)));