Index: lldb/include/lldb/Target/Process.h =================================================================== --- lldb/include/lldb/Target/Process.h +++ lldb/include/lldb/Target/Process.h @@ -696,6 +696,9 @@ virtual JITLoaderList &GetJITLoaders(); public: + /// Get the system architecture for this process. + virtual ArchSpec GetSystemArchitecture(); + /// Get the system runtime plug-in for this process. /// /// \return Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -70,6 +70,8 @@ static std::chrono::seconds GetPacketTimeout(); + ArchSpec GetSystemArchitecture() override; + // Check if a given Process bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override; Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -208,6 +208,10 @@ return std::chrono::seconds(GetGlobalPluginProperties().GetPacketTimeout()); } +ArchSpec ProcessGDBRemote::GetSystemArchitecture() { + return m_gdb_comm.GetHostArchitecture(); +} + bool ProcessGDBRemote::CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) { if (plugin_specified_by_name) Index: lldb/source/Target/Process.cpp =================================================================== --- lldb/source/Target/Process.cpp +++ lldb/source/Target/Process.cpp @@ -2650,6 +2650,10 @@ return *m_jit_loaders_up; } +ArchSpec Process::GetSystemArchitecture() { + return HostInfo::GetArchitecture(); +} + SystemRuntime *Process::GetSystemRuntime() { if (!m_system_runtime_up) m_system_runtime_up.reset(SystemRuntime::FindPlugin(this));